IAX2Ie Class Reference

#include <ies.h>

Inheritance diagram for IAX2Ie:

IAX2IeBlockOfData IAX2IeByte IAX2IeChar IAX2IeDateAndTime IAX2IeInt IAX2IeInvalidElement IAX2IeList IAX2IeNone IAX2IeShort IAX2IeSockaddrIn IAX2IeString IAX2IeUInt IAX2IeUShort List of all members.

Worker methods

virtual BOOL IsValid ()
virtual BYTE GetLengthOfData ()
int GetBinarySize ()
void PrintOn (ostream &str) const
virtual BYTE GetKeyValue () const
void SetData (int &)
int ReadData ()
void WriteBinary (void *data, PINDEX &writeIndex)
virtual void StoreDataIn (IAX2IeData &)
static IAX2IeBuildInformationElement (BYTE _typeCode, BYTE length, BYTE *srcData)

Public Types

enum  IAX2IeTypeCode {
  ie_calledNumber = 1, ie_callingNumber = 2, ie_callingAni = 3, ie_callingName = 4,
  ie_calledContext = 5, ie_userName = 6, ie_password = 7, ie_capability = 8,
  ie_format = 9, ie_language = 10, ie_version = 11, ie_adsicpe = 12,
  ie_dnid = 13, ie_authMethods = 14, ie_challenge = 15, ie_md5Result = 16,
  ie_rsaResult = 17, ie_apparentAddr = 18, ie_refresh = 19, ie_dpStatus = 20,
  ie_callNo = 21, ie_cause = 22, ie_iaxUnknown = 23, ie_msgCount = 24,
  ie_autoAnswer = 25, ie_musicOnHold = 26, ie_transferId = 27, ie_rdnis = 28,
  ie_provisioning = 29, ie_aesProvisioning = 30, ie_dateTime = 31, ie_deviceType = 32,
  ie_serviceIdent = 33, ie_firmwareVer = 34, ie_fwBlockDesc = 35, ie_fwBlockData = 36,
  ie_provVer = 37, ie_callingPres = 38, ie_callingTon = 39, ie_callingTns = 40,
  ie_samplingRate = 41, ie_causeCode = 42, ie_encryption = 43, ie_encKey = 44,
  ie_codecPrefs = 45, ie_recJitter = 46, ie_recLoss = 47, ie_recPackets = 48,
  ie_recDelay = 49, ie_recDropped = 50, ie_recOoo = 51
}

Protected Member Functions

virtual void WriteBinary (BYTE *)

Protected Attributes

BOOL validData

Detailed Description

Ie class is for handling information elements


Member Enumeration Documentation

enum IAX2Ie::IAX2IeTypeCode

Each of the 45 possible Information Element types

Enumerator:
ie_calledNumber  Number or extension that is being being called (string)
ie_callingNumber  The number of the node initating the call r (string)
ie_callingAni  The ANI (calling number) to use for billing (string)
ie_callingName  The callers name (string)
ie_calledContext  The context we are calling to (string)
ie_userName  UserName (peer or user) to use in the authentication process (string)
ie_password  Password - which is used in the authentication process (string)
ie_capability  Bitmask of the codecs sending end supports or senders capability (unsigned int)
ie_format  Bitmask of the desired codec (unsigned int)
ie_language  Sending ends preferred language string)
ie_version  Sending ends protocol version - typically 2. (short)
ie_adsicpe  CPE ADSI capability (short)
ie_dnid  Originally dialed DNID (string)
ie_authMethods  Bitmask of the available Authentication method(s) (short)
ie_challenge  The challenge data used in MD5/RSA authentication (string)
ie_md5Result  MD5 challenge (authentication process) result (string)
ie_rsaResult  RSA challenge (authentication process) result (string)
ie_apparentAddr  The peer's apparent address. (struct sockaddr_in)
ie_refresh  The frequency of on with to refresh registration, in units of seconds (short)
ie_dpStatus  The dialplan status (short)
ie_callNo  Call number of the peer (short)
ie_cause  Description of why hangup or authentication or other failure happened (string)
ie_iaxUnknown  An IAX command that is unknown (byte)
ie_msgCount  A report on the number of messages waiting (short)
ie_autoAnswer  auto-answering is requested (no type required, as this is a request)
ie_musicOnHold  Demand for music on hold combined with QUELCH (string or none)
ie_transferId  Identifier for a Transfer Request (int)
ie_rdnis  DNIS of the referring agent (string)
ie_provisioning  Info to be used for provisioning (binary data)
ie_aesProvisioning  Info for provisioning AES (binary data)
ie_dateTime  Date and Time (which is stored in binary format defined in IAX2IeDateTime)
ie_deviceType  The type of device (string)
ie_serviceIdent  The Identifier for service (string)
ie_firmwareVer  The version of firmware (unsigned 32 bit number)
ie_fwBlockDesc  The description for a block of firmware (unsigned 32 bit number )
ie_fwBlockData  Binary data for a block of fw ()
ie_provVer  The version of provisiong (unsigned 32 bit number)
ie_callingPres  Presentation of calling (unsigned 8 bit)
ie_callingTon  Type of number calling (unsigned 8 bit)
ie_callingTns  Transit Network Select for calling (unsigned 16 bit)
ie_samplingRate  Bitmask of supported Rate of sampling . Sampling defaults to 8000 hz, (unsigned 16)
ie_causeCode  Code value which describes why the registration failed, or call hungup etc (unsigned 8 bit)
ie_encryption  The method for encrption the remote code wants to use (U16)
ie_encKey  the Key for ncryption (raw binary data)
ie_codecPrefs  The codec we would prefer to use (unsigned 8 bit)
ie_recJitter  From rfc 1889, the received jitter (unsigned 32 bit number)
ie_recLoss  The received loss rate, where the high byte is the loss packt, low 24 bits loss count, from rfc1889 (unsigned 32 bit)
ie_recPackets  Recevied number of frames (total frames received) (unsigned 32 bit)
ie_recDelay  Received frame largest playout delay (in ms) (unsigned 16 bit)
ie_recDropped  The number of dropped received frames by the jitter buf, so it is a measure of the number of late frames (unsigned 32 bit)
ie_recOoo  The number of received frames which were Out Of Order (unsigned 32 number)


Constructor & Destructor Documentation

IAX2Ie::IAX2Ie (  ) 

Constructor

virtual IAX2Ie::~IAX2Ie (  )  [inline, virtual]

Destructor

IAX2Ie::IAX2Ie (  ) 

Constructor

virtual IAX2Ie::~IAX2Ie (  )  [inline, virtual]

Destructor


Member Function Documentation

static IAX2Ie* IAX2Ie::BuildInformationElement ( BYTE  _typeCode,
BYTE  length,
BYTE *  srcData 
) [static]

Given an arbitrary type code, build & initialise the IAX2Ie descendant class

virtual BOOL IAX2Ie::IsValid (  )  [inline, virtual]

returns TRUE if contains an initialised information element

virtual BYTE IAX2Ie::GetLengthOfData (  )  [inline, virtual]

return the number of bytes to hold this data element

Reimplemented in IAX2IeString, IAX2IeDateAndTime, IAX2IeBlockOfData, and IAX2IeSockaddrIn.

int IAX2Ie::GetBinarySize (  )  [inline]

return the number of bytes to hold this Information Element when stored in a packet

void IAX2Ie::PrintOn ( ostream &  str  )  const

print this class (nicely) to the designated stream

Reimplemented in IAX2IeCauseCode, IAX2IeInvalidElement, IAX2IeString, IAX2IeDateAndTime, IAX2IeBlockOfData, IAX2IeSockaddrIn, IAX2IeCalledNumber, IAX2IeCallingNumber, IAX2IeCallingAni, IAX2IeCallingName, IAX2IeCalledContext, IAX2IeUserName, IAX2IePassword, IAX2IeCapability, IAX2IeFormat, IAX2IeLanguage, IAX2IeVersion, IAX2IeAdsicpe, IAX2IeDnid, IAX2IeAuthMethods, IAX2IeChallenge, IAX2IeMd5Result, IAX2IeRsaResult, IAX2IeApparentAddr, IAX2IeRefresh, IAX2IeDpStatus, IAX2IeCallNo, IAX2IeCause, IAX2IeIaxUnknown, IAX2IeMsgCount, IAX2IeAutoAnswer, IAX2IeMusicOnHold, IAX2IeTransferId, IAX2IeRdnis, IAX2IeProvisioning, IAX2IeAesProvisioning, IAX2IeDateTime, IAX2IeDeviceType, IAX2IeServiceIdent, IAX2IeFirmwareVer, IAX2IeFwBlockDesc, IAX2IeFwBlockData, IAX2IeProvVer, IAX2IeCallingPres, IAX2IeCallingTon, IAX2IeCallingTns, IAX2IeSamplingRate, IAX2IeEncryption, IAX2IeEncKey, IAX2IeCodecPrefs, IAX2IeReceivedJitter, IAX2IeReceivedLoss, IAX2IeReceivedFrames, IAX2IeReceivedDelay, IAX2IeDroppedFrames, and IAX2IeReceivedOoo.

virtual BYTE IAX2Ie::GetKeyValue (  )  const [inline, virtual]

Get the enum value for this information element class

Reimplemented in IAX2IeCauseCode, IAX2IeCalledNumber, IAX2IeCallingNumber, IAX2IeCallingAni, IAX2IeCallingName, IAX2IeCalledContext, IAX2IeUserName, IAX2IePassword, IAX2IeCapability, IAX2IeFormat, IAX2IeLanguage, IAX2IeVersion, IAX2IeAdsicpe, IAX2IeDnid, IAX2IeAuthMethods, IAX2IeChallenge, IAX2IeMd5Result, IAX2IeRsaResult, IAX2IeApparentAddr, IAX2IeRefresh, IAX2IeDpStatus, IAX2IeCallNo, IAX2IeCause, IAX2IeIaxUnknown, IAX2IeMsgCount, IAX2IeAutoAnswer, IAX2IeMusicOnHold, IAX2IeTransferId, IAX2IeRdnis, IAX2IeProvisioning, IAX2IeAesProvisioning, IAX2IeDateTime, IAX2IeDeviceType, IAX2IeServiceIdent, IAX2IeFirmwareVer, IAX2IeFwBlockDesc, IAX2IeFwBlockData, IAX2IeProvVer, IAX2IeCallingPres, IAX2IeCallingTon, IAX2IeCallingTns, IAX2IeSamplingRate, IAX2IeEncryption, IAX2IeEncKey, IAX2IeCodecPrefs, IAX2IeReceivedJitter, IAX2IeReceivedLoss, IAX2IeReceivedFrames, IAX2IeReceivedDelay, IAX2IeDroppedFrames, and IAX2IeReceivedOoo.

void IAX2Ie::SetData ( int &   )  [inline]

Take the supplied data and copy contents into this IE

int IAX2Ie::ReadData (  )  [inline]

Read the value of the stored data for this class

Reimplemented in IAX2IeString, IAX2IeDateAndTime, IAX2IeBlockOfData, and IAX2IeSockaddrIn.

void IAX2Ie::WriteBinary ( void *  data,
PINDEX &  writeIndex 
)

Take the data from this IAX2Ie and copy into the memory region. When finished, increment the writeIndex appropriately.

virtual void IAX2Ie::StoreDataIn ( IAX2IeData  )  [inline, virtual]

Take the data from this IAX2Ie, and copy it into the IAX2IeData structure. This is done on processing an incoming frame which contains IAX2Ie in the data section.

Reimplemented in IAX2IeCauseCode, IAX2IeCalledNumber, IAX2IeCallingNumber, IAX2IeCallingAni, IAX2IeCallingName, IAX2IeCalledContext, IAX2IeUserName, IAX2IePassword, IAX2IeCapability, IAX2IeFormat, IAX2IeLanguage, IAX2IeVersion, IAX2IeAdsicpe, IAX2IeDnid, IAX2IeAuthMethods, IAX2IeChallenge, IAX2IeMd5Result, IAX2IeRsaResult, IAX2IeApparentAddr, IAX2IeRefresh, IAX2IeDpStatus, IAX2IeCallNo, IAX2IeCause, IAX2IeIaxUnknown, IAX2IeMsgCount, IAX2IeAutoAnswer, IAX2IeMusicOnHold, IAX2IeTransferId, IAX2IeRdnis, IAX2IeProvisioning, IAX2IeAesProvisioning, IAX2IeDateTime, IAX2IeDeviceType, IAX2IeServiceIdent, IAX2IeFirmwareVer, IAX2IeFwBlockDesc, IAX2IeFwBlockData, IAX2IeProvVer, IAX2IeCallingPres, IAX2IeCallingTon, IAX2IeCallingTns, IAX2IeSamplingRate, IAX2IeEncryption, IAX2IeEncKey, IAX2IeCodecPrefs, IAX2IeReceivedJitter, IAX2IeReceivedLoss, IAX2IeReceivedFrames, IAX2IeReceivedDelay, IAX2IeDroppedFrames, and IAX2IeReceivedOoo.

virtual void IAX2Ie::WriteBinary ( BYTE *   )  [inline, protected, virtual]

Take the data value for this particular IAX2Ie and copy into the memory region.

Reimplemented in IAX2IeInvalidElement, IAX2IeNone, IAX2IeByte, IAX2IeChar, IAX2IeShort, IAX2IeInt, IAX2IeUShort, IAX2IeUInt, IAX2IeString, IAX2IeDateAndTime, IAX2IeBlockOfData, and IAX2IeSockaddrIn.


Member Data Documentation

BOOL IAX2Ie::validData [protected]

A flag indicating if the data was read from the supplied bytes correctly, or if this structure is yet to be initialised


The documentation for this class was generated from the following file:
Generated on Fri Mar 7 06:34:02 2008 for OPAL by  doxygen 1.5.1