<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">The onreply_route is never armed, but gets executed.</div><div class=""><br class=""></div><div class="">The failure_route[initial_request] is armed via t_on_failure("initial_request") and actually gets executed after the onreply_route (as per my last test).</div><div class=""><div class=""><div style="font: 8pt arial,sans-serif; color: #888; width: 680px" class="">
    </div>
</div>

</div>
<div class=""><br class=""></div><div class="">Can we stop the propagation of the 302 from within failure_route, or is it considered already sent after the execution of onreply_route?</div><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 7, 2017, at 8:12 PM, Alex Balashov <<a href="mailto:abalashov@evaristesys.com" class="">abalashov@evaristesys.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Don't arm the onreply_route. Doesn't the failure_route get called?<br class=""><br class="">On September 7, 2017 1:08:55 PM EDT, Blagovest Buyukliev <<a href="mailto:blagovest@voipfone.co.uk" class="">blagovest@voipfone.co.uk</a>> wrote:<br class=""><blockquote type="cite" class="">Which functions need to be used for that?<br class=""><br class="">The current routing logic is roughly what's listed below and the<br class="">problematic issues are commented.<br class=""><br class="">How can it be modified to accomplish what you've described?<br class=""><br class="">route {<br class="">   ...<br class="">   loose_route();<br class="">   record_route();<br class="">   t_on_failure("initial_request");<br class="">   t_relay();<br class=""><br class="">   # We are okay here, the initial INVITE is passed to a local server.<br class="">}<br class=""><br class="">onreply_route {<br class="">   if ($rs == 302) {<br class=""># The 302 is caught here, but we are pretty much handicapped to do<br class="">anything in this block.<br class=""># The response is passed back to the external network, which is<br class="">undesired.<br class="">   }<br class="">}<br class=""><br class="">failure_route[initial_request] {<br class=""># How can we arrive here right upon the receipt of the 302, not in<br class="">onreply_route?<br class="">}<br class=""><br class=""><blockquote type="cite" class="">On Sep 5, 2017, at 4:54 PM, Alex Balashov <<a href="mailto:abalashov@evaristesys.com" class="">abalashov@evaristesys.com</a>><br class=""></blockquote>wrote:<br class=""><blockquote type="cite" class=""><br class="">Yes, failure_route is the answer to all your objectives here. You can<br class="">intercept the 302, extract what you want from it, create a new branch<br class="">and fork the call elsewhere.<br class=""><br class="">-- <br class="">Alex Balashov | Principal | Evariste Systems LLC<br class=""><br class="">Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) <br class="">Web: <a href="http://www.evaristesys.com/" class="">http://www.evaristesys.com/</a>, <a href="http://www.csrpswitch.com/" class="">http://www.csrpswitch.com/</a><br class=""><br class="">_______________________________________________<br class="">Users mailing list<br class=""><a href="mailto:Users@lists.opensips.org" class="">Users@lists.opensips.org</a><br class="">http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br class=""></blockquote></blockquote><br class="">-- Alex<br class=""><br class="">--<br class="">Sent via mobile, please forgive typos and brevity. <br class=""><br class="">_______________________________________________<br class="">Users mailing list<br class=""><a href="mailto:Users@lists.opensips.org" class="">Users@lists.opensips.org</a><br class="">http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br class=""></div></div></blockquote></div><br class=""></body></html>