1 /* 2 * 3 * 4 * Inter Asterisk Exchange 2 5 * 6 * defines the different types of information elements 7 * 8 * Open Phone Abstraction Library (OPAL) 9 * 10 * Copyright (c) 2005 Indranet Technologies Ltd. 11 * 12 * The contents of this file are subject to the Mozilla Public License 13 * Version 1.0 (the "License"); you may not use this file except in 14 * compliance with the License. You may obtain a copy of the License at 15 * http://www.mozilla.org/MPL/ 16 * 17 * Software distributed under the License is distributed on an "AS IS" 18 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 19 * the License for the specific language governing rights and limitations 20 * under the License. 21 * 22 * The Original Code is Open Phone Abstraction Library. 23 * 24 * The Initial Developer of the Original Code is Indranet Technologies Ltd. 25 * 26 * The author of this code is Derek J Smithies 27 * 28 * $Revision: 24606 $ 29 * $Author: dereksmithies $ 30 * $Date: 2010-07-28 22:51:05 -0500 (Wed, 28 Jul 2010) $ 31 */ 32 33 #ifndef OPAL_IAX2_IEDATA_H 34 #define OPAL_IAX2_IEDATA_H 35 36 #ifndef _PTLIB_H 37 #include <ptlib.h> 38 #endif 39 40 #include <opal/buildopts.h> 41 42 #if OPAL_IAX2 43 44 #include <ptlib/sockets.h> 45 46 #ifdef P_USE_PRAGMA 47 #pragma interface 48 #endif 49 50 /**This class is used to contain the data read from the different ie fields. 51 52 53 This class is not thread safe. 54 */ 55 class IAX2IeData : public PObject 56 { 57 PCLASSINFO(IAX2IeData, PObject); 58 public: 59 /**@name Construction/Destruction */ 60 //@{ 61 /**Construct IeData class 62 */ 63 IAX2IeData(); 64 65 66 ~IAX2IeData(); 67 //@} 68 69 /**Pretty print the varaibles in this class to the designated stream*/ 70 virtual void PrintOn(ostream & strm) const; 71 72 73 PString calledNumber; /*!< Number/extension being called - string */ 74 PString callingNumber; /*!< Calling number - string */ 75 PString callingAni; /*!< Calling number ANI for billing - string */ 76 PString callingName; /*!< Name of caller - string */ 77 int callingTon; /*!< calling typeofnum */ 78 int callingTns; /*!< calling transitnet */ 79 int callingPres; /*!< calling presntn */ 80 PString calledContext; /*!< Context for number - string */ 81 PString userName; /*!< Username (peer or user) for authentication - string */ 82 PString password; /*!< Password for authentication - string */ 83 unsigned int capability; /*!< Actual codec capability - unsigned int */ 84 unsigned int format; /*!< Desired codec format - unsigned int */ 85 PString codecPrefs; /*!< codec_prefs */ 86 PString language; /*!< Desired language - string */ 87 int version; /*!< Protocol version - short */ 88 PINDEX adsicpe; /*!< CPE ADSI capability - short */ 89 PString dnid; /*!< Originally dialed DNID - string */ 90 PString rdnis; /*!< Referring DNIS -- string */ 91 short authMethods; /*!< Authentication method(s) - short */ 92 unsigned int encryptionMethods; /*!< encryption method to us */ 93 PString challenge; /*!< Challenge data for MD5/RSA - string */ 94 PString md5Result; /*!< MD5 challenge result - string */ 95 PString rsaResult; /*!< RSA challenge result - string */ 96 PIPSocket::Address apparentAddr; /*!< Apparent address of peer - struct sockaddr_in */ 97 PINDEX refresh; /*!< When to refresh registration - short */ 98 PINDEX dpStatus; /*!< Dialplan status - short */ 99 PINDEX callNo; /*!< Call number of peer - short */ 100 PString cause; /*!< Cause - string */ 101 BYTE causeCode; /*!< cause code */ 102 BYTE iaxUnknown; /*!< never used */ 103 int msgCount; /*!< How many messages waiting - short */ 104 int autoAnswer; /*!< Request auto-answering -- none */ 105 int musicOnHold; /*!< Request musiconhold with QUELCH -- none or string */ 106 unsigned int transferId; /*!< Transfer Request Identifier -- int */ 107 PTime dateTime; /*!< Date/Time */ 108 PString deviceType; /*!< device type */ 109 PString serviceIdent; /*!< service ident */ 110 int firmwareVer; /*!< firmware ver */ 111 unsigned int fwBlockDesc; /*!< fw block desc */ 112 PBYTEArray fwBlockData; /*!< fw block data */ 113 PString encKey; /*!< encryption key */ 114 unsigned int provVer; /*!< provisioning ver */ 115 PINDEX samplingRate; /*!< samplingrate */ 116 int provverPres; /*!< provisioning ver */ 117 unsigned int receivedJitter; /*!< received jitter (as in rfc 1889) u32 */ 118 unsigned int receivedLoss; /*!< Received loss (high byte loss pckt, low 24 bits loss count, as in rfc1889 */ 119 unsigned int receivedPackets; /*!< recevied frames (total frames received) u32 */ 120 unsigned short receivedDelay; /*!< Max playout delay for received frame (in ms) u16*/ 121 unsigned int receivedDropped; /*!< Dropped frames (presumably by jitterbuf) u32 */ 122 unsigned int receivedOoo; /*!< Frames received Out of Order u32 */ 123 PBYTEArray callToken; /*!< "Fix" DOS vulnerability from lots of calls being setup.*/ 124 }; 125 126 127 #endif // OPAL_IAX2 128 129 #endif // OPAL_IAX2_IEDATA_H 130 131 /* The comment below is magic for those who use emacs to edit this file. 132 * With the comment below, the tab key does auto indent to 2 spaces. 133 * 134 * Local Variables: 135 * mode:c 136 * c-basic-offset:2 137 * End: 138 */ 139