OPAL Version 3.10.4

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
IAX2RegProcessor Class Reference

`#include <regprocessor.h>`

Inheritance diagram for IAX2RegProcessor:

## Public Member Functions

| IAX2RegProcessor (IAX2EndPoint &ep, const PString &host, const PString &username, const PString &password, PINDEX inRegistrationRefreshTime)
virtual | ~IAX2RegProcessor ()
void | Unregister ()
PString | GetHost () const
PString | GetUserName () const
PString | GetPassword () const
Public Member Functions inherited from IAX2Processor
| IAX2Processor (IAX2EndPoint &ep)
virtual | ~IAX2Processor ()
IAX2SequenceNumbers & | GetSequenceInfo ()
IAX2Encryption & | GetEncryptionInfo ()
void | IncomingEthernetFrame (IAX2Frame *frame)
IAX2EndPoint & | GetEndPoint ()
void | SetCallToken (const PString &newToken)
PString | GetCallToken ()
IAX2Remote & | GetRemoteInfo ()
const PTimeInterval & | GetCallStartTick ()
void | Main ()
PBoolean | IsStatusQueryEthernetFrame (IAX2Frame *frame)
void | SetSpecialPackets (PBoolean newValue)
void | Terminate ()
void | Activate ()
void | ReportLists (PString &answer)

## Protected Types

enum | RegistrationState { registrationStart = 1, registrationHappening, registrationUnregisterStart, registrationUnregistering, registrationUnregistered, registrationWait }
Protected Types inherited from IAX2Processor
enum | DefinedNoResponseTimePeriod { NoResponseTimePeriod = 5000 }

## Protected Member Functions

void | OnDoRegistration (PTimer &, INT)
void | ProcessIaxCmdRegAuth (IAX2FullFrameProtocol *src)
void | ProcessIaxCmdRegAck (IAX2FullFrameProtocol *src)
void | ProcessIaxCmdRegRej (IAX2FullFrameProtocol *src)
void | ProcessIaxCmdUnRegAuth (IAX2FullFrameProtocol *src)
void | ProcessIaxCmdUnRegAck (IAX2FullFrameProtocol *src)
void | ProcessIaxCmdUnRegRej (IAX2FullFrameProtocol *src)
void | OnNoResponseTimeout ()
void | PrintOn (ostream &strm) const
virtual void | ProcessLists ()
virtual void | ProcessFullFrame (IAX2FullFrame &fullFrame)
virtual void | ProcessNetworkFrame (IAX2MiniFrame *src)
virtual PBoolean | ProcessNetworkFrame (IAX2FullFrameProtocol *src)
void | ResetCall ()
virtual PBoolean | IncomingMessageOutOfOrder (IAX2FullFrame *)
Protected Member Functions inherited from IAX2Processor
void | StartNoResponseTimer (PINDEX msToWait=60000)
void | StopNoResponseTimer ()
void | CleanPendingLists ()
PBoolean | IsHandlingSpecialPackets ()
virtual void | ProcessIaxCmdLagRq (IAX2FullFrameProtocol *src)
virtual void | ProcessIaxCmdLagRp (IAX2FullFrameProtocol *src)
virtual void | ProcessIaxCmdVnak (IAX2FullFrameProtocol *src)
virtual void | ProcessIaxCmdPing (IAX2FullFrameProtocol *src)
virtual void | ProcessIaxCmdPong (IAX2FullFrameProtocol *src)
PBoolean | ProcessOneIncomingEthernetFrame ()
void | IncControlFramesSent ()
void | IncControlFramesRcvd ()
void | TransmitFrameToRemoteEndpoint (IAX2Frame *src)
void | TransmitFrameToRemoteEndpoint (IAX2FullFrame *src, IAX2WaitingForAck::ResponseToAck response)
void | TransmitFrameNow (IAX2Frame *src)
void | TransmitFrameToRemoteEndpoint (IAX2FullFrameProtocol *src)
PBoolean | Authenticate (IAX2FullFrameProtocol *reply, PString &password)
void | SendAckFrame (IAX2FullFrame *inReplyTo)
void | SendVnakFrame (IAX2FullFrame *inReplyTo)
void | SendUnsupportedFrame (IAX2FullFrame *inReplyTo)

## Protected Attributes

PString | host
PString | userName
PString | password
INT | registrationRefreshTime
RegistrationState | registrationState
PMutex | stateMutex
PTimer | registrationTimer
PRandom | regRandom
Protected Attributes inherited from IAX2Processor
IAX2EndPoint & | endpoint
PTimeInterval | callStartTick
IAX2Remote | remote
PTimer | noResponseTimer
IAX2WaitingForAck | nextTask
PSyncPoint | activate
PBoolean | endThread
IAX2Encryption | encryption
IAX2SequenceNumbers | sequence
IAX2ActiveFrameList | frameList
SafeString | callToken
PBoolean | specialPackets
PAtomicInteger | controlFramesSent
PAtomicInteger | controlFramesRcvd
IAX2IeData | ieData
DWORD | currentSoundTimeStamp

## Member Enumeration Documentation

enum IAX2RegProcessor::RegistrationState

protected

bit mask of the different flags to indicate call status

Enumerator:

  registrationStart | Intial state of registration
  registrationHappening | The registration process is happening
  registrationUnregisterStart | The unregistration process is about to begin
  registrationUnregistering | The unregistration process is happening
  registrationUnregistered | The unregistration process is complete and is waiting for termination
  registrationWait | Waiting for the refresh peroid

## Constructor & Destructor Documentation

IAX2RegProcessor::IAX2RegProcessor | ( | IAX2EndPoint & | ep,
|  | const PString & | host,
|  | const PString & | username,
|  | const PString & | password,
|  | PINDEX | inRegistrationRefreshTime
| ) |  |

Construct this class

virtual IAX2RegProcessor::~IAX2RegProcessor | ( |  | ) |

virtual

Destructor

## Member Function Documentation

PString IAX2RegProcessor::GetHost | ( |  | ) | const

inline

References host.

PString IAX2RegProcessor::GetPassword | ( |  | ) | const

inline

PString IAX2RegProcessor::GetUserName | ( |  | ) | const

inline

References userName.

virtual PBoolean IAX2RegProcessor::IncomingMessageOutOfOrder | ( | IAX2FullFrame * |  | ) |

inline protected virtual

Test the sequence number of the incoming frame. This is only valid for handling a call. If the message is outof order, the supplied fullframe is deleted.

Returns:
  true if the frame is out of order, which deletes the supplied frame
  false, and does not destroy the supplied frame

Implements IAX2Processor.

void IAX2RegProcessor::OnDoRegistration | ( | PTimer & | ,
|  | INT |
| ) |  |

protected

A pwlib callback function to start the registration process again

void IAX2RegProcessor::OnNoResponseTimeout | ( |  | ) |

protected virtual

This callback is called when a packet fails to get an Acknowledgment

Implements IAX2Processor.

void IAX2RegProcessor::PrintOn | ( | ostream & | strm | ) | const

protected virtual

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

Implements IAX2Processor.

virtual void IAX2RegProcessor::ProcessFullFrame | ( | IAX2FullFrame & | fullFrame | ) |

protected virtual

Processes a full frame, and sends it off to the relevant processor. This RegistrationProcessor instance worries about those types common to registration, so is concerned about cmdRegAuth, cmdRegAck etc.

Implements IAX2Processor.

void IAX2RegProcessor::ProcessIaxCmdRegAck | ( | IAX2FullFrameProtocol * | src | ) |

protected

Process an acknowledgement of a sucessful registration

void IAX2RegProcessor::ProcessIaxCmdRegAuth | ( | IAX2FullFrameProtocol * | src | ) |

protected

Process an authentication request when registering

void IAX2RegProcessor::ProcessIaxCmdRegRej | ( | IAX2FullFrameProtocol * | src | ) |

protected

Process a registration rejection

void IAX2RegProcessor::ProcessIaxCmdUnRegAck | ( | IAX2FullFrameProtocol * | src | ) |

protected

Process an acknowledgement of a registration release

void IAX2RegProcessor::ProcessIaxCmdUnRegAuth | ( | IAX2FullFrameProtocol * | src | ) |

protected

Process an authentication request when registering doing a registration release

void IAX2RegProcessor::ProcessIaxCmdUnRegRej | ( | IAX2FullFrameProtocol * | src | ) |

protected

Process a registration release rejection

virtual void IAX2RegProcessor::ProcessLists | ( |  | ) |

protected virtual

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

Implements IAX2Processor.

virtual void IAX2RegProcessor::ProcessNetworkFrame | ( | IAX2MiniFrame * | src | ) |

protected virtual

Handles a mini frame - so copes with media.

Implements IAX2Processor.

virtual PBoolean IAX2RegProcessor::ProcessNetworkFrame | ( | IAX2FullFrameProtocol * | src | ) |

protected virtual

Processes a protocol full frame, well, those components relating to registration.

Reimplemented from IAX2Processor.

void IAX2RegProcessor::ResetCall | ( |  | ) |

protected

Reset the call, ie: get a new call source number, put the sequence numbers to 0 and reset the timer. This solves having to create a new thread for every seperate call.

void IAX2RegProcessor::Unregister | ( |  | ) |

Unregister from the remote iax2 server. This method is synchronous. and could take until the Timeout peroid to return. This will also shutdown the main thread.

## Field Documentation

PString IAX2RegProcessor::host

protected

Referenced by GetHost().

PString IAX2RegProcessor::password

protected

INT IAX2RegProcessor::registrationRefreshTime

protected

RegistrationState IAX2RegProcessor::registrationState

protected

The current state of the registration

PTimer IAX2RegProcessor::registrationTimer

protected

The timer which is used to send a registration message

PRandom IAX2RegProcessor::regRandom

protected

A class that generates random values used for varying the registration timer

PMutex IAX2RegProcessor::stateMutex

protected

A mutex to protect the registrationState variable and the flow of the RegProcessor.

PString IAX2RegProcessor::userName

protected

Referenced by GetUserName().

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

- regprocessor.h