[SR-Users] re-Invite in the failure route

Alex Balashov abalashov at evaristesys.com
Mon Jul 4 03:22:43 CEST 2016


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 at 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/



More information about the sr-users mailing list