causes.h

Go to the documentation of this file.
00001 /*
00002  * Asterisk -- An open source telephony toolkit.
00003  *
00004  * Copyright (C) 1999 - 2005, Digium, Inc.
00005  *
00006  * Martin Pycko <martinp@digium.com>
00007  *
00008  * See http://www.asterisk.org for more information about
00009  * the Asterisk project. Please do not directly contact
00010  * any of the maintainers of this project for assistance;
00011  * the project provides a web site, mailing lists and IRC
00012  * channels for your use.
00013  *
00014  * This program is free software, distributed under the terms of
00015  * the GNU General Public License Version 2. See the LICENSE file
00016  * at the top of the source tree.
00017  */
00018 
00019 /*! \file
00020  * \brief Internal Asterisk hangup causes
00021  */
00022 
00023 #ifndef _ASTERISK_CAUSES_H
00024 #define _ASTERISK_CAUSES_H
00025 
00026 /*! \page AstCauses Hangup Causes for Asterisk
00027 
00028 The Asterisk hangup causes are delivered to the dialplan in the
00029 ${HANGUPCAUSE} channel variable after a call (after execution
00030 of "dial").
00031 
00032 In SIP, we have a conversion table to convert between SIP
00033 return codes and Q.931 both ways. This is to improve SIP/ISDN
00034 compatibility.
00035 
00036 These are the current codes, based on the Q.850/Q.931
00037 specification:
00038 
00039    - AST_CAUSE_UNALLOCATED                      1
00040    - AST_CAUSE_NO_ROUTE_TRANSIT_NET             2
00041    - AST_CAUSE_NO_ROUTE_DESTINATION             3
00042    - AST_CAUSE_MISDIALLED_TRUNK_PREFIX          5
00043    - AST_CAUSE_CHANNEL_UNACCEPTABLE             6
00044    - AST_CAUSE_CALL_AWARDED_DELIVERED           7
00045    - AST_CAUSE_PRE_EMPTED                       8
00046    - AST_CAUSE_NUMBER_PORTED_NOT_HERE          14
00047    - AST_CAUSE_NORMAL_CLEARING                 16
00048    - AST_CAUSE_USER_BUSY                       17
00049    - AST_CAUSE_NO_USER_RESPONSE                18
00050    - AST_CAUSE_NO_ANSWER                       19
00051    - AST_CAUSE_CALL_REJECTED                   21
00052    - AST_CAUSE_NUMBER_CHANGED                  22
00053    - AST_CAUSE_REDIRECTED_TO_NEW_DESTINATION   23
00054    - AST_CAUSE_ANSWERED_ELSEWHERE              26
00055    - AST_CAUSE_DESTINATION_OUT_OF_ORDER        27
00056    - AST_CAUSE_INVALID_NUMBER_FORMAT           28
00057    - AST_CAUSE_FACILITY_REJECTED               29
00058    - AST_CAUSE_RESPONSE_TO_STATUS_ENQUIRY      30
00059    - AST_CAUSE_NORMAL_UNSPECIFIED              31
00060    - AST_CAUSE_NORMAL_CIRCUIT_CONGESTION       34
00061    - AST_CAUSE_NETWORK_OUT_OF_ORDER            38
00062    - AST_CAUSE_NORMAL_TEMPORARY_FAILURE        41
00063    - AST_CAUSE_SWITCH_CONGESTION               42
00064    - AST_CAUSE_ACCESS_INFO_DISCARDED           43
00065    - AST_CAUSE_REQUESTED_CHAN_UNAVAIL          44
00066    - AST_CAUSE_FACILITY_NOT_SUBSCRIBED         50
00067    - AST_CAUSE_OUTGOING_CALL_BARRED            52
00068    - AST_CAUSE_INCOMING_CALL_BARRED            54
00069    - AST_CAUSE_BEARERCAPABILITY_NOTAUTH        57
00070    - AST_CAUSE_BEARERCAPABILITY_NOTAVAIL       58
00071    - AST_CAUSE_BEARERCAPABILITY_NOTIMPL        65
00072    - AST_CAUSE_CHAN_NOT_IMPLEMENTED            66
00073    - AST_CAUSE_FACILITY_NOT_IMPLEMENTED        69
00074    - AST_CAUSE_INVALID_CALL_REFERENCE          81
00075    - AST_CAUSE_INCOMPATIBLE_DESTINATION        88
00076    - AST_CAUSE_INVALID_MSG_UNSPECIFIED         95
00077    - AST_CAUSE_MANDATORY_IE_MISSING            96
00078    - AST_CAUSE_MESSAGE_TYPE_NONEXIST           97
00079    - AST_CAUSE_WRONG_MESSAGE                   98
00080    - AST_CAUSE_IE_NONEXIST                     99
00081    - AST_CAUSE_INVALID_IE_CONTENTS            100
00082    - AST_CAUSE_WRONG_CALL_STATE               101
00083    - AST_CAUSE_RECOVERY_ON_TIMER_EXPIRE       102
00084    - AST_CAUSE_MANDATORY_IE_LENGTH_ERROR      103
00085    - AST_CAUSE_PROTOCOL_ERROR                 111
00086    - AST_CAUSE_INTERWORKING                   127
00087 
00088 For more information:
00089 - \ref app_dial.c
00090 */
00091 
00092 /*! \name Causes for disconnection (from Q.850/Q.931)
00093  *  These are the internal cause codes used in Asterisk.
00094  *  \ref AstCauses
00095  */
00096 /*@{ */
00097 #define AST_CAUSE_UNALLOCATED                    1
00098 #define AST_CAUSE_NO_ROUTE_TRANSIT_NET           2
00099 #define AST_CAUSE_NO_ROUTE_DESTINATION           3
00100 #define AST_CAUSE_MISDIALLED_TRUNK_PREFIX        5
00101 #define AST_CAUSE_CHANNEL_UNACCEPTABLE           6
00102 #define AST_CAUSE_CALL_AWARDED_DELIVERED         7
00103 #define AST_CAUSE_PRE_EMPTED                     8
00104 #define AST_CAUSE_NUMBER_PORTED_NOT_HERE        14
00105 #define AST_CAUSE_NORMAL_CLEARING               16
00106 #define AST_CAUSE_USER_BUSY                     17
00107 #define AST_CAUSE_NO_USER_RESPONSE              18
00108 #define AST_CAUSE_NO_ANSWER                     19
00109 #define AST_CAUSE_SUBSCRIBER_ABSENT             20
00110 #define AST_CAUSE_CALL_REJECTED                 21
00111 #define AST_CAUSE_NUMBER_CHANGED                22
00112 #define AST_CAUSE_REDIRECTED_TO_NEW_DESTINATION 23
00113 #define AST_CAUSE_ANSWERED_ELSEWHERE            26
00114 #define AST_CAUSE_DESTINATION_OUT_OF_ORDER      27
00115 #define AST_CAUSE_INVALID_NUMBER_FORMAT         28
00116 #define AST_CAUSE_FACILITY_REJECTED             29
00117 #define AST_CAUSE_RESPONSE_TO_STATUS_ENQUIRY    30
00118 #define AST_CAUSE_NORMAL_UNSPECIFIED            31
00119 #define AST_CAUSE_NORMAL_CIRCUIT_CONGESTION     34
00120 #define AST_CAUSE_NETWORK_OUT_OF_ORDER          38
00121 #define AST_CAUSE_NORMAL_TEMPORARY_FAILURE      41
00122 #define AST_CAUSE_SWITCH_CONGESTION             42
00123 #define AST_CAUSE_ACCESS_INFO_DISCARDED         43
00124 #define AST_CAUSE_REQUESTED_CHAN_UNAVAIL        44
00125 #define AST_CAUSE_FACILITY_NOT_SUBSCRIBED       50
00126 #define AST_CAUSE_OUTGOING_CALL_BARRED          52
00127 #define AST_CAUSE_INCOMING_CALL_BARRED          54
00128 #define AST_CAUSE_BEARERCAPABILITY_NOTAUTH      57
00129 #define AST_CAUSE_BEARERCAPABILITY_NOTAVAIL     58
00130 #define AST_CAUSE_BEARERCAPABILITY_NOTIMPL      65
00131 #define AST_CAUSE_CHAN_NOT_IMPLEMENTED          66
00132 #define AST_CAUSE_FACILITY_NOT_IMPLEMENTED      69
00133 #define AST_CAUSE_INVALID_CALL_REFERENCE        81
00134 #define AST_CAUSE_INCOMPATIBLE_DESTINATION      88
00135 #define AST_CAUSE_INVALID_MSG_UNSPECIFIED       95
00136 #define AST_CAUSE_MANDATORY_IE_MISSING          96
00137 #define AST_CAUSE_MESSAGE_TYPE_NONEXIST         97
00138 #define AST_CAUSE_WRONG_MESSAGE                 98
00139 #define AST_CAUSE_IE_NONEXIST                   99
00140 #define AST_CAUSE_INVALID_IE_CONTENTS          100
00141 #define AST_CAUSE_WRONG_CALL_STATE             101
00142 #define AST_CAUSE_RECOVERY_ON_TIMER_EXPIRE     102
00143 #define AST_CAUSE_MANDATORY_IE_LENGTH_ERROR    103
00144 #define AST_CAUSE_PROTOCOL_ERROR               111
00145 #define AST_CAUSE_INTERWORKING                 127
00146 
00147 /* Special Asterisk aliases */
00148 #define AST_CAUSE_BUSY          AST_CAUSE_USER_BUSY
00149 #define AST_CAUSE_FAILURE       AST_CAUSE_NETWORK_OUT_OF_ORDER
00150 #define AST_CAUSE_NORMAL        AST_CAUSE_NORMAL_CLEARING
00151 #define AST_CAUSE_NOANSWER      AST_CAUSE_NO_ANSWER
00152 #define AST_CAUSE_CONGESTION    AST_CAUSE_NORMAL_CIRCUIT_CONGESTION
00153 #define AST_CAUSE_UNREGISTERED  AST_CAUSE_SUBSCRIBER_ABSENT
00154 #define AST_CAUSE_NOTDEFINED    0
00155 #define AST_CAUSE_NOSUCHDRIVER  AST_CAUSE_CHAN_NOT_IMPLEMENTED
00156 /*@} */
00157 
00158 #endif /* _ASTERISK_CAUSES_H */

Generated on Thu Apr 16 06:27:16 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6