# IAX2FullFrameProtocol Class Reference

`#include <frame.h>`

Inheritance diagram for IAX2FullFrameProtocol:

[legend]
Collaboration diagram for IAX2FullFrameProtocol:
[legend]

## Public Types

| 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

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
}

## Public Member Functions

| IAX2FullFrameProtocol (const IAX2Frame &srcFrame)
| IAX2FullFrameProtocol (const IAX2FullFrame &srcFrame)
| IAX2FullFrameProtocol (IAX2Processor *processor, PINDEX subClassValue, ConnectionRequired needCon=IAX2FullFrame::callActive)
| IAX2FullFrameProtocol (IAX2Processor *processor, ProtocolSc subClassValue, ConnectionRequired needCon=IAX2FullFrame::callActive)
| IAX2FullFrameProtocol (IAX2Processor *processor, ProtocolSc subClassValue, IAX2FullFrame *inReplyTo, ConnectionRequired needCon=IAX2FullFrame::callActive)
virtual | ~IAX2FullFrameProtocol ()
void | SetRetransmissionRequired ()
virtual PBoolean | InformationElementsPresent ()
ProtocolSc | GetSubClass () const
virtual PString | GetSubClassName () const
void | AppendIe (IAX2Ie *newElement)
void | WriteIeAsBinaryData ()
void | CopyDataFromIeListTo (IAX2IeData &res)
void | GetRemoteCapability (unsigned int &capability, unsigned int &preferred)
virtual BYTE | GetFullFrameType ()
virtual void | PrintOn (ostream &strm) const
PBoolean | GetCallTokenIe (IAX2IeCallToken &callToken)

## Static Public Member Functions

static PString | GetSubClassName (unsigned t)

## Protected Member Functions

PBoolean | ReadInformationElements ()

## Protected Attributes

IAX2IeList | ieElements

## Detailed Description

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.

## Member Enumeration Documentation

enum IAX2FullFrameProtocol::ProtocolSc

enum comtaining the possible subclass value for these IAX protocol control frames

Enumerator:

  cmdNew | Create a new call
  cmdPing | Ping request, which is done on an open call. It is "Are you Alive
  cmdPong | reply to a Ping
  cmdAck | Acknowledge a Reliably sent full frame
  cmdHangup | Request to terminate this call
  cmdReject | Refuse to accept this call. May happen if authentication faile
  cmdAccept | Allow this call to procee
  cmdAuthReq | Ask remote end to supply authenticatio
  cmdAuthRep | A reply, that contains authenticatio
  cmdInval | Destroy this call immediatly
  cmdLagRq | Initial message, used to measure the round trip time
  cmdLagRp | Reply to cmdLagrq, which tells us the round trip time
  cmdRegReq | Request for Registration
  cmdRegAuth | Registration requires for authentication
  cmdRegAck | Registration has been accepted
  cmdRegRej | Registration has been rejected
  cmdRegRel | Force the release of the current registration
  cmdVnak | This indicates out of order frames, and can be read as voice not acknowledged
  cmdDpReq | Request the status of an entry for dialplan
  cmdDpRep | Request status of an entry for dialplan
  cmdDial | Request that there is a dial (TBD) on a channel
  cmdTxreq | Request a Transfer
  cmdTxcnt | Connect up a Transfer
  cmdTxacc | Transfer has been accepted
  cmdTxready | Transfer is ready to happen
  cmdTxrel | Release a Transfer
  cmdTxrej | Reject a Transfer
  cmdQuelch | Stop media transmission
  cmdUnquelch | Resume media transmission
  cmdPoke | Query the remote endpoint (there is no open connection)
  cmdPage | Do a Page
  cmdMwi | Indicate : message waiting
  cmdUnsupport | We have received an unsupported message
  cmdTransfer | Initiate the remote end to do a transfer
  cmdProvision | Provision the remote end
  cmdFwDownl | The remote end must download some firmware
  cmdFwData | This message contains firmware.
  cmdTxMedia | undocumented - for now .
  cmdRtKey | More undocumented. Apologies
  cmdCallToken | Prevents DOS attack of handling multiple incoming calls.

## Constructor & Destructor Documentation

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.

Parameters:

  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.

Parameters:

  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

Parameters:

  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 IAX2FullFrameProtocol::~IAX2FullFrameProtocol | ( |  | ) | `[virtual]`

Destructor, which deletes all current Information Elements

## Member Function Documentation

void IAX2FullFrameProtocol::AppendIe | ( | IAX2Ie * | newElement | ) | `[inline]`

Add a new Information Element (Ie) to the intenral list

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.

virtual BYTE IAX2FullFrameProtocol::GetFullFrameType | ( |  | ) | `[inline, virtual]`

Return the IAX2FullFrame type represented here (voice, protocol, session etc

Reimplemented from IAX2FullFrame.

void IAX2FullFrameProtocol::GetRemoteCapability | ( | unsigned int & | capability,
|  | unsigned int & | preferred |
| ) |  |  |

Look through the list of IEs, and look for remote capabability and preferred codec

ProtocolSc IAX2FullFrameProtocol::GetSubClass | ( |  | ) | const`[inline]`

Report the current value of the subClass variable

Reimplemented from IAX2FullFrame.

static PString IAX2FullFrameProtocol::GetSubClassName | ( | unsigned | t | ) | `[static]`

Get text description of the subclass contents

virtual PString IAX2FullFrameProtocol::GetSubClassName | ( |  | ) | const`[virtual]`

Get text description of the subclass contents

Reimplemented from IAX2FullFrame.

virtual PBoolean IAX2FullFrameProtocol::InformationElementsPresent | ( |  | ) | `[inline, virtual]`

Mark this frame as having (or not having) information elements

Reimplemented from IAX2FullFrame.

virtual void IAX2FullFrameProtocol::PrintOn | ( | ostream & | strm | ) | const`[virtual]`

Pretty print this frame data to the designated stream

Reimplemented from IAX2FullFrame.

PBoolean IAX2FullFrameProtocol::ReadInformationElements | ( |  | ) | `[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

## Field Documentation

IAX2IeList IAX2FullFrameProtocol::ieElements `[protected]`

A list of the IEs read from/(or written to) the data section of this frame,

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

- frame.h