[SR-Users] How to stop kamailio from send 408?

Daniel-Constantin Mierla miconda at gmail.com
Thu Jun 26 10:03:07 CEST 2014


Hello,

sl_send_reply() sends the SIP response in stateless mode. In that way, 
the transaction state is not updated at all, tm module sending its own 
response as well (the 408).

You can use t_reply() instead of sl_send_reply() for overwriting tm's 
response code.

The return code of the function is available in $rc.

t_relay();
$var(rc) = $rc;
xlog("t_relay returned $var(rc)\n");

Above I stored $rc in a temporary variable (which is not really needed 
in this example) -- in that way you are sure it doesn't get overwritten 
in case you execute other functions before you interpret it.

Cheers,
Daniel

On 26/06/14 06:31, Allen Zhang wrote:
>
> Hi,
>
> when t_relay() times out, calling sl_reply_error() will send 408 to 
> the client.
>
> But if I don’t want to send 408, how do I interpret the error code 
> t_relay() set?
>
> Regards,
>
> Allen
>
>
>
> _______________________________________________
> 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

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140626/d8dfa4cd/attachment.html>


More information about the sr-users mailing list