A lot of doxygen updates
[asterisk/asterisk.git] / include / asterisk / causes.h
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
19 /*! \file
20  * \brief Internal Asterisk hangup causes
21  */
22
23 #ifndef _ASTERISK_CAUSES_H
24 #define _ASTERISK_CAUSES_H
25
26 /*! \page AstCauses Hangup Causes for Asterisk
27
28 The Asterisk hangup causes are delivered to the dialplan in the
29 ${HANGUPCAUSE} channel variable after a call (after execution
30 of "dial"). 
31
32 In SIP, we have a conversion table to convert between SIP
33 return codes and Q.931 both ways. This is to improve SIP/ISDN
34 compatibility.
35
36 These are the current codes, based on the Q.931
37 specification:
38
39         - AST_CAUSE_UNALLOCATED                         1
40         - AST_CAUSE_NO_ROUTE_TRANSIT_NET                        2
41         - AST_CAUSE_NO_ROUTE_DESTINATION                        3
42         - AST_CAUSE_CHANNEL_UNACCEPTABLE                        6
43         - AST_CAUSE_CALL_AWARDED_DELIVERED              7
44         - AST_CAUSE_NORMAL_CLEARING                     16
45         - AST_CAUSE_USER_BUSY                           17
46         - AST_CAUSE_NO_USER_RESPONSE                    18
47         - AST_CAUSE_NO_ANSWER                           19
48         - AST_CAUSE_CALL_REJECTED                               21
49         - AST_CAUSE_NUMBER_CHANGED                      22
50         - AST_CAUSE_DESTINATION_OUT_OF_ORDER            27
51         - AST_CAUSE_INVALID_NUMBER_FORMAT                       28
52         - AST_CAUSE_FACILITY_REJECTED                   29
53         - AST_CAUSE_RESPONSE_TO_STATUS_ENQUIRY          30
54         - AST_CAUSE_NORMAL_UNSPECIFIED                  31
55         - AST_CAUSE_NORMAL_CIRCUIT_CONGESTION           34
56         - AST_CAUSE_NETWORK_OUT_OF_ORDER                        38
57         - AST_CAUSE_NORMAL_TEMPORARY_FAILURE            41
58         - AST_CAUSE_SWITCH_CONGESTION                   42
59         - AST_CAUSE_ACCESS_INFO_DISCARDED                       43
60         - AST_CAUSE_REQUESTED_CHAN_UNAVAIL              44
61         - AST_CAUSE_PRE_EMPTED                          45
62         - AST_CAUSE_FACILITY_NOT_SUBSCRIBED             50
63         - AST_CAUSE_OUTGOING_CALL_BARRED                52
64         - AST_CAUSE_INCOMING_CALL_BARRED                54
65         - AST_CAUSE_BEARERCAPABILITY_NOTAUTH            57
66         - AST_CAUSE_BEARERCAPABILITY_NOTAVAIL           58
67         - AST_CAUSE_BEARERCAPABILITY_NOTIMPL            65
68         - AST_CAUSE_CHAN_NOT_IMPLEMENTED                66
69         - AST_CAUSE_FACILITY_NOT_IMPLEMENTED            69
70         - AST_CAUSE_INVALID_CALL_REFERENCE              81
71         - AST_CAUSE_INCOMPATIBLE_DESTINATION            88
72         - AST_CAUSE_INVALID_MSG_UNSPECIFIED             95
73         - AST_CAUSE_MANDATORY_IE_MISSING                        96
74         - AST_CAUSE_MESSAGE_TYPE_NONEXIST                       97
75         - AST_CAUSE_WRONG_MESSAGE                               98
76         - AST_CAUSE_IE_NONEXIST                         99
77         - AST_CAUSE_INVALID_IE_CONTENTS                 100
78         - AST_CAUSE_WRONG_CALL_STATE                    101
79         - AST_CAUSE_RECOVERY_ON_TIMER_EXPIRE            102
80         - AST_CAUSE_MANDATORY_IE_LENGTH_ERROR           103
81         - AST_CAUSE_PROTOCOL_ERROR                      111
82         - AST_CAUSE_INTERWORKING                                127
83
84 For more information:
85 - \ref app_dial.c
86 */
87
88 /*! \name Causes for disconnection (from Q.931) 
89         These are the internal cause codes used in Asterisk.
90         \ref AstCauses
91 */
92 /*@{ */
93 #define AST_CAUSE_UNALLOCATED                           1
94 #define AST_CAUSE_NO_ROUTE_TRANSIT_NET                  2
95 #define AST_CAUSE_NO_ROUTE_DESTINATION                  3
96 #define AST_CAUSE_CHANNEL_UNACCEPTABLE                  6
97 #define AST_CAUSE_CALL_AWARDED_DELIVERED                7
98 #define AST_CAUSE_NORMAL_CLEARING                       16
99 #define AST_CAUSE_USER_BUSY                             17
100 #define AST_CAUSE_NO_USER_RESPONSE                      18
101 #define AST_CAUSE_NO_ANSWER                             19
102 #define AST_CAUSE_CALL_REJECTED                         21
103 #define AST_CAUSE_NUMBER_CHANGED                        22
104 #define AST_CAUSE_DESTINATION_OUT_OF_ORDER              27
105 #define AST_CAUSE_INVALID_NUMBER_FORMAT                 28
106 #define AST_CAUSE_FACILITY_REJECTED                     29
107 #define AST_CAUSE_RESPONSE_TO_STATUS_ENQUIRY            30
108 #define AST_CAUSE_NORMAL_UNSPECIFIED                    31
109 #define AST_CAUSE_NORMAL_CIRCUIT_CONGESTION             34
110 #define AST_CAUSE_NETWORK_OUT_OF_ORDER                  38
111 #define AST_CAUSE_NORMAL_TEMPORARY_FAILURE              41
112 #define AST_CAUSE_SWITCH_CONGESTION                     42
113 #define AST_CAUSE_ACCESS_INFO_DISCARDED                 43
114 #define AST_CAUSE_REQUESTED_CHAN_UNAVAIL                44
115 #define AST_CAUSE_PRE_EMPTED                            45
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
138 /* Special Asterisk aliases */
139 #define AST_CAUSE_BUSY                                  AST_CAUSE_USER_BUSY
140 #define AST_CAUSE_FAILURE                               AST_CAUSE_NETWORK_OUT_OF_ORDER
141 #define AST_CAUSE_NORMAL                                AST_CAUSE_NORMAL_CLEARING
142 #define AST_CAUSE_NOANSWER                              AST_CAUSE_NO_ANSWER
143 #define AST_CAUSE_CONGESTION                            AST_CAUSE_NORMAL_CIRCUIT_CONGESTION
144 #define AST_CAUSE_UNREGISTERED                          AST_CAUSE_NO_ROUTE_DESTINATION
145 #define AST_CAUSE_NOTDEFINED                            0
146 #define AST_CAUSE_NOSUCHDRIVER                          AST_CAUSE_CHAN_NOT_IMPLEMENTED
147 /*@{ */
148
149 #endif /* _ASTERISK_CAUSES_H */