<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi Donat,<br>
<br>
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.<br>
<br>
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).<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS Summit 2019
<a class="moz-txt-link-freetext" href="https://www.opensips.org/events/Summit-2019Amsterdam/">https://www.opensips.org/events/Summit-2019Amsterdam/</a>
</pre>
<div class="moz-cite-prefix">On 04/17/2019 12:28 PM, Donat Zenichev
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CANLwQCn5XDAYHu4g92q0AhTLM9O5-3m60Agtp6Ue4HJ7DpbSDw@mail.gmail.com">
<div dir="ltr">
<div>Hi community.</div>
<div>I have a question regarding usage of core function -
append_branch().</div>
<div>It's pretty clear for me, what is a purpose of it, but I
have a few tricky questions regarding it.</div>
<div><br>
</div>
<div>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] ?<br>
</div>
<div>What will happen when both branches reach t_relay()
function?</div>
<div>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?</div>
<div>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) ?<br>
</div>
<div><br>
</div>
<div>Second question is, what if I manually set destination URI
just before calling append_branch():<br>
</div>
<div>$du = "sip:<a href="http://some.domain.com:5060"
moz-do-not-send="true">some.domain.com:5060</a>" ;<br>
</div>
<div>append_branch();<br>
</div>
<div><br>
</div>
<div>Will the second branch ( branch[1] ) inherit the same
destination URI?</div>
<div>Or will it set its own destination URI using R-URI it
inherited from branch[0] ?</div>
<div><br>
</div>
<div>Thanks for an answer in advance!<br>
</div>
<div><br>
</div>
<div><br>
-- <br>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr"><font
style="background-color:rgb(255,255,255)"
color="#0b5394">-- <br>
BR, Donat Zenichev
<br>
<br>
</font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Devel@lists.opensips.org">Devel@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a>
</pre>
</blockquote>
<br>
</body>
</html>