IAX2Processor Class Reference

#include <processor.h>

List of all members.

Internal, protected methods, which are invoked only by this

thread

enum  CallStatus {
  callNewed = 1 << 0, callSentRinging = 1 << 1, callRegistered = 1 << 2, callAuthorised = 1 << 3,
  callAccepted = 1 << 4, callRinging = 1 << 5, callAnswered = 1 << 6, callTerminating = 1 << 7
}
enum  DefinedNoResponseTimePeriod { NoResponseTimePeriod = 5000 }
BOOL RemoteSelectedCodecOk ()
void CheckForHangupMessages ()
void SendAckFrame (IAX2FullFrame *inReplyTo)
void TransmitFrameToRemoteEndpoint (IAX2Frame *src)
void TransmitFrameToRemoteEndpoint (IAX2FullFrame *src, IAX2WaitingForAck::ResponseToAck response)
void TransmitFrameNow (IAX2Frame *src)
void TransmitFrameToRemoteEndpoint (IAX2FullFrameProtocol *src)
void ProcessNetworkFrame (IAX2Frame *src)
void ProcessNetworkFrame (IAX2MiniFrame *src)
void ProcessNetworkFrame (IAX2FullFrame *src)
void ProcessNetworkFrame (IAX2FullFrameDtmf *src)
void ProcessNetworkFrame (IAX2FullFrameVoice *src)
void ProcessNetworkFrame (IAX2FullFrameVideo *src)
void ProcessNetworkFrame (IAX2FullFrameSessionControl *src)
void ProcessNetworkFrame (IAX2FullFrameNull *src)
void ProcessNetworkFrame (IAX2FullFrameProtocol *src)
void ProcessNetworkFrame (IAX2FullFrameText *src)
void ProcessNetworkFrame (IAX2FullFrameImage *src)
void ProcessNetworkFrame (IAX2FullFrameHtml *src)
void ProcessNetworkFrame (IAX2FullFrameCng *src)
void ProcessLists ()
BOOL ProcessOneIncomingEthernetFrame ()
void ConnectToRemoteNode (PString &destination)
void SendDtmfMessage (char message)
void SendTextMessage (PString &message)
void SendSoundMessage (PBYTEArray *sound)
void IncControlFramesSent ()
void IncControlFramesRcvd ()
void IncAudioFramesSent ()
void IncAudioFramesRcvd ()
void IncVideoFramesSent ()
void IncVideoFramesRcvd ()
void RemoteNodeHasAnswered ()
void CallStopSounds ()
void ReceivedHookFlash ()
void RemoteNodeIsBusy ()
void ProcessIncomingAudioFrame (IAX2Frame *newFrame)
void ProcessIncomingVideoFrame (IAX2Frame *newFrame)
void ProcessIaxCmdNew (IAX2FullFrameProtocol *src)
void ProcessIaxCmdPing (IAX2FullFrameProtocol *src)
void ProcessIaxCmdPong (IAX2FullFrameProtocol *src)
void ProcessIaxCmdAck (IAX2FullFrameProtocol *src)
void ProcessIaxCmdHangup (IAX2FullFrameProtocol *src)
void ProcessIaxCmdReject (IAX2FullFrameProtocol *src)
void ProcessIaxCmdAccept (IAX2FullFrameProtocol *src)
void ProcessIaxCmdAuthReq (IAX2FullFrameProtocol *src)
void ProcessIaxCmdAuthRep (IAX2FullFrameProtocol *src)
void ProcessIaxCmdInval (IAX2FullFrameProtocol *src)
void ProcessIaxCmdLagRq (IAX2FullFrameProtocol *src)
void ProcessIaxCmdLagRp (IAX2FullFrameProtocol *src)
void ProcessIaxCmdRegReq (IAX2FullFrameProtocol *src)
void ProcessIaxCmdRegAuth (IAX2FullFrameProtocol *src)
void ProcessIaxCmdRegAck (IAX2FullFrameProtocol *src)
void ProcessIaxCmdRegRej (IAX2FullFrameProtocol *src)
void ProcessIaxCmdRegRel (IAX2FullFrameProtocol *src)
void ProcessIaxCmdVnak (IAX2FullFrameProtocol *src)
void ProcessIaxCmdDpReq (IAX2FullFrameProtocol *src)
void ProcessIaxCmdDpRep (IAX2FullFrameProtocol *src)
void ProcessIaxCmdDial (IAX2FullFrameProtocol *src)
void ProcessIaxCmdTxreq (IAX2FullFrameProtocol *src)
void ProcessIaxCmdTxcnt (IAX2FullFrameProtocol *src)
void ProcessIaxCmdTxacc (IAX2FullFrameProtocol *src)
void ProcessIaxCmdTxready (IAX2FullFrameProtocol *src)
void ProcessIaxCmdTxrel (IAX2FullFrameProtocol *src)
void ProcessIaxCmdTxrej (IAX2FullFrameProtocol *src)
void ProcessIaxCmdQuelch (IAX2FullFrameProtocol *src)
void ProcessIaxCmdUnquelch (IAX2FullFrameProtocol *src)
void ProcessIaxCmdPoke (IAX2FullFrameProtocol *src)
void ProcessIaxCmdPage (IAX2FullFrameProtocol *src)
void ProcessIaxCmdMwi (IAX2FullFrameProtocol *src)
void ProcessIaxCmdUnsupport (IAX2FullFrameProtocol *src)
void ProcessIaxCmdTransfer (IAX2FullFrameProtocol *src)
void ProcessIaxCmdProvision (IAX2FullFrameProtocol *src)
void ProcessIaxCmdFwDownl (IAX2FullFrameProtocol *src)
void ProcessIaxCmdFwData (IAX2FullFrameProtocol *src)
BOOL Authenticate (IAX2FullFrameProtocol *reply)
void SetCallSentRinging (BOOL newValue=TRUE)
void SetCallNewed (BOOL newValue=TRUE)
void SetCallRegistered (BOOL newValue=TRUE)
void SetCallAuthorised (BOOL newValue=TRUE)
void SetCallAccepted (BOOL newValue=TRUE)
void SetCallRinging (BOOL newValue=TRUE)
void SetCallAnswered (BOOL newValue=TRUE)
void SetCallTerminating (BOOL newValue=TRUE)
BOOL IsCallHappening ()
BOOL IsCallNewed ()
BOOL IsCallSentRinging ()
BOOL IsCallRegistered ()
BOOL IsCallAuthorised ()
BOOL IsCallAccepted ()
BOOL IsCallRinging ()
BOOL IsCallAnswered ()
void SendAnswerMessageToRemoteNode ()
void OnNoResponseTimeout (PTimer &, INT)
void StartNoResponseTimer (PINDEX msToWait=60000)
void StopNoResponseTimer ()
void StartStatusCheckTimer (PINDEX msToWait=10000)
void OnStatusCheck (PTimer &, INT)
void DoStatusCheck ()
void CleanPendingLists ()
void RemoteNodeIsRinging ()
void RingingWasAcked ()
void AnswerWasAcked ()
BOOL IsHandlingSpecialPackets ()
void CheckForRemoteCapabilities (IAX2FullFrameProtocol *src)
PTimeInterval callStartTick
IAX2Remote remote
IAX2SequenceNumbers sequence
PAtomicInteger controlFramesSent
PAtomicInteger controlFramesRcvd
PAtomicInteger audioFramesSent
PAtomicInteger audioFramesRcvd
PAtomicInteger videoFramesSent
PAtomicInteger videoFramesRcvd
SafeString remotePhoneNumber
SafeStrings callList
SafeString dtmfText
SafeStrings textList
SafeStrings dtmfNetworkList
SafeStrings hangList
IAX2SoundList soundWaitingForTransmission
IAX2FrameList soundReadFromEthernet
IAX2FrameList frameList
PINDEX lastFullFrameTimeStamp
BOOL audioCanFlow
IAX2IeData ieData
unsigned int selectedCodec
unsigned short callStatus
PTimer noResponseTimer
IAX2WaitingForAck nextTask
PSyncPoint activate
BOOL endThread
BOOL specialPackets
SafeString callToken
BOOL firstMediaFrame
BOOL answerCallNow
BOOL statusCheckOtherEnd
PTimer statusCheckTimer
PINDEX lastSentAudioFrameTime
PINDEX audioFrameDuration
PINDEX audioCompressedBytes
BOOL audioFramesNotStarted
IAX2Encryption encryption

Public Member Functions

 IAX2Processor (IAX2EndPoint &ep)
 ~IAX2Processor ()
void AssignConnection (IAX2Connection *_con)
virtual void Main ()
void Terminate ()
void Activate ()
void PutSoundPacketToNetwork (PBYTEArray *sund)
IAX2RemoteGetRemoteInfo ()
IAX2SequenceNumbersGetSequenceInfo ()
IAX2EncryptionGetEncryptionInfo ()
const PTimeInterval & GetCallStartTick ()
virtual void Release (OpalConnection::CallEndReason releaseReason=OpalConnection::EndedByLocalUser)
void ClearCall (OpalConnection::CallEndReason releaseReason=OpalConnection::EndedByLocalUser)
virtual void OnReleased ()
void SendDtmf (PString dtmfs)
void SendText (const PString &text)
virtual BOOL SetUpConnection ()
void IncomingEthernetFrame (IAX2Frame *frame)
IAX2FrameGetSoundPacketFromNetwork ()
void SetSpecialPackets (BOOL newValue)
BOOL IsStatusQueryEthernetFrame (IAX2Frame *frame)
BOOL Matches (IAX2Frame *frame)
virtual void PrintOn (ostream &strm) const
void ReportStatistics ()
BOOL MatchingLocalCallNumber (PINDEX compare)
unsigned short GetSelectedCodec ()
void SetConnected ()
void AcceptIncomingCall ()
virtual BOOL SetAlerting (const PString &calleeName, BOOL withMedia)
void SetCallToken (PString newToken)
void SetEstablished (BOOL originator)
PString GetCallToken ()
IAX2EndPointGetEndPoint ()
void Hangup (PString messageToSend)
BOOL IsCallTerminating ()

Protected Attributes

IAX2EndPointendpoint
IAX2Connectioncon


Detailed Description

This class does the work of processing the lists of IAX packets (in and out) that are associated with each call. There is one IAX2Processor per connection. There is a special processor which is created to handle the weirdo iax2 packets that are sent outside of a particular call. Examples of weirdo packets are the ping/pong/lagrq/lagrp.


Member Enumeration Documentation

enum IAX2Processor::CallStatus [protected]

bit mask of the different flags to indicate call status

Enumerator:
callNewed  we have received a new packet to set this call up.
callSentRinging  we have sent a packet to indicate that the phone is ringing at our end
callRegistered  registration with a remote asterisk server has been approved
callAuthorised  we are waiting on password authentication at the remote endpoint
callAccepted  call has been accepted, which means that the new request has been approved
callRinging  Remote end has sent us advice the phone is ringing, awaiting answer
callAnswered  call setup complete, now do audio
callTerminating  Flag to indicate call is closing down after iax2 call end commands

enum IAX2Processor::DefinedNoResponseTimePeriod [protected]

A defined value which is the maximum time we will wait for an answer to our packets

Enumerator:
NoResponseTimePeriod  Time (in milliseconds) we will wait


Constructor & Destructor Documentation

IAX2Processor::IAX2Processor ( IAX2EndPoint ep  ) 

Construct this class

IAX2Processor::~IAX2Processor (  ) 

Destructor


Member Function Documentation

void IAX2Processor::AcceptIncomingCall (  ) 

Send appropriate packets to the remote node to indicate we will accept this call. Note that this method is called from the endpoint thread, (not this IAX2Connection's thread

void IAX2Processor::Activate (  ) 

Cause this thread to come to life, and process events that are pending at IAX2Connection

void IAX2Processor::AnswerWasAcked (  )  [protected]

We have received an ack message from the remote node. The ack message was sent in response to our Answer message. Since the Answer message has been acked, we have to regard this call as Established();.

void IAX2Processor::AssignConnection ( IAX2Connection _con  ) 

Assign a pointer to the connection class to process, and starts thread

BOOL IAX2Processor::Authenticate ( IAX2FullFrameProtocol reply  )  [protected]

Do the md5/rsa authentication. Return True if successful. Has the side effect of appending the appropriate Ie class to the "reply" parameter.

Parameters:
reply  this frame contains the result of authenticating the internal data

void IAX2Processor::CallStopSounds (  )  [protected]

A stop sounds packet has been received, which means we have moved from waiting for the remote person to answer, to they have answered and media can flow in both directions

void IAX2Processor::CheckForHangupMessages (  )  [protected]

Check to see if there is an outstanding request to send a hangup frame. This needs to be done in two places, so we use a routine to see if need to send a hanup frame.

void IAX2Processor::CheckForRemoteCapabilities ( IAX2FullFrameProtocol src  )  [protected]

If the incoming frame has Information Elements defining remote capability, define the list of remote capabilities

void IAX2Processor::CleanPendingLists (  )  [inline, protected]

Activate this thread to process all the lists of queued frames

void IAX2Processor::ClearCall ( OpalConnection::CallEndReason  releaseReason = OpalConnection::EndedByLocalUser  ) 

From the IAX2Connection class. CAlling this sends a hangup frame

void IAX2Processor::ConnectToRemoteNode ( PString &  destination  )  [protected]

Make a call to a remote node

void IAX2Processor::DoStatusCheck (  )  [protected]

Code to send a PING and a LAGRQ packet to the remote endpoint

const PTimeInterval& IAX2Processor::GetCallStartTick (  )  [inline]

Get the call start tick

PString IAX2Processor::GetCallToken (  ) 

Return the string that identifies this IAX2Connection instance

IAX2Encryption& IAX2Processor::GetEncryptionInfo (  )  [inline]

Get the iax2 encryption info

IAX2EndPoint& IAX2Processor::GetEndPoint (  )  [inline]

Access the endpoint class that launched this processor

IAX2Remote& IAX2Processor::GetRemoteInfo (  )  [inline]

Get information on IAX2Remote class (remote node address & port + source & dest call number.)

unsigned short IAX2Processor::GetSelectedCodec (  )  [inline]

Get the bit pattern of the selected codec

IAX2SequenceNumbers& IAX2Processor::GetSequenceInfo (  )  [inline]

Get the sequence number info (inSeqNo and outSeqNo)

IAX2Frame* IAX2Processor::GetSoundPacketFromNetwork (  ) 

A sound packet has been given (by the Receiver thread) to this IAX2Processor class, and queued on the IAX2SoundList structure. The OpalIAX2MediaStream thread will call this method to retrieving the sound packet. The OpalIAX2MediaStream will handle this packet appropriately - eg send to the PC speaker..

void IAX2Processor::Hangup ( PString  messageToSend  ) 

Cause this thread to hangup the current call, but not die. Death will come soon though. The argument is placed in the iax2 hangup packet as the cause string.

void IAX2Processor::IncAudioFramesRcvd (  )  [inline, protected]

Increment the count of audio frames received

void IAX2Processor::IncAudioFramesSent (  )  [inline, protected]

Increment the count of audio frames sent

void IAX2Processor::IncControlFramesRcvd (  )  [inline, protected]

Increment the count of full frames received

void IAX2Processor::IncControlFramesSent (  )  [inline, protected]

Increment the count of full frames sent

void IAX2Processor::IncomingEthernetFrame ( IAX2Frame frame  ) 

Handle a received IAX frame. This may be a mini frame or full frame

void IAX2Processor::IncVideoFramesRcvd (  )  [inline, protected]

Increment the count of video frames received

void IAX2Processor::IncVideoFramesSent (  )  [inline, protected]

Increment the count of video frames sent

BOOL IAX2Processor::IsCallAccepted (  )  [inline, protected]

Get the current value of the call status flag callAccepted

BOOL IAX2Processor::IsCallAnswered (  )  [inline, protected]

Get the current value of the call status flag callAnswered

BOOL IAX2Processor::IsCallAuthorised (  )  [inline, protected]

Get the current value of the call status flag callAuthorised

BOOL IAX2Processor::IsCallHappening (  )  [inline, protected]

See if any of the flag bits are on, which indicate this call is actually active

BOOL IAX2Processor::IsCallNewed (  )  [inline, protected]

Get marker to indicate that some packets have flowed etc for this call

BOOL IAX2Processor::IsCallRegistered (  )  [inline, protected]

Get the current value of the call status flag callRegistered

BOOL IAX2Processor::IsCallRinging (  )  [inline, protected]

Get the current value of the call status flag callRinging

BOOL IAX2Processor::IsCallSentRinging (  )  [inline, protected]

Get marker to indicate that we are waiting on the ack for the iaxcommandringing packet we sent

BOOL IAX2Processor::IsCallTerminating (  )  [inline]

Report the status of the flag callEndingNow, which indicates if the call is terminating under iax2 control

BOOL IAX2Processor::IsHandlingSpecialPackets (  )  [inline, protected]

return the flag to indicate if we are handling special packets, which are those packets sent to the endpoint (and not related to any particular call).

BOOL IAX2Processor::IsStatusQueryEthernetFrame ( IAX2Frame frame  ) 

Test to see if it is a status query type iax frame (eg lagrq) and handle it. If the frame is a status query, and it is handled, return TRUE

virtual void IAX2Processor::Main (  )  [virtual]

The worker method of this thread. In here, all incoming frames (for this call) are handled.

BOOL IAX2Processor::Matches ( IAX2Frame frame  )  [inline]

Return TRUE if the remote info in the frame matches the remote info in this connection

BOOL IAX2Processor::MatchingLocalCallNumber ( PINDEX  compare  )  [inline]

Return TRUE if the arg matches the source call number for this connection

void IAX2Processor::OnNoResponseTimeout ( PTimer &  ,
INT   
) [protected]

pwlib constructs to cope with no response to an outgoing message. This is used to handle the output of the noResponseTimer

This method runs in a separate thread to the heart of the Connection. It is threadsafe, cause each of the elements in Connection (that are touched) are thread safe

virtual void IAX2Processor::OnReleased (  )  [virtual]

Call back from the IAX2Connection class. This indicates the IAX2Connection class is in the final stages of destruction. At this point, we can terminate the thread that processors all iax packets

void IAX2Processor::OnStatusCheck ( PTimer &  ,
INT   
) [protected]

A pwlib callback function to invoke another status check on the other endpoint

This method runs in a separate thread to the heart of the Connection. It is threadsafe, cause each of the elements in Connection (that are touched) are thread safe

virtual void IAX2Processor::PrintOn ( ostream &  strm  )  const [virtual]

A method to cause some of the values in this class to be formatted into a printable stream

void IAX2Processor::ProcessIaxCmdAccept ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Allow this call to procee

void IAX2Processor::ProcessIaxCmdAck ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Acknowledge a Reliably sent full frame

void IAX2Processor::ProcessIaxCmdAuthRep ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is A reply, that contains authenticatio

void IAX2Processor::ProcessIaxCmdAuthReq ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Ask remote end to supply authenticatio

void IAX2Processor::ProcessIaxCmdDial ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Request a dial on channel brought up TBD

void IAX2Processor::ProcessIaxCmdDpRep ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Request status of a dialplan entry

void IAX2Processor::ProcessIaxCmdDpReq ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Request status of a dialplan entry

void IAX2Processor::ProcessIaxCmdFwData ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Firmware Data

void IAX2Processor::ProcessIaxCmdFwDownl ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Download firmware

void IAX2Processor::ProcessIaxCmdHangup ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Request to terminate this call

void IAX2Processor::ProcessIaxCmdInval ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Destroy this call immediatly

void IAX2Processor::ProcessIaxCmdLagRp ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Reply to cmdLagrq, which tells us the round trip time

void IAX2Processor::ProcessIaxCmdLagRq ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Initial message, used to measure the round trip time

void IAX2Processor::ProcessIaxCmdMwi ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Stand-alone message waiting indicator

void IAX2Processor::ProcessIaxCmdNew ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Create a new call

void IAX2Processor::ProcessIaxCmdPage ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Paging description

void IAX2Processor::ProcessIaxCmdPing ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Ping request,

void IAX2Processor::ProcessIaxCmdPoke ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Like ping, but does not require an open connection

void IAX2Processor::ProcessIaxCmdPong ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is reply to a Ping

void IAX2Processor::ProcessIaxCmdProvision ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Provision device

void IAX2Processor::ProcessIaxCmdQuelch ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Stop audio/video transmission

void IAX2Processor::ProcessIaxCmdRegAck ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Registration accepted

void IAX2Processor::ProcessIaxCmdRegAuth ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Registration authentication required

void IAX2Processor::ProcessIaxCmdRegRej ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Registration rejected

void IAX2Processor::ProcessIaxCmdRegRel ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Force release of registration

void IAX2Processor::ProcessIaxCmdRegReq ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Registration request

void IAX2Processor::ProcessIaxCmdReject ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Refuse to accept this call. May happen if authentication faile

void IAX2Processor::ProcessIaxCmdTransfer ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Request remote transfer

void IAX2Processor::ProcessIaxCmdTxacc ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Transfer Accepted

void IAX2Processor::ProcessIaxCmdTxcnt ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Transfer Connect

void IAX2Processor::ProcessIaxCmdTxready ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Transfer ready

void IAX2Processor::ProcessIaxCmdTxrej ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Transfer reject

void IAX2Processor::ProcessIaxCmdTxrel ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Transfer release

void IAX2Processor::ProcessIaxCmdTxreq ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Transfer Request

void IAX2Processor::ProcessIaxCmdUnquelch ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Resume audio/video transmission

void IAX2Processor::ProcessIaxCmdUnsupport ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is Unsupported message received

void IAX2Processor::ProcessIaxCmdVnak ( IAX2FullFrameProtocol src  )  [protected]

Process a FullFrameProtocol class, where the sub Class value is If we receive voice before valid first voice frame, send this

void IAX2Processor::ProcessIncomingAudioFrame ( IAX2Frame newFrame  )  [protected]

Process the audio data portions of the Frame argument, which may be a MiniFrame or FullFrame

void IAX2Processor::ProcessIncomingVideoFrame ( IAX2Frame newFrame  )  [protected]

Process the video data portions of the Frame argument, which may be a MiniFrame or FullFrame

void IAX2Processor::ProcessLists (  )  [protected]

Go through the three lists for incoming data (ethernet/sound/UI commands.

void IAX2Processor::ProcessNetworkFrame ( IAX2FullFrameCng src  )  [protected]

Internal method to process an incoming network frame of type IAX2FullFrameCng

void IAX2Processor::ProcessNetworkFrame ( IAX2FullFrameHtml src  )  [protected]

Internal method to process an incoming network frame of type IAX2FullFrameHtml

void IAX2Processor::ProcessNetworkFrame ( IAX2FullFrameImage src  )  [protected]

Internal method to process an incoming network frame of type IAX2FullFrameImage

void IAX2Processor::ProcessNetworkFrame ( IAX2FullFrameText src  )  [protected]

Internal method to process an incoming network frame of type IAX2FullFrameText

void IAX2Processor::ProcessNetworkFrame ( IAX2FullFrameProtocol src  )  [protected]

Internal method to process an incoming network frame of type IAX2FullFrameProtocol.

A frame of FullFrameProtocol type is labelled as AST_FRAME_IAX in the asterisk souces, It will contain 0, 1, 2 or more Information Elements (Ie) in the data section.

void IAX2Processor::ProcessNetworkFrame ( IAX2FullFrameNull src  )  [protected]

Internal method to process an incoming network frame of type IAX2FullFrameNull

void IAX2Processor::ProcessNetworkFrame ( IAX2FullFrameSessionControl src  )  [protected]

Internal method to process an incoming network frame of type IAX2FullFrameSessionControl

void IAX2Processor::ProcessNetworkFrame ( IAX2FullFrameVideo src  )  [protected]

Internal method to process an incoming network frame of type IAX2FullFrameVideo

void IAX2Processor::ProcessNetworkFrame ( IAX2FullFrameVoice src  )  [protected]

Internal method to process an incoming network frame of type IAX2FullFrameVoice

void IAX2Processor::ProcessNetworkFrame ( IAX2FullFrameDtmf src  )  [protected]

Internal method to process an incoming network frame of type IAX2FullFrameDtmf

void IAX2Processor::ProcessNetworkFrame ( IAX2FullFrame src  )  [protected]

Internal method to process an incoming network frame of type IAX2FullFrame

void IAX2Processor::ProcessNetworkFrame ( IAX2MiniFrame src  )  [protected]

Internal method to process an incoming network frame of type IAX2MiniFrame

void IAX2Processor::ProcessNetworkFrame ( IAX2Frame src  )  [protected]

Internal method to process an incoming network frame of type IAX2Frame

BOOL IAX2Processor::ProcessOneIncomingEthernetFrame (  )  [protected]

remove one frame on the incoming ethernet frame list. If there may be more to process, return TRUE. If there are no more to process, return FALSE.

void IAX2Processor::PutSoundPacketToNetwork ( PBYTEArray *  sund  ) 

Handle a sound packet received from the sound device.

Now onsend this to the remote endpoint.

void IAX2Processor::ReceivedHookFlash (  )  [protected]

A callback which is used to indicate that the remote party has sent us a hook flash message (i.e, their hook was flashed)

virtual void IAX2Processor::Release ( OpalConnection::CallEndReason  releaseReason = OpalConnection::EndedByLocalUser  )  [virtual]

Call back from the IAX2Connection class

void IAX2Processor::RemoteNodeHasAnswered (  )  [protected]

A callback which is used to indicate the remote party has accepted our call. Media can flow now

void IAX2Processor::RemoteNodeIsBusy (  )  [protected]

A callback which is used to indicate that the remote party has sent us a message stating they are busy.

void IAX2Processor::RemoteNodeIsRinging (  )  [protected]

we have received a message that the remote node is ringing. Now wait for the remote user to answer.

BOOL IAX2Processor::RemoteSelectedCodecOk (  )  [protected]

Test the value supplied in the format Ie is compatible.

void IAX2Processor::ReportStatistics (  ) 

Invoked by the User interface, which causes the statistics (count of in/out packets) to be printed

void IAX2Processor::RingingWasAcked (  )  [protected]

We have told the remote node that our phone is ringing. they have acked this message. Now, we advise opal that our phone "should" be ringing, and does opal want to accept our call.

void IAX2Processor::SendAckFrame ( IAX2FullFrame inReplyTo  )  [protected]

Transmit an iax protocol frame with subclass type ack immediately to remote endpoint

void IAX2Processor::SendAnswerMessageToRemoteNode (  )  [protected]

Advise the other end that we have picked up the phone

void IAX2Processor::SendDtmf ( PString  dtmfs  ) 

Ask this IAX2Processor to send dtmf to the remote endpoint. The dtmf is placed on a queue, ready for transmission in fullframes of type dtmf.

void IAX2Processor::SendDtmfMessage ( char  message  )  [protected]

Cause the dtmf full frames to go out for this dtmf character

void IAX2Processor::SendSoundMessage ( PBYTEArray *  sound  )  [protected]

Cause a sound frame (which is full or mini) to be sent. The data in the array is already compressed.

void IAX2Processor::SendText ( const PString &  text  ) 

Ask this IAX2Processor to send text to the remote endpoint. The text is placed on a queue, ready for transmission in fullframes of type text.

void IAX2Processor::SendTextMessage ( PString &  message  )  [protected]

Cause the text full frames to go out for this text message

virtual BOOL IAX2Processor::SetAlerting ( const PString &  calleeName,
BOOL  withMedia 
) [virtual]

Indicate to remote endpoint an alert is in progress. If this is an incoming connection and the AnswerCallResponse is in a AnswerCallDeferred or AnswerCallPending state, then this function is used to indicate to that endpoint that an alert is in progress. This is usually due to another connection which is in the call (the B party) has received an OnAlerting() indicating that its remoteendpoint is "ringing".

The default behaviour is pure.

Parameters:
withMedia  Name of endpoint being alerted. Open media with alerting

void IAX2Processor::SetCallAccepted ( BOOL  newValue = TRUE  )  [inline, protected]

Mark call status Accepted (argument determines flag status)

void IAX2Processor::SetCallAnswered ( BOOL  newValue = TRUE  )  [inline, protected]

Mark call status Answered (argument determines flag status)

void IAX2Processor::SetCallAuthorised ( BOOL  newValue = TRUE  )  [inline, protected]

Mark call status Authorised (argument determines flag status)

void IAX2Processor::SetCallNewed ( BOOL  newValue = TRUE  )  [inline, protected]

Mark call status as having received a new packet

void IAX2Processor::SetCallRegistered ( BOOL  newValue = TRUE  )  [inline, protected]

Mark call status Registered (argument determines flag status)

void IAX2Processor::SetCallRinging ( BOOL  newValue = TRUE  )  [inline, protected]

Mark call status Ringing (argument determines flag status)

void IAX2Processor::SetCallSentRinging ( BOOL  newValue = TRUE  )  [inline, protected]

Mark call status as having sent a iaxcmdRinging packet

void IAX2Processor::SetCallTerminating ( BOOL  newValue = TRUE  )  [inline, protected]

Mark call status as terminated (is processing IAX2 hangup packets etc )

void IAX2Processor::SetCallToken ( PString  newToken  ) 

Give the call token a value. The call token is the ipaddress of the remote node concatented with the remote nodes src number. This is guaranteed to be unique. Sadly, if this connection is setting up the call, the callToken is not known until receipt of the first packet from the remote node.

However, if this connection is created in response to a call, this connection can determine the callToken on examination of that incoming first packet

void IAX2Processor::SetConnected (  ) 

Indicate to remote endpoint we are connected.

void IAX2Processor::SetEstablished ( BOOL  originator  ) 

Advise the procesor that this call is totally setup, and answer accordingly

Parameters:
originator  Flag to indicate if we created the call

void IAX2Processor::SetSpecialPackets ( BOOL  newValue  )  [inline]

Set the flag to indicate if we are handling specialPackets (those packets which are not sent to any particular call)

virtual BOOL IAX2Processor::SetUpConnection (  )  [virtual]

Start an outgoing connection. This function will initiate the connection to the remote entity, for example in H.323 it sends a SETUP, in SIP it sends an INVITE etc.

The behaviour at the opal level is pure. Here, the method is defined.

void IAX2Processor::StartNoResponseTimer ( PINDEX  msToWait = 60000  )  [protected]

Set the acceptable time (in milliseconds) to wait before giving up on this call

void IAX2Processor::StartStatusCheckTimer ( PINDEX  msToWait = 10000  )  [protected]

Set up the acceptable time (in milliseconds) to wait between doing status checks.

Parameters:
msToWait  time between status checks, default = 10 seconds

void IAX2Processor::StopNoResponseTimer (  )  [inline, protected]

Stop the timer - we have received a reply

void IAX2Processor::Terminate (  ) 

Cause this thread to die immediately

void IAX2Processor::TransmitFrameNow ( IAX2Frame src  )  [protected]

Transmit IAX2Frame to remote endpoint,. This calls a method in the Transmitter class. .It is only called by the this Connection class. There is no stats change when this method is called.

void IAX2Processor::TransmitFrameToRemoteEndpoint ( IAX2FullFrameProtocol src  )  [protected]

FullFrameProtocol class needs to have the IE's correctly appended prior to transmission

void IAX2Processor::TransmitFrameToRemoteEndpoint ( IAX2FullFrame src,
IAX2WaitingForAck::ResponseToAck  response 
) [protected]

Transmit IAX2Frame to remote endpoint, and then increment send count. This calls a method in the Transmitter class. .It is only called by the this IAX2Processor class. The second parameter determines what to do when an ack frame is received for the sent frame.

Parameters:
response  action to do on getting Ack

void IAX2Processor::TransmitFrameToRemoteEndpoint ( IAX2Frame src  )  [protected]

Transmit IAX2Frame to remote endpoint, and then increment send count. This calls a method in the Transmitter class. .It is only called by the this IAX2Processor class.


Member Data Documentation

PSyncPoint IAX2Processor::activate [protected]

Flag which is used to activate this thread, so all pending tasks/packets are processed

BOOL IAX2Processor::answerCallNow [protected]

Flag to indicate we have to answer this call (i.e. send a FullFrameSessionControl::answer packet).

BOOL IAX2Processor::audioCanFlow [protected]

Flag to indicate we are ready for audio to flow

PINDEX IAX2Processor::audioCompressedBytes [protected]

The number of bytes from compressing one frame of audio

PINDEX IAX2Processor::audioFrameDuration [protected]

The time period, in ms, of each audio frame. It is used when determining the appropriate timestamp to go on a packet.

BOOL IAX2Processor::audioFramesNotStarted [protected]

A flag to indicate we have yet to send an audio frame to remote endpoint. If this is on, then the first audio frame sent is a full one.

PAtomicInteger IAX2Processor::audioFramesRcvd [protected]

Count of the number of sound frames received

PAtomicInteger IAX2Processor::audioFramesSent [protected]

Count of the number of sound frames sent

SafeStrings IAX2Processor::callList [protected]

Array of remote node we have to make a call to

PTimeInterval IAX2Processor::callStartTick [protected]

Time this connection class was created, which is the call start time. It is reported in Ticks, which is required for millisecond accuracy under windows.

unsigned short IAX2Processor::callStatus [protected]

Contains the bits stating what is happening in the call

SafeString IAX2Processor::callToken [protected]

The call token, which uniquely identifies this IAX2Processor, and the associated call

IAX2Connection* IAX2Processor::con [protected]

The connection class we are charged with running.

PAtomicInteger IAX2Processor::controlFramesRcvd [protected]

Count of the number of control frames received

PAtomicInteger IAX2Processor::controlFramesSent [protected]

Count of the number of control frames sent

SafeStrings IAX2Processor::dtmfNetworkList [protected]

Array of received dtmf characters (These have come from the network)

SafeString IAX2Processor::dtmfText [protected]

Contains the concatanation of the dtmf we have to send to the remote endpoint. This string is sent a character at a time, one DTMF frame per character.

IAX2Encryption IAX2Processor::encryption [protected]

Status of encryption for this processor - by default, no encrytpion

IAX2EndPoint& IAX2Processor::endpoint [protected]

Reference to the global variable of this program

BOOL IAX2Processor::endThread [protected]

Flag to indicate, end this thread

BOOL IAX2Processor::firstMediaFrame [protected]

Flag to indicate if we are waiting on the first full frame of media (voice or video). The arrival of this frame causes the IAX2Connection::OnEstablished method to be called.

IAX2FrameList IAX2Processor::frameList [protected]

Array of frames read from the Receiver for this call

SafeStrings IAX2Processor::hangList [protected]

Array of requests to end this current call

IAX2IeData IAX2Processor::ieData [protected]

Hold each of the possible values from an Ie class

PINDEX IAX2Processor::lastFullFrameTimeStamp [protected]

This is the timestamp of the last received full frame, which is used to reconstruct the timestamp of received MiniFrames

PINDEX IAX2Processor::lastSentAudioFrameTime [protected]

Time sent the last frame of audio

IAX2WaitingForAck IAX2Processor::nextTask [protected]

Action to perform on receiving an ACK packet (which is required during call setup phase for receiver

PTimer IAX2Processor::noResponseTimer [protected]

The timer which is used to test for no reply to our outgoing call setup messages

IAX2Remote IAX2Processor::remote [protected]

Details on the address of the remote endpoint, and source/dest call numbers

SafeString IAX2Processor::remotePhoneNumber [protected]

Phone number of the remote endpoint

unsigned int IAX2Processor::selectedCodec [protected]

Bitmask of FullFrameVoice::AudioSc values to specify which codec is used

IAX2SequenceNumbers IAX2Processor::sequence [protected]

Details on the in/out sequence numbers

IAX2FrameList IAX2Processor::soundReadFromEthernet [protected]

Array of sound packets which has been read from the ethernet, and is to be sent to the audio device

IAX2SoundList IAX2Processor::soundWaitingForTransmission [protected]

Array of sound packets read from the audio device, and is about to be transmitted to the remote node

BOOL IAX2Processor::specialPackets [protected]

Flag to indicate we are handing the special packets, which are sent to the endpoint,and not related to any particular call.

BOOL IAX2Processor::statusCheckOtherEnd [protected]

Flag to indicate we need to do a status query on the other end. this means, send a PING and a LAGRQ packet, which happens every 10 seconds. The timer, timeStatusCheck controls when this happens

PTimer IAX2Processor::statusCheckTimer [protected]

The timer which is used to do the status check

SafeStrings IAX2Processor::textList [protected]

Array of the text we have to send to the remote endpoint

PAtomicInteger IAX2Processor::videoFramesRcvd [protected]

Count of the number of video frames received

PAtomicInteger IAX2Processor::videoFramesSent [protected]

Count of the number of video frames sent


The documentation for this class was generated from the following file:
Generated on Mon Sep 25 16:21:46 2006 for OPAL by  doxygen 1.4.7