00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef OPAL_IAX2_CAUSECODE_H
00033 #define OPAL_IAX2_CAUSECODE_H
00034
00035 #include <opal/buildopts.h>
00036
00037 #if OPAL_IAX2
00038
00039 #include <iax2/ies.h>
00040
00042
00043 class IAX2IeCauseCode : public IAX2IeByte
00044 {
00045 PCLASSINFO(IAX2IeCauseCode, IAX2IeByte);
00046 public:
00048 enum CauseCodes {
00049 Unallocated = 1,
00050 NoRouteTransitNet = 2,
00051 NoRouteDestination = 3,
00052 ChannelUnacceptable = 6,
00053 CallAwardedDelivered = 7,
00054 NormalClearing = 16,
00055 UserBusy = 17,
00056 NoUserResponse = 18,
00057 NoAnswer = 19,
00058 CallRejected = 21,
00059 NumberChanged = 22,
00060 DestinationOutOfOrder = 27,
00061 InvalidNumberFormat = 28,
00062 FacilityRejected = 29,
00063 ResponseToStatusEnquiry = 30,
00064 NormalUnspecified = 31,
00065 NormalCircuitCongestion = 34,
00066 NetworkOutOfOrder = 38,
00067 NormalTemporaryFailure = 41,
00068 SwitchCongestion = 42,
00069 AccessInfoDiscarded = 43,
00070 RequestedChanUnavail = 44,
00071 PreEmpted = 45,
00072 FacilityNotSubscribed = 50,
00073 OutgoingCallBarred = 52,
00074 IncomingCallBarred = 54,
00075 BearerCapabilityNotauth = 57,
00076 BearerCapabilityNotAvail = 58,
00077 BearerCapabilityNotimpl = 65,
00078 ChanNotImplemented = 66,
00079 FacilityNotImplemented = 69,
00080 InvalidCallReference = 81,
00081 IncompatibleDestination = 88,
00082 InvalidMsgUnspecified = 95,
00083 MandatoryIeMissing = 96,
00084 MessageTypeNonexist = 97,
00085 WrongMessage = 98,
00086 IeNonexist = 99,
00087 InvalidIeContents = 100,
00088 WrpngCallState = 101,
00089 RecoveryOnTimerExpire = 102,
00090 MandatoryIeLengthError = 103,
00091 ProtocolError = 111,
00092 Interworking = 127,
00094
00095 Busy = UserBusy,
00096 Failure = NetworkOutOfOrder,
00097 Normal = NormalClearing,
00098 Congestion = NormalCircuitCongestion,
00099 Unregistered = NoRouteDestination,
00100 NotDefined = 0,
00101 NoSuchDriver = ChanNotImplemented,
00102 };
00103
00107 IAX2IeCauseCode(BYTE length, BYTE *srcData) : IAX2IeByte(length, srcData) { };
00108
00110 IAX2IeCauseCode(BYTE newValue) : IAX2IeByte(newValue) { }
00111
00113 virtual BYTE GetKeyValue() const { return ie_causeCode; }
00114
00116 void PrintOn(ostream & str) const;
00117
00120 virtual void StoreDataIn(IAX2IeData &res) { res.causeCode = dataValue; }
00121
00122 };
00123
00124 #endif // OPAL_IAX2
00125
00126 #endif // OPAL_IAX2_CAUSECODE_H
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137