# IAX2FullFrame Class Reference

`#include <frame.h>`

Inheritance diagram for IAX2FullFrame:

[legend]
Collaboration diagram for IAX2FullFrame:
[legend]

## Public Types

| callActive
| callIrrelevant
enum | ConnectionRequired { callActive, callIrrelevant }

## Public Member Functions

| IAX2FullFrame (const IAX2Frame &srcFrame)
| IAX2FullFrame (IAX2EndPoint &_endpoint)
virtual | ~IAX2FullFrame ()
PBoolean | IsAckFrame ()
PBoolean | IsPingFrame ()
PBoolean | IsNewFrame ()
PBoolean | IsLagRqFrame ()
PBoolean | IsLagRpFrame ()
PBoolean | IsPongFrame ()
PBoolean | IsAuthReqFrame ()
PBoolean | IsVnakFrame ()
PBoolean | IsRegReqFrame ()
PBoolean | IsRegAuthFrame ()
PBoolean | IsRegAckFrame ()
PBoolean | IsRegRelFrame ()
PBoolean | IsRegRejFrame ()
PBoolean | IsCallTokenFrame ()
PBoolean | FrameIncrementsInSeqNo ()
virtual PBoolean | IsFullFrame ()
PBoolean | IsHangupFrame ()
void | ZeroAllValues ()
virtual PBoolean | ProcessNetworkPacket ()
virtual PBoolean | TransmitPacket (PUDPSocket &sock)
PString | GetFullFrameName () const
virtual PString | GetSubClassName () const
void | MarkDeleteNow ()
void | MarkVnakSendNow ()
virtual BYTE * | GetMediaDataPointer ()
virtual PINDEX | GetMediaDataSize ()
PINDEX | GetSubClass () const
void | SetSubClass (PINDEX newValue)
virtual PBoolean | WriteHeader ()
void | ModifyFrameHeaderSequenceNumbers (PINDEX inNo, PINDEX outNo)
void | ModifyFrameTimeStamp (PINDEX newTimeStamp)
virtual PBoolean | InformationElementsPresent ()
PBoolean | SendFrameNow ()
PBoolean | DeleteFrameNow ()
IAX2SequenceNumbers & | GetSequenceInfo ()
virtual void | PrintOn (ostream &strm) const
void | MarkAsResent ()
PBoolean | operator *= (IAX2FullFrame &other)
virtual BYTE | GetFullFrameType ()
virtual PINDEX | GetEncryptionOffset ()

## Protected Types

| minRetryTime = 1000
| maxRetryTime = 010000
| maxRetries = 3
enum | RetryTime { minRetryTime = 1000, maxRetryTime = 010000, maxRetries = 3 }

## Protected Member Functions

virtual PBoolean | CallMustBeActive ()
void | UnCompressSubClass (BYTE a)
int | CompressSubClass ()
void | ClearListFlags ()
virtual void | InitialiseHeader (IAX2Processor *processor)
void | OnTransmissionTimeout (PTimer &, INT)

## Protected Attributes

PTimer | transmissionTimer
int | subClass
PTimeInterval | retryDelta
PTimeInterval | timeOffset
PINDEX | retries
IAX2SequenceNumbers | sequence
PBoolean | sendFrameNow
PBoolean | deleteFrameNow
PBoolean | packetResent
PBoolean | callMustBeActive
PBoolean | isAckFrame

## Detailed Description

Class to handle a full frame, which is sent reliably to the remote endpoint

## Member Enumeration Documentation

enum IAX2FullFrame::ConnectionRequired

enum to define if the call must be active when sending this frame

Enumerator:

  callActive | the call must be active when sending frame
  callIrrelevant | the call may, or may not be, active when sending frame

enum IAX2FullFrame::RetryTime `[protected]`

Internal variables specifying the retry time periods (in milliseconds)

Enumerator:

  minRetryTime | 1000 milliseconds
  maxRetryTime | 10 seconds
  maxRetries | number of retries

## Constructor & Destructor Documentation

IAX2FullFrame::IAX2FullFrame | ( | const IAX2Frame & | srcFrame | ) |

Construction from a supplied dataframe. In this case, this class is filled from an incoming data packet

IAX2FullFrame::IAX2FullFrame | ( | IAX2EndPoint & | _endpoint | ) |

Construction from an endpoint, to create an empty frame. In this case, the class is filled with the various methods

virtual IAX2FullFrame::~IAX2FullFrame | ( |  | ) | `[virtual]`

Delete this frame now, but first we have to delete every timer on it.

## Member Function Documentation

virtual PBoolean IAX2FullFrame::CallMustBeActive | ( |  | ) | `[inline, protected, virtual]`

Report flag stating that this call must be active when this frame is transmitted

Reimplemented from IAX2Frame.

void IAX2FullFrame::ClearListFlags | ( |  | ) | `[protected]`

Mark this frame as not to be sent, and not to be deleted

int IAX2FullFrame::CompressSubClass | ( |  | ) | `[protected]`

Turn the 16 bit subClass value into a 8 bit representation

PBoolean IAX2FullFrame::DeleteFrameNow | ( |  | ) | `[inline]`

Get flag to see if this frame is ready for deletion. In other words. Has it been sent too many times?

PBoolean IAX2FullFrame::FrameIncrementsInSeqNo | ( |  | ) |

Return True if this FullFrame is of a type that increments the InSeqNo

virtual PINDEX IAX2FullFrame::GetEncryptionOffset | ( |  | ) | `[inline, virtual]`

Get the offset to the beginning of the encrypted region

Reimplemented from IAX2Frame.

PString IAX2FullFrame::GetFullFrameName | ( |  | ) | const

Get text descrption of this frame type

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

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

Reimplemented in IAX2FullFrameDtmf, IAX2FullFrameVoice, IAX2FullFrameVideo, IAX2FullFrameSessionControl, IAX2FullFrameNull, IAX2FullFrameProtocol, IAX2FullFrameText, IAX2FullFrameImage, IAX2FullFrameHtml, and IAX2FullFrameCng.

virtual BYTE* IAX2FullFrame::GetMediaDataPointer | ( |  | ) | `[virtual]`

Pointer to the beginning of the media (after the header) in this packet

Reimplemented from IAX2Frame.

virtual PINDEX IAX2FullFrame::GetMediaDataSize | ( |  | ) | `[virtual]`

Number of bytes in the media section of this packet.

Reimplemented from IAX2Frame.

IAX2SequenceNumbers& IAX2FullFrame::GetSequenceInfo | ( |  | ) | `[inline]`

Get the sequence number info (inSeqNo and outSeqNo)

PINDEX IAX2FullFrame::GetSubClass | ( |  | ) | const`[inline]`

Determine the current value of the subClass variable

Reimplemented in IAX2FullFrameProtocol.

virtual PString IAX2FullFrame::GetSubClassName | ( |  | ) | const`[inline, virtual]`

Get text description of the subclass contents

Reimplemented in IAX2FullFrameDtmf, IAX2FullFrameVoice, IAX2FullFrameVideo, IAX2FullFrameSessionControl, IAX2FullFrameNull, IAX2FullFrameProtocol, IAX2FullFrameText, IAX2FullFrameImage, IAX2FullFrameHtml, and IAX2FullFrameCng.

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

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

Reimplemented in IAX2FullFrameProtocol.

virtual void IAX2FullFrame::InitialiseHeader | ( | IAX2Processor * | processor | ) | `[protected, virtual]`

Given the supplied Connection class, write the first 12 bytes of the frame. This method is called by the frame construcors, in preparation for transmission. This method is never called when processing a received frame.

Whenever a frame is transmitted, this method will be called.

Reimplemented from IAX2Frame.

PBoolean IAX2FullFrame::IsAckFrame | ( |  | ) | `[inline]`

Return True if this an ack frame

PBoolean IAX2FullFrame::IsAuthReqFrame | ( |  | ) |

Return True if this is a AuthReq frame

PBoolean IAX2FullFrame::IsCallTokenFrame | ( |  | ) |

Return True if this is a CALLTOKEN frame

virtual PBoolean IAX2FullFrame::IsFullFrame | ( |  | ) | `[inline, virtual]`

True if this is a full frame - always returns true as this is a full frame.

Reimplemented from IAX2Frame.

PBoolean IAX2FullFrame::IsHangupFrame | ( |  | ) |

Report true if this is a hangup frame. We need this information for processing incoming frames, before fully dissection of the frame has completed

PBoolean IAX2FullFrame::IsLagRpFrame | ( |  | ) |

Return True if this is a LAGRP frame

PBoolean IAX2FullFrame::IsLagRqFrame | ( |  | ) |

Return True if this is a LAGRQ frame

PBoolean IAX2FullFrame::IsNewFrame | ( |  | ) |

Return True if this is a NEW frame

PBoolean IAX2FullFrame::IsPingFrame | ( |  | ) |

Return True if this is a PING frame

PBoolean IAX2FullFrame::IsPongFrame | ( |  | ) |

Return True if this is a PONG frame

PBoolean IAX2FullFrame::IsRegAckFrame | ( |  | ) |

Return True if this is a REGACK frame

PBoolean IAX2FullFrame::IsRegAuthFrame | ( |  | ) |

Return True if this is a REGAUTH frame

PBoolean IAX2FullFrame::IsRegRejFrame | ( |  | ) |

Return True if this is a REGREJ frame

PBoolean IAX2FullFrame::IsRegRelFrame | ( |  | ) |

Return True if this is a REGREL frame

PBoolean IAX2FullFrame::IsRegReqFrame | ( |  | ) |

Return True if this is a REGREQ frame

PBoolean IAX2FullFrame::IsVnakFrame | ( |  | ) |

Return True if this is a VNAK frame

void IAX2FullFrame::MarkAsResent | ( |  | ) |

Mark this frame as having been resent (set bit 7 of data[2])

void IAX2FullFrame::MarkDeleteNow | ( |  | ) |

Stop the timer, so this packet is not retransmitted. Mark packet as dead. This happens when a packet has been received that matches one of the previously sent packets.

void IAX2FullFrame::MarkVnakSendNow | ( |  | ) |

A Vnak frame has been received. This Vnak frame is demanding that we resend this particular frame. Given it is to be resent by vnak, we reset the countdown variables. E.G. it gets the full amount of retries again.

void IAX2FullFrame::ModifyFrameHeaderSequenceNumbers | ( | PINDEX | inNo,
|  | PINDEX | outNo |
| ) |  |  |

Alter the two bytes for in and out sequence values. (in the header)

void IAX2FullFrame::ModifyFrameTimeStamp | ( | PINDEX | newTimeStamp | ) |

Alter the four bytes for this frames timestamp. It is required, when transmitting full frames, that there is a 3ms interval to last full frame in the timestamps. This is required by limitations in the handline of time in asterisk.

void IAX2FullFrame::OnTransmissionTimeout | ( | PTimer & | ,
|  | INT |  |
| ) |  |  | `[protected]`

pwlib constructs to cope with timeout, when transmitting a full frame. This happens when a full frame has not been acknowledged in the required time period. This frame will be resent.

PBoolean IAX2FullFrame::operator *= | ( | IAX2FullFrame & | other | ) |

Compare this FullFrame with another full frame, which is used when determining if we are dealing with a frame we have already processed

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

Pretty print this frame data to the designated stream

Reimplemented from IAX2Frame.

Reimplemented in IAX2FullFrameProtocol.

virtual PBoolean IAX2FullFrame::ProcessNetworkPacket | ( |  | ) | `[virtual]`

Process the incoming frame some more, but process it as a full frame

Reimplemented from IAX2Frame.

PBoolean IAX2FullFrame::SendFrameNow | ( |  | ) | `[inline]`

Get flag to see if this frame is ready to be sent (or resent). In other words, has the timer expired?

void IAX2FullFrame::SetSubClass | ( | PINDEX | newValue | ) | `[inline]`

Dry the current value of the subClass variable

virtual PBoolean IAX2FullFrame::TransmitPacket | ( | PUDPSocket & | sock | ) | `[virtual]`

Send this packet on the specified socket to the remote host. This method is only called by the transmiter.

Reimplemented from IAX2Frame.

void IAX2FullFrame::UnCompressSubClass | ( | BYTE | a | ) | `[protected]`

Turn the 8 bit subClass value into a 16 bit representation

virtual PBoolean IAX2FullFrame::WriteHeader | ( |  | ) | `[virtual]`

Write the header for this class to the internal data array. 12 bytes of data are writen. The application developer must write the remaining bytes, before transmiting this frame.

Reimplemented from IAX2Frame.

void IAX2FullFrame::ZeroAllValues | ( |  | ) |

Initialise to zero all the members of this particular class

Reimplemented from IAX2Frame.

## Field Documentation

PBoolean IAX2FullFrame::callMustBeActive `[protected]`

Flag stating that this call must be active when this frame is transmitted

PBoolean IAX2FullFrame::deleteFrameNow `[protected]`

List flag, this frame is ready for deletion (too many retries)

PBoolean IAX2FullFrame::isAckFrame `[protected]`

flag to indicate if this is an ack frame

PBoolean IAX2FullFrame::packetResent `[protected]`

A tracking flag to indicate this fame has been resent

PINDEX IAX2FullFrame::retries `[protected]`

Number of retries this frame has undergone

PTimeInterval IAX2FullFrame::retryDelta `[protected]`

Time to wait between retries

PBoolean IAX2FullFrame::sendFrameNow `[protected]`

List flag, indicating if this frame ready for sending

IAX2SequenceNumbers IAX2FullFrame::sequence `[protected]`

Class holding the sequence numbers, which is used by all classes which have a FullFrame ancestor.

int IAX2FullFrame::subClass `[protected]`

integer variable specifying the uncompressed subClass value for this particular frame

PTimeInterval IAX2FullFrame::timeOffset `[protected]`

Time delta between call start and sending (or receiving)

PTimer IAX2FullFrame::transmissionTimer `[protected]`

The timer which is used to test for no reply to this frame (on transmission)

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

- frame.h