[Kamailio-Users] Why does Kamailio reply 408 when 'fr_inv_timer' expires?

Iñaki Baz Castillo ibc at aliax.net
Sun Aug 17 19:25:55 CEST 2008


Hi, when 'fr_inv_timer' expires Kamailio CANCELs the pending branches
and reply "408 Request Timeout" to the UAC.
Well, I wonder if 408 is appropiate. I think "480 User Unavailable" or
"487 Cancelled" would be better:

I received those replies in other maillist:

"408 indicates transaction timeout. You have sent request to next hop
and it has not responded back. If the gateway has not responded at all
(Including 100 trying), 408 is appropriate. 480 is more of application
usage meaning that the user is not available and would be appropriate
if the gateway has at least send one provisional response i.e. 100,
180, 183..."

"408 is used consistently to mean IP-level timeout in sending a request
from one element to another.  It is also defined to be returned by a
UA when the time specified in "Expires" has been reached.  (In theory,
two different error codes should be defined for these two situations,
but that has not been done.)  However, in a ring-no-answer situation,
it is more common for an upstream proxy to send a CANCEL to the
UA/gateway, in which case the UA/gateway provides a 487 response to
the INVITE."


This last point suggest that Kamailio could do the following:

- If the proxy has received provisional responses from callee's then
not send a 408 upstream since when the proxy sends CANCEL to UAS's it
will receive some 487 and would return a 487 upstream.
- If the proxy hasn't received provisional responses then this is a
clear "408 Request timeout".

So a possibility is that Kamailio just reply a 408 in real timeouts
and reply 487 when 'fr_inv_timer' expires (or just reply nothing since
UAS's will generate the 487).

Opinions?



-- 
Iñaki Baz Castillo
<ibc at aliax.net>


More information about the Users mailing list