OPAL
Version 3.18.8
|
#include <frame.h>
Public Types | |
enum | ProtocolSc { cmdNew = 1, cmdPing = 2, cmdPong = 3, cmdAck = 4, cmdHangup = 5, cmdReject = 6, cmdAccept = 7, cmdAuthReq = 8, cmdAuthRep = 9, cmdInval = 10, cmdLagRq = 11, cmdLagRp = 12, cmdRegReq = 13, cmdRegAuth = 14, cmdRegAck = 15, cmdRegRej = 16, cmdRegRel = 17, cmdVnak = 18, cmdDpReq = 19, cmdDpRep = 20, cmdDial = 21, cmdTxreq = 22, cmdTxcnt = 23, cmdTxacc = 24, cmdTxready = 25, cmdTxrel = 26, cmdTxrej = 27, cmdQuelch = 28, cmdUnquelch = 29, cmdPoke = 30, cmdPage = 31, cmdMwi = 32, cmdUnsupport = 33, cmdTransfer = 34, cmdProvision = 35, cmdFwDownl = 36, cmdFwData = 37, cmdTxMedia = 38, cmdRtKey = 39, cmdCallToken = 40 } |
![]() | |
enum | ConnectionRequired { callActive, callIrrelevant } |
![]() | |
enum | IAX2FrameType { undefType = 0, dtmfType = 1, voiceType = 2, videoType = 3, controlType = 4, nullType = 5, iax2ProtocolType = 6, textType = 7, imageType = 8, htmlType = 9, cngType = 10, numFrameTypes = 11 } |
Static Public Member Functions | |
static PString | GetSubClassName (unsigned t) |
![]() | |
static DWORD | CalcTimeStamp (const PTimeInterval &callStartTick) |
Protected Member Functions | |
PBoolean | ReadInformationElements () |
![]() | |
virtual PBoolean | CallMustBeActive () |
void | UnCompressSubClass (BYTE a) |
int | CompressSubClass () |
void | ClearListFlags () |
virtual void | InitialiseHeader (IAX2Processor *processor) |
void | OnTransmissionTimeout (PTimer &, INT) |
![]() | |
PBoolean | DecryptContents (IAX2Encryption &encryption) |
PBoolean | Read1Byte (BYTE &res) |
PBoolean | Read2Bytes (PINDEX &res) |
PBoolean | Read2Bytes (WORD &res) |
PBoolean | Read4Bytes (DWORD &res) |
void | Write1Byte (BYTE newVal) |
void | Write1Byte (PINDEX newVal) |
void | Write2Bytes (PINDEX newVal) |
void | Write4Bytes (unsigned int newVal) |
void | ZeroAllValues () |
Protected Attributes | |
IAX2IeList | ieElements |
![]() | |
PTimer | transmissionTimer |
int | subClass |
PTimeInterval | retryDelta |
PTimeInterval | timeOffset |
PINDEX | retries |
IAX2SequenceNumbers | sequence |
PBoolean | sendFrameNow |
PBoolean | deleteFrameNow |
PBoolean | packetResent |
PBoolean | callMustBeActive |
PBoolean | isAckFrame |
![]() | |
IAX2Remote | remote |
IAX2FrameType | frameType |
IAX2EndPoint & | endpoint |
PBYTEArray | data |
PBoolean | isFullFrame |
PBoolean | isVideo |
PBoolean | isAudio |
PINDEX | currentReadIndex |
PINDEX | currentWriteIndex |
DWORD | timeStamp |
PBoolean | canRetransmitFrame |
PString | connectionToken |
DWORD | presetTimeStamp |
Additional Inherited Members | |
![]() | |
enum | RetryTime { minRetryTime = 1000, maxRetryTime = 010000, maxRetries = 3 } |
Handle IAX specific protocol issues. Used for initiating a call, closing a call, registration, reject a call etc.. These are used to manipulate the session.
The data section contains information elements, or type Ie classes.
enum comtaining the possible subclass value for these IAX protocol control frames
IAX2FullFrameProtocol::IAX2FullFrameProtocol | ( | const IAX2Frame & | srcFrame | ) |
Construction from a supplied dataframe. In this case, this class is filled from an incoming data packet. Classes generated like this are used to handle received data.
IAX2FullFrameProtocol::IAX2FullFrameProtocol | ( | const IAX2FullFrame & | srcFrame | ) |
Construction from a supplied dataframe. In this case, this class is filled from an incoming data packet. Classes generated like this are used to handle received data.
IAX2FullFrameProtocol::IAX2FullFrameProtocol | ( | IAX2Processor * | processor, |
PINDEX | subClassValue, | ||
ConnectionRequired | needCon = IAX2FullFrame::callActive |
||
) |
Construction from a Connection class. Classes generated from this are then on sent to a remote endpoint.
processor | Iax Processor from which this frame originates |
subClassValue | IAX protocol command for remote end to process |
needCon | this frame is only sent if the Connection class exists |
IAX2FullFrameProtocol::IAX2FullFrameProtocol | ( | IAX2Processor * | processor, |
ProtocolSc | subClassValue, | ||
ConnectionRequired | needCon = IAX2FullFrame::callActive |
||
) |
Construction from an Connection class. Classes generated from this are then on sent to a remote endpoint.
processor | Iax Processor from which this frame originates |
subClassValue | IAX protocol command for remote end to process |
needCon | this frame is only sent if the Connection class exists |
IAX2FullFrameProtocol::IAX2FullFrameProtocol | ( | IAX2Processor * | processor, |
ProtocolSc | subClassValue, | ||
IAX2FullFrame * | inReplyTo, | ||
ConnectionRequired | needCon = IAX2FullFrame::callActive |
||
) |
Construction from a Connection class. Classes generated from this are then on sent to a remote endpoint.
We have received a IAX2FullFrameProtocol, and this constructor is used to create a reply. Use the iseqno and time stamp from the supplied frame to construct the reply
processor | Iax Processor from which this frame originates |
subClassValue | IAX protocol command for remote end to process |
inReplyTo | this message was sent in reply to this frame |
needCon | this frame is only sent if the Connection class exists |
|
virtual |
Destructor, which deletes all current Information Elements
|
inline |
Add a new Information Element (Ie) to the intenral list
References ieElements.
void IAX2FullFrameProtocol::CopyDataFromIeListTo | ( | IAX2IeData & | res | ) |
Transfer the data (stored in the IeList) and place it in into the IeData class. This is done when precessing a frame we have received from an external node, which has to be stored in the IeData class
PBoolean IAX2FullFrameProtocol::GetCallTokenIe | ( | IAX2IeCallToken & | callToken | ) |
Go through the list of IEs read in, and find the CallToken Ie, and return a copy of it to the caller. If found, return true.
|
inlinevirtual |
Return the IAX2FullFrame type represented here (voice, protocol, session etc
Reimplemented from IAX2FullFrame.
References IAX2Frame::iax2ProtocolType.
void IAX2FullFrameProtocol::GetRemoteCapability | ( | unsigned int & | capability, |
unsigned int & | preferred | ||
) |
Look through the list of IEs, and look for remote capabability and preferred codec
|
inline |
Report the current value of the subClass variable
References IAX2FullFrame::subClass.
|
virtual |
Get text description of the subclass contents
Reimplemented from IAX2FullFrame.
|
static |
Get text description of the subclass contents
|
inlinevirtual |
Mark this frame as having (or not having) information elements
Reimplemented from IAX2FullFrame.
References ieElements.
|
virtual |
Pretty print this frame data to the designated stream
Reimplemented from IAX2FullFrame.
|
protected |
Read the information elements from the incoming data array to generate a list of information element classes
void IAX2FullFrameProtocol::SetRetransmissionRequired | ( | ) |
Set internal variable to say that this frame does not need to be retransmitted
void IAX2FullFrameProtocol::WriteIeAsBinaryData | ( | ) |
Write the contents of the Ie internal list to the frame data array. This is usually done in preparation to transmitting this frame
|
protected |
A list of the IEs read from/(or written to) the data section of this frame,
Referenced by AppendIe(), and InformationElementsPresent().