<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1467594853945_16120"><span>Hi Alex,</span></div><div id="yui_3_16_0_ym19_1_1467594853945_16120"><span><br></span></div><div id="yui_3_16_0_ym19_1_1467594853945_16120" dir="ltr"><span id="yui_3_16_0_ym19_1_1467594853945_16230">Thanks for the quick response. I believe I used the wrong terminology. Your sample code looks like exactly what I'm looking for. Thanks.</span></div><div id="yui_3_16_0_ym19_1_1467594853945_16120" dir="ltr"><span><br></span></div><div id="yui_3_16_0_ym19_1_1467594853945_16120" dir="ltr"><span>Regards,</span></div><div id="yui_3_16_0_ym19_1_1467594853945_16120" dir="ltr"><span>Jay</span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> On Sunday, July 3, 2016 9:23 PM, Alex Balashov <abalashov@evaristesys.com> wrote:<br></font></div>  <br><br> <div class="y_msg_container">Are you sure "reinvite" is the correct term for what you are referring to?<br clear="none"><br clear="none">A reinvite is an INVITE inside a dialog. A dialog only exists between <br clear="none">two parties. So, sending it to a different gateway than the one in <br clear="none">relation to which the dialog already exists is not going to work.<br clear="none"><br clear="none">That said, you can always fork new branches in a failure_route:<br clear="none"><br clear="none">route {<br clear="none">    ...<br clear="none"><br clear="none">    t_on_failure("FAILURE");<br clear="none"><br clear="none">    if(!t_relay())<br clear="none">       sl_reply_error();<br clear="none">}<br clear="none"><br clear="none">failure_route[FAILURE] {<br clear="none">    if(t_is_canceled())<br clear="none">       exit;<br clear="none"><br clear="none">    $ru = "<new destination>":<br clear="none"><br clear="none">    t_on_failure("FAILURE");<br clear="none">    t_relay();<br clear="none">}<br clear="none"><br clear="none">-- Alex<br clear="none"><div class="yqt7346369117" id="yqtfd23745"><br clear="none">On 07/03/2016 09:14 PM, Jay Li wrote:<br clear="none"><br clear="none">> Dear All,<br clear="none">><br clear="none">> Hopefully I'll be able to get some help here on re-INVITE in the failure<br clear="none">> route. For example I have a couple of PSTN gateway options. I'd like to<br clear="none">> try them by priorities. In case the one with top priority couldn't go<br clear="none">> through(e.g. returned 5XX on INVITE), I'd like to re-INVITE through<br clear="none">> another provider in the failure route. Not sure what I should do for<br clear="none">> such cases. Thanks.<br clear="none">><br clear="none">> Regards,<br clear="none">> Jay</div><br clear="none">><br clear="none">><br clear="none">> _______________________________________________<br clear="none">> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br clear="none">> <a shape="rect" ymailto="mailto:sr-users@lists.sip-router.org" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br clear="none">> <a shape="rect" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br clear="none">><br clear="none"><br clear="none"><br clear="none">-- <br clear="none">Alex Balashov | Principal | Evariste Systems LLC<br clear="none">1447 Peachtree Street NE, Suite 700<br clear="none">Atlanta, GA 30309<br clear="none">United States<br clear="none"><br clear="none">Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)<br clear="none">Web: <a shape="rect" href="http://www.evaristesys.com/," target="_blank">http://www.evaristesys.com/, </a><a shape="rect" href="http://www.csrpswitch.com/" target="_blank">http://www.csrpswitch.com/</a><br clear="none"><br clear="none">_______________________________________________<br clear="none">SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br clear="none"><a shape="rect" ymailto="mailto:sr-users@lists.sip-router.org" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br clear="none"><a shape="rect" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><div class="yqt7346369117" id="yqtfd82005"><br clear="none"></div><br><br></div>  </div> </div>  </div></div></body></html>