Hello,

yesterday I committed to git new feature that allow write access to branch attributes. It is about branches kept in core before TM takes over and creates the branches for transaction. These branches are filled when you do location lookup, alias db lookup or append_branch in route block.

You can update the attributes:
- r-uri
- outbound proxy address (dst uri)
- path
- q value
- local socket to be used for sending
- branch flags

More at:
http://sip-router.org/wiki/cookbooks/pseudo-variables/devel#branch_attributes

The access can be done with index, 0 is the first. Negative value of index starts counting from the last, therefore index -1 is the last branch. If the index is missing, then first branch is used.

Adding a new branch can be done with km_append_branch(...) of kex module or append_branch() functions. Dropping a branch is by assigning $null to uri attribute of branch.

Among benefits:
- drop invalid branches before creating the transaction
- you can lookup the aor from branches in location table, avoiding a loopback of a branch (e.g., for alias db case)

Cheers,
Daniel

--
Daniel-Constantin Mierla
* http://www.asipto.com/
* http://twitter.com/miconda
* http://www.linkedin.com/in/danielconstantinmierla


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to