Asterisk - The Open Source Telephony Project GIT-master-f3e88d3
causes.h
Go to the documentation of this file.
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
28The Asterisk hangup causes are delivered to the dialplan in the
29${HANGUPCAUSE} channel variable after a call (after execution
30of "dial").
31
32In SIP, we have a conversion table to convert between SIP
33return codes and Q.931 both ways. This is to improve SIP/ISDN
34compatibility.
35
36These are the current codes, based on the Q.850/Q.931
37specification:
38
39 - AST_CAUSE_UNALLOCATED 1
40 - AST_CAUSE_NO_ROUTE_TRANSIT_NET 2
41 - AST_CAUSE_NO_ROUTE_DESTINATION 3
42 - AST_CAUSE_MISDIALLED_TRUNK_PREFIX 5
43 - AST_CAUSE_CHANNEL_UNACCEPTABLE 6
44 - AST_CAUSE_CALL_AWARDED_DELIVERED 7
45 - AST_CAUSE_PRE_EMPTED 8
46 - AST_CAUSE_NUMBER_PORTED_NOT_HERE 14
47 - AST_CAUSE_NORMAL_CLEARING 16
48 - AST_CAUSE_USER_BUSY 17
49 - AST_CAUSE_NO_USER_RESPONSE 18
50 - AST_CAUSE_NO_ANSWER 19
51 - AST_CAUSE_CALL_REJECTED 21
52 - AST_CAUSE_NUMBER_CHANGED 22
53 - AST_CAUSE_REDIRECTED_TO_NEW_DESTINATION 23
54 - AST_CAUSE_ANSWERED_ELSEWHERE 26
55 - AST_CAUSE_DESTINATION_OUT_OF_ORDER 27
56 - AST_CAUSE_INVALID_NUMBER_FORMAT 28
57 - AST_CAUSE_FACILITY_REJECTED 29
58 - AST_CAUSE_RESPONSE_TO_STATUS_ENQUIRY 30
59 - AST_CAUSE_NORMAL_UNSPECIFIED 31
60 - AST_CAUSE_NORMAL_CIRCUIT_CONGESTION 34
61 - AST_CAUSE_NETWORK_OUT_OF_ORDER 38
62 - AST_CAUSE_NORMAL_TEMPORARY_FAILURE 41
63 - AST_CAUSE_SWITCH_CONGESTION 42
64 - AST_CAUSE_ACCESS_INFO_DISCARDED 43
65 - AST_CAUSE_REQUESTED_CHAN_UNAVAIL 44
66 - AST_CAUSE_FACILITY_NOT_SUBSCRIBED 50
67 - AST_CAUSE_OUTGOING_CALL_BARRED 52
68 - AST_CAUSE_INCOMING_CALL_BARRED 54
69 - AST_CAUSE_BEARERCAPABILITY_NOTAUTH 57
70 - AST_CAUSE_BEARERCAPABILITY_NOTAVAIL 58
71 - AST_CAUSE_BEARERCAPABILITY_NOTIMPL 65
72 - AST_CAUSE_CHAN_NOT_IMPLEMENTED 66
73 - AST_CAUSE_FACILITY_NOT_IMPLEMENTED 69
74 - AST_CAUSE_INVALID_CALL_REFERENCE 81
75 - AST_CAUSE_INCOMPATIBLE_DESTINATION 88
76 - AST_CAUSE_INVALID_MSG_UNSPECIFIED 95
77 - AST_CAUSE_MANDATORY_IE_MISSING 96
78 - AST_CAUSE_MESSAGE_TYPE_NONEXIST 97
79 - AST_CAUSE_WRONG_MESSAGE 98
80 - AST_CAUSE_IE_NONEXIST 99
81 - AST_CAUSE_INVALID_IE_CONTENTS 100
82 - AST_CAUSE_WRONG_CALL_STATE 101
83 - AST_CAUSE_RECOVERY_ON_TIMER_EXPIRE 102
84 - AST_CAUSE_MANDATORY_IE_LENGTH_ERROR 103
85 - AST_CAUSE_PROTOCOL_ERROR 111
86 - AST_CAUSE_INTERWORKING 127
87
88For more information:
89- \ref app_dial.c
90*/
91
92/*! \name Causes for disconnection (from Q.850/Q.931)
93 * These are the internal cause codes used in Asterisk.
94 * \ref AstCauses
95 *
96 * @{
97 */
98#define AST_CAUSE_UNALLOCATED 1
99#define AST_CAUSE_NO_ROUTE_TRANSIT_NET 2
100#define AST_CAUSE_NO_ROUTE_DESTINATION 3
101#define AST_CAUSE_MISDIALLED_TRUNK_PREFIX 5
102#define AST_CAUSE_CHANNEL_UNACCEPTABLE 6
103#define AST_CAUSE_CALL_AWARDED_DELIVERED 7
104#define AST_CAUSE_PRE_EMPTED 8
105#define AST_CAUSE_NUMBER_PORTED_NOT_HERE 14
106#define AST_CAUSE_NORMAL_CLEARING 16
107#define AST_CAUSE_USER_BUSY 17
108#define AST_CAUSE_NO_USER_RESPONSE 18
109#define AST_CAUSE_NO_ANSWER 19
110#define AST_CAUSE_SUBSCRIBER_ABSENT 20
111#define AST_CAUSE_CALL_REJECTED 21
112#define AST_CAUSE_NUMBER_CHANGED 22
113#define AST_CAUSE_REDIRECTED_TO_NEW_DESTINATION 23
114#define AST_CAUSE_ANSWERED_ELSEWHERE 26
115#define AST_CAUSE_DESTINATION_OUT_OF_ORDER 27
116#define AST_CAUSE_INVALID_NUMBER_FORMAT 28
117#define AST_CAUSE_FACILITY_REJECTED 29
118#define AST_CAUSE_RESPONSE_TO_STATUS_ENQUIRY 30
119#define AST_CAUSE_NORMAL_UNSPECIFIED 31
120#define AST_CAUSE_NORMAL_CIRCUIT_CONGESTION 34
121#define AST_CAUSE_NETWORK_OUT_OF_ORDER 38
122#define AST_CAUSE_NORMAL_TEMPORARY_FAILURE 41
123#define AST_CAUSE_SWITCH_CONGESTION 42
124#define AST_CAUSE_ACCESS_INFO_DISCARDED 43
125#define AST_CAUSE_REQUESTED_CHAN_UNAVAIL 44
126#define AST_CAUSE_FACILITY_NOT_SUBSCRIBED 50
127#define AST_CAUSE_OUTGOING_CALL_BARRED 52
128#define AST_CAUSE_INCOMING_CALL_BARRED 54
129#define AST_CAUSE_BEARERCAPABILITY_NOTAUTH 57
130#define AST_CAUSE_BEARERCAPABILITY_NOTAVAIL 58
131#define AST_CAUSE_BEARERCAPABILITY_NOTIMPL 65
132#define AST_CAUSE_CHAN_NOT_IMPLEMENTED 66
133#define AST_CAUSE_FACILITY_NOT_IMPLEMENTED 69
134#define AST_CAUSE_INVALID_CALL_REFERENCE 81
135#define AST_CAUSE_INCOMPATIBLE_DESTINATION 88
136#define AST_CAUSE_INVALID_MSG_UNSPECIFIED 95
137#define AST_CAUSE_MANDATORY_IE_MISSING 96
138#define AST_CAUSE_MESSAGE_TYPE_NONEXIST 97
139#define AST_CAUSE_WRONG_MESSAGE 98
140#define AST_CAUSE_IE_NONEXIST 99
141#define AST_CAUSE_INVALID_IE_CONTENTS 100
142#define AST_CAUSE_WRONG_CALL_STATE 101
143#define AST_CAUSE_RECOVERY_ON_TIMER_EXPIRE 102
144#define AST_CAUSE_MANDATORY_IE_LENGTH_ERROR 103
145#define AST_CAUSE_PROTOCOL_ERROR 111
146#define AST_CAUSE_INTERWORKING 127
147
148/* Special Asterisk aliases */
149#define AST_CAUSE_BUSY AST_CAUSE_USER_BUSY
150#define AST_CAUSE_FAILURE AST_CAUSE_NETWORK_OUT_OF_ORDER
151#define AST_CAUSE_NORMAL AST_CAUSE_NORMAL_CLEARING
152#define AST_CAUSE_NOANSWER AST_CAUSE_NO_ANSWER
153#define AST_CAUSE_CONGESTION AST_CAUSE_NORMAL_CIRCUIT_CONGESTION
154#define AST_CAUSE_UNREGISTERED AST_CAUSE_SUBSCRIBER_ABSENT
155#define AST_CAUSE_NOTDEFINED 0
156#define AST_CAUSE_NOSUCHDRIVER AST_CAUSE_CHAN_NOT_IMPLEMENTED
157
158/*! @} */
159
160#endif /* _ASTERISK_CAUSES_H */