Hangup Cause Code Table
About
The default code is NORMAL_CLEARING (if you do not specify one)
The codes are documented in src/switch_channel.c and SIP Protocol Messages
IE stands for Information Element
Q.850 to SIP Code Table
The following table describes the mappings implemented by FreeSwitch (see mod_sofia.c:hangup_cause_to_sip). Unspecified causes codes (no value in the "SIP Equiv." column in the table) are translated to SIP "480 Temporarily Unavailable" by FreeSwitch.
The table also contains non-standard codes above 127 (ISUP and ISDN only specify codes up to 127). These codes are used internally to FreeSwitch to indicate other states. (These codes do not map directly to SIP error codes either.) The complete list of SWITCH_CAUSE_ codes (switch_call_cause_t) is defined in include/switch_types.h.
See ITU-T Q.850 standard for a formal definition of standard telephony disconnect cause codes for ISDN, and the mapping between Q.931 (DSSS1) and ISUP codes.
See ITU Q.1912.5 for a formal definition of interoperability between ISUP and SIP, especially section 6.11 which specifies the "Reason" header and gives the mapping of the disconnect cause codes between ISUP and SIP.
Another set of mappings are the Q.SIG / SIP mappings from RFC 4497 section 8.4.1. (Q.SIG is one of many extensions to Q.931 used for PBX-to-PBX signalling on private links.)
In practice it appears that FreeSwitch implements neither Q.1912.5 nor RFC4497.
ITU-T Q.850 Code | SIP Equiv. | Enumeration | Cause | Description |
---|---|---|---|---|
0 | UNSPECIFIED | Unspecified. No other cause codes applicable. | This is usually given by the router when none of the other codes apply. This cause usually occurs in the same type of situations as cause 1, cause 88, and cause 100. | |
1 | 404 | UNALLOCATED_NUMBER | Unallocated (unassigned) number [Q.850 value 1] | This cause indicates that the called party cannot be reached because, although the called party number is in a valid format, it is not currently allocated (assigned). |
2 | 404 | NO_ROUTE_TRANSIT_NET | No route to specified transit network (national use) [Q.850] | This cause indicates that the equipment sending this cause has received a request to route the call through a particular transit network, which it does not recognize. The equipment sending this cause does not recognize the transit network either because the transit network does not exist or because that particular transit network, while it does exist, does not serve the equipment which is sending this cause. |
3 | 404 | NO_ROUTE_DESTINATION | No route to destination [Q.850] | This cause indicates that the called party cannot be reached because the network through which the call has been routed does not serve the destination desired. This cause is supported on a network dependent basis. |
6 | CHANNEL_UNACCEPTABLE | channel unacceptable [Q.850] | This cause indicates that the channel most recently identified is not acceptable to the sending entity for use in this call. | |
7 | CALL_AWARDED_DELIVERED | call awarded, being delivered in an established channel [Q.850] | This cause indicates that the user has been awarded the incoming call, and that the incoming call is being connected to a channel already established to that user for similar calls (e.g. packet-mode x.25 virtual calls). | |
16 | NORMAL_CLEARING | normal call clearing [Q.850] | This cause indicates that the call is being cleared because one of the users involved in the call has requested that the call be cleared. Under normal situations, the source of this cause is not the network. | |
17 | 486 | USER_BUSY | user busy [Q.850] | This cause is used to indicate that the called party is unable to accept another call because the user busy condition has been encountered. This cause value may be generated by the called user or by the network. In the case of user determined user busy it is noted that the user equipment is compatible with the call. |
18 | 408 | NO_USER_RESPONSE | no user responding [Q.850] | This cause is used when a called party does not respond to a call establishment message with either an alerting or connect indication within the prescribed period of time allocated. |
19 | 480 | NO_ANSWER | no answer from user (user alerted) [Q.850] | This cause is used when the called party has been alerted but does not respond with a connect indication within a prescribed period of time. Note - This cause is not necessarily generated by Q.931 procedures but may be generated by internal network timers. |
20 | 480 | SUBSCRIBER_ABSENT | subscriber absent [Q.850] | This cause value is used when a mobile station has logged off, radio contact is not obtained with a mobile station or if a personal telecommunication user is temporarily not addressable at any user-network interface. Sofia SIP will normally raise USER_NOT_REGISTERED in such situations. |
21 | 603 | CALL_REJECTED | call rejected [Q.850] | This cause indicates that the equipment sending this cause does not wish to accept this call, although it could have accepted the call because the equipment sending this cause is neither busy nor incompatible. The network may also generate this cause, indicating that the call was cleared due to a supplementary service constraint. The diagnostic field may contain additional information about the supplementary service and reason for rejection. |
22 | 410 | NUMBER_CHANGED | number changed [Q.850] | This cause is returned to a calling party when the called party number indicated by the calling party is no longer assigned, The new called party number may optionally be included in the diagnostic field. If a network does not support this cause, cause no: 1, unallocated (unassigned) number shall be used. |
23 | 410 | REDIRECTION_TO_NEW_DESTINATION | This cause is used by a general ISUP protocol mechanism that can be invoked by an exchange that decides that the call should be set-up to a different called number. Such an exchange can invoke a redirection mechanism, by use of this cause value, to request a preceding exchange involved in the call to route the call to the new number. | |
25 | 483 | EXCHANGE_ROUTING_ERROR | This cause indicates that the destination indicated by the user cannot be reached, because an intermediate exchange has released the call due to reaching a limit in executing the hop counter procedure. This cause is generated by an intermediate node, which when decrementing the hop counter value, gives the result 0. | |
27 | 502 | DESTINATION_OUT_OF_ORDER | destination out of order [Q.850] | This cause indicates that the destination indicated by the user cannot be reached because the interface to the destination is not functioning correctly. The term "not functioning correctly" indicates that a signal message was unable to be delivered to the remote party; e.g. a physical layer or data link layer failure at the remote party, or user equipment off-line. |
28 | 484 | INVALID_NUMBER_FORMAT | invalid number format (address incomplete) [Q.850] | This cause indicates that the called party cannot be reached because the called party number is not in a valid format or is not complete. |
29 | 501 | FACILITY_REJECTED | facilities rejected [Q.850] | This cause is returned when a supplementary service requested by the user cannot be provide by the network. |
30 | RESPONSE_TO_STATUS_ENQUIRY | response to STATUS INQUIRY [Q.850] | This cause is included in the STATUS message when the reason for generating the STATUS message was the prior receipt of a STATUS INQUIRY. | |
31 | 480 | NORMAL_UNSPECIFIED | normal, unspecified [Q.850] | This cause is used to report a normal event only when no other cause in the normal class applies. |
34 | 503 | NORMAL_CIRCUIT_CONGESTION | no circuit/channel available [Q.850] | This cause indicates that there is no appropriate circuit/channel presently available to handle the call. |
38 | 502 | NETWORK_OUT_OF_ORDER | network out of order [Q.850] | This cause indicates that the network is not functioning correctly and that the condition is likely to last a relatively long period of time e.g. immediately re-attempting the call is not likely to be successful. |
41 | 503 | NORMAL_TEMPORARY_FAILURE | temporary failure [Q.850] | This cause indicates that the network is not functioning correctly and that the condition is not likely to last a long period of time; e.g. the user may wish to try another call attempt almost immediately. |
42 | 503 | SWITCH_CONGESTION | switching equipment congestion [Q.850] | This cause indicates that the switching equipment generating this cause is experiencing a period of high traffic. |
43 | ACCESS_INFO_DISCARDED | access information discarded [Q.850] | This cause indicates that the network could not deliver access information to the remote user as requested, i.e. user-to-user information, low layer compatibility, high layer compatibility or sub-address as indicated in the diagnostic. It is noted that the particular type of access information discarded is optionally included in the diagnostic. | |
44 | 503 | REQUESTED_CHAN_UNAVAIL | requested circuit/channel not available [Q.850] | This cause is returned when the other side of the interface cannot provide the circuit or channel indicated by the requesting entity. |
45 | PRE_EMPTED | |||
47 | resource unavailable, unspecified [Q.850] | This cause is used to report a resource unavailable event only when no other cause in the resource unavailable class applies. | ||
50 | FACILITY_NOT_SUBSCRIBED | requested facility not subscribed [Q.850 | This cause indicates that the user has requested a supplementary service, which is available, but the user is not authorized to use. | |
52 | 403 | OUTGOING_CALL_BARRED | outgoing calls barred | This cause indicates that although the calling party is a member of the CUG for the outgoing CUG call, outgoing calls are not allowed for this member of the CUG. |
54 | 403 | INCOMING_CALL_BARRED | incoming calls barred | This cause indicates that although the called party is a member of the CUG for the incoming CUG call, incoming calls are not allowed to this member of the CUG. |
57 | 403 | BEARERCAPABILITY_NOTAUTH | bearer capability not authorized [Q.850] | This cause indicates that the user has requested a bearer capability that is implemented by the equipment which generated this cause but the user is not authorized to use. |
58 | 503 | BEARERCAPABILITY_NOTAVAIL | bearer capability not presently available [Q.850] | This cause indicates that the user has requested a bearer capability which is implemented by the equipment which generated this cause but which is not available at this time. |
63 | SERVICE_UNAVAILABLE | service or option not available, unspecified [Q.850] | This cause is used to report a service or option not available event only when no other cause in the service or option not available class applies. | |
65 | 488 | BEARERCAPABILITY_NOTIMPL | bearer capability not implemented [Q.850] | This cause indicates that the equipment sending this cause does not support the bearer capability requested. |
66 | CHAN_NOT_IMPLEMENTED | channel type not implemented [Q.850] | This cause indicates that the equipment sending this cause does not support the channel type requested | |
69 | 501 | FACILITY_NOT_IMPLEMENTED | requested facility not implemented [Q.850] | This cause indicates that the equipment sending this cause does not support the requested supplementary services. |
79 | 501 | SERVICE_NOT_IMPLEMENTED | service or option not implemented, unspecified [Q.850] | This cause is used to report a service or option not implemented event only when no other cause in the service or option not implemented class applies. |
81 | INVALID_CALL_REFERENCE | invalid call reference value [Q.850] | This cause indicates that the equipment sending this cause has received a message with a call reference which is not currently in use on the user-network interface. | |
88 | 488 | INCOMPATIBLE_DESTINATION | incompatible destination [Q.850] | This cause indicates that the equipment sending this cause has received a request to establish a call which has low layer compatibility, high layer compatibility or other compatibility attributes (e.g. data rate) which cannot be accommodated. |
95 | INVALID_MSG_UNSPECIFIED | invalid message, unspecified [Q.850] | This cause is used to report an invalid message event only when no other cause in the invalid message class applies. | |
96 | MANDATORY_IE_MISSING | mandatory information element is missing [Q.850] | This cause indicates that the equipment sending this cause has received a message which is missing an information element which must be present in the message before that message can be processed. | |
97 | MESSAGE_TYPE_NONEXIST | message type non-existent or not implemented [Q.850] | This cause indicates that the equipment sending this cause has received a message with a message type it does not recognize either because this is a message not defined of defined but not implemented by the equipment sending this cause. | |
98 | WRONG_MESSAGE | message not compatible with call state or message type non-existent or not implemented. [Q.850] | This cause indicates that the equipment sending this cause has received a message such that the procedures do not indicate that this is a permissible message to receive while in the call state, or a STATUS message was received indicating an incompatible call state. | |
99 | IE_NONEXIST | Information element / parameter non-existent or not implemented [Q.850] | This cause indicates that the equipment sending this cause has received a message which includes information element(s)/parameter(s) not recognized because the information element(s)/parameter name(s) are not defined or are defined but not implemented by the equipment sending the cause. This cause indicates that the information element(s)/parameter(s) were discarded. However, the information element is not required to be present in the message in order for the equipment sending the cause to process the message. | |
100 | INVALID_IE_CONTENTS | Invalid information element contents [Q.850] | This cause indicates that the equipment sending this cause has received and information element which it has implemented; however, one or more fields in the I.E. are coded in such a way which has not been implemented by the equipment sending this cause. | |
101 | WRONG_CALL_STATE | message not compatible with call state [Q.850] | This cause indicates that a message has been received which is incompatible with the call state. | |
102 | 504 | RECOVERY_ON_TIMER_EXPIRE | recovery on timer expiry [Q.850] | This cause indicates that a procedure has been initiated by the expiration of a timer in association with error handling procedures. This is often associated with NAT problems. Ensure that "NAT Mapping Enable" is turned on in your ATA. If it is not NAT related it can sometimes be provider related, make sure to ensure another outbound provider does not solve the problem.FreeSWITCH also returns this when the remote party sends a 408 for call expired. |
103 | MANDATORY_IE_LENGTH_ERROR | parameter non-existent or not implemented - passed on (national use) [Q.850] | This cause indicates that the equipment sending this cause has received a message which includes parameters not recognized because the parameters are not defined or are defined but not implemented by the equipment sending this cause. The cause indicates that the parameter(s) were ignored. In addition, if the equipment sending this cause is an intermediate point, then this cause indicates that the parameter(s) were passed unchanged. | |
111 | PROTOCOL_ERROR | protocol error, unspecified [Q.850] | This cause is used to report a protocol error event only when no other cause in the protocol error class applies. | |
127 | INTERWORKING | Interworking, unspecified [Q.850] | This cause indicates that an interworking call (usually a call to SW56 service) has ended. | |
487 | 487 | ORIGINATOR_CANCEL | ||
500 | CRASH | |||
501 | SYSTEM_SHUTDOWN | |||
502 | LOSE_RACE | |||
503 | MANAGER_REQUEST | This cause is used when you send an api command to make it hangup. For example uuid_kill <uuid> | ||
600 | BLIND_TRANSFER | |||
601 | ATTENDED_TRANSFER | |||
602 | ALLOTTED_TIMEOUT | This cause means that the server canceled the call because the destination channel took too long to answer. | ||
603 | USER_CHALLENGE | |||
604 | MEDIA_TIMEOUT | |||
605 | PICKED_OFF | This cause means the call was picked up by intercepting it from another extension (i.e. dialing **ext_number from another extension). | ||
606 | USER_NOT_REGISTERED | This means you tried to originate a call to a SIP user who forgot to register. | ||
607 | PROGRESS_TIMEOUT | See: progress_timeout | ||
609 | GATEWAY_DOWN | Gateway is down (not answering on OPTIONS or SUBSCRIBE) |
SIP to Q.850 Code Table
These mappings are taken from RFC 4497 section 8.4.4.
SIP Code | ITU-T Q.850 Code | Enumeration | Cause |
---|---|---|---|
400 | 41 | NORMAL_TEMPORARY_FAILURE | Temporary failure [Q.850] |
401 | 21 | CALL_REJECTED | Call rejected [Q.850] |
402 | 21 | CALL_REJECTED | Call rejected [Q.850] |
403 | 21 | CALL_REJECTED | Call rejected [Q.850] |
404 | 1 | NO_ROUTE_TRANSIT_NET | Unallocated number [Q.850] |