OPAL  Version 3.10.10
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 
44 {
45  PCLASSINFO(IAX2IeCauseCode, IAX2IeByte);
46  public:
48  enum CauseCodes {
55  UserBusy = 17,
57  NoAnswer = 19,
58  CallRejected = 21,
71  PreEmpted = 45,
85  WrongMessage = 98,
86  IeNonexist = 99,
91  ProtocolError = 111,
92  Interworking = 127,
94  /* Special Asterisk aliases */
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  */
Definition: causecode.h:66
Definition: causecode.h:92
Definition: causecode.h:96
Definition: causecode.h:51
Definition: causecode.h:58
Definition: causecode.h:55
Definition: causecode.h:52
Definition: causecode.h:56
Definition: causecode.h:82
Definition: causecode.h:54
Definition: causecode.h:88
Definition: causecode.h:87
Definition: causecode.h:98
Definition: causecode.h:64
Definition: ies.h:239
Definition: causecode.h:53
Definition: causecode.h:49
Definition: causecode.h:71
Definition: causecode.h:62
Definition: causecode.h:90
Definition: causecode.h:61
Definition: causecode.h:50
Definition: causecode.h:91
Definition: causecode.h:60
Definition: causecode.h:99
Definition: causecode.h:79
Definition: ies.h:102
virtual void StoreDataIn(IAX2IeData &res)
Definition: causecode.h:120
Definition: causecode.h:86
Definition: iedata.h:55
Definition: causecode.h:85
Definition: causecode.h:72
BYTE causeCode
Definition: iedata.h:101
Definition: causecode.h:83
IAX2IeCauseCode(BYTE newValue)
Definition: causecode.h:110
IAX2IeCauseCode(BYTE length, BYTE *srcData)
Definition: causecode.h:107
Definition: causecode.h:89
Definition: causecode.h:84
Definition: causecode.h:67
Definition: causecode.h:101
Definition: causecode.h:43
Definition: causecode.h:69
Definition: causecode.h:100
Definition: causecode.h:57
CauseCodes
Definition: causecode.h:48
virtual BYTE GetKeyValue() const
Definition: causecode.h:113
Definition: causecode.h:80
Definition: causecode.h:97
BYTE dataValue
Definition: ies.h:278
Definition: causecode.h:70
void PrintOn(ostream &str) const
Definition: causecode.h:68
Definition: causecode.h:74
Definition: causecode.h:95
Definition: causecode.h:59
Definition: causecode.h:73
Definition: causecode.h:78