frame.h
Go to the documentation of this file.
/*
*
* Inter Asterisk Exchange 2
*
* Open Phone Abstraction Library (OPAL)
*
* Define the classes that carry information over the ethernet.
*
* Copyright (c) 2005 Indranet Technologies Ltd.
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Open Phone Abstraction Library.
*
* The Initial Developer of the Original Code is Indranet Technologies Ltd.
*
* The author of this code is Derek J Smithies
*
* $Revision: 24606 $
* $Author: dereksmithies $
* $Date: 2010-07-28 22:51:05 -0500 (Wed, 28 Jul 2010) $
*/
#ifndef OPAL_IAX2_FRAME_H
#define OPAL_IAX2_FRAME_H
#ifndef _PTLIB_H
#include <ptlib.h>
#endif
#include <opal/buildopts.h>
#if OPAL_IAX2
#include <iax2/ies.h>
#include <iax2/remote.h>
#include <ptlib/sockets.h>
#ifdef P_USE_PRAGMA
#pragma interface
#endif
class IAX2Frame;
class IAX2FrameList;
class IAX2FullFrame;
class IAX2FullFrameCng;
class IAX2FullFrameDtmf;
class IAX2FullFrameHtml;
class IAX2FullFrameImage;
class IAX2FullFrameNull;
class IAX2FullFrameProtocol;
class IAX2FullFrameSessionControl;
class IAX2FullFrameText;
class IAX2FullFrameVideo;
class IAX2FullFrameVoice;
class IAX2EndPoint;
class IAX2Processor;
class IAX2CallProcessor;
class IAX2IeList;
class IAX2MiniFrame;
class IAX2Transmitter;
class IAX2Frame : public PObject
{
PCLASSINFO(IAX2Frame, PObject);
public:
IAX2Frame(IAX2EndPoint &_endpoint);
virtual ~IAX2Frame();
PBoolean ReadNetworkPacket(PUDPSocket &sock);
virtual PBoolean ProcessNetworkPacket();
virtual PBoolean IsFullFrame() { return isFullFrame; }
PBoolean IsVideo() const { return isVideo; }
PBoolean IsAudio() const { return isAudio; }
virtual BYTE *GetMediaDataPointer() { return data.GetPointer(); }
virtual PINDEX GetMediaDataSize() { return DataSize();}
PINDEX DataSize() { return data.GetSize(); }
IAX2Remote & GetRemoteInfo() { return remote; }
const BYTE * GetDataPointer() { return data + currentReadIndex; }
IAX2Frame * BuildAppropriateFrameType(IAX2Encryption &encryptionInfo);
IAX2Frame * BuildAppropriateFrameType();
PINDEX GetUnReadBytes() { return data.GetSize() - currentReadIndex; }
virtual PBoolean WriteHeader() { return false; }
virtual PBoolean TransmitPacket(PUDPSocket &sock);
virtual void PrintOn(ostream & strm) const;
static DWORD CalcTimeStamp(const PTimeInterval & callStartTick);
virtual void BuildTimeStamp(const PTimeInterval & callStartTick);
IAX2EndPoint & GetEndpoint() { return endpoint; }
PString IdString() const;
DWORD GetTimeStamp() { return timeStamp; }
void SetTimeStamp(DWORD newValue);
virtual PBoolean CallMustBeActive() { return true; }
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
};
IAX2FrameType GetFrameType() { return frameType; }
virtual void InitialiseHeader(IAX2Processor * /*processor*/) { }
PBoolean CanRetransmitFrame() const {return canRetransmitFrame; }
PString GetConnectionToken() const { return connectionToken; }
void SetConnectionToken(PString newToken) { connectionToken = newToken; }
void BuildConnectionToken();
PBoolean EncryptContents(IAX2Encryption &encData);
virtual PINDEX GetEncryptionOffset();
protected:
PBoolean DecryptContents(IAX2Encryption & encryption);
IAX2Remote remote;
IAX2FrameType frameType;
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();
IAX2EndPoint & endpoint;
PBYTEArray data;
PBoolean isFullFrame;
PBoolean isVideo;
PBoolean isAudio;
PINDEX currentReadIndex;
PINDEX currentWriteIndex;
DWORD timeStamp;
PBoolean canRetransmitFrame;
PString connectionToken;
DWORD presetTimeStamp;
};
class IAX2MiniFrame : public IAX2Frame
{
PCLASSINFO(IAX2MiniFrame, IAX2Frame);
public:
IAX2MiniFrame(const IAX2Frame & srcFrame);
IAX2MiniFrame(IAX2EndPoint & _endpoint);
IAX2MiniFrame(IAX2Processor * con, PBYTEArray &sound, PBoolean isAudio, DWORD usersTimeStamp = 0);
virtual ~IAX2MiniFrame();
virtual PBoolean ProcessNetworkPacket();
virtual PBoolean WriteHeader();
virtual void PrintOn(ostream & strm) const;
virtual BYTE *GetMediaDataPointer();
virtual PINDEX GetMediaDataSize();
void AlterTimeStamp(PINDEX newValue);
virtual void InitialiseHeader(IAX2Processor *processor);
virtual PINDEX GetEncryptionOffset();
protected:
void ZeroAllValues();
};
class IAX2FullFrame : public IAX2Frame
{
PCLASSINFO(IAX2FullFrame, IAX2Frame);
public:
IAX2FullFrame(const IAX2Frame & srcFrame);
IAX2FullFrame(IAX2EndPoint &_endpoint);
virtual ~IAX2FullFrame();
PBoolean IsAckFrame() { return 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() { return true; }
PBoolean IsHangupFrame();
void ZeroAllValues();
virtual PBoolean ProcessNetworkPacket();
virtual PBoolean TransmitPacket(PUDPSocket &sock);
PString GetFullFrameName() const;
virtual PString GetSubClassName() const
{ return PString(" subclass=") + PString(subClass); }
void MarkDeleteNow();
void MarkVnakSendNow();
virtual BYTE *GetMediaDataPointer();
virtual PINDEX GetMediaDataSize();
PINDEX GetSubClass() const { return subClass; }
void SetSubClass(PINDEX newValue) { subClass = newValue;}
virtual PBoolean WriteHeader();
void ModifyFrameHeaderSequenceNumbers(PINDEX inNo, PINDEX outNo);
void ModifyFrameTimeStamp(PINDEX newTimeStamp);
virtual PBoolean InformationElementsPresent() { return false; }
PBoolean SendFrameNow() { return sendFrameNow; }
PBoolean DeleteFrameNow() { return deleteFrameNow; }
IAX2SequenceNumbers & GetSequenceInfo() { return sequence; }
virtual void PrintOn(ostream & strm) const;
void MarkAsResent();
PBoolean operator *= (IAX2FullFrame & other);
enum ConnectionRequired {
callActive,
callIrrelevant
};
virtual BYTE GetFullFrameType() { return 0; }
virtual PINDEX GetEncryptionOffset() { return 4; }
protected:
virtual PBoolean CallMustBeActive() { return callMustBeActive; }
void UnCompressSubClass(BYTE a);
int CompressSubClass();
void ClearListFlags();
virtual void InitialiseHeader(IAX2Processor *processor);
#ifdef DOC_PLUS_PLUS
void OnTransmissionTimeout(PTimer &, INT);
#else
PDECLARE_NOTIFIER(PTimer, IAX2FullFrame, OnTransmissionTimeout);
#endif
PTimer transmissionTimer;
PINDEX subClass;
PTimeInterval retryDelta;
PTimeInterval timeOffset;
PINDEX retries;
enum RetryTime {
minRetryTime = 1000,
maxRetryTime = 010000,
maxRetries = 3
};
IAX2SequenceNumbers sequence;
PBoolean sendFrameNow;
PBoolean deleteFrameNow;
PBoolean packetResent;
PBoolean callMustBeActive;
PBoolean isAckFrame;
};
class IAX2FullFrameDtmf : public IAX2FullFrame
{
PCLASSINFO(IAX2FullFrameDtmf, IAX2FullFrame);
public:
IAX2FullFrameDtmf(const IAX2Frame & srcFrame);
IAX2FullFrameDtmf(const IAX2FullFrame & srcFrame);
IAX2FullFrameDtmf(IAX2Processor *processor,
char subClassValue
);
IAX2FullFrameDtmf(IAX2Processor *processor,
PString subClassValue
);
virtual PString GetSubClassName() const;
enum DtmfSc {
dtmf0 = 48,
dtmf1 = 49,
dtmf2 = 50,
dtmf3 = 51,
dtmf4 = 52,
dtmf5 = 53,
dtmf6 = 54,
dtmf7 = 55,
dtmf8 = 56,
dtmf9 = 57,
dtmfA = 65,
dtmfB = 66,
dtmfC = 67,
dtmfD = 68,
dtmfStar = 42,
dtmfHash = 35
};
virtual BYTE GetFullFrameType() { return dtmfType; }
protected:
};
class IAX2FullFrameVoice : public IAX2FullFrame
{
PCLASSINFO(IAX2FullFrameVoice, IAX2FullFrame);
public:
IAX2FullFrameVoice(const IAX2Frame & srcFrame);
IAX2FullFrameVoice(const IAX2FullFrame & srcFrame);
IAX2FullFrameVoice(IAX2CallProcessor *processor, PBYTEArray &sound,
PINDEX usersTimeStamp = 0);
virtual ~IAX2FullFrameVoice();
virtual PString GetSubClassName() const;
static PString GetSubClassName(unsigned short testValue)
{ return GetSubClassName((unsigned int) testValue); }
static PString GetSubClassName(unsigned int testValue);
static PString GetOpalNameOfCodec(PINDEX testValue);
static PString GetSubClassName(int testValue)
{ return GetSubClassName((unsigned short) testValue); }
static unsigned short OpalNameToIax2Value(const PString opalName);
enum AudioSc {
g7231 = 1,
gsm = 2,
g711ulaw = 4,
g711alaw = 8,
mp3 = 0x10,
adpcm = 0x20,
pcm = 0x40,
lpc10 = 0x80,
g729 = 0x100,
speex = 0x200,
ilbc = 0x400,
supportedCodecs = 11
};
virtual BYTE GetFullFrameType() { return voiceType; }
};
class IAX2FullFrameVideo : public IAX2FullFrame
{
PCLASSINFO(IAX2FullFrameVideo, IAX2FullFrame);
public:
IAX2FullFrameVideo(const IAX2Frame & srcFrame);
IAX2FullFrameVideo(const IAX2FullFrame & srcFrame);
virtual PString GetSubClassName() const;
enum VideoSc {
jpeg = 0x10000,
png = 0x20000,
h261 = 0x40000,
h263 = 0x80000
};
virtual BYTE GetFullFrameType() { return videoType; }
protected:
};
class IAX2FullFrameSessionControl : public IAX2FullFrame
{
PCLASSINFO(IAX2FullFrameSessionControl, IAX2FullFrame);
public:
enum SessionSc {
hangup = 1,
ring = 2,
ringing = 3,
answer = 4,
busy = 5,
tkoffhk = 6,
offhook = 7,
congestion = 8,
flashhook = 9,
wink = 10,
option = 11,
keyRadio = 12,
unkeyRadio = 13,
callProgress = 14,
callProceeding = 15,
callOnHold = 16,
callHoldRelease = 17,
stopSounds = 255
};
IAX2FullFrameSessionControl(const IAX2Frame & srcFrame);
IAX2FullFrameSessionControl(const IAX2FullFrame & srcFrame);
IAX2FullFrameSessionControl(IAX2Processor *processor,
PINDEX subClassValue
);
IAX2FullFrameSessionControl(IAX2Processor *processor,
SessionSc subClassValue
);
virtual ~IAX2FullFrameSessionControl() { }
virtual PString GetSubClassName() const;
virtual BYTE GetFullFrameType() { return controlType; }
protected:
};
class IAX2FullFrameNull : public IAX2FullFrame
{
PCLASSINFO(IAX2FullFrameNull, IAX2FullFrame);
public:
IAX2FullFrameNull(IAX2EndPoint & endpoint) : IAX2FullFrame(endpoint) { }
IAX2FullFrameNull(const IAX2Frame & srcFrame);
IAX2FullFrameNull(const IAX2FullFrame & srcFrame);
virtual PString GetSubClassName() const { return PString(""); }
virtual BYTE GetFullFrameType() { return nullType; }
protected:
};
class IAX2FullFrameProtocol : public IAX2FullFrame
{
PCLASSINFO(IAX2FullFrameProtocol, IAX2FullFrame);
public:
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
};
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() { return !ieElements.IsEmpty(); }
ProtocolSc GetSubClass() const { return (ProtocolSc) subClass; }
virtual PString GetSubClassName() const;
static PString GetSubClassName(PINDEX t);
IAX2Ie *GetIeAt(PINDEX i) { return ieElements.GetIeAt(i); }
void AppendIe(IAX2Ie *newElement) { ieElements.AppendIe(newElement); }
void WriteIeAsBinaryData();
void CopyDataFromIeListTo(IAX2IeData &res);
void GetRemoteCapability(unsigned int & capability,
unsigned int & preferred);
virtual BYTE GetFullFrameType() { return iax2ProtocolType; }
virtual void PrintOn(ostream & strm) const;
PBoolean GetCallTokenIe(IAX2IeCallToken & callToken);
protected:
PBoolean ReadInformationElements();
IAX2IeList ieElements;
#if PTRACING
friend ostream & operator<<(ostream & o, ProtocolSc t);
#endif
};
class IAX2FullFrameText : public IAX2FullFrame
{
PCLASSINFO(IAX2FullFrameText, IAX2FullFrame);
public:
IAX2FullFrameText(IAX2Processor *processor,
const PString& textValue
);
IAX2FullFrameText(const IAX2Frame & srcFrame);
IAX2FullFrameText(const IAX2FullFrame & srcFrame);
virtual PString GetSubClassName() const;
virtual BYTE GetFullFrameType() { return textType; }
PString GetTextString() const;
protected:
PString internalText;
};
class IAX2FullFrameImage : public IAX2FullFrame
{
PCLASSINFO(IAX2FullFrameImage, IAX2FullFrame);
public:
IAX2FullFrameImage(const IAX2Frame & srcFrame);
IAX2FullFrameImage(const IAX2FullFrame & srcFrame);
virtual PString GetSubClassName() const;
virtual BYTE GetFullFrameType() { return imageType; }
protected:
};
class IAX2FullFrameHtml : public IAX2FullFrame
{
PCLASSINFO(IAX2FullFrameHtml, IAX2FullFrame);
public:
IAX2FullFrameHtml(const IAX2Frame & srcFrame);
IAX2FullFrameHtml(const IAX2FullFrame & srcFrame);
virtual PString GetSubClassName() const;
virtual BYTE GetFullFrameType() { return htmlType; }
protected:
};
class IAX2FullFrameCng : public IAX2FullFrame
{
PCLASSINFO(IAX2FullFrameCng, IAX2FullFrame);
public:
IAX2FullFrameCng(const IAX2Frame & srcFrame);
IAX2FullFrameCng(const IAX2FullFrame & srcFrame);
virtual PString GetSubClassName() const;
virtual BYTE GetFullFrameType() { return cngType; }
protected:
};
PDECLARE_LIST (IAX2FrameList, IAX2Frame *)
#ifdef DOC_PLUS_PLUS //This makes emacs bracket matching code happy.
class IAX2FrameList : public IAX2Frame *
{
#endif
public:
~IAX2FrameList();
void ReportList(PString & answer);
IAX2Frame *GetLastFrame();
void Initialise();
PBoolean Empty() { return GetSize() == 0; }
void GrabContents(IAX2FrameList &src);
void DeleteMatchingSendFrame(IAX2FullFrame *reply);
void SendVnakRequestedFrames(IAX2FullFrameProtocol &src);
void AddNewFrame(IAX2Frame *src);
void GetResendFramesDeleteOldFrames(IAX2FrameList & framesToSend);
virtual PINDEX GetSize() { PWaitAndSignal m(mutex); return PAbstractList::GetSize(); }
void MarkAllAsResent();
protected:
virtual PINDEX GetEntries() { return PAbstractList::GetSize(); }
PMutex mutex;
};
class IAX2ActiveFrameList : public IAX2FrameList
{
PCLASSINFO(IAX2ActiveFrameList, IAX2FrameList);
public:
IAX2ActiveFrameList() { Initialise(); }
};
#endif // OPAL_IAX2
#endif // OPAL_IAX2_FRAME_H
/* The comment below is magic for those who use emacs to edit this file.
* With the comment below, the tab key does auto indent to 2 spaces.
*
* Local Variables:
* mode:c
* c-basic-offset:2
* End:
*/
IAX2FullFrameSessionControl::busy
Definition: frame.h:794
IAX2FullFrameProtocol::SetRetransmissionRequired
void SetRetransmissionRequired()
IAX2Frame::Read1Byte
PBoolean Read1Byte(BYTE &res)
IAX2FullFrameProtocol::cmdPing
Definition: frame.h:893
IAX2FullFrameDtmf::dtmf5
Definition: frame.h:644
IAX2FullFrameVideo::GetFullFrameType
virtual BYTE GetFullFrameType()
Definition: frame.h:773
IAX2FullFrameDtmf::dtmf9
Definition: frame.h:648
IAX2Frame::connectionToken
PString connectionToken
Definition: frame.h:298
IAX2MiniFrame::AlterTimeStamp
void AlterTimeStamp(PINDEX newValue)
IAX2FrameList::Initialise
void Initialise()
IAX2Frame::Read2Bytes
PBoolean Read2Bytes(PINDEX &res)
IAX2FullFrameProtocol::GetSubClassName
virtual PString GetSubClassName() const
IAX2SequenceNumbers
Definition: remote.h:230
IAX2FrameList::GetResendFramesDeleteOldFrames
void GetResendFramesDeleteOldFrames(IAX2FrameList &framesToSend)
IAX2FullFrameProtocol::cmdLagRq
Definition: frame.h:902
IAX2FullFrameProtocol::cmdTxMedia
Definition: frame.h:929
IAX2MiniFrame::GetEncryptionOffset
virtual PINDEX GetEncryptionOffset()
IAX2FullFrameVoice::gsm
Definition: frame.h:726
IAX2FullFrameText::GetTextString
PString GetTextString() const
IAX2FullFrameProtocol::cmdRegAuth
Definition: frame.h:905
IAX2FullFrameVoice::GetOpalNameOfCodec
static PString GetOpalNameOfCodec(PINDEX testValue)
IAX2FullFrame::maxRetries
Definition: frame.h:581
IAX2FullFrameText::GetSubClassName
virtual PString GetSubClassName() const
IAX2FullFrameDtmf::dtmfHash
Definition: frame.h:654
IAX2FullFrameProtocol::GetRemoteCapability
void GetRemoteCapability(unsigned int &capability, unsigned int &preferred)
IAX2Frame::GetFrameType
IAX2FrameType GetFrameType()
Definition: frame.h:186
IAX2FullFrameSessionControl::congestion
Definition: frame.h:797
IAX2FullFrameSessionControl::GetSubClassName
virtual PString GetSubClassName() const
IAX2FullFrame::callActive
Definition: frame.h:524
IAX2FrameList
Definition: frame.h:1168
IAX2FullFrameNull
Definition: frame.h:851
IAX2FullFrameNull::GetSubClassName
virtual PString GetSubClassName() const
Definition: frame.h:870
IAX2Frame::CanRetransmitFrame
PBoolean CanRetransmitFrame() const
Definition: frame.h:195
IAX2FullFrame::IsRegReqFrame
PBoolean IsRegReqFrame()
IAX2MiniFrame::WriteHeader
virtual PBoolean WriteHeader()
IAX2FullFrameVoice
Definition: frame.h:671
IAX2FullFrame::IsLagRqFrame
PBoolean IsLagRqFrame()
IAX2Frame::IsAudio
PBoolean IsAudio() const
Definition: frame.h:99
IAX2Frame::DataSize
PINDEX DataSize()
Definition: frame.h:112
IAX2Frame::Write4Bytes
void Write4Bytes(unsigned int newVal)
IAX2FullFrameNull::GetFullFrameType
virtual BYTE GetFullFrameType()
Definition: frame.h:873
IAX2FullFrameDtmf::dtmf8
Definition: frame.h:647
IAX2Frame::remote
IAX2Remote remote
Definition: frame.h:225
IAX2Frame::controlType
Definition: frame.h:174
IAX2FullFrameVoice::adpcm
Definition: frame.h:730
IAX2FullFrameCng::GetSubClassName
virtual PString GetSubClassName() const
IAX2EndPoint
Definition: iax2ep.h:104
IAX2Remote
Definition: remote.h:59
IAX2FullFrameDtmf::dtmfD
Definition: frame.h:652
IAX2Frame::voiceType
Definition: frame.h:172
IAX2FullFrame::ClearListFlags
void ClearListFlags()
IAX2MiniFrame::~IAX2MiniFrame
virtual ~IAX2MiniFrame()
IAX2FullFrameCng::IAX2FullFrameCng
IAX2FullFrameCng(const IAX2Frame &srcFrame)
IAX2Frame::DecryptContents
PBoolean DecryptContents(IAX2Encryption &encryption)
buildopts.h
IAX2FullFrameDtmf::dtmfA
Definition: frame.h:649
IAX2FullFrameDtmf::GetFullFrameType
virtual BYTE GetFullFrameType()
Definition: frame.h:658
IAX2Frame::cngType
Definition: frame.h:180
IAX2FullFrame::operator*=
PBoolean operator*=(IAX2FullFrame &other)
IAX2FullFrameVideo::h263
Definition: frame.h:769
IAX2FullFrame::sequence
IAX2SequenceNumbers sequence
Definition: frame.h:585
IAX2Frame::IsVideo
PBoolean IsVideo() const
Definition: frame.h:96
IAX2FullFrame::GetFullFrameType
virtual BYTE GetFullFrameType()
Definition: frame.h:529
IAX2FullFrameProtocol::cmdPong
Definition: frame.h:894
IAX2FullFrameSessionControl::callProgress
Definition: frame.h:803
IAX2FullFrameVoice::lpc10
Definition: frame.h:732
IAX2FullFrameProtocol::cmdDpRep
Definition: frame.h:911
IAX2FullFrameVideo::h261
Definition: frame.h:768
IAX2FullFrameDtmf::dtmfC
Definition: frame.h:651
IAX2FrameList::mutex
PMutex mutex
Definition: frame.h:1215
IAX2FullFrame::minRetryTime
Definition: frame.h:579
IAX2MiniFrame::PrintOn
virtual void PrintOn(ostream &strm) const
IAX2FullFrameProtocol::GetSubClass
ProtocolSc GetSubClass() const
Definition: frame.h:982
IAX2FullFrameVideo::png
Definition: frame.h:767
IAX2Frame::PrintOn
virtual void PrintOn(ostream &strm) const
IAX2FullFrameVideo::VideoSc
VideoSc
Definition: frame.h:765
IAX2FullFrameProtocol::cmdPoke
Definition: frame.h:921
IAX2FullFrameDtmf::dtmf6
Definition: frame.h:645
IAX2Frame::imageType
Definition: frame.h:178
IAX2IeCallToken
Definition: ies.h:2082
IAX2FullFrameVideo::IAX2FullFrameVideo
IAX2FullFrameVideo(const IAX2Frame &srcFrame)
IAX2FullFrame::ModifyFrameTimeStamp
void ModifyFrameTimeStamp(PINDEX newTimeStamp)
IAX2MiniFrame::IAX2MiniFrame
IAX2MiniFrame(const IAX2Frame &srcFrame)
IAX2FullFrame::ConnectionRequired
ConnectionRequired
Definition: frame.h:523
IAX2FullFrame::IsVnakFrame
PBoolean IsVnakFrame()
IAX2FullFrameProtocol::cmdInval
Definition: frame.h:901
IAX2FullFrame::IsRegAckFrame
PBoolean IsRegAckFrame()
IAX2FullFrame
Definition: frame.h:369
IAX2FullFrameHtml::GetFullFrameType
virtual BYTE GetFullFrameType()
Definition: frame.h:1128
IAX2FullFrameProtocol::cmdDpReq
Definition: frame.h:910
IAX2Frame::IAX2FrameType
IAX2FrameType
Definition: frame.h:169
IAX2FullFrameProtocol::~IAX2FullFrameProtocol
virtual ~IAX2FullFrameProtocol()
IAX2MiniFrame::ZeroAllValues
void ZeroAllValues()
IAX2FullFrameVoice::ilbc
Definition: frame.h:735
IAX2Frame::undefType
Definition: frame.h:170
IAX2FullFrameProtocol::cmdTxready
Definition: frame.h:916
IAX2FullFrameSessionControl::flashhook
Definition: frame.h:798
IAX2MiniFrame
Definition: frame.h:307
IAX2FullFrameProtocol::cmdRegRel
Definition: frame.h:908
IAX2FullFrameVoice::GetSubClassName
static PString GetSubClassName(int testValue)
Definition: frame.h:716
IAX2MiniFrame::GetMediaDataPointer
virtual BYTE * GetMediaDataPointer()
IAX2FullFrameProtocol::cmdFwDownl
Definition: frame.h:927
IAX2FullFrame::ZeroAllValues
void ZeroAllValues()
IAX2FullFrameProtocol::PrintOn
virtual void PrintOn(ostream &strm) const
IAX2FullFrame::timeOffset
PTimeInterval timeOffset
Definition: frame.h:572
IAX2FullFrame::callIrrelevant
Definition: frame.h:525
IAX2Frame::GetUnReadBytes
PINDEX GetUnReadBytes()
Definition: frame.h:132
IAX2FullFrame::GetFullFrameName
PString GetFullFrameName() const
IAX2FullFrameSessionControl::answer
Definition: frame.h:793
IAX2FullFrame::IsAuthReqFrame
PBoolean IsAuthReqFrame()
IAX2FullFrameHtml
Definition: frame.h:1111
IAX2FullFrameProtocol::ProtocolSc
ProtocolSc
Definition: frame.h:891
IAX2FullFrameSessionControl::ring
Definition: frame.h:791
IAX2FullFrame::IsNewFrame
PBoolean IsNewFrame()
IAX2FullFrameNull::IAX2FullFrameNull
IAX2FullFrameNull(IAX2EndPoint &endpoint)
Definition: frame.h:857
IAX2Frame::htmlType
Definition: frame.h:179
IAX2FrameList::GrabContents
void GrabContents(IAX2FrameList &src)
IAX2FullFrame::InitialiseHeader
virtual void InitialiseHeader(IAX2Processor *processor)
IAX2Frame::InitialiseHeader
virtual void InitialiseHeader(IAX2Processor *)
Definition: frame.h:191
IAX2Frame::GetConnectionToken
PString GetConnectionToken() const
Definition: frame.h:199
IAX2Frame::textType
Definition: frame.h:177
IAX2FullFrameProtocol::WriteIeAsBinaryData
void WriteIeAsBinaryData()
IAX2Frame::currentWriteIndex
PINDEX currentWriteIndex
Definition: frame.h:286
IAX2CallProcessor
Definition: callprocessor.h:57
IAX2FullFrameDtmf::dtmf7
Definition: frame.h:646
IAX2FullFrameProtocol::cmdProvision
Definition: frame.h:926
IAX2Frame::canRetransmitFrame
PBoolean canRetransmitFrame
Definition: frame.h:292
IAX2FullFrame::retryDelta
PTimeInterval retryDelta
Definition: frame.h:569
IAX2FullFrame::IsLagRpFrame
PBoolean IsLagRpFrame()
IAX2FullFrameVoice::AudioSc
AudioSc
Definition: frame.h:724
IAX2Frame::TransmitPacket
virtual PBoolean TransmitPacket(PUDPSocket &sock)
IAX2FullFrameDtmf::dtmf4
Definition: frame.h:643
IAX2FullFrameHtml::IAX2FullFrameHtml
IAX2FullFrameHtml(const IAX2Frame &srcFrame)
IAX2FullFrameVoice::g711alaw
Definition: frame.h:728
IAX2FullFrameProtocol::cmdAck
Definition: frame.h:895
IAX2FullFrameProtocol::cmdLagRp
Definition: frame.h:903
IAX2MiniFrame::GetMediaDataSize
virtual PINDEX GetMediaDataSize()
IAX2Frame::BuildAppropriateFrameType
IAX2Frame * BuildAppropriateFrameType()
IAX2FullFrame::GetSubClassName
virtual PString GetSubClassName() const
Definition: frame.h:455
IAX2Frame::timeStamp
DWORD timeStamp
Definition: frame.h:289
IAX2FullFrame::MarkVnakSendNow
void MarkVnakSendNow()
IAX2MiniFrame::ProcessNetworkPacket
virtual PBoolean ProcessNetworkPacket()
IAX2FullFrameProtocol::cmdTxcnt
Definition: frame.h:914
IAX2FullFrameVoice::GetFullFrameType
virtual BYTE GetFullFrameType()
Definition: frame.h:740
IAX2FullFrame::packetResent
PBoolean packetResent
Definition: frame.h:594
IAX2Frame::ProcessNetworkPacket
virtual PBoolean ProcessNetworkPacket()
IAX2FrameList::MarkAllAsResent
void MarkAllAsResent()
IAX2FullFrameVoice::IAX2FullFrameVoice
IAX2FullFrameVoice(const IAX2Frame &srcFrame)
IAX2FullFrame::deleteFrameNow
PBoolean deleteFrameNow
Definition: frame.h:591
IAX2IeList::IsEmpty
PBoolean IsEmpty() const
Definition: ies.h:2176
IAX2FullFrameDtmf::dtmf0
Definition: frame.h:639
IAX2FullFrameSessionControl::~IAX2FullFrameSessionControl
virtual ~IAX2FullFrameSessionControl()
Definition: frame.h:833
IAX2FrameList::DeleteMatchingSendFrame
void DeleteMatchingSendFrame(IAX2FullFrame *reply)
IAX2FullFrame::callMustBeActive
PBoolean callMustBeActive
Definition: frame.h:597
IAX2Frame::GetEndpoint
IAX2EndPoint & GetEndpoint()
Definition: frame.h:153
IAX2FullFrame::MarkDeleteNow
void MarkDeleteNow()
IAX2IeData
Definition: iedata.h:55
IAX2FullFrame::TransmitPacket
virtual PBoolean TransmitPacket(PUDPSocket &sock)
IAX2Frame::GetMediaDataPointer
virtual BYTE * GetMediaDataPointer()
Definition: frame.h:104
IAX2FullFrame::SetSubClass
void SetSubClass(PINDEX newValue)
Definition: frame.h:480
IAX2FullFrameSessionControl::stopSounds
Definition: frame.h:807
IAX2FullFrameSessionControl::callOnHold
Definition: frame.h:805
IAX2FrameList::AddNewFrame
void AddNewFrame(IAX2Frame *src)
IAX2Frame::Write1Byte
void Write1Byte(BYTE newVal)
IAX2FullFrameProtocol
Definition: frame.h:885
IAX2Frame::WriteHeader
virtual PBoolean WriteHeader()
Definition: frame.h:135
IAX2FullFrameImage::IAX2FullFrameImage
IAX2FullFrameImage(const IAX2Frame &srcFrame)
IAX2FullFrameDtmf::IAX2FullFrameDtmf
IAX2FullFrameDtmf(const IAX2Frame &srcFrame)
IAX2FullFrameVoice::speex
Definition: frame.h:734
IAX2FullFrameProtocol::GetFullFrameType
virtual BYTE GetFullFrameType()
Definition: frame.h:1013
IAX2FullFrameDtmf::DtmfSc
DtmfSc
Definition: frame.h:638
IAX2FullFrame::GetSubClass
PINDEX GetSubClass() const
Definition: frame.h:477
IAX2FrameList::SendVnakRequestedFrames
void SendVnakRequestedFrames(IAX2FullFrameProtocol &src)
IAX2FullFrame::sendFrameNow
PBoolean sendFrameNow
Definition: frame.h:588
IAX2FullFrameSessionControl::unkeyRadio
Definition: frame.h:802
IAX2FullFrameCng
Definition: frame.h:1137
IAX2FullFrame::GetMediaDataSize
virtual PINDEX GetMediaDataSize()
IAX2ActiveFrameList::IAX2ActiveFrameList
IAX2ActiveFrameList()
Definition: frame.h:1227
IAX2Frame::GetEncryptionOffset
virtual PINDEX GetEncryptionOffset()
IAX2FullFrame::SendFrameNow
PBoolean SendFrameNow()
Definition: frame.h:502
IAX2Frame::numFrameTypes
Definition: frame.h:181
IAX2FullFrame::IsFullFrame
virtual PBoolean IsFullFrame()
Definition: frame.h:433
IAX2FullFrameText::IAX2FullFrameText
IAX2FullFrameText(IAX2Processor *processor, const PString &textValue)
IAX2FullFrameText
Definition: frame.h:1045
IAX2FullFrame::IsAckFrame
PBoolean IsAckFrame()
Definition: frame.h:386
IAX2FullFrameProtocol::cmdUnquelch
Definition: frame.h:920
IAX2FrameList::~IAX2FrameList
~IAX2FrameList()
IAX2FullFrameVoice::g7231
Definition: frame.h:725
IAX2FullFrameImage::GetSubClassName
virtual PString GetSubClassName() const
IAX2FullFrameVoice::pcm
Definition: frame.h:731
IAX2FullFrame::UnCompressSubClass
void UnCompressSubClass(BYTE a)
IAX2FullFrameProtocol::GetIeAt
IAX2Ie * GetIeAt(PINDEX i)
Definition: frame.h:992
IAX2FullFrame::CompressSubClass
int CompressSubClass()
IAX2FullFrame::maxRetryTime
Definition: frame.h:580
IAX2FullFrame::GetEncryptionOffset
virtual PINDEX GetEncryptionOffset()
Definition: frame.h:532
IAX2FullFrameSessionControl::wink
Definition: frame.h:799
IAX2Frame::data
PBYTEArray data
Definition: frame.h:271
IAX2FullFrameDtmf::dtmfStar
Definition: frame.h:653
IAX2FullFrame::GetSequenceInfo
IAX2SequenceNumbers & GetSequenceInfo()
Definition: frame.h:509
IAX2Frame::endpoint
IAX2EndPoint & endpoint
Definition: frame.h:267
IAX2FullFrameProtocol::IAX2FullFrameProtocol
IAX2FullFrameProtocol(const IAX2Frame &srcFrame)
IAX2FullFrameVoice::GetSubClassName
virtual PString GetSubClassName() const
IAX2FullFrameVoice::supportedCodecs
Definition: frame.h:736
IAX2FullFrameProtocol::AppendIe
void AppendIe(IAX2Ie *newElement)
Definition: frame.h:995
IAX2FullFrame::retries
PINDEX retries
Definition: frame.h:575
IAX2FullFrameVoice::OpalNameToIax2Value
static unsigned short OpalNameToIax2Value(const PString opalName)
IAX2FullFrameSessionControl::callHoldRelease
Definition: frame.h:806
IAX2FullFrameProtocol::cmdPage
Definition: frame.h:922
IAX2FullFrameVoice::~IAX2FullFrameVoice
virtual ~IAX2FullFrameVoice()
IAX2FullFrameProtocol::cmdCallToken
Definition: frame.h:931
IAX2Frame::IsFullFrame
virtual PBoolean IsFullFrame()
Definition: frame.h:93
IAX2Encryption
Definition: remote.h:345
IAX2FullFrameProtocol::cmdTxrel
Definition: frame.h:917
IAX2Frame::ZeroAllValues
void ZeroAllValues()
IAX2FullFrameHtml::GetSubClassName
virtual PString GetSubClassName() const
IAX2FullFrameVideo
Definition: frame.h:748
IAX2FullFrameSessionControl::SessionSc
SessionSc
Definition: frame.h:789
IAX2Frame::isVideo
PBoolean isVideo
Definition: frame.h:277
IAX2FullFrameProtocol::cmdRegRej
Definition: frame.h:907
IAX2FullFrame::IsHangupFrame
PBoolean IsHangupFrame()
operator<<
ostream & operator<<(ostream &strm, OpalSilenceDetector::Mode mode)
IAX2ActiveFrameList
Definition: frame.h:1223
IAX2FullFrameProtocol::cmdRtKey
Definition: frame.h:930
IAX2Processor
Definition: processor.h:136
IAX2FullFrameSessionControl::IAX2FullFrameSessionControl
IAX2FullFrameSessionControl(const IAX2Frame &srcFrame)
IAX2FullFrameDtmf::dtmf2
Definition: frame.h:641
IAX2IeList::GetIeAt
IAX2Ie * GetIeAt(int i) const
IAX2FullFrameImage
Definition: frame.h:1084
IAX2Frame::currentReadIndex
PINDEX currentReadIndex
Definition: frame.h:283
IAX2FullFrameProtocol::ieElements
IAX2IeList ieElements
Definition: frame.h:1031
IAX2FrameList::GetLastFrame
IAX2Frame * GetLastFrame()
IAX2FullFrame::PrintOn
virtual void PrintOn(ostream &strm) const
IAX2FullFrame::GetMediaDataPointer
virtual BYTE * GetMediaDataPointer()
IAX2FullFrameVoice::g711ulaw
Definition: frame.h:727
IAX2Frame::SetTimeStamp
void SetTimeStamp(DWORD newValue)
IAX2Frame::dtmfType
Definition: frame.h:171
IAX2FullFrame::WriteHeader
virtual PBoolean WriteHeader()
IAX2FullFrameProtocol::cmdRegReq
Definition: frame.h:904
IAX2FullFrame::ModifyFrameHeaderSequenceNumbers
void ModifyFrameHeaderSequenceNumbers(PINDEX inNo, PINDEX outNo)
IAX2Frame::SetConnectionToken
void SetConnectionToken(PString newToken)
Definition: frame.h:203
IAX2FullFrameProtocol::cmdHangup
Definition: frame.h:896
IAX2FullFrameProtocol::GetCallTokenIe
PBoolean GetCallTokenIe(IAX2IeCallToken &callToken)
IAX2FullFrameProtocol::cmdVnak
Definition: frame.h:909
IAX2FullFrameText::GetFullFrameType
virtual BYTE GetFullFrameType()
Definition: frame.h:1068
IAX2Frame::frameType
IAX2FrameType frameType
Definition: frame.h:229
IAX2FullFrameDtmf
Definition: frame.h:609
IAX2Frame::nullType
Definition: frame.h:175
IAX2Frame::presetTimeStamp
DWORD presetTimeStamp
Definition: frame.h:302
IAX2FullFrameProtocol::cmdAccept
Definition: frame.h:898
IAX2Frame::GetRemoteInfo
IAX2Remote & GetRemoteInfo()
Definition: frame.h:115
IAX2FullFrameProtocol::cmdNew
Definition: frame.h:892
IAX2Frame::iax2ProtocolType
Definition: frame.h:176
IAX2FullFrameProtocol::CopyDataFromIeListTo
void CopyDataFromIeListTo(IAX2IeData &res)
IAX2FullFrameVoice::g729
Definition: frame.h:733
IAX2FullFrameProtocol::cmdDial
Definition: frame.h:912
IAX2FullFrame::IAX2FullFrame
IAX2FullFrame(const IAX2Frame &srcFrame)
IAX2FullFrameProtocol::InformationElementsPresent
virtual PBoolean InformationElementsPresent()
Definition: frame.h:979
IAX2FullFrame::FrameIncrementsInSeqNo
PBoolean FrameIncrementsInSeqNo()
IAX2FullFrame::isAckFrame
PBoolean isAckFrame
Definition: frame.h:600
IAX2FullFrameDtmf::dtmfB
Definition: frame.h:650
IAX2FrameList::GetEntries
virtual PINDEX GetEntries()
Definition: frame.h:1212
IAX2FullFrameProtocol::cmdTxreq
Definition: frame.h:913
IAX2Ie
Definition: ies.h:55
IAX2FullFrameProtocol::cmdQuelch
Definition: frame.h:919
IAX2Frame::GetDataPointer
const BYTE * GetDataPointer()
Definition: frame.h:118
IAX2FullFrameSessionControl::tkoffhk
Definition: frame.h:795
IAX2FullFrameProtocol::cmdTxacc
Definition: frame.h:915
IAX2Frame::CalcTimeStamp
static DWORD CalcTimeStamp(const PTimeInterval &callStartTick)
remote.h
IAX2Frame::IdString
PString IdString() const
IAX2FullFrameSessionControl::GetFullFrameType
virtual BYTE GetFullFrameType()
Definition: frame.h:839
IAX2FullFrame::IsRegRelFrame
PBoolean IsRegRelFrame()
IAX2FullFrame::~IAX2FullFrame
virtual ~IAX2FullFrame()
IAX2FullFrameVoice::GetSubClassName
static PString GetSubClassName(unsigned short testValue)
Definition: frame.h:703
IAX2Frame::Read4Bytes
PBoolean Read4Bytes(DWORD &res)
IAX2FullFrameProtocol::ReadInformationElements
PBoolean ReadInformationElements()
IAX2Frame::CallMustBeActive
virtual PBoolean CallMustBeActive()
Definition: frame.h:166
IAX2Frame::~IAX2Frame
virtual ~IAX2Frame()
IAX2FullFrameImage::GetFullFrameType
virtual BYTE GetFullFrameType()
Definition: frame.h:1101
IAX2Frame::ReadNetworkPacket
PBoolean ReadNetworkPacket(PUDPSocket &sock)
IAX2FullFrame::DeleteFrameNow
PBoolean DeleteFrameNow()
Definition: frame.h:506
IAX2FullFrameProtocol::cmdRegAck
Definition: frame.h:906
IAX2FullFrameCng::GetFullFrameType
virtual BYTE GetFullFrameType()
Definition: frame.h:1154
IAX2FullFrameDtmf::GetSubClassName
virtual PString GetSubClassName() const
IAX2Frame::isAudio
PBoolean isAudio
Definition: frame.h:280
IAX2Frame
Definition: frame.h:75
IAX2Frame::GetTimeStamp
DWORD GetTimeStamp()
Definition: frame.h:160
IAX2FullFrame::IsRegAuthFrame
PBoolean IsRegAuthFrame()
IAX2FullFrameVoice::mp3
Definition: frame.h:729
IAX2FullFrame::OnTransmissionTimeout
void OnTransmissionTimeout(PTimer &, INT)
IAX2FullFrame::transmissionTimer
PTimer transmissionTimer
Definition: frame.h:563
IAX2FullFrameDtmf::dtmf3
Definition: frame.h:642
IAX2FullFrameProtocol::cmdMwi
Definition: frame.h:923
IAX2FullFrame::InformationElementsPresent
virtual PBoolean InformationElementsPresent()
Definition: frame.h:498
IAX2FrameList::ReportList
void ReportList(PString &answer)
IAX2FullFrameSessionControl::keyRadio
Definition: frame.h:801
IAX2Frame::GetMediaDataSize
virtual PINDEX GetMediaDataSize()
Definition: frame.h:109
IAX2FrameList::Empty
PBoolean Empty()
Definition: frame.h:1184
IAX2IeList::AppendIe
void AppendIe(IAX2Ie *newMember)
Definition: ies.h:2179
IAX2FullFrameProtocol::cmdReject
Definition: frame.h:897
IAX2FullFrameSessionControl::ringing
Definition: frame.h:792
IAX2FullFrameProtocol::cmdFwData
Definition: frame.h:928
IAX2FullFrameProtocol::cmdTxrej
Definition: frame.h:918
ies.h
IAX2Frame::IAX2Frame
IAX2Frame(IAX2EndPoint &_endpoint)
IAX2FullFrameProtocol::cmdTransfer
Definition: frame.h:925
IAX2FullFrame::ProcessNetworkPacket
virtual PBoolean ProcessNetworkPacket()
IAX2FullFrameSessionControl::offhook
Definition: frame.h:796
IAX2Frame::videoType
Definition: frame.h:173
IAX2FullFrameVideo::jpeg
Definition: frame.h:766
IAX2FullFrameText::internalText
PString internalText
Definition: frame.h:1076
IAX2FullFrameProtocol::cmdAuthReq
Definition: frame.h:899
IAX2FullFrameSessionControl::callProceeding
Definition: frame.h:804
IAX2FullFrameProtocol::cmdUnsupport
Definition: frame.h:924
IAX2Frame::isFullFrame
PBoolean isFullFrame
Definition: frame.h:274
IAX2MiniFrame::InitialiseHeader
virtual void InitialiseHeader(IAX2Processor *processor)
IAX2FullFrame::IsPingFrame
PBoolean IsPingFrame()
IAX2FullFrame::MarkAsResent
void MarkAsResent()
IAX2FullFrameSessionControl
Definition: frame.h:783
IAX2FrameList::GetSize
virtual PINDEX GetSize()
Definition: frame.h:1205
IAX2IeList
Definition: ies.h:2149
IAX2FullFrame::RetryTime
RetryTime
Definition: frame.h:578
IAX2FullFrame::IsCallTokenFrame
PBoolean IsCallTokenFrame()
IAX2FullFrameDtmf::dtmf1
Definition: frame.h:640
IAX2Frame::EncryptContents
PBoolean EncryptContents(IAX2Encryption &encData)
IAX2FullFrame::IsPongFrame
PBoolean IsPongFrame()
IAX2Frame::BuildConnectionToken
void BuildConnectionToken()
IAX2FullFrameVideo::GetSubClassName
virtual PString GetSubClassName() const
IAX2FullFrameProtocol::cmdAuthRep
Definition: frame.h:900
IAX2FullFrameSessionControl::option
Definition: frame.h:800
IAX2FullFrameSessionControl::hangup
Definition: frame.h:790
IAX2FullFrame::CallMustBeActive
virtual PBoolean CallMustBeActive()
Definition: frame.h:536
IAX2Frame::BuildTimeStamp
virtual void BuildTimeStamp(const PTimeInterval &callStartTick)
IAX2FullFrame::subClass
PINDEX subClass
Definition: frame.h:566
IAX2FullFrame::IsRegRejFrame
PBoolean IsRegRejFrame()
IAX2Frame::Write2Bytes
void Write2Bytes(PINDEX newVal)