OPAL Version 3.10.4

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

causecode.h
Go to the documentation of this file.
1 /*
2 *
3 * Inter Asterisk Exchange 2
4 *
5 * Open Phone Abstraction Library (OPAL)
6 *
7 * List of the defines which enumerate the reason why calls end.
8 *
9 * Copyright (c) 2005 Indranet Technologies Ltd.
10 *
11 * The contents of this file are subject to the Mozilla Public License
12 * Version 1.0 (the "License"); you may not use this file except in
13 * compliance with the License. You may obtain a copy of the License at
14 * http://www.mozilla.org/MPL/
15 *
16 * Software distributed under the License is distributed on an "AS IS"
17 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
18 * the License for the specific language governing rights and limitations
19 * under the License.
20 *
21 * The Original Code is Open Phone Abstraction Library.
22 *
23 * The Initial Developer of the Original Code is Indranet Technologies Ltd.
24 *
25 * The author of this code is Derek J Smithies
26 *
27 * $Revision: 24606 $
28 * $Author: dereksmithies $
29 * $Date: 2010-07-28 22:51:05 -0500 (Wed, 28 Jul 2010) $
30 */
31
32 #ifndef OPAL_IAX2_CAUSECODE_H
33 #define OPAL_IAX2_CAUSECODE_H
34
35 #include <opal/buildopts.h>
36
37 #if OPAL_IAX2
38
39 #include <iax2/ies.h>
40
42
43 class IAX2IeCauseCode : public IAX2IeByte
44 {
45 PCLASSINFO(IAX2IeCauseCode, IAX2IeByte);
46 public:
48 enum CauseCodes {
49 Unallocated = 1,
50 NoRouteTransitNet = 2,
51 NoRouteDestination = 3,
52 ChannelUnacceptable = 6,
53 CallAwardedDelivered = 7,
54 NormalClearing = 16,
55 UserBusy = 17,
56 NoUserResponse = 18,
57 NoAnswer = 19,
58 CallRejected = 21,
59 NumberChanged = 22,
60 DestinationOutOfOrder = 27,
61 InvalidNumberFormat = 28,
62 FacilityRejected = 29,
63 ResponseToStatusEnquiry = 30,
64 NormalUnspecified = 31,
65 NormalCircuitCongestion = 34,
66 NetworkOutOfOrder = 38,
67 NormalTemporaryFailure = 41,
68 SwitchCongestion = 42,
69 AccessInfoDiscarded = 43,
70 RequestedChanUnavail = 44,
71 PreEmpted = 45,
72 FacilityNotSubscribed = 50,
73 OutgoingCallBarred = 52,
74 IncomingCallBarred = 54,
75 BearerCapabilityNotauth = 57,
76 BearerCapabilityNotAvail = 58,
77 BearerCapabilityNotimpl = 65,
78 ChanNotImplemented = 66,
79 FacilityNotImplemented = 69,
80 InvalidCallReference = 81,
81 IncompatibleDestination = 88,
82 InvalidMsgUnspecified = 95,
83 MandatoryIeMissing = 96,
84 MessageTypeNonexist = 97,
85 WrongMessage = 98,
86 IeNonexist = 99,
87 InvalidIeContents = 100,
88 WrpngCallState = 101,
89 RecoveryOnTimerExpire = 102,
90 MandatoryIeLengthError = 103,
91 ProtocolError = 111,
92 Interworking = 127,
94 /* Special Asterisk aliases */
95 Busy = UserBusy,
96 Failure = NetworkOutOfOrder,
97 Normal = NormalClearing,
98 Congestion = NormalCircuitCongestion,
99 Unregistered = NoRouteDestination,
100 NotDefined = 0,
101 NoSuchDriver = ChanNotImplemented,
102 };
103
107 IAX2IeCauseCode(BYTE length, BYTE *srcData) : IAX2IeByte(length, srcData) { };
108
110 IAX2IeCauseCode(BYTE newValue) : IAX2IeByte(newValue) { }
111
113 virtual BYTE GetKeyValue() const { return ie_causeCode; }
114
116 void PrintOn(ostream & str) const;
117
120 virtual void StoreDataIn(IAX2IeData &res) { res.causeCode = dataValue; }
121
122 };
123
124 #endif // OPAL_IAX2
125
126 #endif // OPAL_IAX2_CAUSECODE_H
127
128 /* The comment below is magic for those who use emacs to edit this file.
129 * With the comment below, the tab key does auto indent to 2 spaces.
130 *
131 * Local Variables:
132 * mode:c
133 * c-basic-offset:2
134 * End:
135 */