sip media · stub

SIP 500 and 502 and 504 server errors

Verified 2026-10-14 · 54 sources · tier 1–2

Stub. This topic has 54 sources and no published article. The sources below are everything recorded so far.

So far, no summary has been generated for this topic. The sources below are everything recorded so far.

See also

Related to

Sources

  1. 1
    Once a call is interworked to ISUP or ISDN using RFC 3398's default table, a 500 and a 503 both become cause 41. The far end cannot tell them apart from the cause value alone.inferred
  2. 2
    RFC 3261 defines 500 Server Internal Error as the server meeting an unexpected condition that stopped it from fulfilling the request.
    RFC 3261 — SIP: Session Initiation Protocol · Section 21.5.1 500 Server Internal Error · Checked 2026-10-14
  3. 3
    A 500 received through an RFC 3261-conformant proxy does not prove that the proxy itself failed. It may stand in for a downstream 503 that the proxy chose not to forward.inferred
    RFC 3261 — SIP: Session Initiation Protocol · Section 16.7 step 6, read together with Section 21.5.1 · Checked 2026-10-14
  4. 4
    Under RFC 3261, a client receiving a 500 MAY retry after several seconds, and a server MAY add a Retry-After header if the condition is temporary. Retry-After on a 500 is optional, not required.
    RFC 3261 — SIP: Session Initiation Protocol · Section 21.5.1 500 Server Internal Error, second and third sentences · Checked 2026-10-14
  5. 5
    RFC 3261 defines 501 Not Implemented as the server not supporting the functionality the request needs, used when a UAS does not recognise the method. A 405 is used when the method is recognised but not allowed.
    RFC 3261 — SIP: Session Initiation Protocol · Section 21.5.2 501 Not Implemented · Checked 2026-10-14
  6. 6
    With RFC 3398 defaults in both directions, a 502 sent into ISUP becomes cause 38, and cause 38 coming back into SIP becomes 503. A 502 can therefore come out as a 503 after crossing a TDM leg.inferred
    RFC 3398: Integrated Services Digital Network (ISDN) User Part (ISUP) to Session Initiation Protocol (SIP) Mapping · Section 8.2.6.1 (502 row) with section 7.2.4.1 (cause 38) · Checked 2026-10-14
  7. 7
    RFC 3261 defines 502 Bad Gateway as a server acting as a gateway or proxy that received an invalid response from the downstream server it contacted.
    RFC 3261 — SIP: Session Initiation Protocol · Section 21.5.3 502 Bad Gateway · Checked 2026-10-14
  8. 8
    RFC 3261 defines 503 Service Unavailable as the server being temporarily unable to process the request because of temporary overload or maintenance.
    RFC 3261 — SIP: Session Initiation Protocol · Section 21.5.4 503 Service Unavailable · Checked 2026-10-14
  9. 9
    For a 503, RFC 3261 says a client or proxy should try an alternate server and not send other requests to the failing server for the Retry-After period. Section 21.5 gives no such alternate-server instruction for 500, 502 or 504.
    RFC 3261 — SIP: Session Initiation Protocol · Section 21.5.4 503 Service Unavailable, compared with 21.5.1, 21.5.3 and 21.5.5 · Checked 2026-10-14
  10. 10
    Under RFC 3261, a client receiving a 503 with no Retry-After header MUST act as if it had received a 500.
    RFC 3261 — SIP: Session Initiation Protocol · Section 21.5.4 503 Service Unavailable · Checked 2026-10-14
  11. 11
    RFC 3261 defines 504 Server Time-out as the server not receiving a timely response from an external server it contacted while processing the request.
    RFC 3261 — SIP: Session Initiation Protocol · Section 21.5.5 504 Server Time-out · Checked 2026-10-14
  12. 12
    RFC 3261 says to send 408 instead of 504 when there was no response within the period set in the upstream server's Expires header field.
    RFC 3261 — SIP: Session Initiation Protocol · Section 21.5.5 504 Server Time-out, second sentence · Checked 2026-10-14
  13. 13
    RFC 3261 defines 505 Version Not Supported as the server not supporting, or refusing to support, the SIP protocol version used in the request.
    RFC 3261 — SIP: Session Initiation Protocol · Section 21.5.6 505 Version Not Supported · Checked 2026-10-14
  14. 14
    RFC 3261 defines 513 Message Too Large as the server being unable to process the request because the message length exceeded its capabilities.
    RFC 3261 — SIP: Session Initiation Protocol · Section 21.5.7 513 Message Too Large · Checked 2026-10-14
  15. 15
    RFC 3261 defines the 5xx class as failure responses given when a server itself has erred.
    RFC 3261 — SIP: Session Initiation Protocol · Section 21.5 Server Failure 5xx · Checked 2026-10-14
  16. 16
    Asterisk's Hangup Cause Mappings page pairs SIP 500 with AST_CAUSE_NETWORK_OUT_OF_ORDER, cause 38. RFC 3398 maps 500 to cause 41.
    Hangup Cause Mappings · Table row AST_CAUSE_NETWORK_OUT_OF_ORDER · Checked 2026-10-14
  17. 17
    Asterisk's Hangup Cause Mappings page pairs SIP 504 with AST_CAUSE_RECOVERY_ON_TIMER_EXPIRE, cause 102.
    Hangup Cause Mappings · Table row AST_CAUSE_RECOVERY_ON_TIMER_EXPIRE · Checked 2026-10-14
  18. 18
    The AudioCodes Mediant 1000 v7.6 fixed SIP-to-ISDN mapping turns SIP 500 into ISDN release reason 41 Temporary failure.
    Fixed Mapping of SIP Response to ISDN Release Reason (Mediant 1000 SBC/Gateway User's Manual v7.6) · Table 'Fixed Mapping of SIP Response to ISDN Release Reason', 500 row · Checked 2026-10-14
  19. 19
    AudioCodes Mediant 1000 v7.6 maps SIP 501 to ISDN release reason 38 Network out of order, while RFC 3398 maps 501 to cause 79. For 501, the AudioCodes fixed table does not follow RFC 3398.inferred
    Fixed Mapping of SIP Response to ISDN Release Reason (Mediant 1000 SBC/Gateway User's Manual v7.6) · Table 'Fixed Mapping of SIP Response to ISDN Release Reason', 501 row; compare RFC 3398 section 8.2.6.1 · Checked 2026-10-14
  20. 20
    The AudioCodes Mediant 1000 v7.6 fixed SIP-to-ISDN mapping turns SIP 502 Bad gateway into ISDN release reason 38 Network out of order.
    Fixed Mapping of SIP Response to ISDN Release Reason (Mediant 1000 SBC/Gateway User's Manual v7.6) · Table 'Fixed Mapping of SIP Response to ISDN Release Reason', 502 row · Checked 2026-10-14
  21. 21
    The AudioCodes Mediant 1000 v7.6 fixed SIP-to-ISDN mapping turns SIP 504 Server timeout into ISDN release reason 102 Recovery on timer expiry.
    Fixed Mapping of SIP Response to ISDN Release Reason (Mediant 1000 SBC/Gateway User's Manual v7.6) · Table 'Fixed Mapping of SIP Response to ISDN Release Reason', 504 row · Checked 2026-10-14
  22. 22
    The AudioCodes Mediant 1000 v7.6 fixed ISDN-to-SIP mapping turns ISDN cause 27 Destination out of order into SIP 502. Causes 43, 81, 82 and 91 are also mapped to 502, as AudioCodes additions marked with an asterisk.
    Fixed Mapping of ISDN Release Reason to SIP Response (Mediant 1000 SBC/Gateway User's Manual v7.6) · Table 'Fixed Mapping of ISDN Release Reason to SIP Response', rows 27, 43, 81, 82, 91 and asterisk footnote · Checked 2026-10-14
  23. 23
    The AudioCodes Mediant 1000 v7.6 fixed ISDN-to-SIP mapping turns ISDN causes 7, 32, 33, 111 and 127 into SIP 500 Server internal error.
    Fixed Mapping of ISDN Release Reason to SIP Response (Mediant 1000 SBC/Gateway User's Manual v7.6) · Table 'Fixed Mapping of ISDN Release Reason to SIP Response', rows mapping to 500 · Checked 2026-10-14
  24. 24
    As retrieved, the AudioCodes Mediant 1000 v7.6 fixed ISDN-to-SIP mapping table has no row producing SIP 504, although RFC 3398 maps cause 102 to 504.
    Fixed Mapping of ISDN Release Reason to SIP Response (Mediant 1000 SBC/Gateway User's Manual v7.6) · Table 'Fixed Mapping of ISDN Release Reason to SIP Response' (no 504 row returned) · Checked 2026-10-14
  25. 25
    By default, Teams Direct Routing treats an outbound call as completed when it receives any 4xx or 6xx error to its INVITE, unless that code is listed in FailoverResponseCodes.
    Set-CsOnlinePSTNGateway (MicrosoftTeams) · Parameters > -FailoverResponseCodes, first paragraph · Checked 2026-10-14
  26. 26
    500 and 502 are not in the default Teams Direct Routing FailoverResponseCodes list. With defaults, an SBC returning 500 or 502 on an outbound INVITE does not trigger a retry on another SBC, while 504 does.
    Set-CsOnlinePSTNGateway (MicrosoftTeams) · Parameters > -FailoverResponseCodes, Default value row · Checked 2026-10-14
  27. 27
    Microsoft's Direct Routing SIP protocol page says a busy Direct Routing datacenter may send a 503 with a one-second Retry-After, and the SBC must then end that connection and try the next Microsoft datacenter.
    Teams Phone System Direct Routing: SIP protocol · Section 'Retry-After' · Checked 2026-10-14
  28. 28
    The Teams Direct Routing gateway parameter FailoverResponseCodes defaults to 408, 503, 504. On those codes Direct Routing tries another SBC, if the user's voice routing policy has one.
    Set-CsOnlinePSTNGateway (MicrosoftTeams) · Parameters > -FailoverResponseCodes, description and Default value row · Checked 2026-10-14
  29. 29
    Setting FailoverResponseCodes replaces the default list, so to keep 408, 503 and 504 you must include them in the new string alongside any codes you add, such as 500 or 502.
    Set-CsOnlinePSTNGateway (MicrosoftTeams) · Parameters > -FailoverResponseCodes, second paragraph · Checked 2026-10-14
  30. 30
    Teams Direct Routing FailoverTimeSeconds defaults to 10. An outbound call the gateway does not answer within that time goes to the next available trunk, or is dropped if there is none.
    Set-CsOnlinePSTNGateway (MicrosoftTeams) · Parameters > -FailoverTimeSeconds · Checked 2026-10-14
  31. 31
    The SIP signaling failover section of Microsoft's Plan Direct Routing page describes Microsoft moving the SBC to secondary and tertiary regions automatically, and names no SIP response codes.
    Plan Direct Routing · Section 'SIP signaling failover' · Checked 2026-10-14
  32. 32
    When choosing which final response to forward, an RFC 3261 proxy MUST choose from any 6xx responses received, and otherwise SHOULD choose from the lowest response class received. So a forking proxy that got a 4xx from one branch and a 5xx from another would normally forward the 4xx.
    RFC 3261 — SIP: Session Initiation Protocol · Section 16.7 Response Processing, step 6 (Choosing the best response) · Checked 2026-10-14
  33. 33
    RFC 3261 says that if the only response a proxy received is a 503, it SHOULD generate a 500 and forward that upstream.
    RFC 3261 — SIP: Session Initiation Protocol · Section 16.7 Response Processing, step 6 (Choosing the best response) · Checked 2026-10-14
  34. 34
    RFC 3261 says a proxy that receives a 503 SHOULD NOT forward it upstream, unless it can determine that later requests it proxies would also get a 503.
    RFC 3261 — SIP: Session Initiation Protocol · Section 16.7 Response Processing, step 6 (Choosing the best response) · Checked 2026-10-14
  35. 35
    RFC 3261 says a proxy MUST send 408 Request Timeout upstream when its response context holds no final responses. A proxy that hears nothing back is told to send 408, not 504.
    RFC 3261 — SIP: Session Initiation Protocol · Section 16.7 Response Processing, step 6 · Checked 2026-10-14
  36. 36
    A client that implements only RFC 3263 failover would not move to the next DNS SRV target on a 500, 502 or 504, because section 4.3 names only 503, transport failure and total timeout as failure.inferred
    RFC 3263: Session Initiation Protocol (SIP): Locating SIP Servers · Section 4.3 (absence of 500, 502 and 504 from the failure definition) · Checked 2026-10-14
  37. 37
    RFC 3263 counts a 503 reported by the transaction layer, or a transport failure, as failure. On failure the client SHOULD send a new request, with a new Via branch, to the next element from DNS resolution.
  38. 38
    RFC 3263 also counts it as failure when the transaction layer times out without receiving any response, provisional or final (Timer B or F).
  39. 39
    RFC 3398's SIP-to-ISDN table maps 500 Server internal error to cause 41 Temporary failure.
    RFC 3398: Integrated Services Digital Network (ISDN) User Part (ISUP) to Session Initiation Protocol (SIP) Mapping · Section 8.2.6.1 SIP Status Code to ISDN Cause Code Mapping, 500 row · Checked 2026-10-14
  40. 40
    RFC 3398's SIP-to-ISDN table maps 502 Bad gateway to cause 38 Network out of order.
  41. 41
    RFC 3398's SIP-to-ISDN table maps 503 Service unavailable to cause 41 Temporary failure, the same cause it uses for 500.
  42. 42
    RFC 3398's SIP-to-ISDN table maps 504 Server time-out to cause 102 Recovery on timer expiry.
  43. 43
    In RFC 3398 section 8.2.6.1 the Version Not Supported row is printed with status 504, mapped to cause 127, and there is no 505 row. This appears to be a typo for 505.
  44. 44
    In the ISDN-to-SIP direction, RFC 3398 maps cause 102 recovery on timer expiry to 504.
    RFC 3398: Integrated Services Digital Network (ISDN) User Part (ISUP) to Session Initiation Protocol (SIP) Mapping · Section 7.2.4.1 ISDN Cause Code to Status Code Mapping, protocol error group, cause 102 · Checked 2026-10-14
  45. 45
    In the ISDN-to-SIP direction, RFC 3398 maps cause 111 protocol error and cause 127 interworking unspecified to 500.
    RFC 3398: Integrated Services Digital Network (ISDN) User Part (ISUP) to Session Initiation Protocol (SIP) Mapping · Section 7.2.4.1, protocol error and interworking groups, causes 111 and 127 · Checked 2026-10-14
  46. 46
    In the ISDN-to-SIP direction, RFC 3398 maps cause 27 destination out of order to 502 Bad Gateway.
  47. 47
    In the ISDN-to-SIP direction, RFC 3398 maps cause 38 network out of order and cause 41 temporary failure to 503. Causes 34, 42, 47, 58 and 88 also map to 503.
    RFC 3398: Integrated Services Digital Network (ISDN) User Part (ISUP) to Session Initiation Protocol (SIP) Mapping · Section 7.2.4.1, resource unavailable, service-or-option and invalid message groups · Checked 2026-10-14
  48. 48
    RFC 3398 says that for any ISDN cause value not listed in its mapping table, 500 Server internal error SHOULD be used.
  49. 49
    Under RFC 3261, when Timer C fires and the client transaction has received no provisional response, the proxy MUST behave as if the transaction received a 408.
    RFC 3261 — SIP: Session Initiation Protocol · Section 16.8 Processing Timer C · Checked 2026-10-14
  50. 50
    Twilio error 32011 means a problem talking to a specific endpoint of the customer's SIP infrastructure: no timely response, an error response, or an invalid response.
  51. 51
    Twilio says a 32011 condition may lengthen call setup or fail the call, depending on the failover configuration.
    32011: Error communicating with your SIP communications infrastructure · Description, final sentence · Checked 2026-10-14
  52. 52
    Twilio lists the customer's SIP endpoint sending an error response, such as SIP 500, as a possible cause of error 32011. It names no other 5xx code.
    32011: Error communicating with your SIP communications infrastructure · Possible causes, first bullet · Checked 2026-10-14
  53. 53
    For Elastic SIP Trunking origination, Twilio tries the configured SIP URIs first and calls the disaster recovery URL, which must return TwiML, only if none of them succeed.
    Programmable Voice Failover Best Practices · Section 'Elastic SIP Trunking Origination: Configure a disaster recovery URL' · Checked 2026-10-14
  54. 54
    Twilio's current Voice failover best-practices page describes origination failover only in terms of a URI being unavailable or failed. It does not list which SIP response codes trigger failover to the next origination URI.
    Programmable Voice Failover Best Practices · Sections 'Elastic SIP Trunking Origination: Load balance between multiple PBXs/SBCs' and 'Stand up fallback PBXs/SBCs in other regions' · Checked 2026-10-14

Documents

tier 1 standards and regulators

RFC 3261 — SIP: Session Initiation Protocol

IETF / RFC Editor · 2002-06 · accessed 2026-09-04

tier 1 standards and regulators

RFC 3263: Session Initiation Protocol (SIP): Locating SIP Servers

RFC Editor / IETF · 2002-06-01 · accessed 2026-09-24

tier 1 standards and regulators

RFC 3398: Integrated Services Digital Network (ISDN) User Part (ISUP) to Session Initiation Protocol (SIP) Mapping

IETF / RFC Editor · 2002-12-01 · accessed 2026-09-24

tier 2 current vendor documentation

32011: Error communicating with your SIP communications infrastructure

Twilio · 2026-03-11 · accessed 2026-10-14

tier 2 current vendor documentation

Fixed Mapping of ISDN Release Reason to SIP Response (Mediant 1000 SBC/Gateway User's Manual v7.6)

AudioCodes · accessed 2026-10-14

tier 2 current vendor documentation

Fixed Mapping of SIP Response to ISDN Release Reason (Mediant 1000 SBC/Gateway User's Manual v7.6)

AudioCodes · accessed 2026-10-14

tier 2 current vendor documentation

Hangup Cause Mappings

Sangoma / Asterisk project · accessed 2026-10-14

tier 2 current vendor documentation

Plan Direct Routing

Microsoft (Microsoft Learn) · 2026-08-21 · accessed 2026-09-06

tier 2 current vendor documentation

Programmable Voice Failover Best Practices

Twilio · 2026-09-15 · accessed 2026-09-25

tier 2 current vendor documentation

Set-CsOnlinePSTNGateway (MicrosoftTeams)

Microsoft · 2026-04-27 · accessed 2026-09-25

tier 2 current vendor documentation

Teams Phone System Direct Routing: SIP protocol

Microsoft · 2026-08-21 · accessed 2026-09-23

Cite this page

APA

WarmTransfer. (2026, October 14). SIP 500 and 502 and 504 server errors. WarmTransfer. https://warmtransfer.net/knowledge/sip-5xx-server-errors

BibTeX

@misc{warmtransfer-sip-5xx-server-errors,
  title  = {SIP 500 and 502 and 504 server errors},
  author = {{WarmTransfer}},
  year   = {2026},
  url    = {https://warmtransfer.net/knowledge/sip-5xx-server-errors},
  note   = {Verified 2026-10-14}
}