Yep, I think you meant initial (regular) INVITEs, not reinvites. :-)

On 07/03/2016 09:32 PM, Jay Li wrote:
Hi Alex,

Thanks for the quick response. I believe I used the wrong terminology.
Your sample code looks like exactly what I'm looking for. Thanks.

Regards,
Jay


On Sunday, July 3, 2016 9:23 PM, Alex Balashov
<abalas...@evaristesys.com> wrote:


Are you sure "reinvite" is the correct term for what you are referring to?

A reinvite is an INVITE inside a dialog. A dialog only exists between
two parties. So, sending it to a different gateway than the one in
relation to which the dialog already exists is not going to work.

That said, you can always fork new branches in a failure_route:

route {
     ...

     t_on_failure("FAILURE");

     if(!t_relay())
       sl_reply_error();
}

failure_route[FAILURE] {
     if(t_is_canceled())
       exit;

     $ru = "<new destination>":

     t_on_failure("FAILURE");
     t_relay();
}

-- Alex

On 07/03/2016 09:14 PM, Jay Li wrote:

 > Dear All,
 >
 > Hopefully I'll be able to get some help here on re-INVITE in the failure
 > route. For example I have a couple of PSTN gateway options. I'd like to
 > try them by priorities. In case the one with top priority couldn't go
 > through(e.g. returned 5XX on INVITE), I'd like to re-INVITE through
 > another provider in the failure route. Not sure what I should do for
 > such cases. Thanks.
 >
 > Regards,
 > Jay

 >
 >
 > _______________________________________________
 > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 > sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org>
 > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 >


--
Alex Balashov | Principal | Evariste Systems LLC
1447 Peachtree Street NE, Suite 700
Atlanta, GA 30309
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/,
<http://www.evaristesys.com/,>http://www.csrpswitch.com/

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org>
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users





--
Alex Balashov | Principal | Evariste Systems LLC
1447 Peachtree Street NE, Suite 700
Atlanta, GA 30309
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to