[OpenSIPS-Users] Why the best response is 408 instead of 486 when parallel forking?

Iñaki Baz Castillo ibc at aliax.net
Sun Oct 26 21:12:59 CET 2008

El Domingo, 26 de Octubre de 2008, Bogdan-Andrei Iancu escribió:
> Hi Victor,
> You mean you should try to pick first an answer from the replies you
> actually received and if none, go for the internally generated replies?

Well, I wouldn't rely on the origin of the reply. Note this example:

  bob1 -- Proxy1 -- Registrar
  bob2 ------------ Registrar

bob at domain AoR is registered in bob1 (through Proxy1) and bob2.

If the registrar calls bob at domain and receives a *real* 408 from Proxy1 it 
could mean the same as if the registrar generates internally a 408 when 
trying to contact bob2. In both cases could be an error when trying to 
contact the final location.

IMHO what makes sense is to choose an user response better than choosing a 
proxy response. Well, if Proxy1 replies "480 Not available" it could be a 
reply originated in bob1 or Proxy1, but a 486 is usually generated by the 
final UAS (bob2 or bob1).

So I would select a response in a preference order like the following:

- 2XX (inmediate)
- 6XX (except if disable_6xx_block == 1)
- 3XX
- 486
- 480
- 4XX
- 408
- 5XX

RFC 3261 says in section 16.7:

  6.  Choosing the best response

         If there are no final responses in the context, the proxy MUST
         send a 408 (Request Timeout) response to the server
         The proxy SHOULD
         give preference to responses that provide information affecting
         resubmission of this request, such as 401, 407, 415, 420, and
         484 if the 4xx class is chosen.

This ensures that in the case of my initial mail (486 from location 1 and 
internal 408) the 486 should be chosen.

Iñaki Baz Castillo

More information about the Users mailing list