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
00033
00034
00035
00036
00037
00038
00039
00040 #ifndef CAUSECODE_H
00041 #define CAUSECODE_H
00042
00043 #include <opal/buildopts.h>
00044
00045 #include <iax2/ies.h>
00046
00048
00049 class IAX2IeCauseCode : public IAX2IeByte
00050 {
00051 PCLASSINFO(IAX2IeCauseCode, IAX2IeByte);
00052 public:
00054 enum CauseCodes {
00055 Unallocated = 1,
00056 NoRouteTransitNet = 2,
00057 NoRouteDestination = 3,
00058 ChannelUnacceptable = 6,
00059 CallAwardedDelivered = 7,
00060 NormalClearing = 16,
00061 UserBusy = 17,
00062 NoUserResponse = 18,
00063 NoAnswer = 19,
00064 CallRejected = 21,
00065 NumberChanged = 22,
00066 DestinationOutOfOrder = 27,
00067 InvalidNumberFormat = 28,
00068 FacilityRejected = 29,
00069 ResponseToStatusEnquiry = 30,
00070 NormalUnspecified = 31,
00071 NormalCircuitCongestion = 34,
00072 NetworkOutOfOrder = 38,
00073 NormalTemporaryFailure = 41,
00074 SwitchCongestion = 42,
00075 AccessInfoDiscarded = 43,
00076 RequestedChanUnavail = 44,
00077 PreEmpted = 45,
00078 FacilityNotSubscribed = 50,
00079 OutgoingCallBarred = 52,
00080 IncomingCallBarred = 54,
00081 BearerCapabilityNotauth = 57,
00082 BearerCapabilityNotAvail = 58,
00083 BearerCapabilityNotimpl = 65,
00084 ChanNotImplemented = 66,
00085 FacilityNotImplemented = 69,
00086 InvalidCallReference = 81,
00087 IncompatibleDestination = 88,
00088 InvalidMsgUnspecified = 95,
00089 MandatoryIeMissing = 96,
00090 MessageTypeNonexist = 97,
00091 WrongMessage = 98,
00092 IeNonexist = 99,
00093 InvalidIeContents = 100,
00094 WrpngCallState = 101,
00095 RecoveryOnTimerExpire = 102,
00096 MandatoryIeLengthError = 103,
00097 ProtocolError = 111,
00098 Interworking = 127,
00100
00101 Busy = UserBusy,
00102 Failure = NetworkOutOfOrder,
00103 Normal = NormalClearing,
00104 Congestion = NormalCircuitCongestion,
00105 Unregistered = NoRouteDestination,
00106 NotDefined = 0,
00107 NoSuchDriver = ChanNotImplemented,
00108 };
00109
00113 IAX2IeCauseCode(BYTE length, BYTE *srcData) : IAX2IeByte(length, srcData) { };
00114
00116 IAX2IeCauseCode(BYTE newValue) : IAX2IeByte(newValue) { }
00117
00119 virtual BYTE GetKeyValue() const { return ie_causeCode; }
00120
00122 void PrintOn(ostream & str) const;
00123
00126 virtual void StoreDataIn(IAX2IeData &res) { res.causeCode = dataValue; }
00127
00128 };
00129
00130 #endif //CAUSECODE_H
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141