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?
Hi!
MAybe 408 is not the correct response code, but it is widely used. If you need a different response code IMO it would be better to make it configurable - e.g. as tm module parameter, and default is 408 (for backwards compatibility). I think this should be a easy patch.
regards klaus
Iñaki Baz Castillo schrieb:
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?
El Monday 25 August 2008 10:02:56 Klaus Darilion escribió:
Hi!
MAybe 408 is not the correct response code, but it is widely used.
Hi Klaus, in fact now I think I was wrong since RFC3261 says in "16.7 Proxy - Response Processing":
6. Choosing the best response
A stateful proxy MUST send a final response to a response context's server transaction if no final responses have been immediately forwarded by the above rules and all client transactions in this response context have been terminated.
The stateful proxy MUST choose the "best" final response among those received and stored in the response context.
If there are no final responses in the context, the proxy MUST send a 408 (Request Timeout) response to the server transaction.
If you need a different response code IMO it would be better to make it configurable - e.g. as tm module parameter, and default is 408 (for backwards compatibility). I think this should be a easy patch.
Well, it's not neccesary to do that, you can do it in failure_route :)
Thanks.