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
| Cause | Meaning | SIP response |
|---|---|---|
| 1 | Unallocated number | 404 Not Found |
| 2 | No route to network | 404 Not Found |
| 3 | No route to destination | 404 Not Found |
| 16 | Normal call clearing | None. The call ends with BYE or CANCEL |
| 17 | User busy | 486 Busy Here |
| 18 | No user responding | 408 Request Timeout |
| 19 | No answer from the user | 480 Temporarily Unavailable |
| 20 | Subscriber absent | 480 Temporarily Unavailable |
| 21 | Call rejected | 403 Forbidden |
| 22 | Number changed | 410 Gone |
| 27 | Destination out of order | 502 Bad Gateway |
| 28 | Address incomplete | 484 Address Incomplete |
| 29 | Facility rejected | 501 Not Implemented |
| 31 | Normal, unspecified | 480 Temporarily Unavailable |
| 34 | No circuit available | 503 Service Unavailable |
| 38 | Network out of order | 503 Service Unavailable |
| 41 | Temporary failure | 503 Service Unavailable |
| 42 | Switching equipment congestion | 503 Service Unavailable |
| 47 | Resource unavailable | 503 Service Unavailable |
| 57 | Bearer capability not authorized | 403 Forbidden |
| 58 | Bearer capability not presently available | 503 Service Unavailable |
| 65 | Bearer capability not implemented | 488 Not Acceptable Here |
| 79 | Service or option not implemented | 501 Not Implemented |
| 88 | Incompatible destination | 503 Service Unavailable |
| 102 | Recovery on timer expiry | 504 Gateway Timeout |
| 111 | Protocol error | 500 Server Internal Error |
| 127 | Interworking, unspecified | 500 Server Internal Error |
A cause that is not in the standard list is sent as 500 Server Internal Error.
SIP response to cause code
| SIP response | Cause | Meaning |
|---|---|---|
| 400 Bad Request | 41 | Temporary failure |
| 401, 403, 407 | 21 | Call rejected |
| 404 Not Found | 1 | Unallocated number |
| 408 Request Timeout | 102 | Recovery on timer expiry |
| 410 Gone | 22 | Number changed |
| 480 Temporarily Unavailable | 18 | No user responding |
| 484 Address Incomplete | 28 | Address incomplete |
| 486 Busy Here | 17 | User busy |
| 500 Server Internal Error | 41 | Temporary failure |
| 501 Not Implemented | 79 | Service or option not implemented |
| 502 Bad Gateway | 38 | Network out of order |
| 503 Service Unavailable | 41 | Temporary failure |
| 504 Gateway Timeout | 102 | Recovery on timer expiry |
| 600 Busy Everywhere | 17 | User busy |
| 603 Decline | 21 | Call 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
- Cause 16 on a call that should not have ended means one side hung up deliberately. Look for who sent the BYE.
- Causes 34, 38, 41, 42, 47, 58 and 88 all become 503. The Reason header is the only way to tell them apart.
- Cause 1 and a 404 usually mean the number format is wrong for that trunk, not that the number does not exist.
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.