# class IAXTransaction | An IAX2 transaction. More...
Full name | `TelEngine::IAXTransaction`
Definition | `#include <libs/yiax/yateiax.h>`
Inherits | TelEngine::Mutex [public ], TelEngine::RefObject [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum Type { Incorrect, New, RegReq, RegRel, Poke, }
- enum State { Connected, NewLocalInvite, NewLocalInvite_AuthRecv, NewLocalInvite_RepSent, NewRemoteInvite, NewRemoteInvite_AuthSent, NewRemoteInvite_RepRecv, Unknown, Terminated, Terminating, }

#### Public Methods

- virtual ~IAXTransaction ()
- inline IAXEngine* getEngine () const
- inline Type type () const
- inline const char* typeName ()
- inline State state () const
- inline const char* stateName ()
- inline u_int64_t timeStamp () const
- inline bool outgoing () const
- inline void setUserData (void* data)
- inline void* getUserData () const
- inline u_int16_t localCallNo () const
- inline u_int16_t remoteCallNo () const
- inline const SocketAddr& remoteAddr () const
- inline const String& username ()
- inline const String& callingNo ()
- inline const String& callingName ()
- inline const String& calledNo ()
- inline const String& calledContext ()
- inline const String& challenge ()
- inline IAXFormat* getFormat (int type)
- inline IAXMediaData* getData (int type)
- inline u_int32_t format (int type)
- inline u_int32_t formatIn (int type)
- inline u_int32_t formatOut (int type)
- inline u_int32_t capability () const
- inline u_int32_t expire () const
- inline const String& authdata ()
- inline void setDestroy ()
- void start ()
- IAXTransaction* processFrame (IAXFrame* frame)
- IAXTransaction* processMedia (DataBlock& data, u_int32_t tStamp, int type = IAXFormat::Audio, bool full = false, bool mark = false)
- unsigned int sendMedia (const DataBlock& data, unsigned int tStamp, u_int32_t format, int type = IAXFormat::Audio, bool mark = false)
- IAXEvent* getEvent (const Time& now = Time())
- inline bool sendAnswer ()
- inline bool sendRinging ()
- inline bool sendProgress ()
- bool sendAccept (unsigned int* expires = 0)
- bool sendHangup (const char* cause = 0, u_int8_t code = 0)
- bool sendReject (const char* cause = 0, u_int8_t code = 0)
- bool sendAuth ()
- bool sendAuthReply (const String& response)
- inline bool sendDtmf (u_int8_t dtmf)
- bool sendText (const char* text)
- inline bool sendNoise (u_int8_t noise)
- bool abortReg ()
- bool enableTrunking (IAXMetaTrunkFrame* trunkFrame, bool efficientUse)
- void processCallToken (const DataBlock& callToken)
- void processMiniNoTs (u_int32_t ts, ObjList& blocks, const Time& now = Time())
- void print (bool printStats = false, bool printFrames = false, const char* location = "status")

#### Public Static Methods

- static IAXTransaction* factoryIn (IAXEngine* engine, IAXFullFrame* frame, u_int16_t lcallno, const SocketAddr& addr, void* data = 0)
- static IAXTransaction* factoryOut (IAXEngine* engine, Type type, u_int16_t lcallno, const SocketAddr& addr, IAXIEList& ieList, void* data = 0)
- static unsigned char getMaxFrameList ()
- static bool setMaxFrameList (unsigned char value)
- static inline const char* typeName (int type)
- static inline const char* stateName (int state)

#### Public Members

- static const TokenDict s_typeName[]
- static const TokenDict s_stateName[]
- static String s_iax_modNoAuthMethod
- static String s_iax_modNoMediaFormat
- static String s_iax_modInvalidAuth
- static String s_iax_modNoUsername

#### Protected Methods

- IAXTransaction (IAXEngine* engine, IAXFullFrame* frame, u_int16_t lcallno, const SocketAddr& addr, void* data = 0)
- IAXTransaction (IAXEngine* engine, Type type, u_int16_t lcallno, const SocketAddr& addr, IAXIEList& ieList, void* data = 0)
- virtual void destroyed ()
- void init (IAXIEList& ieList)
- bool incrementSeqNo (const IAXFullFrame* frame, bool inbound)
- bool isFrameAcceptable (const IAXFullFrame* frame)
- bool changeState (State newState)
- IAXEvent* terminate (u_int8_t evType, bool local, IAXFullFrame* frame = 0, bool createIEList = true)
- IAXEvent* waitForTerminate (u_int8_t evType = 0, bool local = true, IAXFullFrame* frame = 0)
- void postFrame (IAXFrame::Type type, u_int32_t subclass, void* data = 0, u_int16_t len = 0, u_int32_t tStamp = 0, bool ackOnly = false, bool mark = false)
- void postFrameIes (IAXFrame::Type type, u_int32_t subclass, IAXIEList* ies, u_int32_t tStamp = 0, bool ackOnly = false)
- bool sendFrame (IAXFrameOut* frame, bool vnak = false)
- IAXEvent* createEvent (u_int8_t evType, bool local, IAXFullFrame* frame, State newState)
- IAXEvent* createResponse (IAXFrameOut* frame, u_int8_t findType, u_int8_t findSubclass, u_int8_t evType, bool local, State newState)
- IAXEvent* getEventResponse (IAXFrameOut* frame, bool& delFrame)
- IAXEvent* getEventResponse_New (IAXFrameOut* frame, bool& delFrame)
- IAXEvent* processAuthReq (IAXEvent* event)
- IAXEvent* processAccept (IAXEvent* event)
- IAXEvent* processAuthRep (IAXEvent* event)
- IAXEvent* getEventResponse_Reg (IAXFrameOut* frame, bool& delFrame)
- IAXEvent* processRegAck (IAXEvent* event)
- IAXEvent* getEventStartTrans (IAXFullFrame* frame, bool& delFrame)
- IAXEvent* getEventRequest (IAXFullFrame* frame, bool& delFrame)
- IAXEvent* getEventRequest_New (IAXFullFrame* frame, bool& delFrame)
- IAXFullFrame* findInFrame (IAXFrame::Type type, u_int32_t subclass)
- bool findInFrameTimestamp (const IAXFullFrame* frameOut, IAXFrame::Type type, u_int32_t subclass)
- bool findInFrameAck (const IAXFullFrame* frameOut)
- void ackInFrames ()
- bool sendConnected (IAXFullFrame::ControlType subclass, IAXFrame::Type frametype = IAXFrame::Control)
- void sendAck (const IAXFullFrame* frame)
- void sendVNAK ()
- void sendUnsupport (u_int32_t subclass)
- IAXEvent* processInternalOutgoingRequest (IAXFrameOut* frame, bool& delFrame)
- IAXEvent* processInternalIncomingRequest (const IAXFullFrame* frame, bool& delFrame)
- IAXEvent* processMidCallControl (IAXFullFrame* frame, bool& delFrame)
- IAXEvent* processMidCallIAXControl (IAXFullFrame* frame, bool& delFrame)
- IAXEvent* remoteRejectCall (IAXFullFrame* frame, bool& delFrame)
- IAXTransaction* processMediaFrame (const IAXFullFrame* frame, int type)
- IAXTransaction* retransmitOnVNAK (u_int16_t seqNo)
- IAXEvent* internalReject (const char* reason, u_int8_t code)
- void eventTerminated (IAXEvent* event)
- inline IAXEvent* keepEvent (IAXEvent* event)

## Detailed Description

This class holds all the data needded for the management of an IAX2 transaction which might be a call leg, a register/unregister or a poke one

enum Type { Incorrect, New, RegReq, RegRel, Poke, } | ### Type

The transaction type as enumeration

enum State { Connected, NewLocalInvite, NewLocalInvite_AuthRecv, NewLocalInvite_RepSent, NewRemoteInvite, NewRemoteInvite_AuthSent, NewRemoteInvite_RepRecv, Unknown, Terminated, Terminating, } | ### State

The transaction state as enumeration

IAXTransaction* factoryIn (IAXEngine* engine, IAXFullFrame* frame, u_int16_t lcallno, const SocketAddr& addr, void* data = 0) | ### factoryIn

[static]

Constructs an incoming transaction from a received full frame with an IAX control message that needs a new transaction

Parameters:

engine | The engine that owns this transaction
frame | A valid full frame
lcallno | Local call number
addr | Address from where the frame was received
data | Pointer to arbitrary user data

IAXTransaction* factoryOut (IAXEngine* engine, Type type, u_int16_t lcallno, const SocketAddr& addr, IAXIEList& ieList, void* data = 0) | ### factoryOut

[static]

Constructs an outgoing transaction with an IAX control message that needs a new transaction

Parameters:

engine | The engine that owns this transaction
type | Transaction type
lcallno | Local call number
addr | Address to use
ieList | Starting IE list
data | Pointer to arbitrary user data

~IAXTransaction () | ### ~IAXTransaction

[virtual]

Destructor

inline IAXEngine* getEngine () | ### getEngine

[const]

The IAX engine this transaction belongs to

Returns: Pointer to the IAXEngine of this transaction

inline Type type () | ### type

[const]

Get the type of this transaction

Returns: The type of the transaction as enumeration

inline const char* typeName () | ### typeName

Retrieve transaction type name

Returns: Transaction type name

inline State state () | ### state

[const]

Get the state of this transaction

Returns: The state of the transaction as enumeration

inline const char* stateName () | ### stateName

Retrieve the transaction state name

Returns: Transaction state name

inline u_int64_t timeStamp () | ### timeStamp

[const]

Get the timestamp of this transaction

Returns: The timestamp of this transaction

inline bool outgoing () | ### outgoing

[const]

Get the direction of this transaction

Returns: True if it is an outgoing transaction

inline void setUserData (void* data) | ### setUserData

Store a pointer to arbitrary user data

Parameters:

data | User provided pointer

inline void* getUserData () | ### getUserData

[const]

Return the opaque user data stored in the transaction

Returns: Pointer set by user

inline u_int16_t localCallNo () | ### localCallNo

[const]

Retrieve the local call number

Returns: 15-bit local call number

inline u_int16_t remoteCallNo () | ### remoteCallNo

[const]

Retrieve the remote call number

Returns: 15-bit remote call number

inline const SocketAddr& remoteAddr () | ### remoteAddr

[const]

Retrieve the remote host+port address

Returns: A reference to the remote address

inline const String& username () | ### username

Retrieve the username

Returns: A reference to the username

inline const String& callingNo () | ### callingNo

Retrieve the calling number

Returns: A reference to the calling number

inline const String& callingName () | ### callingName

Retrieve the calling name

Returns: A reference to the calling name

inline const String& calledNo () | ### calledNo

Retrieve the called number

Returns: A reference to the called number

inline const String& calledContext () | ### calledContext

Retrieve the called context

Returns: A reference to the called context

inline const String& challenge () | ### challenge

Retrieve the challenge sent/received during authentication

Returns: A reference to the challenge

inline IAXFormat* getFormat (int type) | ### getFormat

Retrieve the media of a given type

Parameters:

type | Media type to retrieve

Returns: IAXFormat pointer or 0 for invalid type

inline IAXMediaData* getData (int type) | ### getData

Retrieve the media data for a given type

Parameters:

type | Media type to retrieve

Returns: IAXMediaData pointer or 0 for invalid type

inline u_int32_t format (int type) | ### format

Retrieve the media format used during initialization

Parameters:

type | Media type to retrieve

Returns: The initial media format for the given type

inline u_int32_t formatIn (int type) | ### formatIn

Retrieve the incoming media format

Parameters:

type | Media type to retrieve

Returns: The incoming media format for the given type

inline u_int32_t formatOut (int type) | ### formatOut

Retrieve the outgoing media format

Parameters:

type | Media type to retrieve

Returns: The outgoing media format for the given type

inline u_int32_t capability () | ### capability

[const]

Retrieve the media capability of this transaction

Returns: The media capability of this transaction

inline u_int32_t expire () | ### expire

[const]

Retrieve the expiring time for a register/unregister transaction

Returns: The expiring time for a register/unregister transaction

inline const String& authdata () | ### authdata

Retrieve the authentication data sent/received during authentication

Returns: A reference to the authentication data

inline void setDestroy () | ### setDestroy

Set the destroy flag

void start () | ### start

Start an outgoing transaction. This method is thread safe

IAXTransaction* processFrame (IAXFrame* frame) | ### processFrame

Process a frame from remote peer. This method is thread safe

Parameters:

frame | IAX frame belonging to this transaction to process

Returns: 'this' if successful or NULL if the frame is invalid

IAXTransaction* processMedia (DataBlock& data, u_int32_t tStamp, int type = IAXFormat::Audio, bool full = false, bool mark = false) | ### processMedia

Process received media data

Parameters:

data | Received data
tStamp | Mini frame timestamp multiplied by format multiplier
type | Media type
full | True if received in a full frame
mark | Mark flag

Returns: 0

unsigned int sendMedia (const DataBlock& data, unsigned int tStamp, u_int32_t format, int type = IAXFormat::Audio, bool mark = false) | ### sendMedia

Send media data to remote peer. Update the outgoing media format if changed

Parameters:

data | Data to send
tStamp | Data timestamp
format | Data format
type | Media type
mark | Mark flag

Returns: The number of bytes sent

IAXEvent* getEvent (const Time& now = Time()) | ### getEvent

Get an IAX event from the queue This method is thread safe.

Parameters:

now | Current time

Returns: Pointer to an IAXEvent or 0 if none available

unsigned char getMaxFrameList () | ### getMaxFrameList

[static]

Get the maximum allowed number of full frames in the incoming frame list

Returns: The maximum allowed number of full frames in the incoming frame list

bool setMaxFrameList (unsigned char value) | ### setMaxFrameList

[static]

Set the maximum allowed number of full frames in the incoming frame list

Parameters:

value | The new value of m_maxInFrames

Returns: False if value is greater then IAX2_MAX_TRANSINFRAMELIST

inline bool sendAnswer () | ### sendAnswer

Send an ANSWER frame to remote peer This method is thread safe

Returns: False if the current transaction state is not Connected

inline bool sendRinging () | ### sendRinging

Send a RINGING frame to remote peer This method is thread safe

Returns: False if the current transaction state is not Connected

inline bool sendProgress () | ### sendProgress

Send a PROCEEDING frame to remote peer This method is thread safe

Returns: False if the current transaction state is not Connected

bool sendAccept (unsigned int* expires = 0) | ### sendAccept

Send an ACCEPT/REGACK frame to remote peer This method is thread safe

Parameters:

expires | Optional pointer to expiring time for register transactions

Returns: False if the transaction type is not New and state is NewRemoteInvite or NewRemoteInvite_AuthRep or if the transaction type is not RegReq and state is NewRemoteInvite or type is not RegReq/RegRel and state is NewRemoteInvite_AuthRep

bool sendHangup (const char* cause = 0, u_int8_t code = 0) | ### sendHangup

Send a HANGUP frame to remote peer This method is thread safe

Parameters:

cause | Optional reason for hangup
code | Optional code of reason

Returns: False if the transaction type is not New or state is Terminated/Terminating

bool sendReject (const char* cause = 0, u_int8_t code = 0) | ### sendReject

Send a REJECT/REGREJ frame to remote peer This method is thread safe

Parameters:

cause | Optional reason for reject
code | Optional code of reason

Returns: False if the transaction type is not New/RegReq/RegRel or state is Terminated/Terminating

bool sendAuth () | ### sendAuth

Send an AUTHREQ/REGAUTH frame to remote peer This method is thread safe

Returns: False if the current transaction state is not NewRemoteInvite

bool sendAuthReply (const String& response) | ### sendAuthReply

Send an AUTHREP/REGREQ/REGREL frame to remote peer as a response to AUTHREQ/REGREQ/REGREL This method is thread safe

Parameters:

response | Response to send

Returns: False if the current transaction state is not NewLocalInvite_AuthRecv

inline bool sendDtmf (u_int8_t dtmf) | ### sendDtmf

Send a DTMF frame to remote peer This method is thread safe

Parameters:

dtmf | DTMF char to send

Returns: False if the current transaction state is not Connected or dtmf is grater then 127

bool sendText (const char* text) | ### sendText

Send a TEXT frame to remote peer This method is thread safe

Parameters:

text | Text to send

Returns: False if the current transaction state is not Connected

inline bool sendNoise (u_int8_t noise) | ### sendNoise

Send a NOISE frame to remote peer This method is thread safe

Parameters:

noise | Noise value to send

Returns: False if the current transaction state is not Connected or noise is grater then 127

bool abortReg () | ### abortReg

Abort a registration transaction This method is thread safe

Returns: False transaction is not a registration one or is already terminating

bool enableTrunking (IAXMetaTrunkFrame* trunkFrame, bool efficientUse) | ### enableTrunking

Enable trunking for this transaction

Parameters:

trunkFrame | Pointer to IAXMetaTrunkFrame used to send trunked media
efficientUse | Use or not the trunk based on calls using it

Returns: False trunking is already enabled for this transactio or trunkFrame is 0

void processCallToken (const DataBlock& callToken) | ### processCallToken

Process a received call token This method is thread safe

Parameters:

callToken | Received call token

void processMiniNoTs (u_int32_t ts, ObjList& blocks, const Time& now = Time()) | ### processMiniNoTs

Process incoming audio miniframes from trunk without timestamps

Parameters:

ts | Trunk frame timestamp
blocks | Received blocks
now | Current time

void print (bool printStats = false, bool printFrames = false, const char* location = "status") | ### print

Print transaction data on stdin

Parameters:

printStats | True to print media statistics
printFrames | True to print in/out pending frames
location | Additional location info to be shown in debug

inline const char* typeName (int type) | ### typeName

[static]

Retrieve transaction type name from transaction type

Parameters:

type | Transaction type

Returns: Requested type name

inline const char* stateName (int state) | ### stateName

[static]

Retrieve transaction state name

Parameters:

state | Transaction state

Returns: Requested state name

static const TokenDict s_typeName[] | ### s_typeName[]

static const TokenDict s_stateName[] | ### s_stateName[]

static String s_iax_modNoAuthMethod | ### s_iax_modNoAuthMethod

static String s_iax_modNoMediaFormat | ### s_iax_modNoMediaFormat

static String s_iax_modInvalidAuth | ### s_iax_modInvalidAuth

static String s_iax_modNoUsername | ### s_iax_modNoUsername

IAXTransaction (IAXEngine* engine, IAXFullFrame* frame, u_int16_t lcallno, const SocketAddr& addr, void* data = 0) | ### IAXTransaction

[protected]

Constructor: constructs an incoming transaction from a received full frame with an IAX control message that needs a new transaction

Parameters:

engine | The engine that owns this transaction
frame | A valid full frame
lcallno | Local call number
addr | Address from where the frame was received
data | Pointer to arbitrary user data

IAXTransaction (IAXEngine* engine, Type type, u_int16_t lcallno, const SocketAddr& addr, IAXIEList& ieList, void* data = 0) | ### IAXTransaction

[protected]

Constructor: constructs an outgoing transaction with an IAX control message that needs a new transaction

Parameters:

engine | The engine that owns this transaction
type | Transaction type: see Type enumeration
lcallno | Local call number
addr | Address to use
ieList | Starting IE list
data | Pointer to arbitrary user data

void destroyed () | ### destroyed

[protected virtual]

Cleanup

Reimplemented from RefObject.

void init (IAXIEList& ieList) | ### init

[protected]

Init data members from an IE list

Parameters:

ieList | IE list to init from

bool incrementSeqNo (const IAXFullFrame* frame, bool inbound) | ### incrementSeqNo

[protected]

Increment sequence numbers (inbound or outbound) for the frames that need it

Parameters:

frame | Received frame if inbound is true, otherwise a transmitted one
inbound | True for inbound frames

Returns: True if incremented.

bool isFrameAcceptable (const IAXFullFrame* frame) | ### isFrameAcceptable

[protected]

Test if frame is acceptable (not an out of order or a late one)

Parameters:

frame | Frame to test

Returns: True if frame can be added to incoming frame list

bool changeState (State newState) | ### changeState

[protected]

Change the transaction state

Parameters:

newState | the new transaction state

Returns: False if trying to change a termination state into a non termination one

IAXEvent* terminate (u_int8_t evType, bool local, IAXFullFrame* frame = 0, bool createIEList = true) | ### terminate

[protected]

Terminate the transaction.

Parameters:

evType | IAXEvent type to generate
local | If true it is a locally generated event
frame | Frame to build event from
createIEList | If true create IE list in the generated event

Returns: Pointer to a valid IAXEvent

IAXEvent* waitForTerminate (u_int8_t evType = 0, bool local = true, IAXFullFrame* frame = 0) | ### waitForTerminate

[protected]

Wait for ACK to terminate the transaction. No more events will be generated

Parameters:

evType | IAXEvent type to generate
local | If true it is a locally generated event
frame | Frame to build event from

Returns: Pointer to a valid IAXEvent if evType if non 0, 0 otherwise

void postFrame (IAXFrame::Type type, u_int32_t subclass, void* data = 0, u_int16_t len = 0, u_int32_t tStamp = 0, bool ackOnly = false, bool mark = false) | ### postFrame

[protected]

Constructs an IAXFrameOut frame, send it to remote peer and put it in the transmission list This method is thread safe

Parameters:

type | Frame type
subclass | Frame subclass
data | Frame IE list
len | Frame IE list length
tStamp | Frame timestamp. If 0 the transaction timestamp will be used
ackOnly | Frame's acknoledge only flag
mark | Frame mark flag

void postFrameIes (IAXFrame::Type type, u_int32_t subclass, IAXIEList* ies, u_int32_t tStamp = 0, bool ackOnly = false) | ### postFrameIes

[protected]

Constructs an IAXFrameOut frame, send it to remote peer and put it in the transmission list This method is thread safe

Parameters:

type | Frame type
subclass | Frame subclass
ies | Frame IE list
tStamp | Frame timestamp. If 0 the transaction timestamp will be used
ackOnly | Frame's acknoledge only flag

bool sendFrame (IAXFrameOut* frame, bool vnak = false) | ### sendFrame

[protected]

Send a full frame to remote peer

Parameters:

frame | Frame to send
vnak | If true the transmission is a response to a VNAK frame

Returns: True on success

IAXEvent* createEvent (u_int8_t evType, bool local, IAXFullFrame* frame, State newState) | ### createEvent

[protected]

Create an event

Parameters:

evType | Event type
local | If true it is a locally generated event.
frame | Frame to create from
newState | The transaction new state

Returns: Pointer to an IAXEvent or 0 (invalid IE list)

IAXEvent* createResponse (IAXFrameOut* frame, u_int8_t findType, u_int8_t findSubclass, u_int8_t evType, bool local, State newState) | ### createResponse

[protected]

Create an event from a received frame that is a response to a sent frame and change the transaction state to newState. Remove the response from incoming list.

Parameters:

frame | Frame to create response for
findType | Frame type to find
findSubclass | Frame subclass to find
evType | Event type to generate
local | Local flag for the generated event.
newState | New transaction state if an event was generated

Returns: Pointer to an IAXEvent or 0 (invalid IE list)

IAXEvent* getEventResponse (IAXFrameOut* frame, bool& delFrame) | ### getEventResponse

[protected]

Find a response for a previously sent frame

Parameters:

frame | Frame to find response for
delFrame | Delete frame flag. If true on exit, a response was found

Returns: Pointer to an IAXEvent or 0

IAXEvent* getEventResponse_New (IAXFrameOut* frame, bool& delFrame) | ### getEventResponse_New

[protected]

Find a response for a previously sent frame if the transaction type is New

Parameters:

frame | Frame to find response for
delFrame | Delete frame flag. If true on exit, a response was found

Returns: Pointer to an IAXEvent or 0

IAXEvent* processAuthReq (IAXEvent* event) | ### processAuthReq

[protected]

Process an authentication request. If valid, send an authentication reply

Parameters:

event | Already generated event

Returns: Pointer to a valid IAXEvent

IAXEvent* processAccept (IAXEvent* event) | ### processAccept

[protected]

Process an accept. If not valid (call m_engine->acceptFormatAndCapability) send a reject. Otherwise return the event

Parameters:

event | Already generated event

Returns: Pointer to a valid IAXEvent

IAXEvent* processAuthRep (IAXEvent* event) | ### processAuthRep

[protected]

Process an authentication reply

Parameters:

event | Already generated event

Returns: Pointer to a valid IAXEvent

IAXEvent* getEventResponse_Reg (IAXFrameOut* frame, bool& delFrame) | ### getEventResponse_Reg

[protected]

Find a response for a previously sent frame if the transaction type is RegReq/RegRel

Parameters:

frame | Frame to find response for
delFrame | Delete frame flag. If true on exit, a response was found

Returns: Pointer to an IAXEvent or 0

IAXEvent* processRegAck (IAXEvent* event) | ### processRegAck

[protected]

Update transaction data from the event

Parameters:

event | Already generated event

Returns: The received event

IAXEvent* getEventStartTrans (IAXFullFrame* frame, bool& delFrame) | ### getEventStartTrans

[protected]

Find out if an incoming frame would start a transaction

Parameters:

frame | Frame to process
delFrame | Delete frame flag. If true on exit, frame is valid

Returns: Pointer to an IAXEvent or 0

IAXEvent* getEventRequest (IAXFullFrame* frame, bool& delFrame) | ### getEventRequest

[protected]

Find out if a frame is a remote request

Parameters:

frame | Frame to process
delFrame | Delete rame flag. If true on exit, a request was found

Returns: Pointer to an IAXEvent or 0

IAXEvent* getEventRequest_New (IAXFullFrame* frame, bool& delFrame) | ### getEventRequest_New

[protected]

Find out if a frame is a remote request if transaction type is New

Parameters:

frame | Frame to process
delFrame | Delete rame flag. If true on exit, a request was found

Returns: Pointer to an IAXEvent or 0

IAXFullFrame* findInFrame (IAXFrame::Type type, u_int32_t subclass) | ### findInFrame

[protected]

Search for a frame in m_inFrames having the given type and subclass

Parameters:

type | Frame type to find.
subclass | Frame subclass to find.

Returns: Pointer to frame if found or 0.

bool findInFrameTimestamp (const IAXFullFrame* frameOut, IAXFrame::Type type, u_int32_t subclass) | ### findInFrameTimestamp

[protected]

Search in m_inFrames for a frame with the same timestamp as frameOut and deletes it.

Parameters:

frameOut | Frame to find response for
type | Frame type to find
subclass | Frame subclass to find

Returns: True if found.

bool findInFrameAck (const IAXFullFrame* frameOut) | ### findInFrameAck

[protected]

Search in m_inFrames for an ACK frame which confirm the received frame and deletes it

Parameters:

frameOut | Frame to find response for

Returns: True if found.

void ackInFrames () | ### ackInFrames

[protected]

Acknoledge the last received full frame

bool sendConnected (IAXFullFrame::ControlType subclass, IAXFrame::Type frametype = IAXFrame::Control) | ### sendConnected

[protected]

Send a frame to remote peer in state Connected This method is thread safe

Parameters:

subclass | Frame subclass to send
frametype | Frame type to send

Returns: False if the current transaction state is not Connected

void sendAck (const IAXFullFrame* frame) | ### sendAck

[protected]

Send an ACK frame

Parameters:

frame | Aknoledged frame

void sendVNAK () | ### sendVNAK

[protected]

Send an VNAK frame

void sendUnsupport (u_int32_t subclass) | ### sendUnsupport

[protected]

Send an Unsupport frame

Parameters:

subclass | Unsupported frame's subclass

IAXEvent* processInternalOutgoingRequest (IAXFrameOut* frame, bool& delFrame) | ### processInternalOutgoingRequest

[protected]

Internal protocol outgoing frames processing (PING/LAGRQ)

Parameters:

frame | Frame to process
delFrame | Delete frame flag. If true on exit, a response was found

Returns: 0.

IAXEvent* processInternalIncomingRequest (const IAXFullFrame* frame, bool& delFrame) | ### processInternalIncomingRequest

[protected]

Internal protocol incoming frames processing (PING/LAGRQ)

Parameters:

frame | Frame to process
delFrame | Delete frame flag. If true on exit, a request was found

Returns: 0.

IAXEvent* processMidCallControl (IAXFullFrame* frame, bool& delFrame) | ### processMidCallControl

[protected]

Process mid call control frames

Parameters:

frame | Frame to process
delFrame | Delete frame flag. If true on exit, a request was found

Returns: A valid IAXEvent or 0

IAXEvent* processMidCallIAXControl (IAXFullFrame* frame, bool& delFrame) | ### processMidCallIAXControl

[protected]

Process mid call IAX control frames

Parameters:

frame | Frame to process
delFrame | Delete frame flag. If true on exit, a request was found

Returns: A valid IAXEvent or 0

IAXEvent* remoteRejectCall (IAXFullFrame* frame, bool& delFrame) | ### remoteRejectCall

[protected]

Test if frame is a Reject/RegRej frame

Parameters:

frame | Frame to process.
delFrame | Delete frame flag. If true on exit, a request was found

Returns: A valid IAXEvent or 0.

IAXTransaction* processMediaFrame (const IAXFullFrame* frame, int type) | ### processMediaFrame

[protected]

Process received media full frames

Parameters:

frame | Received frame
type | Media type

Returns: 0

IAXTransaction* retransmitOnVNAK (u_int16_t seqNo) | ### retransmitOnVNAK

[protected]

Send all frames from outgoing queue with outbound sequence number starting with seqNo.

Parameters:

seqNo | Requested sequence number

Returns: 0

IAXEvent* internalReject (const char* reason, u_int8_t code) | ### internalReject

[protected]

Generate a Reject event after internally rejecting a transaction

Parameters:

reason | The reason of rejecting
code | Error code

Returns: A valid IAXEvent

void eventTerminated (IAXEvent* event) | ### eventTerminated

[protected]

Event terminated feedback This method is thread safe

Parameters:

event | The event notifying termination

inline IAXEvent* keepEvent (IAXEvent* event) | ### keepEvent

[protected]

Set the current event

Parameters:

event | The event notifying termination

Returns: event

Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.