Opened 10 years ago

Closed 10 years ago

#870 closed defect (fixed)

Changed the mapping of host resolution failure to SIP status code 502 from 503 (thanks Robert Cichielo for the report)

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-1.3
Component: pjsip Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description

Currently host resolution error (when sending request) is treated as SIP error 503 (Service Unavailable), as interpreted from the following paragraph in RFC 3261:

8.1.3.1 Transaction Layer Errors

If a fatal transport error is reported by the transport layer
(generally, due to fatal ICMP errors in UDP or connection failures in
TCP), the condition MUST be treated as a 503 (Service Unavailable)
status code.

However this is inappropriate since normally 503 should trigger client to retry the request, either after some specified time or to an alternate server, and in this case retrying the request will not help. Hence status code 502 seems to be more appropriate.

Change History (1)

comment:1 Changed 10 years ago by bennylp

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r2732:

  • also fixed client registration to use the reason phrase of the transaction rather than to retrieve the default reason phrase for the status code, meaning that the reason phrase should display something like "gethostbyname() has returned error (PJ_ERESOLVE)" rather than the generic "Bad Gateway".
Note: See TracTickets for help on using tickets.