causecode.h

Go to the documentation of this file.
00001 /*
00002  *
00003  * Inter Asterisk Exchange 2
00004  * 
00005  * Open Phone Abstraction Library (OPAL)
00006  *
00007  * List of the defines which enumerate the reason why calls end.
00008  *
00009  * Copyright (c) 2005 Indranet Technologies Ltd.
00010  *
00011  * The contents of this file are subject to the Mozilla Public License
00012  * Version 1.0 (the "License"); you may not use this file except in
00013  * compliance with the License. You may obtain a copy of the License at
00014  * http://www.mozilla.org/MPL/
00015  *
00016  * Software distributed under the License is distributed on an "AS IS"
00017  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00018  * the License for the specific language governing rights and limitations
00019  * under the License.
00020  *
00021  * The Original Code is Open Phone Abstraction Library.
00022  *
00023  * The Initial Developer of the Original Code is Indranet Technologies Ltd.
00024  *
00025  * The author of this code is Derek J Smithies
00026  *
00027  *  $Log: causecode.h,v $
00028  *  Revision 1.2  2005/08/26 03:07:35  dereksmithies
00029  *  Change naming convention, so all class names contain the string "IAX2"
00030  *
00031  *  Revision 1.1  2005/07/30 07:01:32  csoutheren
00032  *  Added implementation of IAX2 (Inter Asterisk Exchange 2) protocol
00033  *  Thanks to Derek Smithies of Indranet Technologies Ltd. for
00034  *  writing and contributing this code
00035  *
00036  *
00037  *
00038  *
00039  */
00040 
00041 #include <iax2/ies.h>
00042 
00044 
00045 class IAX2IeCauseCode : public IAX2IeByte
00046 {
00047   PCLASSINFO(IAX2IeCauseCode, IAX2IeByte);
00048  public:
00050   enum CauseCodes {
00051     Unallocated                      =   1,               
00052     NoRouteTransitNet                =   2,               
00053     NoRouteDestination               =   3,               
00054     ChannelUnacceptable              =   6,               
00055     CallAwardedDelivered             =   7,               
00056     NormalClearing                   =  16,               
00057     UserBusy                         =  17,               
00058     NoUserResponse                   =  18,               
00059     NoAnswer                         =  19,               
00060     CallRejected                     =  21,               
00061     NumberChanged                    =  22,               
00062     DestinationOutOfOrder            =  27,               
00063     InvalidNumberFormat              =  28,               
00064     FacilityRejected                 =  29,               
00065     ResponseToStatusEnquiry          =  30,               
00066     NormalUnspecified                =  31,               
00067     NormalCircuitCongestion          =  34,               
00068     NetworkOutOfOrder                =  38,               
00069     NormalTemporaryFailure           =  41,               
00070     SwitchCongestion                 =  42,               
00071     AccessInfoDiscarded              =  43,               
00072     RequestedChanUnavail             =  44,               
00073     PreEmpted                        =  45,               
00074     FacilityNotSubscribed            =  50,               
00075     OutgoingCallBarred               =  52,               
00076     IncomingCallBarred               =  54,               
00077     BearerCapabilityNotauth          =  57,               
00078     BearerCapabilityNotAvail         =  58,               
00079     BearerCapabilityNotimpl          =  65,               
00080     ChanNotImplemented               =  66,               
00081     FacilityNotImplemented           =  69,               
00082     InvalidCallReference             =  81,               
00083     IncompatibleDestination          =  88,               
00084     InvalidMsgUnspecified            =  95,               
00085     MandatoryIeMissing               =  96,               
00086     MessageTypeNonexist              =  97,               
00087     WrongMessage                     =  98,               
00088     IeNonexist                       =  99,               
00089     InvalidIeContents                = 100,               
00090     WrpngCallState                   = 101,               
00091     RecoveryOnTimerExpire            = 102,               
00092     MandatoryIeLengthError           = 103,               
00093     ProtocolError                    = 111,               
00094     Interworking                     = 127,               
00096     /* Special Asterisk aliases */
00097     Busy                              =  UserBusy,                         
00098     Failure                           =  NetworkOutOfOrder,                
00099     Normal                            =  NormalClearing,                   
00100     Congestion                        =  NormalCircuitCongestion,          
00101     Unregistered                      =  NoRouteDestination,               
00102     NotDefined                        =  0,                                
00103     NoSuchDriver                      =  ChanNotImplemented,               
00104   };
00105 
00109   IAX2IeCauseCode(BYTE length, BYTE *srcData) : IAX2IeByte(length, srcData) { };
00110      
00112   IAX2IeCauseCode(BYTE newValue) : IAX2IeByte(newValue) { }
00113 
00115   virtual BYTE GetKeyValue() const { return ie_causeCode; }
00116 
00118   void PrintOn(ostream & str) const;
00119 
00122   virtual void StoreDataIn(IAX2IeData &res) { res.causeCode = dataValue; }     
00123 
00124 };
00125 
00126 /* The comment below is magic for those who use emacs to edit this file. */
00127 /* With the comment below, the tab key does auto indent to 4 spaces.     */
00128 
00129 /*
00130  * Local Variables:
00131  * mode:c
00132  * c-file-style:linux
00133  * c-basic-offset:2
00134  * End:
00135  */
00136 

Generated on Fri Mar 7 06:33:08 2008 for OPAL by  doxygen 1.5.1