Yate
IAXFullFrame Class Reference

This class holds an IAX full frame. More...

#include <yateiax.h>

Inheritance diagram for IAXFullFrame:
IAXFrame RefObject GenObject IAXFrameOut

Public Types

enum  ControlType {
  Hangup = 0x01 , Ringing = 0x03 , Answer = 0x04 , Busy = 0x05 ,
  Congestion = 0x08 , FlashHook = 0x09 , Option = 0x0b , KeyRadio = 0x0c ,
  UnkeyRadio = 0x0d , Progressing = 0x0e , Proceeding = 0x0f , Hold = 0x10 ,
  Unhold = 0x11 , VidUpdate = 0x12 , SrcUpdate = 0x14 , StopSounds = 0xff
}
 
- Public Types inherited from IAXFrame
enum  Type {
  DTMF = 0x01 , Voice = 0x02 , Video = 0x03 , Control = 0x04 ,
  Null = 0x05 , IAX = 0x06 , Text = 0x07 , Image = 0x08 ,
  HTML = 0x09 , Noise = 0x0a
}
 

Public Member Functions

 IAXFullFrame (Type type, u_int32_t subclass, u_int16_t sCallNo, u_int16_t dCallNo, unsigned char oSeqNo, unsigned char iSeqNo, u_int32_t tStamp, bool retrans, const unsigned char *buf, unsigned int len, bool mark=false)
 
 IAXFullFrame (Type type, u_int32_t subclass, u_int16_t sCallNo, u_int16_t dCallNo, unsigned char oSeqNo, unsigned char iSeqNo, u_int32_t tStamp, const unsigned char *buf=0, unsigned int len=0, bool mark=false)
 
 IAXFullFrame (Type type, u_int32_t subclass, u_int16_t sCallNo, u_int16_t dCallNo, unsigned char oSeqNo, unsigned char iSeqNo, u_int32_t tStamp, IAXIEList *ieList, u_int16_t maxlen, bool mark=false)
 
virtual ~IAXFullFrame ()
 
u_int16_t destCallNo () const
 
unsigned char oSeqNo () const
 
unsigned char iSeqNo () const
 
u_int32_t subclass () const
 
bool isAuthReq () const
 
bool isInval () const
 
virtual IAXFullFramefullFrame ()
 
void updateBuffer (u_int16_t maxlen)
 
IAXIEListieList ()
 
bool updateIEList (bool incoming)
 
IAXIEListremoveIEList (bool delObj=true)
 
void toString (String &dest, const SocketAddr &local, const SocketAddr &remote, bool incoming)
 
- Public Member Functions inherited from IAXFrame
 IAXFrame (Type type, u_int16_t sCallNo, u_int32_t tStamp, bool retrans, const unsigned char *buf, unsigned int len, bool mark=false)
 
virtual ~IAXFrame ()
 
Type type () const
 
DataBlockdata ()
 
bool retrans () const
 
u_int16_t sourceCallNo () const
 
u_int32_t timeStamp () const
 
bool mark () const
 
- Public Member Functions inherited from RefObject
 RefObject ()
 
virtual ~RefObject ()
 
virtual void * getObject (const String &name) const
 
virtual bool alive () const
 
bool ref ()
 
bool deref ()
 
int refcount () const
 
virtual void destruct ()
 
- Public Member Functions inherited from GenObject
 GenObject ()
 
virtual ~GenObject ()
 
virtual const StringtoString () const
 
virtual const StringtraceId () const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 

Static Public Member Functions

static const char * controlTypeText (int type)
 
- Static Public Member Functions inherited from IAXFrame
static IAXFrameparse (const unsigned char *buf, unsigned int len, IAXEngine *engine=0, const SocketAddr *addr=0)
 
static void buildMiniFrame (DataBlock &dest, u_int16_t sCallNo, u_int32_t ts, void *data, unsigned int len)
 
static void buildVideoMetaFrame (DataBlock &dest, u_int16_t sCallNo, u_int32_t tStamp, bool mark, void *data, unsigned int len)
 
static u_int8_t packSubclass (u_int32_t value)
 
static u_int32_t unpackSubclass (u_int8_t value)
 
static const char * typeText (int type)
 
- Static Public Member Functions inherited from RefObject
static bool alive (const RefObject *obj)
 
static bool efficientIncDec ()
 
- Static Public Member Functions inherited from GenObject
static void * getObject (const String &name, const GenObject *obj)
 
static bool getObjCounting ()
 
static void setObjCounting (bool enable)
 
static NamedCountergetObjCounter (const String &name, bool create=true)
 
static ObjListgetObjCounters ()
 

Protected Member Functions

virtual void destroyed ()
 
- Protected Member Functions inherited from RefObject
virtual void zeroRefs ()
 
bool resurrect ()
 

Additional Inherited Members

- Protected Attributes inherited from IAXFrame
DataBlock m_data
 
bool m_retrans
 

Detailed Description

This class holds an IAX full frame.

This class holds all data needded to manage an IAX full frame

Member Enumeration Documentation

◆ ControlType

IAX frame subclass enumeration types for frames of type Control

Constructor & Destructor Documentation

◆ IAXFullFrame() [1/3]

IAXFullFrame ( Type type,
u_int32_t subclass,
u_int16_t sCallNo,
u_int16_t dCallNo,
unsigned char oSeqNo,
unsigned char iSeqNo,
u_int32_t tStamp,
bool retrans,
const unsigned char * buf,
unsigned int len,
bool mark = false )

Constructor. Constructs an incoming full frame

Parameters
typeFrame type
subclassFrame subclass
sCallNoSource (remote) call number
dCallNoDestination (local) call number
oSeqNoOutgoing sequence number
iSeqNoIncoming (expected) sequence number
tStampFrame timestamp
retransRetransmission flag
bufIE buffer
lenIE buffer length
markMark flag

References iSeqNo(), IAXFrame::mark(), oSeqNo(), IAXFrame::retrans(), subclass(), and IAXFrame::type().

Referenced by fullFrame(), IAXFrameOut::IAXFrameOut(), and IAXFrameOut::IAXFrameOut().

◆ IAXFullFrame() [2/3]

IAXFullFrame ( Type type,
u_int32_t subclass,
u_int16_t sCallNo,
u_int16_t dCallNo,
unsigned char oSeqNo,
unsigned char iSeqNo,
u_int32_t tStamp,
const unsigned char * buf = 0,
unsigned int len = 0,
bool mark = false )

Constructor. Constructs an outgoing full frame

Parameters
typeFrame type
subclassFrame subclass
sCallNoSource (remote) call number
dCallNoDestination (local) call number
oSeqNoOutgoing sequence number
iSeqNoIncoming (expected) sequence number
tStampFrame timestamp
bufIE buffer
lenIE buffer length
markMark flag

References iSeqNo(), IAXFrame::mark(), oSeqNo(), subclass(), and IAXFrame::type().

◆ IAXFullFrame() [3/3]

IAXFullFrame ( Type type,
u_int32_t subclass,
u_int16_t sCallNo,
u_int16_t dCallNo,
unsigned char oSeqNo,
unsigned char iSeqNo,
u_int32_t tStamp,
IAXIEList * ieList,
u_int16_t maxlen,
bool mark = false )

Constructor. Constructs an outgoing full frame

Parameters
typeFrame type
subclassFrame subclass
sCallNoSource (remote) call number
dCallNoDestination (local) call number
oSeqNoOutgoing sequence number
iSeqNoIncoming (expected) sequence number
tStampFrame timestamp
ieListList of frame IEs
maxlenMax frame data length
markMark flag

References ieList(), iSeqNo(), IAXFrame::mark(), oSeqNo(), subclass(), and IAXFrame::type().

◆ ~IAXFullFrame()

virtual ~IAXFullFrame ( )
virtual

Destructor

Member Function Documentation

◆ controlTypeText()

static const char * controlTypeText ( int type)
inlinestatic

Get the string associated with the given IAX control type

Parameters
typeThe requested control type
Returns
The text if type is valid or 0

References IAXFrame::type().

◆ destCallNo()

u_int16_t destCallNo ( ) const
inline

Get the destination call number

Returns
The destination call number

◆ destroyed()

virtual void destroyed ( )
protectedvirtual

Destroyed notification. Clear data

Reimplemented from RefObject.

◆ fullFrame()

virtual IAXFullFrame * fullFrame ( )
virtual

Get a pointer to this frame if it is a full frame

Returns
A pointer to this frame

Reimplemented from IAXFrame.

References IAXFullFrame().

◆ ieList()

IAXIEList * ieList ( )
inline

Retrieve the IE list

Returns
IAXIEList pointer or NULL

Referenced by IAXFrameOut::IAXFrameOut(), and IAXFullFrame().

◆ isAuthReq()

bool isAuthReq ( ) const
inline

Check if this frame is used to request authentication

Returns
True if this frame is used to request authentication (like RegReq or RegAuth)

References subclass(), and IAXFrame::type().

◆ iSeqNo()

unsigned char iSeqNo ( ) const
inline

Get the incoming sequence number

Returns
The incoming sequence number

Referenced by IAXFrameOut::IAXFrameOut(), IAXFrameOut::IAXFrameOut(), IAXFullFrame(), IAXFullFrame(), and IAXFullFrame().

◆ isInval()

bool isInval ( ) const
inline

Check if this frame is an INVAL one

Returns
True if this frame is INVAL

References subclass(), and IAXFrame::type().

◆ oSeqNo()

unsigned char oSeqNo ( ) const
inline

Get the outgoing sequence number

Returns
The outgoing sequence number

Referenced by IAXFrameOut::IAXFrameOut(), IAXFrameOut::IAXFrameOut(), IAXFullFrame(), IAXFullFrame(), and IAXFullFrame().

◆ removeIEList()

IAXIEList * removeIEList ( bool delObj = true)

Remove the IE list

Parameters
delObjTrue to delete it
Returns
IAXIEList pointer or NULL if requested to delete it or already NULL

◆ subclass()

u_int32_t subclass ( ) const
inline

Get the subclass of this frame

Returns
The subclass of this frame

Referenced by IAXFrameOut::IAXFrameOut(), IAXFrameOut::IAXFrameOut(), IAXFullFrame(), IAXFullFrame(), IAXFullFrame(), isAuthReq(), and isInval().

◆ toString()

void toString ( String & dest,
const SocketAddr & local,
const SocketAddr & remote,
bool incoming )

Fill a string with this frame

Parameters
destThe string to fill
localThe local address
remoteThe remote address
incomingTrue if it is an incoming frame

◆ updateBuffer()

void updateBuffer ( u_int16_t maxlen)

Rebuild frame buffer from the list of IEs

Parameters
maxlenMax frame data length

◆ updateIEList()

bool updateIEList ( bool incoming)

Update IE list from buffer if not already done

Parameters
incomingTrue if this is an incoming frame
Returns
True if the list is valid

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