<div dir="ltr"><div dir="ltr"><div dir="ltr">Bogdan,<div><br></div><div>Re awakening this question I have tried the following </div><div><br></div><div><div>route[fork_call] {</div><div> xlog("user $avp(aor) registered the a new contact $avp(uri), "</div><div> "injecting it in transaction with transport $avp(transport)\n");</div><div> xlog("destination protocol $var(transport) upstream ts $var(upstreamtransport) ");</div><div> # take the contact described by the E_UL_CONTACT_INSERT</div><div> # event and inject it as a new branch into the original transaction</div><div> t_on_reply("handle_nat");</div><div><span style="white-space:pre"> </span> if($avp(uri)=~"sip:(.+)@(.+);transport=tls"){</div><div><span style="white-space:pre"> </span> xlog("destination tls\n");</div><div><span style="white-space:pre"> </span>$var(rtpengine_flags) = "RTP/AVPF replace-session-connection replace-origin ICE=remove rtcp-mux-demux via-branch=1";</div><div><span style="white-space:pre"> </span>rtpengine_offer("$var(rtpengine_flags)");<span style="white-space:pre"> </span> <span style="white-space:pre"> </span></div><div>}</div><div> t_inject_branches("event");</div></div><div><br></div><div><br></div><div>The issue I have is grabbing the value of the remote request transport flag along with sending the offer to rtpengine which fails to acquire the call-id</div><div><br></div><div>ERROR:rtpengine:rtpe_function_call: can't get Call-Id field<br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 14, 2018 at 12:59 AM Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<tt>Hi Tito,<br>
<br>
The resume route has no context of the transaction, nor message
-> so the bflags are not available. Still, the event carries
all the information about the new branch to be injected, so you
can reach to the flags via the $avp(bflags) variables - this will
keep the bitmask with all the bflags. Unfortunately it will be
more or less useless as you do not know the index of the "DST_WS"
flag :(...<br>
<br>
Nevertheless, the consistent approach on the matter will be to
have the all the needed bflags already saved in the user location.<br>
<br>
Regards,<br>
</tt>
<pre class="m_954189589397438188moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="m_954189589397438188moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
<a class="m_954189589397438188moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam" target="_blank">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
<div class="m_954189589397438188moz-cite-prefix">On 05/02/2018 01:08 AM, Tito Cumpen
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Any idea why the branch flags wouldn't be passed on
to the branch route?
<div><br>
</div>
<div>Thanks,</div>
<div>Tito</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Apr 19, 2018 at 2:02 PM, Tito
Cumpen <span dir="ltr"><<a href="mailto:tito@xsvoce.com" target="_blank">tito@xsvoce.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>Bogdan,</div>
<div><br>
</div>
<div><br>
</div>
Once I declared the branch route it looks like it is going
through the branch route logic. The issue I have is
parsing the exported $avp(uri) for transport=ws and then
setting a branch flag that is kept from the event route
<div><br>
</div>
<div>
<div>route[fork_call] {</div>
<div> xlog("user $avp(aor) registered the a new
contact $avp(uri), "</div>
<div> "injecting it in transaction \n");</div>
<div> </div>
<div> $var(uri) = $avp(uri);</div>
<div> #if transport is ws then ;</div>
<div><span style="white-space:pre-wrap"> </span> <span style="white-space:pre-wrap"> </span>setbflag(DST_WS);
#this branch flag is not kept nor considered when
branch route is executed</div>
<div><br>
</div>
<div> t_inject_branches("event");</div>
<div> <span style="white-space:pre-wrap"> </span></div>
<div>}</div>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Tito</div>
</div>
<div class="m_954189589397438188HOEnZb">
<div class="m_954189589397438188h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Apr 19, 2018 at 3:23
AM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> <tt>Tito,<br>
<br>
Arming the branch route once, in the request
route, before the initial t_relay() should be
fine. Now, if you use any xlog() to check , is
the branch route triggered for the injected
branch ?<br>
<br>
Regards,<br>
</tt><span>
<pre class="m_954189589397438188m_-8719203841151150527m_5361345059415073310moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="m_954189589397438188m_-8719203841151150527m_5361345059415073310moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
<a class="m_954189589397438188m_-8719203841151150527m_5361345059415073310moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam" target="_blank">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
</span>
<div>
<div class="m_954189589397438188m_-8719203841151150527h5">
<div class="m_954189589397438188m_-8719203841151150527m_5361345059415073310moz-cite-prefix">On
04/18/2018 08:35 PM, Tito Cumpen wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Bogdan,
<div><br>
</div>
<div>The branch route is defined in my
my relay route. <a href="https://pastebin.com/MFcLxcDv" target="_blank">https://pastebin.com/MFcLxcDv</a>
Should it be defined in the event
route I figured since the original
transaction used the relay route it
would use the route defined there ?</div>
<div><br>
</div>
<div>Thanks,<br>
Tito</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Apr 18,
2018 at 9:32 AM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> <tt>Hi Tito,<br>
<br>
I see no branch route in your
script sample.<br>
<br>
Regards,<br>
</tt>
<pre class="m_954189589397438188m_-8719203841151150527m_5361345059415073310m_-6353185575792044713moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="m_954189589397438188m_-8719203841151150527m_5361345059415073310m_-6353185575792044713moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
<a class="m_954189589397438188m_-8719203841151150527m_5361345059415073310m_-6353185575792044713moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam" target="_blank">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
<div>
<div class="m_954189589397438188m_-8719203841151150527m_5361345059415073310h5">
<div class="m_954189589397438188m_-8719203841151150527m_5361345059415073310m_-6353185575792044713moz-cite-prefix">On
04/16/2018 09:37 PM, Tito
Cumpen wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="m_954189589397438188m_-8719203841151150527m_5361345059415073310h5">
<div dir="ltr">Group,
<div><br>
</div>
<div>I am having issues
when injecting a new
branch with rtpengine
flags to a call request
using the event routing
module. It seems like
when the branch is
injected it either does
not use any of the flags
to aid with rtpengine
media translation or
does not run through the
branch route block
defined in my relay
route at all.</div>
<div><br>
</div>
<div><a href="https://pastebin.com/u1EYzDe0" target="_blank">https://pastebin.com/u1EYzDe0</a><br>
</div>
<div><br>
</div>
<div>above is the route
that prepares injection
and transport priorities
along with the route
that gets called upon a
new registration. </div>
<div><br>
</div>
<div>Thanks,<br>
Tito</div>
</div>
<br>
<fieldset class="m_954189589397438188m_-8719203841151150527m_5361345059415073310m_-6353185575792044713mimeAttachmentHeader"></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
Users mailing list
<a class="m_954189589397438188m_-8719203841151150527m_5361345059415073310m_-6353185575792044713moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a class="m_954189589397438188m_-8719203841151150527m_5361345059415073310m_-6353185575792044713moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div>
</blockquote></div>