#include <processor.h>
Public Types | |
enum | ResponseToAck { RingingAcked = 0, AcceptAcked = 1, AuthRepAcked = 2, AnswerAcked = 3 } |
Public Member Functions | |
IAX2WaitingForAck () | |
void | Assign (IAX2FullFrame *f, ResponseToAck _response) |
PBoolean | MatchingAckPacket (IAX2FullFrame *f) |
ResponseToAck | GetResponse () |
PString | GetResponseAsString () const |
virtual void | PrintOn (ostream &strm) const |
void | ZeroValues () |
Essentially, this class provides us a means of "knowing" the other end has acted on the sent full frame. The action to do could be as simple as saying, "other end has accepted our Accept packet"
It also helps us to move on in the call setup phase. On receipt of one particular ack packet, we send the next packet in the call process. Thus, on receipt of a ack for a timestamp of X and oseqno of Y, we send this packet.
The outgoing IAX2FullFrame has an inSeqNo, which must match the outSeqNo of the received ack frame.
The sub classes if appropriate will need to request a call number from the endpoint. This class will automatically check if the source call number has been set and if so then will release that number from the endpoint.
The action to do on receiving the specified ack
IAX2WaitingForAck::IAX2WaitingForAck | ( | ) |
Construct this response message with values that cannot match an incoming ack packet
void IAX2WaitingForAck::Assign | ( | IAX2FullFrame * | f, | |
ResponseToAck | _response | |||
) |
Assign this response to wait for the specified coords
PBoolean IAX2WaitingForAck::MatchingAckPacket | ( | IAX2FullFrame * | f | ) |
Return true if the supplied ack frame matches the internal coordinates
ResponseToAck IAX2WaitingForAck::GetResponse | ( | ) | [inline] |
Report the response to carry out
PString IAX2WaitingForAck::GetResponseAsString | ( | ) | const |
Report the internal response code as a string
virtual void IAX2WaitingForAck::PrintOn | ( | ostream & | strm | ) | const [virtual] |
Pretty print this response to the designated stream
void IAX2WaitingForAck::ZeroValues | ( | ) |
Initialise this to no response, and never to match