Thank you.


> To: sr-users@lists.sip-router.org
> From: abalashov@evaristesys.com
> Date: Mon, 28 Mar 2016 15:27:14 -0400
> Subject: Re: [SR-Users] Timeout Handling (update)
>
> Hello,
>
> You cannot handle SIP eventualities by checking the return value of
> t_relay(); a call to t_relay() will almost always succeed immediately,
> unless there is an a priori failure out of hand (e.g. cannot send from
> socket, DNS lookup failure, etc.).
>
> Instead, you must do this in a failure_route:
>
> route {
> ...
> t_on_failure("FAILURE_ROUTE");
>
> if(!t_relay())
> sl_reply_error();
> }
>
> failure_route[FAILURE_ROUTE] {
> if(t_is_canceled())
> exit;
>
> if(t_branch_timeout()) {
> # Handle your timeout case here.
>
> $ru = new value etc.
>
> t_relay();
> exit;
> }
> }
>
>
> --
> 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