Q.850 cause codes and the SIP responses they map to

Gateways translate between the cause codes used by the telephone network and SIP responses. Knowing the pair tells you what the other side of the gateway saw. These are the standard mappings from RFC 3398; a gateway can be configured to use different ones.

Cause code to SIP response

From the telephone network into SIP
CauseMeaningSIP response
1Unallocated number404 Not Found
2No route to network404 Not Found
3No route to destination404 Not Found
16Normal call clearingNone. The call ends with BYE or CANCEL
17User busy486 Busy Here
18No user responding408 Request Timeout
19No answer from the user480 Temporarily Unavailable
20Subscriber absent480 Temporarily Unavailable
21Call rejected403 Forbidden
22Number changed410 Gone
27Destination out of order502 Bad Gateway
28Address incomplete484 Address Incomplete
29Facility rejected501 Not Implemented
31Normal, unspecified480 Temporarily Unavailable
34No circuit available503 Service Unavailable
38Network out of order503 Service Unavailable
41Temporary failure503 Service Unavailable
42Switching equipment congestion503 Service Unavailable
47Resource unavailable503 Service Unavailable
57Bearer capability not authorized403 Forbidden
58Bearer capability not presently available503 Service Unavailable
65Bearer capability not implemented488 Not Acceptable Here
79Service or option not implemented501 Not Implemented
88Incompatible destination503 Service Unavailable
102Recovery on timer expiry504 Gateway Timeout
111Protocol error500 Server Internal Error
127Interworking, unspecified500 Server Internal Error

A cause that is not in the standard list is sent as 500 Server Internal Error.

SIP response to cause code

From SIP into the telephone network
SIP responseCauseMeaning
400 Bad Request41Temporary failure
401, 403, 40721Call rejected
404 Not Found1Unallocated number
408 Request Timeout102Recovery on timer expiry
410 Gone22Number changed
480 Temporarily Unavailable18No user responding
484 Address Incomplete28Address incomplete
486 Busy Here17User busy
500 Server Internal Error41Temporary failure
501 Not Implemented79Service or option not implemented
502 Bad Gateway38Network out of order
503 Service Unavailable41Temporary failure
504 Gateway Timeout102Recovery on timer expiry
600 Busy Everywhere17User busy
603 Decline21Call rejected

A SIP response that is not in the standard list is sent as cause 31, normal unspecified.

Where the cause appears in SIP

A gateway can carry the original cause in a Reason header on the response, BYE or CANCEL, for example Reason: Q.850;cause=17;text="User busy". When it is present, trust it over the response code: several causes share one response.

Reading it in practice

Where Workbench helps

Voice Reference Tables holds the full set of cause codes with plain-English meanings, and SIP Trace Analyzer decodes the Reason header beside the message that carried it.