[Users] Per-branch flags

Iqbal iqbal at gigo.co.uk
Fri Sep 2 21:41:16 CEST 2005

I am very GW focussed currently :-)


Bogdan-Andrei Iancu wrote:

> Hi Iqbal,
> that was an example to show the usage of the branch flags - it's not 
> quite a realistic scenario ;).
> there is a huge range of scenario you may find the branch flags useful 
> - typically parallel forking to destination that must be handled 
> differently (because of NAT, security, privacy, required extra 
> headers, etc)......so it;s not only about GW :)
> regards,
> bogdan
> Iqbal wrote:
>> So...I could send a call out to x number of pstn gateways, and then 
>> drop the ones I get a negative from, or just process the one which 
>> gives me the first reply, rather than sending out a requuest to one 
>> GW, waiting for reply, if negative sending to the next....or have I 
>> missed the point
>> Iqbal
>> Bogdan-Andrei Iancu wrote:
>>> Hi everybody,
>>> I just committed on CVS full support for per-branch flags.
>>> What's the difference between the flags we already have and these 
>>> new one? So far we ave in OpenSER flags that will be called "global" 
>>> flags - global because they were visible everywhere in the 
>>> transaction (in all routes and in all sequential replies/request). 
>>> The new flags, called "branch" flags are flags that will be visible 
>>> only for a specific branch - in all replies and routes connected to 
>>> this branch.
>>> For example: I have a call parallel forking to GW and to a user. And 
>>> I would like to know from which branch I will get the final negative 
>>> reply (if so). I will set a branch route before relaying the calls 
>>> (with the 2 branches). The branch route will be separately executed 
>>> for each branch; in the branch going to GW (I can identified it by 
>>> looking to RURI), I will set a branch flag. This flag will appear 
>>> only in the onreply route run for replied from GW. It will be also 
>>> be visible in failure route if the final elected reply belongs to 
>>> the GW branch. This flags will not be visible in the other branch 
>>> (in routes executing replies from the other branch).
>>> how to use it?
>>> The request flags may be split in two arrays - globals and branch 
>>> flags - by using the TM parameter "branch_flag_mask" (see 
>>> http://www.openser.org/docs/modules/0.10.x/tm.html#AEN268). Flags 
>>> covered by this mask will be processed as branch flags, the rest of 
>>> them as global flags.
>>> Also, modules may set branch flags before transaction creation (for 
>>> the moment this feature is not available in script). The REGISTRAR 
>>> module is the first to use this feature. If the "use_branch_flags" 
>>> param is enabled (see 
>>> http://www.openser.org/docs/modules/0.10.x/registrar.html#AEN236), 
>>> the NAT flag will be push in branch flags instead in message flags - 
>>> IMPORTANT: be sure that NAT flag is in the range of the branch flags 
>>> ad defined in TM. Using this, NAT traversal per branch may be 
>>> experimented....
>>> regards,
>>> bogdan
>>> _______________________________________________
>>> Users mailing list
>>> Users at openser.org
>>> http://openser.org/cgi-bin/mailman/listinfo/users
>>> .
> .

More information about the Users mailing list