causes.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. /*
  2. * Asterisk -- An open source telephony toolkit.
  3. *
  4. * Copyright (C) 1999 - 2005, Digium, Inc.
  5. *
  6. * Martin Pycko <martinp@digium.com>
  7. *
  8. * See http://www.asterisk.org for more information about
  9. * the Asterisk project. Please do not directly contact
  10. * any of the maintainers of this project for assistance;
  11. * the project provides a web site, mailing lists and IRC
  12. * channels for your use.
  13. *
  14. * This program is free software, distributed under the terms of
  15. * the GNU General Public License Version 2. See the LICENSE file
  16. * at the top of the source tree.
  17. */
  18. /*! \file
  19. * \brief Internal Asterisk hangup causes
  20. */
  21. #ifndef _ASTERISK_CAUSES_H
  22. #define _ASTERISK_CAUSES_H
  23. /*! \page AstCauses Hangup Causes for Asterisk
  24. The Asterisk hangup causes are delivered to the dialplan in the
  25. ${HANGUPCAUSE} channel variable after a call (after execution
  26. of "dial").
  27. In SIP, we have a conversion table to convert between SIP
  28. return codes and Q.931 both ways. This is to improve SIP/ISDN
  29. compatibility.
  30. These are the current codes, based on the Q.850/Q.931
  31. specification:
  32. - AST_CAUSE_UNALLOCATED 1
  33. - AST_CAUSE_NO_ROUTE_TRANSIT_NET 2
  34. - AST_CAUSE_NO_ROUTE_DESTINATION 3
  35. - AST_CAUSE_MISDIALLED_TRUNK_PREFIX 5
  36. - AST_CAUSE_CHANNEL_UNACCEPTABLE 6
  37. - AST_CAUSE_CALL_AWARDED_DELIVERED 7
  38. - AST_CAUSE_PRE_EMPTED 8
  39. - AST_CAUSE_NUMBER_PORTED_NOT_HERE 14
  40. - AST_CAUSE_NORMAL_CLEARING 16
  41. - AST_CAUSE_USER_BUSY 17
  42. - AST_CAUSE_NO_USER_RESPONSE 18
  43. - AST_CAUSE_NO_ANSWER 19
  44. - AST_CAUSE_CALL_REJECTED 21
  45. - AST_CAUSE_NUMBER_CHANGED 22
  46. - AST_CAUSE_REDIRECTED_TO_NEW_DESTINATION 23
  47. - AST_CAUSE_ANSWERED_ELSEWHERE 26
  48. - AST_CAUSE_DESTINATION_OUT_OF_ORDER 27
  49. - AST_CAUSE_INVALID_NUMBER_FORMAT 28
  50. - AST_CAUSE_FACILITY_REJECTED 29
  51. - AST_CAUSE_RESPONSE_TO_STATUS_ENQUIRY 30
  52. - AST_CAUSE_NORMAL_UNSPECIFIED 31
  53. - AST_CAUSE_NORMAL_CIRCUIT_CONGESTION 34
  54. - AST_CAUSE_NETWORK_OUT_OF_ORDER 38
  55. - AST_CAUSE_NORMAL_TEMPORARY_FAILURE 41
  56. - AST_CAUSE_SWITCH_CONGESTION 42
  57. - AST_CAUSE_ACCESS_INFO_DISCARDED 43
  58. - AST_CAUSE_REQUESTED_CHAN_UNAVAIL 44
  59. - AST_CAUSE_FACILITY_NOT_SUBSCRIBED 50
  60. - AST_CAUSE_OUTGOING_CALL_BARRED 52
  61. - AST_CAUSE_INCOMING_CALL_BARRED 54
  62. - AST_CAUSE_BEARERCAPABILITY_NOTAUTH 57
  63. - AST_CAUSE_BEARERCAPABILITY_NOTAVAIL 58
  64. - AST_CAUSE_BEARERCAPABILITY_NOTIMPL 65
  65. - AST_CAUSE_CHAN_NOT_IMPLEMENTED 66
  66. - AST_CAUSE_FACILITY_NOT_IMPLEMENTED 69
  67. - AST_CAUSE_INVALID_CALL_REFERENCE 81
  68. - AST_CAUSE_INCOMPATIBLE_DESTINATION 88
  69. - AST_CAUSE_INVALID_MSG_UNSPECIFIED 95
  70. - AST_CAUSE_MANDATORY_IE_MISSING 96
  71. - AST_CAUSE_MESSAGE_TYPE_NONEXIST 97
  72. - AST_CAUSE_WRONG_MESSAGE 98
  73. - AST_CAUSE_IE_NONEXIST 99
  74. - AST_CAUSE_INVALID_IE_CONTENTS 100
  75. - AST_CAUSE_WRONG_CALL_STATE 101
  76. - AST_CAUSE_RECOVERY_ON_TIMER_EXPIRE 102
  77. - AST_CAUSE_MANDATORY_IE_LENGTH_ERROR 103
  78. - AST_CAUSE_PROTOCOL_ERROR 111
  79. - AST_CAUSE_INTERWORKING 127
  80. For more information:
  81. - \ref app_dial.c
  82. */
  83. /*! \name Causes for disconnection (from Q.850/Q.931)
  84. * These are the internal cause codes used in Asterisk.
  85. * \ref AstCauses
  86. */
  87. /*@{ */
  88. #define AST_CAUSE_UNALLOCATED 1
  89. #define AST_CAUSE_NO_ROUTE_TRANSIT_NET 2
  90. #define AST_CAUSE_NO_ROUTE_DESTINATION 3
  91. #define AST_CAUSE_MISDIALLED_TRUNK_PREFIX 5
  92. #define AST_CAUSE_CHANNEL_UNACCEPTABLE 6
  93. #define AST_CAUSE_CALL_AWARDED_DELIVERED 7
  94. #define AST_CAUSE_PRE_EMPTED 8
  95. #define AST_CAUSE_NUMBER_PORTED_NOT_HERE 14
  96. #define AST_CAUSE_NORMAL_CLEARING 16
  97. #define AST_CAUSE_USER_BUSY 17
  98. #define AST_CAUSE_NO_USER_RESPONSE 18
  99. #define AST_CAUSE_NO_ANSWER 19
  100. #define AST_CAUSE_SUBSCRIBER_ABSENT 20
  101. #define AST_CAUSE_CALL_REJECTED 21
  102. #define AST_CAUSE_NUMBER_CHANGED 22
  103. #define AST_CAUSE_REDIRECTED_TO_NEW_DESTINATION 23
  104. #define AST_CAUSE_ANSWERED_ELSEWHERE 26
  105. #define AST_CAUSE_DESTINATION_OUT_OF_ORDER 27
  106. #define AST_CAUSE_INVALID_NUMBER_FORMAT 28
  107. #define AST_CAUSE_FACILITY_REJECTED 29
  108. #define AST_CAUSE_RESPONSE_TO_STATUS_ENQUIRY 30
  109. #define AST_CAUSE_NORMAL_UNSPECIFIED 31
  110. #define AST_CAUSE_NORMAL_CIRCUIT_CONGESTION 34
  111. #define AST_CAUSE_NETWORK_OUT_OF_ORDER 38
  112. #define AST_CAUSE_NORMAL_TEMPORARY_FAILURE 41
  113. #define AST_CAUSE_SWITCH_CONGESTION 42
  114. #define AST_CAUSE_ACCESS_INFO_DISCARDED 43
  115. #define AST_CAUSE_REQUESTED_CHAN_UNAVAIL 44
  116. #define AST_CAUSE_FACILITY_NOT_SUBSCRIBED 50
  117. #define AST_CAUSE_OUTGOING_CALL_BARRED 52
  118. #define AST_CAUSE_INCOMING_CALL_BARRED 54
  119. #define AST_CAUSE_BEARERCAPABILITY_NOTAUTH 57
  120. #define AST_CAUSE_BEARERCAPABILITY_NOTAVAIL 58
  121. #define AST_CAUSE_BEARERCAPABILITY_NOTIMPL 65
  122. #define AST_CAUSE_CHAN_NOT_IMPLEMENTED 66
  123. #define AST_CAUSE_FACILITY_NOT_IMPLEMENTED 69
  124. #define AST_CAUSE_INVALID_CALL_REFERENCE 81
  125. #define AST_CAUSE_INCOMPATIBLE_DESTINATION 88
  126. #define AST_CAUSE_INVALID_MSG_UNSPECIFIED 95
  127. #define AST_CAUSE_MANDATORY_IE_MISSING 96
  128. #define AST_CAUSE_MESSAGE_TYPE_NONEXIST 97
  129. #define AST_CAUSE_WRONG_MESSAGE 98
  130. #define AST_CAUSE_IE_NONEXIST 99
  131. #define AST_CAUSE_INVALID_IE_CONTENTS 100
  132. #define AST_CAUSE_WRONG_CALL_STATE 101
  133. #define AST_CAUSE_RECOVERY_ON_TIMER_EXPIRE 102
  134. #define AST_CAUSE_MANDATORY_IE_LENGTH_ERROR 103
  135. #define AST_CAUSE_PROTOCOL_ERROR 111
  136. #define AST_CAUSE_INTERWORKING 127
  137. /* Special Asterisk aliases */
  138. #define AST_CAUSE_BUSY AST_CAUSE_USER_BUSY
  139. #define AST_CAUSE_FAILURE AST_CAUSE_NETWORK_OUT_OF_ORDER
  140. #define AST_CAUSE_NORMAL AST_CAUSE_NORMAL_CLEARING
  141. #define AST_CAUSE_NOANSWER AST_CAUSE_NO_ANSWER
  142. #define AST_CAUSE_CONGESTION AST_CAUSE_NORMAL_CIRCUIT_CONGESTION
  143. #define AST_CAUSE_UNREGISTERED AST_CAUSE_SUBSCRIBER_ABSENT
  144. #define AST_CAUSE_NOTDEFINED 0
  145. #define AST_CAUSE_NOSUCHDRIVER AST_CAUSE_CHAN_NOT_IMPLEMENTED
  146. /*@} */
  147. #endif /* _ASTERISK_CAUSES_H */