[Devel] Per-branch flags

Bogdan-Andrei Iancu bogdan at voice-system.ro
Fri Sep 2 20:44:11 CEST 2005


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



More information about the Devel mailing list