<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi Tito,<br>
<br>
You do not have to add an additional t_relay(), just add the
"0x02" flag to your existing t_relay() in script.<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="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
<a class="moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
<div class="moz-cite-prefix">On 01/12/2018 09:35 AM, Tito Cumpen
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CANZPVB5+7-rFM_oppPF4eq86HYX0Btt2odu4UqwnbAsDHVZXEQ@mail.gmail.com">
<div dir="ltr">Bogdan,
<div><br>
</div>
<div><br>
The issue is I'm not sure where to enter the
t_relay("0x02"). I don't see it used in the standard relay
route examples. I tried putting it in my relay route like
this </div>
<div><br>
</div>
<div>
<div>route[relay] {</div>
<div> # for INVITEs enable some additional helper
routes</div>
<div> if (is_method("INVITE")) {</div>
<div><br>
</div>
<div>t_relay("0x02");</div>
<div><br>
</div>
<div> do_accounting("evi", "missed");</div>
<div> setflag(accounted);</div>
<div><br>
</div>
<div> t_on_branch("handle_nat");</div>
<div> t_on_reply("handle_nat");</div>
<div> t_on_failure("missed_call");</div>
<div> } else if (is_method("BYE|CANCEL")) {</div>
<div> rtpengine_delete();</div>
<div> }</div>
<div><br>
</div>
<div><br>
</div>
<div> if (!t_relay("3")) {</div>
<div><br>
</div>
<div>if (is_method("INVITE")){</div>
<div> </div>
<div><br>
</div>
<div> xlog("connection failure here at $rU\n");</div>
<div> # route(handletmfail) ;</div>
<div> # exit;</div>
<div>}</div>
<div>}</div>
<div> if (!t_relay()) {</div>
<div> xlog("failure sending call to $rU\n");</div>
<div> send_reply("500","Internal Error");</div>
<div> };</div>
<div> exit;</div>
<div>}</div>
<div><br>
</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>But it gets sent to the failure route prior to failing the
pending branch.</div>
<div><br>
</div>
<div>Thanks,<br>
Tito</div>
<div><br>
</div>
<div><br>
</div>
<div class="gmail_extra">
<div class="gmail_quote">On Tue, May 9, 2017 at 6:17 AM,
Bogdan-Andrei Iancu <span dir="ltr"><<a
href="mailto:bogdan@opensips.org" target="_blank"
moz-do-not-send="true">bogdan@opensips.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF"> <tt>Hi Tito,<br>
<br>
The 477 is locally generated by OpenSIPS prior to send
the the request out. This is why you cannot have in in
the failure route (which is triggered by the failure
of the transaction, AFTER the request was sent out).<br>
<br>
What you can do is to use the 2 flag for t_relay()
(see <a
class="gmail-m_8062212044147558505moz-txt-link-freetext"
href="http://www.opensips.org/html/docs/modules/2.3.x/tm.html#t_relay"
target="_blank" moz-do-not-send="true">http://www.opensips.org/html/<wbr>docs/modules/2.3.x/tm.html#t_<wbr>relay</a>)
and check in script for the failure of t_relay().<br>
<br>
Regards,<br>
</tt>
<pre class="gmail-m_8062212044147558505moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="gmail-m_8062212044147558505moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.<wbr>com</a>
OpenSIPS Summit May 2017 Amsterdam
<a class="gmail-m_8062212044147558505moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2017Amsterdam.html" target="_blank" moz-do-not-send="true">http://www.opensips.org/<wbr>events/Summit-2017Amsterdam.<wbr>html</a>
</pre>
<div>
<div class="gmail-h5">
<div
class="gmail-m_8062212044147558505moz-cite-prefix">On
05/01/2017 10:55 PM, Tito Cumpen wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="gmail-h5">
<div dir="ltr">
<div>Group,</div>
<div><br>
</div>
Is there a tm param to force 477 failures to go
to failure block ?
<div><br>
</div>
<div>IE: I have a wss socket that times out or
closes connection but the UL entry is still
active</div>
<div>so the connection attempt fails and the 477
is sent back to the UAC instead of trying the
logic in the failure block. Can anything be
done here ?</div>
<div><br>
</div>
<div><br>
Thanks,<br>
Tito</div>
<div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
<br>
<fieldset
class="gmail-m_8062212044147558505mimeAttachmentHeader"></fieldset>
<br>
</div>
</div>
<pre>______________________________<wbr>_________________
Users mailing list
<a class="gmail-m_8062212044147558505moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a class="gmail-m_8062212044147558505moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
<br>
</body>
</html>