OPAL  Version 3.18.8
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 
28 #ifndef OPAL_IAX2_CAUSECODE_H
29 #define OPAL_IAX2_CAUSECODE_H
30 
31 #include <opal_config.h>
32 
33 #if OPAL_IAX2
34 
35 #include <iax2/ies.h>
36 
38 
40 {
41  PCLASSINFO(IAX2IeCauseCode, IAX2IeByte);
42  public:
44  enum CauseCodes {
51  UserBusy = 17,
53  NoAnswer = 19,
54  CallRejected = 21,
67  PreEmpted = 45,
81  WrongMessage = 98,
82  IeNonexist = 99,
87  ProtocolError = 111,
88  Interworking = 127,
90  /* Special Asterisk aliases */
96  NotDefined = 0,
98  };
99 
103  IAX2IeCauseCode(BYTE length, BYTE *srcData) : IAX2IeByte(length, srcData) { };
104 
106  IAX2IeCauseCode(BYTE newValue) : IAX2IeByte(newValue) { }
107 
109  virtual BYTE GetKeyValue() const { return ie_causeCode; }
110 
112  void PrintOn(ostream & str) const;
113 
116  virtual void StoreDataIn(IAX2IeData &res) { res.causeCode = dataValue; }
117 
118 };
119 
120 #endif // OPAL_IAX2
121 
122 #endif // OPAL_IAX2_CAUSECODE_H
123 
124 /* The comment below is magic for those who use emacs to edit this file.
125  * With the comment below, the tab key does auto indent to 2 spaces.
126  *
127  * Local Variables:
128  * mode:c
129  * c-basic-offset:2
130  * End:
131  */
Definition: causecode.h:62
Definition: causecode.h:88
Definition: causecode.h:92
Definition: causecode.h:47
Definition: causecode.h:54
Definition: causecode.h:51
Definition: causecode.h:48
Definition: causecode.h:52
Definition: causecode.h:78
Definition: causecode.h:50
Definition: causecode.h:84
Definition: causecode.h:83
Definition: causecode.h:94
Definition: causecode.h:60
Definition: ies.h:235
Definition: causecode.h:49
Definition: causecode.h:45
Definition: causecode.h:67
Definition: causecode.h:58
Definition: causecode.h:86
Definition: causecode.h:57
Definition: causecode.h:46
Definition: causecode.h:87
Definition: causecode.h:56
Definition: causecode.h:95
Definition: causecode.h:75
Definition: ies.h:98
virtual void StoreDataIn(IAX2IeData &res)
Definition: causecode.h:116
Definition: causecode.h:82
Definition: iedata.h:51
Definition: causecode.h:81
Definition: causecode.h:68
BYTE causeCode
Definition: iedata.h:97
Definition: causecode.h:79
IAX2IeCauseCode(BYTE newValue)
Definition: causecode.h:106
IAX2IeCauseCode(BYTE length, BYTE *srcData)
Definition: causecode.h:103
Definition: causecode.h:85
Definition: causecode.h:80
Definition: causecode.h:63
Definition: causecode.h:97
Definition: causecode.h:39
Definition: causecode.h:65
Definition: causecode.h:96
Definition: causecode.h:53
CauseCodes
Definition: causecode.h:44
virtual BYTE GetKeyValue() const
Definition: causecode.h:109
Definition: causecode.h:76
Definition: causecode.h:93
BYTE dataValue
Definition: ies.h:274
Definition: causecode.h:66
void PrintOn(ostream &str) const
Definition: causecode.h:64
Definition: causecode.h:70
Definition: causecode.h:91
Definition: causecode.h:55
Definition: causecode.h:69
Definition: causecode.h:74