[OpenSIPS-Devel] Usage of append_branch()
Bogdan-Andrei Iancu
bogdan at opensips.org
Fri Apr 19 02:38:47 EDT 2019
Hi Donat,
append_branch() simply copies the current RURI (and its related
attributes) as a new branch. So an append_branch() without any RURI
modification will create a new branch identical (as destination and SIP
properties) to the RURI - still there are 2 different branches, so
different VIA branch params.
D-URI is an attribute of RURI (it's its outbound proxy). If you change
$du before append_branch() you will create an identical branch (as RURI
and others), but with a different outbound proxy (destination to send to).
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
https://www.opensips-solutions.com
OpenSIPS Summit 2019
https://www.opensips.org/events/Summit-2019Amsterdam/
On 04/17/2019 12:28 PM, Donat Zenichev wrote:
> 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 <http://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
>
>
>
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20190419/84ba75af/attachment.html>
More information about the Devel
mailing list