#include <processor.h>
|
|
A defined value which is the maximum time we will wait for an answer to our packets |
|
Construct this class |
|
Destructor |
|
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 |
|
Cause this thread to come to life, and process events that are pending at IAX2Connection |
|
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();. |
|
Assign a pointer to the connection class to process, and starts thread |
|
Do the md5/rsa authentication. Return True if successful. Has the side effect of appending the appropriate Ie class to the "reply" parameter.
|
|
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 |
|
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. |
|
If the incoming frame has Information Elements defining remote capability, define the list of remote capabilities |
|
Activate this thread to process all the lists of queued frames |
|
From the IAX2Connection class. CAlling this sends a hangup frame |
|
Make a call to a remote node |
|
Code to send a PING and a LAGRQ packet to the remote endpoint |
|
Get the call start tick |
|
Return the string that identifies this IAX2Connection instance |
|
Get the iax2 encryption info |
|
Access the endpoint class that launched this processor |
|
Get information on IAX2Remote class (remote node address & port + source & dest call number.) |
|
Get the bit pattern of the selected codec |
|
Get the sequence number info (inSeqNo and outSeqNo) |
|
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.. |
|
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. |
|
Increment the count of audio frames received |
|
Increment the count of audio frames sent |
|
Increment the count of full frames received |
|
Increment the count of full frames sent |
|
Handle a received IAX frame. This may be a mini frame or full frame |
|
Increment the count of video frames received |
|
Increment the count of video frames sent |
|
Get the current value of the call status flag callAccepted |
|
Get the current value of the call status flag callAnswered |
|
Get the current value of the call status flag callAuthorised |
|
See if any of the flag bits are on, which indicate this call is actually active |
|
Get marker to indicate that some packets have flowed etc for this call |
|
Get the current value of the call status flag callRegistered |
|
Get the current value of the call status flag callRinging |
|
Get marker to indicate that we are waiting on the ack for the iaxcommandringing packet we sent |
|
Report the status of the flag callEndingNow, which indicates if the call is terminating under iax2 control |
|
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). |
|
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 |
|
The worker method of this thread. In here, all incoming frames (for this call) are handled. |
|
Return TRUE if the remote info in the frame matches the remote info in this connection |
|
Return TRUE if the arg matches the source call number for this connection |
|
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 |
|
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 |
|
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 |
|
A method to cause some of the values in this class to be formatted into a printable stream |
|
Process a FullFrameProtocol class, where the sub Class value is Allow this call to procee |
|
Process a FullFrameProtocol class, where the sub Class value is Acknowledge a Reliably sent full frame |
|
Process a FullFrameProtocol class, where the sub Class value is A reply, that contains authenticatio |
|
Process a FullFrameProtocol class, where the sub Class value is Ask remote end to supply authenticatio |
|
Process a FullFrameProtocol class, where the sub Class value is Request a dial on channel brought up TBD |
|
Process a FullFrameProtocol class, where the sub Class value is Request status of a dialplan entry |
|
Process a FullFrameProtocol class, where the sub Class value is Request status of a dialplan entry |
|
Process a FullFrameProtocol class, where the sub Class value is Firmware Data |
|
Process a FullFrameProtocol class, where the sub Class value is Download firmware |
|
Process a FullFrameProtocol class, where the sub Class value is Request to terminate this call |
|
Process a FullFrameProtocol class, where the sub Class value is Destroy this call immediatly |
|
Process a FullFrameProtocol class, where the sub Class value is Reply to cmdLagrq, which tells us the round trip time |
|
Process a FullFrameProtocol class, where the sub Class value is Initial message, used to measure the round trip time |
|
Process a FullFrameProtocol class, where the sub Class value is Stand-alone message waiting indicator |
|
Process a FullFrameProtocol class, where the sub Class value is Create a new call |
|
Process a FullFrameProtocol class, where the sub Class value is Paging description |
|
Process a FullFrameProtocol class, where the sub Class value is Ping request, |
|
Process a FullFrameProtocol class, where the sub Class value is Like ping, but does not require an open connection |
|
Process a FullFrameProtocol class, where the sub Class value is reply to a Ping |
|
Process a FullFrameProtocol class, where the sub Class value is Provision device |
|
Process a FullFrameProtocol class, where the sub Class value is Stop audio/video transmission |
|
Process a FullFrameProtocol class, where the sub Class value is Registration accepted |
|
Process a FullFrameProtocol class, where the sub Class value is Registration authentication required |
|
Process a FullFrameProtocol class, where the sub Class value is Registration rejected |
|
Process a FullFrameProtocol class, where the sub Class value is Force release of registration |
|
Process a FullFrameProtocol class, where the sub Class value is Registration request |
|
Process a FullFrameProtocol class, where the sub Class value is Refuse to accept this call. May happen if authentication faile |
|
Process a FullFrameProtocol class, where the sub Class value is Request remote transfer |
|
Process a FullFrameProtocol class, where the sub Class value is Transfer Accepted |
|
Process a FullFrameProtocol class, where the sub Class value is Transfer Connect |
|
Process a FullFrameProtocol class, where the sub Class value is Transfer ready |
|
Process a FullFrameProtocol class, where the sub Class value is Transfer reject |
|
Process a FullFrameProtocol class, where the sub Class value is Transfer release |
|
Process a FullFrameProtocol class, where the sub Class value is Transfer Request |
|
Process a FullFrameProtocol class, where the sub Class value is Resume audio/video transmission |
|
Process a FullFrameProtocol class, where the sub Class value is Unsupported message received |
|
Process a FullFrameProtocol class, where the sub Class value is If we receive voice before valid first voice frame, send this |
|
Process the audio data portions of the Frame argument, which may be a MiniFrame or FullFrame |
|
Process the video data portions of the Frame argument, which may be a MiniFrame or FullFrame |
|
Go through the three lists for incoming data (ethernet/sound/UI commands. |
|
Internal method to process an incoming network frame of type IAX2FullFrameCng |
|
Internal method to process an incoming network frame of type IAX2FullFrameHtml |
|
Internal method to process an incoming network frame of type IAX2FullFrameImage |
|
Internal method to process an incoming network frame of type IAX2FullFrameText |
|
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. |
|
Internal method to process an incoming network frame of type IAX2FullFrameNull |
|
Internal method to process an incoming network frame of type IAX2FullFrameSessionControl |
|
Internal method to process an incoming network frame of type IAX2FullFrameVideo |
|
Internal method to process an incoming network frame of type IAX2FullFrameVoice |
|
Internal method to process an incoming network frame of type IAX2FullFrameDtmf |
|
Internal method to process an incoming network frame of type IAX2FullFrame |
|
Internal method to process an incoming network frame of type IAX2MiniFrame |
|
Internal method to process an incoming network frame of type IAX2Frame |
|
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. |
|
Handle a sound packet received from the sound device. Now onsend this to the remote endpoint. |
|
A callback which is used to indicate that the remote party has sent us a hook flash message (i.e, their hook was flashed) |
|
Call back from the IAX2Connection class |
|
A callback which is used to indicate the remote party has accepted our call. Media can flow now |
|
A callback which is used to indicate that the remote party has sent us a message stating they are busy. |
|
we have received a message that the remote node is ringing. Now wait for the remote user to answer. |
|
Test the value supplied in the format Ie is compatible. |
|
Invoked by the User interface, which causes the statistics (count of in/out packets) to be printed |
|
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. |
|
Transmit an iax protocol frame with subclass type ack immediately to remote endpoint |
|
Advise the other end that we have picked up the phone |
|
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. |
|
Cause the dtmf full frames to go out for this dtmf character |
|
Cause a sound frame (which is full or mini) to be sent. The data in the array is already compressed. |
|
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. |
|
Cause the text full frames to go out for this text message |
|
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.
|
|
Mark call status Accepted (argument determines flag status) |
|
Mark call status Answered (argument determines flag status) |
|
Mark call status Authorised (argument determines flag status) |
|
Mark call status as having received a new packet |
|
Mark call status Registered (argument determines flag status) |
|
Mark call status Ringing (argument determines flag status) |
|
Mark call status as having sent a iaxcmdRinging packet |
|
Mark call status as terminated (is processing IAX2 hangup packets etc ) |
|
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 |
|
Indicate to remote endpoint we are connected. |
|
Advise the procesor that this call is totally setup, and answer accordingly
|
|
Set the flag to indicate if we are handling specialPackets (those packets which are not sent to any particular call) |
|
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. |
|
Set the acceptable time (in milliseconds) to wait before giving up on this call |
|
Set up the acceptable time (in milliseconds) to wait between doing status checks.
|
|
Stop the timer - we have received a reply |
|
Cause this thread to die immediately |
|
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. |
|
FullFrameProtocol class needs to have the IE's correctly appended prior to transmission |
|
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.
|
|
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. |
|
Flag which is used to activate this thread, so all pending tasks/packets are processed |
|
Flag to indicate we have to answer this call (i.e. send a FullFrameSessionControl::answer packet). |
|
Flag to indicate we are ready for audio to flow |
|
The number of bytes from compressing one frame of audio |
|
The time period, in ms, of each audio frame. It is used when determining the appropriate timestamp to go on a packet. |
|
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. |
|
Count of the number of sound frames received |
|
Count of the number of sound frames sent |
|
Array of remote node we have to make a call to |
|
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. |
|
Contains the bits stating what is happening in the call |
|
The call token, which uniquely identifies this IAX2Processor, and the associated call |
|
The connection class we are charged with running. |
|
Count of the number of control frames received |
|
Count of the number of control frames sent |
|
Array of received dtmf characters (These have come from the network) |
|
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. |
|
Status of encryption for this processor - by default, no encrytpion |
|
Reference to the global variable of this program |
|
Flag to indicate, end this thread |
|
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. |
|
Array of frames read from the Receiver for this call |
|
Array of requests to end this current call |
|
Hold each of the possible values from an Ie class |
|
This is the timestamp of the last received full frame, which is used to reconstruct the timestamp of received MiniFrames |
|
Time sent the last frame of audio |
|
Action to perform on receiving an ACK packet (which is required during call setup phase for receiver |
|
The timer which is used to test for no reply to our outgoing call setup messages |
|
Details on the address of the remote endpoint, and source/dest call numbers |
|
Phone number of the remote endpoint |
|
Bitmask of FullFrameVoice::AudioSc values to specify which codec is used |
|
Details on the in/out sequence numbers |
|
Array of sound packets which has been read from the ethernet, and is to be sent to the audio device |
|
Array of sound packets read from the audio device, and is about to be transmitted to the remote node |
|
Flag to indicate we are handing the special packets, which are sent to the endpoint,and not related to any particular call. |
|
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 |
|
The timer which is used to do the status check |
|
Array of the text we have to send to the remote endpoint |
|
Count of the number of video frames received |
|
Count of the number of video frames sent |