Skip to end of metadata
Go to start of metadata

Asterisk Hangup Cause Code Mappings

Asterisk Value

ISDN Cause codes (Q.850 & Q.931 unless specified)

MFC/R2

SIP/PJSIP

Motif

AST_CAUSE_NOT_DEFINED

Cause not defined

OR2_CAUSE_UNSPECIFIED

 

 

AST_CAUSE_UNALLOCATED

  1. Unallocated (unassigned) number

 

404, 485, 604

 

AST_CAUSE_NO_ROUTE_TRANSIT_NET

2. No route to specified transmit network

 

 

 

AST_CAUSE_NO_ROUTE_DESTINATION

3. No route to destination

 

420

 

AST_CAUSE_MISDIALLED_TRUNK_PREFIX

5. Misdialled trunk prefix (national use)

 

 

 

AST_CAUSE_CHANNEL_UNACCEPTABLE

6. Channel unacceptable

 

 

 

AST_CAUSE_CALL_AWARDED_DELIVERED

7. Call awarded and being delivered in an established channel

 

 

 

AST_CAUSE_PRE_EMPTED

ISUP - 8. Preemption

 

 

 

AST_CAUSE_NUMBER_PORTED_NOT_HERE

14. QoR: ported number

 

 

 

AST_CAUSE_NORMAL_CLEARING

16. Normal Clearing

OR2_CAUSE_NORMAL_CLEARING

 

gone, success

AST_CAUSE_USER_BUSY

17. User busy

OR2_CAUSE_BUSY_NUMBER

486, 600

busy

AST_CAUSE_NO_USER_RESPONSE

18. No user responding

 

408

expired

AST_CAUSE_NO_ANSWER

19. No answer from user (user alerted)

OR2_CAUSE_NO_ANSWER

480, 483

 

AST_CAUSE_SUBSCRIBER_ABSENT

20. Subscriber absent

OR2_CAUSE_UNALLOCATED_NUMBER

 

 

AST_CAUSE_CALL_REJECTED

21. Call Rejected

 

401, 403, 407, 603

cancel, decline

AST_CAUSE_NUMBER_CHANGED

22. Number changed

 

410

 

AST_CAUSE_REDIRECTED_TO_NEW_DESTINATION

23. Redirected to new destination

 

 

 

AST_CAUSE_ANSWERED_ELSEWHERE

26. Non-selected user clearing

(ASTERISK-15057)

 

 

 

AST_CAUSE_DESTINATION_OUT_OF_ORDER

27. Destination out of order

OR2_CAUSE_OUT_OF_ORDER

502

 

AST_CAUSE_INVALID_NUMBER_FORMAT

28. Invalid number format

 

484

 

AST_CAUSE_FACILITY_REJECTED

29. Facility rejected

 

501

 

AST_CAUSE_RESPONSE_TO_STATUS_ENQUIRY

30. Response to STATUS ENQUIRY

 

 

 

AST_CAUSE_NORMAL_UNSPECIFIED

31. Normal, unspecified

 

 

 

AST_CAUSE_NORMAL_CIRCUIT_CONGESTION

34. No circuit/channel available

(Note that we've called this "Circuit/channel congestion" for a while which can cause confusion with code 42)

OR2_CAUSE_NETWORK_CONGESTION

 

general-error

AST_CAUSE_NETWORK_OUT_OF_ORDER

38. Network out of order

 

500

 

AST_CAUSE_NORMAL_TEMPORARY_FAILURE

41. Temporary failure

 

409

 

AST_CAUSE_SWITCH_CONGESTION

42. Switching equipment congestion

 

5xx

failed-application

AST_CAUSE_ACCESS_INFO_DISCARDED

43. Access information discarded

 

 

 

AST_CAUSE_REQUESTED_CHAN_UNAVAIL

44. Requested circuit/channel not available

 

 

 

AST_CAUSE_FACILITY_NOT_SUBSCRIBED

50. Requested facility not subscribed

 

 

 

AST_CAUSE_OUTGOING_CALL_BARRED

52. Outgoing call barred

 

 

 

AST_CAUSE_INCOMING_CALL_BARRED

54. Incoming call barred

 

 

 

AST_CAUSE_BEARERCAPABILITY_NOTAUTH

57. Bearer capability not authorized

 

 

 

AST_CAUSE_BEARERCAPABILITY_NOTAVAIL

58. Bearer capability not presently available

 

488, 606

incompatible-parameters, media-error, unsupported-applications

AST_CAUSE_BEARERCAPABILITY_NOTIMPL

65. Bearer capability not implemented

 

 

 

AST_CAUSE_CHAN_NOT_IMPLEMENTED

66. Channel type not implemented

 

 

 

AST_CAUSE_FACILITY_NOT_IMPLEMENTED

69. Requested facility not implemented

 

 

unsupported-transports

AST_CAUSE_INVALID_CALL_REFERENCE

81. Invalid call reference value

 

 

 

AST_CAUSE_INCOMPATIBLE_DESTINATION

88. Incompatible destination

 

 

 

AST_CAUSE_INVALID_MSG_UNSPECIFIED

95. Invalid message unspecified

 

 

 

AST_CAUSE_MANDATORY_IE_MISSING

96. Mandatory information element is missing

 

 

 

AST_CAUSE_MESSAGE_TYPE_NONEXIST

97. Message type non-existent or not implemented

 

 

 

AST_CAUSE_WRONG_MESSAGE

98. Message not compatible with call state or message type non-existent or not implemented

 

 

 

AST_CAUSE_IE_NONEXIST

99. Information element nonexistent or not implemented

 

 

 

AST_CAUSE_INVALID_IE_CONTENTS

100. Invalid information element contents

 

 

 

AST_CAUSE_WRONG_CALL_STATE

101. Message not compatible with call state

 

 

 

AST_CAUSE_RECOVERY_ON_TIMER_EXPIRE

102. Recover on timer expiry

 

504

timeout

AST_CAUSE_MANDATORY_IE_LENGTH_ERROR

? Mandatory IE length error

 

 

 

AST_CAUSE_PROTOCOL_ERROR

111. Protocol error, unspecified

 

 

failed-transport, security-error

AST_CAUSE_INTERWORKING

127. Interworking, unspecified

 

4xx, 505, 6xx

connectivity-error

Notes

  • The hangup cause AST_CAUSE_NOT_DEFINED is not actually a Q.931 cause code, and is used to capture hangup causes that do not map cleanly to a Q.931 cause code.
  • IAX2, ISDN, and SS7 are all subsets of the cause codes listed above.
  • Analog will always have a hangup cause code of AST_CAUSE_NORMAL_CLEARING.
  • SIP causes of 4xx, 5xx, and 6xx correspond to all 400, 500, and 600 response codes not explicitly listed in the table above.
  • AST_CAUSE_UNREGISTERED maps to AST_CAUSE_SUBSCRIBER_ABSENT. This error condition is raised when the endpoint is known but has unregistered itself somehow from Asterisk, e.g., a SIP peer has not registered or sent a REGISTER request with an expiration of 0.
  • No labels