[sr-dev] [kamailio] append_branch add to branch route first R_URI twice (#72)

Daniel-Constantin Mierla notifications at github.com
Tue Feb 24 21:52:10 CET 2015


Be aware that r-uri (request uri, represented by $ru as var) it is itself a branch. Also $du (outbound proxy - destination uri) is associated with the $ru branch.

In the config snippet, you assign values to $du, that means you set the destination address for the branch of r-uri ($ru). because you only use append branch, you don't change the r-uri branch and that stays as extra branch with latest $du you set.

What you should do:
- if $var(i)==0 (the first row of the result) - set the $ru to the contact and the $du to received value
- if $var(i)!=0 (the next rows of the result) - do append_branch() with the contact and set the $(branch(dst_uri)[-1]) to received value

As a suggestion, you are using the string transformation to parse URI from database in order to get domain part, etc... you better use the uri transformation, because it is designed for this kind of need.

I am closing this here, such discussion has to be done on sr-users mailing list, follow up there if you need further assitance.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/72#issuecomment-75843183
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20150224/e7fd8c41/attachment.html>


More information about the sr-dev mailing list