OPAL  Version 3.18.8
IAX2Ie Class Reference

#include <ies.h>

Inheritance diagram for IAX2Ie:

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, ie_variable = 52,
  ie_ospToken = 53, ie_callToken = 54, ie_capability2 = 55, ie_format2 = 56,
  ie_countEntries
}
 

Public Member Functions

construction/destruction
 IAX2Ie ()
 
virtual ~IAX2Ie ()
 

Protected Member Functions

virtual void WriteBinary (BYTE *)
 

Protected Attributes

PBoolean validData
 

Worker methods

virtual PBoolean IsValid ()
 
virtual BYTE GetLengthOfData () const
 
int GetBinarySize () const
 
virtual 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)
 

Detailed Description

Ie class is for handling information elements

Member Enumeration Documentation

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)

ie_variable 

do remote variables

ie_ospToken 

OSP token

ie_callToken 

For security - do Call number tests

ie_capability2 

Do the Actual codec capability - u8 version + integer array

ie_format2 

Desired codec format - u8 version + integer array

ie_countEntries 

Report on how many different ie types there are

Constructor & Destructor Documentation

IAX2Ie::IAX2Ie ( )

Constructor

virtual IAX2Ie::~IAX2Ie ( )
inlinevirtual

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

int IAX2Ie::GetBinarySize ( ) const
inline

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

References GetLengthOfData().

virtual BYTE IAX2Ie::GetLengthOfData ( ) const
inlinevirtual

return the number of bytes to hold this data element

Reimplemented in IAX2IeSockaddrIn, IAX2IeBlockOfData, IAX2IeDateAndTime, IAX2IeBinary, and IAX2IeString.

Referenced by GetBinarySize().

virtual PBoolean IAX2Ie::IsValid ( )
inlinevirtual

returns true if contains an initialised information element

References validData.

Referenced by IAX2IeAuthMethods::IsMd5Authentication(), IAX2IeAuthMethods::IsPlainTextAuthentication(), and IAX2IeAuthMethods::IsRsaAuthentication().

int IAX2Ie::ReadData ( )
inline

Read the value of the stored data for this class

void IAX2Ie::SetData ( int &  )
inline

Take the supplied data and copy contents into this IE

Referenced by IAX2IeAuthMethods::IAX2IeAuthMethods().

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::WriteBinary ( BYTE *  )
inlineprotectedvirtual

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

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

Field Documentation

PBoolean 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

Referenced by IAX2IeVersion::IAX2IeVersion(), IsValid(), IAX2IeDateAndTime::SetData(), IAX2IeBlockOfData::SetData(), and IAX2IeSockaddrIn::SetData().


The documentation for this class was generated from the following file: