Page tree
Skip to end of metadata
Go to start of metadata

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 CodeSIP Equiv.EnumerationCauseDescription
0 UNSPECIFIEDUnspecified. 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.
1404UNALLOCATED_NUMBERUnallocated (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).
2404NO_ROUTE_TRANSIT_NETNo 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.
3404NO_ROUTE_DESTINATIONNo 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_UNACCEPTABLEchannel 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_DELIVEREDcall 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_CLEARINGnormal 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.
17486USER_BUSYuser 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.
18408NO_USER_RESPONSEno 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.
19480NO_ANSWERno 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.
20480SUBSCRIBER_ABSENTsubscriber 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.
21603CALL_REJECTEDcall 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.
22410NUMBER_CHANGEDnumber 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.
23410REDIRECTION_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.
25483EXCHANGE_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.
27502DESTINATION_OUT_OF_ORDERdestination 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.
28484INVALID_NUMBER_FORMATinvalid 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.
29501FACILITY_REJECTEDfacilities 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_ENQUIRYresponse 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.
31480NORMAL_UNSPECIFIEDnormal, unspecified [Q.850]This cause is used to report a normal event only when no other cause in the normal class applies.
34503NORMAL_CIRCUIT_CONGESTIONno circuit/channel available [Q.850]This cause indicates that there is no appropriate circuit/channel presently available to handle the call.
38503NETWORK_OUT_OF_ORDERnetwork 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.
41503NORMAL_TEMPORARY_FAILUREtemporary 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.
42503SWITCH_CONGESTIONswitching equipment congestion [Q.850]This cause indicates that the switching equipment generating this cause is experiencing a period of high traffic.
43 ACCESS_INFO_DISCARDEDaccess 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.
44503REQUESTED_CHAN_UNAVAILrequested 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_SUBSCRIBEDrequested facility not subscribed [Q.850This cause indicates that the user has requested a supplementary service, which is available, but the user is not authorized to use.
52403OUTGOING_CALL_BARREDoutgoing calls barredThis 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.
54403INCOMING_CALL_BARREDincoming calls barredThis 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.
57403BEARERCAPABILITY_NOTAUTHbearer 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.
58503BEARERCAPABILITY_NOTAVAILbearer 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_UNAVAILABLEservice 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.
65488BEARERCAPABILITY_NOTIMPLbearer capability not implemented [Q.850]This cause indicates that the equipment sending this cause does not support the bearer capability requested.
66 CHAN_NOT_IMPLEMENTEDchannel type not implemented [Q.850]This cause indicates that the equipment sending this cause does not support the channel type requested
69501FACILITY_NOT_IMPLEMENTEDrequested facility not implemented [Q.850]This cause indicates that the equipment sending this cause does not support the requested supplementary services.
79501SERVICE_NOT_IMPLEMENTEDservice 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_REFERENCEinvalid 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.
88488INCOMPATIBLE_DESTINATIONincompatible 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_UNSPECIFIEDinvalid 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_MISSINGmandatory 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_NONEXISTmessage 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_MESSAGEmessage 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_NONEXISTInformation 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_CONTENTSInvalid 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_STATEmessage not compatible with call state [Q.850]This cause indicates that a message has been received which is incompatible with the call state.
102504RECOVERY_ON_TIMER_EXPIRErecovery 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_ERRORparameter 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_ERRORprotocol 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 INTERWORKINGInterworking, unspecified [Q.850]This cause indicates that an interworking call (usually a call to SW56 service) has ended.
487487ORIGINATOR_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  
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 CodeITU-T Q.850 CodeEnumerationCause
40041NORMAL_TEMPORARY_FAILURETemporary failure [Q.850]
40121CALL_REJECTEDCall rejected [Q.850]
40221CALL_REJECTEDCall rejected [Q.850]
40321CALL_REJECTEDCall rejected [Q.850]
4041NO_ROUTE_TRANSIT_NETUnallocated number [Q.850]

See also

  • No labels