[OpenSIPS-Devel] Usage of append_branch()

Donat Zenichev donat.zenichev at gmail.com
Wed Apr 17 05:28:45 EDT 2019


Hi community.
I have a question regarding usage of core function - append_branch().
It's pretty clear for me, what is a purpose of it, but I have a few tricky
questions regarding it.

First, how system behaves in case if I call append_branch() but don't make
any changes on R-URI of a paternal branch - branch[0] ?
What will happen when both branches reach t_relay() function?
Will OpenSIPS application get that those branches have the same INVITE
request, with completely similar destination URIs? And will it ignore
branch[1] since of that?
In case if not, will those INVITE requests from branch[0] and branch[1]
have different "branch=" values in the top most Via header (showing to
remote system that those two are different transactions) ?

Second question is, what if I manually set destination URI just before
calling append_branch():
$du = "sip:some.domain.com:5060" ;
append_branch();

Will the second branch ( branch[1] ) inherit the same destination URI?
Or will it set its own destination URI using R-URI it inherited from
branch[0] ?

Thanks for an answer in advance!


-- 
-- 
BR, Donat Zenichev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20190417/f9217f75/attachment.html>


More information about the Devel mailing list