OPAL  Version 3.18.8
OpalManager Class Reference

#include <manager.h>

Inheritance diagram for OpalManager:
Collaboration diagram for OpalManager:

Data Structures

class  CallDict
 
class  RouteEntry
 

Public Types

typedef std::map
< OpalMediaType,
PIPSocket::QoS > 
MediaQoSMap
 

Public Member Functions

void GarbageCollection ()
 
void QueueDecoupledEvent (PSafeWork *work, const char *group=NULL)
 
Construction
 OpalManager ()
 
 ~OpalManager ()
 
Endpoint management
void AttachEndPoint (OpalEndPoint *endpoint, const PString &prefix=PString::Empty())
 
void DetachEndPoint (const PString &prefix)
 
void DetachEndPoint (OpalEndPoint *endpoint)
 
OpalEndPointFindEndPoint (const PString &prefix) const
 
template<class T >
T * FindEndPointAs (const PString &prefix) const
 
PList< OpalEndPointGetEndPoints () const
 
PStringList GetPrefixNames (const OpalEndPoint *endpoint=NULL) const
 
virtual PStringList GetNetworkURIs (const PString &name) const
 
void ShutDownEndpoints ()
 
Call management
virtual PSafePtr< OpalCallSetUpCall (const PString &partyA, const PString &partyB, void *userData=NULL, unsigned options=0, OpalConnection::StringOptions *stringOptions=NULL)
 
virtual PBoolean SetUpCall (const PString &partyA, const PString &partyB, PString &token, void *userData=NULL, unsigned options=0, OpalConnection::StringOptions *stringOptions=NULL)
 
virtual bool SetUpConference (OpalCall &call, const char *mixerURI=NULL, const char *localURI=NULL)
 
virtual PBoolean HasCall (const PString &token)
 
PINDEX GetCallCount () const
 
PArray< PString > GetAllCalls () const
 
PSafePtr< OpalCallFindCallWithLock (const PString &token, PSafetyMode mode=PSafeReadWrite) const
 
virtual bool OnLocalIncomingCall (OpalLocalConnection &connection)
 
virtual bool OnLocalOutgoingCall (const OpalLocalConnection &connection)
 
virtual void OnEstablishedCall (OpalCall &call)
 
virtual PBoolean IsCallEstablished (const PString &token)
 
virtual PBoolean ClearCall (const PString &token, OpalConnection::CallEndReason reason=OpalConnection::EndedByLocalUser, PSyncPoint *sync=NULL)
 
virtual PBoolean ClearCallSynchronous (const PString &token, OpalConnection::CallEndReason reason=OpalConnection::EndedByLocalUser)
 
virtual void ClearAllCalls (OpalConnection::CallEndReason reason=OpalConnection::EndedByLocalUser, PBoolean wait=true)
 
virtual void OnClearedCall (OpalCall &call)
 
virtual OpalCallCreateCall (void *userData)
 
OpalCallInternalCreateCall (void *userData=NULL)
 
virtual void DestroyCall (OpalCall *call)
 
virtual PString GetNextToken (char prefix)
 
Connection internal routing
 PARRAY (RouteTable, RouteEntry)
 
virtual PBoolean AddRouteEntry (const PString &spec)
 
PBoolean SetRouteTable (const PStringArray &specs)
 
void SetRouteTable (const RouteTable &table)
 
const RouteTable & GetRouteTable () const
 
virtual PString ApplyRouteTable (const PString &source, const PString &destination, PINDEX &entry)
 
virtual bool OnRouteConnection (PStringSet &routesTried, const PString &a_party, const PString &b_party, OpalCall &call, unsigned options, OpalConnection::StringOptions *stringOptions)
 
Connection management
virtual PSafePtr< OpalConnectionMakeConnection (OpalCall &call, const PString &party, void *userData=NULL, unsigned int options=0, OpalConnection::StringOptions *stringOptions=NULL)
 
virtual void OnNewConnection (OpalConnection &connection)
 
virtual PBoolean OnIncomingConnection (OpalConnection &connection, unsigned options, OpalConnection::StringOptions *stringOptions)
 
virtual void OnApplyStringOptions (OpalConnection &connection, OpalConnection::StringOptions &stringOptions)
 
virtual void OnProceeding (OpalConnection &connection)
 
virtual void OnAlerting (OpalConnection &connection, bool withMedia)
 
virtual void OnAlerting (OpalConnection &connection)
 
virtual
OpalConnection::AnswerCallResponse 
OnAnswerCall (OpalConnection &connection, const PString &caller)
 
virtual void OnConnected (OpalConnection &connection)
 
virtual void OnEstablished (OpalConnection &connection)
 
virtual void OnReleased (OpalConnection &connection)
 
virtual void OnHold (OpalConnection &connection, bool fromRemote, bool onHold)
 
virtual void OnHold (OpalConnection &connection)
 
virtual PBoolean OnForwarded (OpalConnection &connection, const PString &remoteParty)
 
virtual bool OnTransferNotify (OpalConnection &connection, const PStringToString &info)
 
User indications
virtual void OnUserInputString (OpalConnection &connection, const PString &value)
 
virtual void OnUserInputTone (OpalConnection &connection, char tone, int duration)
 
virtual PString ReadUserInput (OpalConnection &connection, const char *terminators="YX#\r\n", unsigned lastDigitTimeout=4, unsigned firstDigitTimeout=30)
 
Call recording
virtual PBoolean StartRecording (const PString &callToken, const PFilePath &filename, const OpalRecordManager::Options &options=false)
 
virtual bool IsRecording (const PString &callToken)
 
virtual bool StopRecording (const PString &callToken)
 
Instant Messaging management
virtual void OnConversation (const OpalIMContext::ConversationInfo &info)
 
virtual PBoolean Message (OpalIM &message)
 Send an Instant Message to a remote party. Backward compatible to old API. More...
 
virtual PBoolean Message (const PString &to, const PString &body)
 Send an Instant Message to a remote party. Backward compatible to old API. More...
 
virtual PBoolean Message (const PURL &to, const PString &type, const PString &body, PURL &from, PString &conversationId)
 
virtual void OnMessageReceived (const OpalIM &message)
 
virtual void OnMessageDisposition (const OpalIMContext::DispositionInfo &info)
 
virtual void OnCompositionIndication (const OpalIMContext::CompositionInfo &info)
 
Networking and NAT Management
virtual PBoolean IsLocalAddress (const PIPSocket::Address &remoteAddress) const
 
virtual PBoolean IsRTPNATEnabled (OpalConnection &connection, const PIPSocket::Address &localAddr, const PIPSocket::Address &peerAddr, const PIPSocket::Address &signalAddr, PBoolean incoming)
 
virtual PBoolean TranslateIPAddress (PIPSocket::Address &localAddress, const PIPSocket::Address &remoteAddress)
 
WORD GetTCPPortBase () const
 
WORD GetTCPPortMax () const
 
void SetTCPPorts (unsigned tcpBase, unsigned tcpMax)
 
PIPSocket::PortRange & GetTCPPortRange ()
 
const PIPSocket::PortRange & GetTCPPortRange () const
 
WORD GetUDPPortBase () const
 
WORD GetUDPPortMax () const
 
void SetUDPPorts (unsigned udpBase, unsigned udpMax)
 
PIPSocket::PortRange & GetUDPPortRange ()
 
const PIPSocket::PortRange & GetUDPPortRange () const
 
WORD GetRtpIpPortBase () const
 
WORD GetRtpIpPortMax () const
 
void SetRtpIpPorts (unsigned udpBase, unsigned udpMax)
 
PIPSocket::PortRange & GetRtpIpPortRange ()
 
const PIPSocket::PortRange & GetRtpIpPortRange () const
 
BYTE GetMediaTypeOfService () const
 
void SetMediaTypeOfService (unsigned tos)
 
BYTE GetMediaTypeOfService (const OpalMediaType &type) const
 
void SetMediaTypeOfService (const OpalMediaType &type, unsigned tos)
 
const PIPSocket::QoS & GetMediaQoS (const OpalMediaType &type) const
 
void SetMediaQoS (const OpalMediaType &type, const PIPSocket::QoS &qos)
 
PINDEX GetMaxRtpPayloadSize () const
 
void SetMaxRtpPayloadSize (PINDEX size, bool mtu=false)
 
PINDEX GetMaxRtpPacketSize () const
 
void SetMaxRtpPacketSize (PINDEX size)
 
Member variable access
const OpalProductInfoGetProductInfo () const
 
void SetProductInfo (const OpalProductInfo &info, bool updateAll=true)
 
const PString & GetDefaultUserName () const
 
void SetDefaultUserName (const PString &name, bool updateAll=true)
 
const PString & GetDefaultDisplayName () const
 
void SetDefaultDisplayName (const PString &name, bool updateAll=true)
 
void SetDefaultConnectionOptions (const OpalConnection::StringOptions &stringOptions)
 
bool CanAutoStartReceiveVideo () const
 
void SetAutoStartReceiveVideo (bool can)
 
bool CanAutoStartTransmitVideo () const
 
void SetAutoStartTransmitVideo (bool can)
 
const OpalJitterBuffer::ParamsGetJitterParameters () const
 
void SetJitterParameters (const OpalJitterBuffer::Params &params)
 
unsigned GetMinAudioJitterDelay () const
 
unsigned GetMaxAudioJitterDelay () const
 
void SetAudioJitterDelay (unsigned minDelay, unsigned maxDelay)
 
const PStringArray & GetMediaFormatOrder () const
 
void SetMediaFormatOrder (const PStringArray &order)
 
const PStringArray & GetMediaFormatMask () const
 
void SetMediaFormatMask (const PStringArray &mask)
 
virtual void SetSilenceDetectParams (const OpalSilenceDetector::Params &params)
 
const OpalSilenceDetector::ParamsGetSilenceDetectParams () const
 
virtual bool SetVideoInputDevice (const PVideoDevice::OpenArgs &deviceArgs, OpalVideoFormat::ContentRole role=OpalVideoFormat::eNoRole)
 
const PVideoDevice::OpenArgs & GetVideoInputDevice (OpalVideoFormat::ContentRole role=OpalVideoFormat::eNoRole) const
 
virtual PBoolean SetVideoPreviewDevice (const PVideoDevice::OpenArgs &deviceArgs, OpalVideoFormat::ContentRole role=OpalVideoFormat::eNoRole)
 
const PVideoDevice::OpenArgs & GetVideoPreviewDevice (OpalVideoFormat::ContentRole role=OpalVideoFormat::eNoRole) const
 
virtual PBoolean SetVideoOutputDevice (const PVideoDevice::OpenArgs &deviceArgs, OpalVideoFormat::ContentRole role=OpalVideoFormat::eNoRole)
 
const PVideoDevice::OpenArgs & GetVideoOutputDevice (OpalVideoFormat::ContentRole role=OpalVideoFormat::eNoRole) const
 
PBoolean DetectInBandDTMFDisabled () const
 
void DisableDetectInBandDTMF (PBoolean mode)
 
const PTimeInterval & GetNoMediaTimeout () const
 
void SetNoMediaTimeout (const PTimeInterval &newInterval)
 
const PTimeInterval & GetTxMediaTimeout () const
 
void SetTxMediaTimeout (const PTimeInterval &newInterval)
 
const PTimeInterval & GetSignalingTimeout () const
 
void SetSignalingTimeout (const PTimeInterval &newInterval)
 
const PTimeInterval & GetTransportIdleTime () const
 
void SetTransportIdleTime (const PTimeInterval &newInterval)
 
const PTimeInterval & GetNatKeepAliveTime () const
 
void SetNatKeepAliveTime (const PTimeInterval &newInterval)
 
const PTimeInterval & GetStaleReceiverTimeout () const
 
void SetStaleReceiverTimeout (const PTimeInterval &newInterval)
 
const PString & GetDefaultILSServer () const
 
void SetDefaultILSServer (const PString &server)
 

Protected Member Functions

 PDECLARE_MUTEX (m_routeMutex)
 
 PDECLARE_READ_WRITE_MUTEX (m_endpointsMutex)
 
 PDECLARE_MUTEX (m_clearingAllCallsMutex)
 
void InternalClearAllCalls (OpalConnection::CallEndReason reason, bool wait, bool first)
 
 PDECLARE_NOTIFIER (PThread, OpalManager, GarbageMain)
 
friend OpalCall::OpalCall (OpalManager &mgr)
 

Protected Attributes

OpalProductInfo m_productInfo
 
PString m_defaultUserName
 
PString m_defaultDisplayName
 
MediaQoSMap m_mediaQoS
 
OpalConnection::StringOptions m_defaultConnectionOptions
 
PINDEX m_rtpPayloadSizeMax
 
PINDEX m_rtpPacketSizeMax
 
OpalJitterBuffer::Params m_jitterParams
 
PStringArray m_mediaFormatOrder
 
PStringArray m_mediaFormatMask
 
bool m_disableDetectInBandDTMF
 
PTimeInterval m_noMediaTimeout
 
PTimeInterval m_txMediaTimeout
 
PTimeInterval m_signalingTimeout
 
PTimeInterval m_transportIdleTime
 
PTimeInterval m_natKeepAliveTime
 
PTimeInterval m_staleReceiverTimeout
 
PString m_ilsServer
 
OpalSilenceDetector::Params m_silenceDetectParams
 
PVideoDevice::OpenArgs m_videoInputDevice [OpalVideoFormat::NumContentRole]
 
PVideoDevice::OpenArgs m_videoPreviewDevice [OpalVideoFormat::NumContentRole]
 
PVideoDevice::OpenArgs m_videoOutputDevice [OpalVideoFormat::NumContentRole]
 
PIPSocket::PortRange m_tcpPorts
 
PIPSocket::PortRange m_udpPorts
 
PIPSocket::PortRange m_rtpIpPorts
 
RouteTable m_routeTable
 
PList< OpalEndPointm_endpointList
 
std::map< PString, OpalEndPoint * > m_endpointMap
 
atomic< unsigned > lastCallTokenID
 
OpalManager::CallDict m_activeCalls
 
atomic< PINDEX > m_clearingAllCallsCount
 
PSyncPoint m_allCallsCleared
 
PThread * m_garbageCollector
 
PSyncPoint m_garbageCollectExit
 
PTime m_garbageCollectChangeTime
 
PSafeThreadPool m_decoupledEventPool
 

Friends

void OpalCall::InternalOnClear ()
 

Media Streams management

virtual OpalMediaFormatList GetCommonMediaFormats (bool transportable, bool pcmAudio) const
 
virtual void AdjustMediaFormats (bool local, const OpalConnection &connection, OpalMediaFormatList &mediaFormats) const
 
 P_DECLARE_TRACED_ENUM (MediaTransferMode, MediaTransferBypass, MediaTransferForward, MediaTransferTranscode)
 How to handle media between two "network" connections. More...
 
virtual MediaTransferMode GetMediaTransferMode (const OpalConnection &provider, const OpalConnection &consumer, const OpalMediaType &mediaType) const
 
virtual bool GetMediaTransportAddresses (const OpalConnection &provider, const OpalConnection &consumer, unsigned sessionId, const OpalMediaType &mediaType, OpalTransportAddressArray &transports) const
 
virtual PBoolean OnOpenMediaStream (OpalConnection &connection, OpalMediaStream &stream)
 
virtual bool OnLocalRTP (OpalConnection &connection1, OpalConnection &connection2, unsigned sessionID, bool opened) const
 
bool SetMediaPassThrough (const PString &token1, const PString &token2, bool bypass, unsigned sessionID=0, bool network=true)
 
virtual void OnClosedMediaStream (const OpalMediaStream &stream)
 
virtual void OnFailedMediaStream (OpalConnection &connection, bool fromRemote, const PString &reason)
 
virtual PBoolean CreateVideoInputDevice (const OpalConnection &connection, const OpalMediaFormat &mediaFormat, PVideoInputDevice *&device, PBoolean &autoDelete)
 
virtual PBoolean CreateVideoOutputDevice (const OpalConnection &connection, const OpalMediaFormat &mediaFormat, PBoolean preview, PVideoOutputDevice *&device, PBoolean &autoDelete)
 
virtual bool CreateVideoInputDevice (const OpalConnection &connection, const PVideoDevice::OpenArgs &args, PVideoInputDevice *&device, PBoolean &autoDelete)
 
virtual bool CreateVideoOutputDevice (const OpalConnection &connection, const PVideoDevice::OpenArgs &args, PVideoOutputDevice *&device, PBoolean &autoDelete)
 
virtual OpalMediaPatchCreateMediaPatch (OpalMediaStream &source, PBoolean requiresPatchThread=true)
 
virtual void OnStartMediaPatch (OpalConnection &connection, OpalMediaPatch &patch)
 
virtual void OnStopMediaPatch (OpalConnection &connection, OpalMediaPatch &patch)
 
virtual bool OnMediaFailed (OpalConnection &connection, unsigned sessionId)
 
static bool SetMediaPassThrough (OpalConnection &connection1, OpalConnection &connection2, bool bypass, unsigned sessionID=0)
 

Other services

enum  MessageWaitingType {
  NoMessageWaiting, VoiceMessageWaiting, FaxMessageWaiting, PagerMessageWaiting,
  MultimediaMessageWaiting, TextMessageWaiting, NumMessageWaitingTypes
}
 Message waiting sub-types. More...
 
virtual void OnMWIReceived (const PString &party, MessageWaitingType type, const PString &extraInfo)
 
virtual bool GetConferenceStates (OpalConferenceStates &states, const PString &name=PString::Empty()) const
 
virtual void OnConferenceStatusChanged (OpalEndPoint &endpoint, const PString &uri, OpalConferenceState::ChangeType change)
 
virtual bool OnChangedPresentationRole (OpalConnection &connection, const PString &newChairURI, bool request)
 

Detailed Description

This class is the central manager for OPAL. The OpalManager embodies the root of the tree of objects that constitute an OPAL system. It contains all of the endpoints that make up the system. Other entities such as media streams etc are in turn contained in these objects. It is expected that an application would only ever have one instance of this class, and also descend from it to override call back functions.

The manager is the eventual destination for call back indications from various other objects. It is possible, for instance, to get an indication of a completed call by creating a descendant of the OpalCall and overriding the OnClearedCall() virtual. However, this could quite unwieldy for all of the possible classes, so the default behaviour is to call the equivalent function on the OpalManager. This allows most applications to only have to create a descendant of the OpalManager and override virtual functions there to get all the indications it needs.

Member Typedef Documentation

typedef std::map<OpalMediaType, PIPSocket::QoS> OpalManager::MediaQoSMap

Member Enumeration Documentation

Message waiting sub-types.

Enumerator
NoMessageWaiting 
VoiceMessageWaiting 
FaxMessageWaiting 
PagerMessageWaiting 
MultimediaMessageWaiting 
TextMessageWaiting 
NumMessageWaitingTypes 

Constructor & Destructor Documentation

OpalManager::OpalManager ( )

Create a new manager.

OpalManager::~OpalManager ( )

Destroy the manager. This will clear all calls, then delete all endpoints still attached to the manager.

Member Function Documentation

virtual PBoolean OpalManager::AddRouteEntry ( const PString &  spec)
virtual

Add a route entry to the route table.

The specification string is of the form:

      pattern '=' destination 

where:

 pattern      regular expression used to select route

 destination  destination for the call

The "pattern" string regex is compared against routing strings that are built as follows:

      a_party '\\t' b_party

where:

 a_party      name associated with a local connection i.e. "pots:vpb:1/2" or
              "h323:myname@myhost.com". 

 b_party      destination specified by the call, which may be a full URI
              or a simple digit string

Note that all "pattern" strings have an implied '^' at the beginning and a '$' at the end. This forces the "pattern" to match the entire source string. For convenience, the sub-expression ".*\\t" is inserted immediately after any ':' character if no '\t' is present.

Route entries are stored and searched in the route table in the order they are added.

The "destination" string is determines the endpoint used for the outbound leg of the route, when a match to the "pattern" is found. It can be a literal string, or can be constructed using various meta-strings that correspond to parts of the source. See below for a list of the available meta-strings

A "destination" starting with the string 'label:' causes the router to restart searching from the beginning of the route table using the new string as the "a_party". Thus, a route table with the folllwing entries:

       "label:speeddial=h323:10.0.1.1" 
       "pots:26=label:speeddial" 

will produce the same result as the single entry "pots:26=h323:10.0.1.1".

If the "destination" parameter is of the form @filename, then the file is read with each line consisting of a pattern=destination route specification.

"destination" strings without an equal sign or beginning with '#' are ignored.

Pattern Regex Examples:

1) A local H.323 endpoint with with name of "myname@myhost.com" that receives a call with a destination h323Id of "boris" would generate:

            "h323:myname@myhost.com\\tboris"

2) A local SIP endpoint with with name of "fred@nurk.com" that receives a call with a destination of "sip:fred@nurk.com" would generate:

            "sip:fred@nurk.com\\tsip:fred@nurk.com"

3) Using line 0 of a PhoneJACK handset with a serial # of 01AB3F4 to dial the digits 2, 6 and # would generate:

            "pots:Quicknet:01AB3F4:0\\t26"

Destination meta-strings:

The available meta-strings are:

<da> Replaced by the "b_party" string. For example "pc:.*\\t.* = sip:<da>" directs calls to the SIP protocol. In this case there is a special condition where if the original destination had a valid protocol, eg h323:fred.com, then the entire string is replaced not just the <da> part.

<db> Same as <da>, but without the special condtion.

<du> Copy the "user" part of the "b_party" string. This is essentially the component after the : and before the '@', or the whole "b_party" string if these are not present.

<!du> The rest of the "b_party" string after the <du> section. The protocol is still omitted. This is usually the '@' and onward. Note if there is already an '@' in the destination before the <!du> and what is abour to replace it also has an '@' then everything between the @ and the <!du> (inclusive) is deleted, then the substitution is made so a legal URL can result.

<dn> Copy all valid consecutive E.164 digits from the "b_party" so pots:0061298765@vpb:1/2 becomes sip:00612.nosp@m.9876.nosp@m.5@car.nosp@m.rier.nosp@m..com

<dnX> As above but skip X digits, eg <dn2> skips 2 digits, so pots:00612198765 becomes sip:61298.nosp@m.765@.nosp@m.carri.nosp@m.er.c.nosp@m.om

<!dn> The rest of the "b_party" after the <dn> or <dnX> sections.

<dn2ip> Translate digits separated by '*' characters to an IP address. e.g. 10*0*1*1 becomes 10.0.1.1, also 1234*10*0*1*1 becomes 1234@10.0.1.1 and 1234*10*0*1*1*1722 becomes 1234@10.0.1.1:1722.

<cu> Copy the "user" part of the "a_party" string. This is essentially the component after the : and before the '@', or the whole "b_party" string if these are not present.

Returns true if an entry was added.

Parameters
specSpecification string to add
virtual void OpalManager::AdjustMediaFormats ( bool  local,
const OpalConnection connection,
OpalMediaFormatList mediaFormats 
) const
virtual

Adjust media formats available on a connection. This is called by a connection after it has called OpalCall::GetMediaFormats() to get all media formats that it can use so that an application may remove or reorder the media formats before they are used to open media streams.

The default behaviour uses the mediaFormatOrder and mediaFormatMask member variables to adjust the mediaFormats list.

Parameters
localMedia formats a local ones to be presented to remote
connectionConnection that is about to use formats
mediaFormatsMedia formats to use
virtual PString OpalManager::ApplyRouteTable ( const PString &  source,
const PString &  destination,
PINDEX &  entry 
)
virtual

Route the source address to a destination using the route table. The source parameter may be something like pots:vpb:1/2 or sip:fred@nurk.com.

The destination parameter is a partial URL, it does not include the protocol, but may be of the form user@host, or simply digits.

Parameters
sourceSource address, including endpoint protocol
destinationDestination address read from source protocol
entryIndex into table to start search
void OpalManager::AttachEndPoint ( OpalEndPoint endpoint,
const PString &  prefix = PString::Empty() 
)

Attach a new endpoint to the manager. This is an internal function called by the OpalEndPoint constructor.

Note that usually the endpoint is automatically "owned" by the manager. They should not be deleted directly. The DetachEndPoint() command should be used to do this.

Parameters
endpointEndPoint to add to the manager
prefixPrefix to use, if empty uses endpoint->GetPrefixName()
bool OpalManager::CanAutoStartReceiveVideo ( ) const
inline

See if should auto-start receive video channels on connection.

References OpalMediaType::Video().

bool OpalManager::CanAutoStartTransmitVideo ( ) const
inline

See if should auto-start transmit video channels on connection.

References OpalMediaType::Video().

virtual void OpalManager::ClearAllCalls ( OpalConnection::CallEndReason  reason = OpalConnection::EndedByLocalUser,
PBoolean  wait = true 
)
virtual

Clear all current calls. This effectively executes OpalCall::Clear() on every call that the manager has active. This function can not be called from several threads at the same time.

Parameters
reasonReason for call clearing
waitFlag to wait for calls to e cleared.
virtual PBoolean OpalManager::ClearCall ( const PString &  token,
OpalConnection::CallEndReason  reason = OpalConnection::EndedByLocalUser,
PSyncPoint *  sync = NULL 
)
virtual

Clear a call. This finds the call by using the token then calls the OpalCall::Clear() function on it. All connections are released, and the connections and call are disposed of. Note that this function returns quickly and the disposal happens at some later time in a background thread. It is safe to call this function from anywhere.

If sync is not NULL then it is signalled when the calls are cleared.

Parameters
tokenToken for identifying connection
reasonReason for call clearing
syncSync point to wait on.
virtual PBoolean OpalManager::ClearCallSynchronous ( const PString &  token,
OpalConnection::CallEndReason  reason = OpalConnection::EndedByLocalUser 
)
virtual

Clear a call. This finds the call by using the token then calls the OpalCall::Clear() function on it. All connections are released, and the connections and caller disposed of. Note that this function waits until the call has been cleared and all responses timeouts etc completed. Care must be used as to when it is called as deadlocks may result.

Parameters
tokenToken for identifying connection
reasonReason for call clearing
virtual OpalCall* OpalManager::CreateCall ( void *  userData)
virtual

Create a call object. This function allows an application to have the system create desccendants of the OpalCall class instead of instances of that class directly. The application can thus override call backs or add extra information that it wishes to maintain on a call by call basis.

The default behavious returns an instance of OpalCall.

Parameters
userDatauser data passed to SetUpCall
virtual OpalMediaPatch* OpalManager::CreateMediaPatch ( OpalMediaStream source,
PBoolean  requiresPatchThread = true 
)
virtual

Create a OpalMediaPatch instance. This function allows an application to have the system create descendant class versions of the OpalMediPatch class. The application could use this to modify the default behaviour of a patch.

The default behaviour returns an instance of OpalMediaPatch.

Parameters
sourceSource media stream
requiresPatchThreadThe patch requires a thread
virtual PBoolean OpalManager::CreateVideoInputDevice ( const OpalConnection connection,
const OpalMediaFormat mediaFormat,
PVideoInputDevice *&  device,
PBoolean &  autoDelete 
)
virtual

Create a PVideoInputDevice for a source media stream.

Parameters
connectionConnection needing created video device
mediaFormatMedia format for stream
deviceCreated device
autoDeleteFlag for auto delete device
virtual bool OpalManager::CreateVideoInputDevice ( const OpalConnection connection,
const PVideoDevice::OpenArgs &  args,
PVideoInputDevice *&  device,
PBoolean &  autoDelete 
)
virtual

Create a PVideoInputDevice for a source media stream.

Parameters
connectionConnection needing created video device
argsDevice to change to
deviceCreated device
autoDeleteFlag for auto delete device
virtual PBoolean OpalManager::CreateVideoOutputDevice ( const OpalConnection connection,
const OpalMediaFormat mediaFormat,
PBoolean  preview,
PVideoOutputDevice *&  device,
PBoolean &  autoDelete 
)
virtual

Create an PVideoOutputDevice for a sink media stream or the preview display for a source media stream.

Parameters
connectionConnection needing created video device
mediaFormatMedia format for stream
previewFlag indicating is a preview output
deviceCreated device
autoDeleteFlag for auto delete device
virtual bool OpalManager::CreateVideoOutputDevice ( const OpalConnection connection,
const PVideoDevice::OpenArgs &  args,
PVideoOutputDevice *&  device,
PBoolean &  autoDelete 
)
virtual

Create an PVideoOutputDevice for a sink media stream or the preview display for a source media stream.

Parameters
connectionConnection needing created video device
argsDevice to change to
deviceCreated device
autoDeleteFlag for auto delete device
virtual void OpalManager::DestroyCall ( OpalCall call)
virtual

Destroy a call object. This gets called from background thread that garbage collects all calls and connections. If an application has object lifetime issues with the threading, it can override this function and take responsibility for deleting the object at some later time.

The default behaviour simply calls "delete call".

void OpalManager::DetachEndPoint ( const PString &  prefix)

Remove an endpoint from the manager. This will delete the endpoint object.

void OpalManager::DetachEndPoint ( OpalEndPoint endpoint)
PBoolean OpalManager::DetectInBandDTMFDisabled ( ) const
inline
void OpalManager::DisableDetectInBandDTMF ( PBoolean  mode)
inline

Set the default H.245 tunneling mode.

Parameters
modeNew default mode

References m_disableDetectInBandDTMF.

PSafePtr<OpalCall> OpalManager::FindCallWithLock ( const PString &  token,
PSafetyMode  mode = PSafeReadWrite 
) const
inline

Find a call with the specified token. This searches the manager database for the call that contains the token as provided by functions such as SetUpCall().

Note the caller of this function MUST call the OpalCall::Unlock() function if this function returns a non-NULL pointer. If it does not then a deadlock can occur.

Parameters
tokenToken to identify connection
modeLock mode

References m_activeCalls.

Referenced by OpalEndPoint::GetConnectionWithLockAs().

OpalEndPoint* OpalManager::FindEndPoint ( const PString &  prefix) const

Find an endpoint instance that is using the specified prefix.

Parameters
prefixPrefix string for endpoint URL

Referenced by FindEndPointAs().

template<class T >
T* OpalManager::FindEndPointAs ( const PString &  prefix) const
inline

Find an endpoint instance that is using the specified prefix.

Parameters
prefixPrefix string for endpoint URL

References FindEndPoint().

void OpalManager::GarbageCollection ( )
PArray<PString> OpalManager::GetAllCalls ( ) const
inline

Get all tokens for active calls.

References m_activeCalls.

PINDEX OpalManager::GetCallCount ( ) const
inline

Return the number of active calls.

References m_activeCalls.

virtual OpalMediaFormatList OpalManager::GetCommonMediaFormats ( bool  transportable,
bool  pcmAudio 
) const
virtual

Get common media formats. This is called by various places to get common media formats for the basic connection classes.

The default behaviour uses the mediaFormatOrder and mediaFormatMask member variables to adjust the mediaFormats list.

Parameters
transportableInclude transportable media formats
pcmAudioInclude raw PCM audio media formats
virtual bool OpalManager::GetConferenceStates ( OpalConferenceStates states,
const PString &  name = PString::Empty() 
) const
virtual

Get conference state information for all nodes. This obtains the state of one or more conferences managed by any endpoints. If no endpoints do conferencing, then false is returned.

The name parameter may be one of the aliases for the conference, or the internal URI for the conference. An empty string indicates all active conferences are to be returned.

Note that if the name does not match an active conference, true is still returned, but the states list will be empty.

The default behaviour returns false indicating this is not a conferencing endpoint.

Parameters
statesList of conference states
nameName for specific node, empty string is all
const PString& OpalManager::GetDefaultDisplayName ( ) const
inline

Get the default display name for all endpoints.

References m_defaultDisplayName.

const PString& OpalManager::GetDefaultILSServer ( ) const
inline

Get the default ILS server to use for user lookup.

References m_ilsServer.

Referenced by H323EndPoint::GetDefaultILSServer().

const PString& OpalManager::GetDefaultUserName ( ) const
inline

Get the default username for all endpoints.

References m_defaultUserName.

PList<OpalEndPoint> OpalManager::GetEndPoints ( ) const

Get the endpoints attached to this manager.

const OpalJitterBuffer::Params& OpalManager::GetJitterParameters ( ) const
inline

Get the default jitter parameters.

References m_jitterParams.

unsigned OpalManager::GetMaxAudioJitterDelay ( ) const
inline

Get the default maximum audio jitter delay parameter. Defaults to 250ms.

References m_jitterParams, and OpalJitterBuffer::Params::m_maxJitterDelay.

Referenced by H323EndPoint::GetMaxAudioJitterDelay().

PINDEX OpalManager::GetMaxRtpPacketSize ( ) const
inline

Get the maximum received RTP packet size. Defaults to 10k.

References m_rtpPacketSizeMax.

PINDEX OpalManager::GetMaxRtpPayloadSize ( ) const
inline

Get the maximum transmitted RTP payload size. Defaults to maximum safe MTU size (1400 bytes) minus the typical size of the IP, UDP an RTP headers.

References m_rtpPayloadSizeMax.

const PStringArray& OpalManager::GetMediaFormatMask ( ) const
inline

Get the default media format mask. The is the default list of media format names to be removed from media format lists bfeore use by a connection. See OpalMediaFormatList::Remove() for more information.

References m_mediaFormatMask.

const PStringArray& OpalManager::GetMediaFormatOrder ( ) const
inline

Get the default media format order.

References m_mediaFormatOrder.

const PIPSocket::QoS& OpalManager::GetMediaQoS ( const OpalMediaType type) const

Get the IP Quality of Service info for media (eg RTP) channels.

virtual MediaTransferMode OpalManager::GetMediaTransferMode ( const OpalConnection provider,
const OpalConnection consumer,
const OpalMediaType mediaType 
) const
virtual

Determine how to handle media between two "network" connections. Determine if media is to bypass this host when it is possible to do so. For example if the two connections are SIP and H.323, they both use RTP and the packets can go directly between the remote endpoints.

An application may override this function in order to conditionally enable this feature, or for example if firewall traversal is in play, or Lawful Intercept, or any application defined reason.

The default behaviour returns MediaTransferForward, disallowing transcoding and full media bypass.

Parameters
providerHalf of call providing media transport addresses
consumerOther half of call needing media transport addresses
mediaTypeMedia type for session
virtual bool OpalManager::GetMediaTransportAddresses ( const OpalConnection provider,
const OpalConnection consumer,
unsigned  sessionId,
const OpalMediaType mediaType,
OpalTransportAddressArray transports 
) const
virtual

Get transports for the media session on the connection. This is primarily used by the media bypass feature controlled by the OpalManager::GetMediaTransferMode() function. It allows one side of the call to get the transport address of the media on the other side, so it can pass it on, bypassing the local host.

It may also be sued by "external" RTP systems where a non network connection can redirect media to seom other transport address.

Default behaviour checks if both connections a "network" and if so uses GetMediaTransferMode() to determine if in bypass mode, otherwise returns false. Note this default implementation does not fill in the transports, as that is usually done by derived OpalConnection class. If the transports is set, then the derived classes to no override it.

Returns
true if a transport address is available and may be used to pass on to a remote system for direct access.
Parameters
providerHalf of call providing media transport addresses
consumerOther half of call needing media transport addresses
sessionIdSession identifier
mediaTypeMedia type for session to return information
transportsInformation on media session
BYTE OpalManager::GetMediaTypeOfService ( ) const

Get the IP Type Of Service byte for media (eg RTP) channels.

BYTE OpalManager::GetMediaTypeOfService ( const OpalMediaType type) const

Get the IP Type Of Service byte for media (eg RTP) channels.

unsigned OpalManager::GetMinAudioJitterDelay ( ) const
inline

Get the default maximum audio jitter delay parameter. Defaults to 50ms

References m_jitterParams, and OpalJitterBuffer::Params::m_minJitterDelay.

Referenced by H323EndPoint::GetMinAudioJitterDelay().

const PTimeInterval& OpalManager::GetNatKeepAliveTime ( ) const
inline

Get the amount of time between "keep-alive" packets to maintain NAT pin-hole.

References m_natKeepAliveTime.

virtual PStringList OpalManager::GetNetworkURIs ( const PString &  name) const
virtual
virtual PString OpalManager::GetNextToken ( char  prefix)
virtual

Get next unique token ID for calls or connections. This is an internal function called by the OpalCall and other constructors.

const PTimeInterval& OpalManager::GetNoMediaTimeout ( ) const
inline

Get the amount of time with no media that will cause a call to clear

References m_noMediaTimeout.

Referenced by H323EndPoint::GetNoMediaTimeout().

PStringList OpalManager::GetPrefixNames ( const OpalEndPoint endpoint = NULL) const

Get all the prefixes for endpoints attached to this manager.

Parameters
endpointOptional ep to get prefixes for
const OpalProductInfo& OpalManager::GetProductInfo ( ) const
inline

Get the product info for all endpoints.

References m_productInfo.

const RouteTable& OpalManager::GetRouteTable ( ) const
inline

Get the active route table for the manager.

References m_routeTable.

WORD OpalManager::GetRtpIpPortBase ( ) const
inline

Get the UDP port number base for RTP channels.

References m_rtpIpPorts.

WORD OpalManager::GetRtpIpPortMax ( ) const
inline

Get the max UDP port number for RTP channels.

References m_rtpIpPorts.

PIPSocket::PortRange& OpalManager::GetRtpIpPortRange ( )
inline

Get the UDP port range for RTP channels.

References m_rtpIpPorts.

const PIPSocket::PortRange& OpalManager::GetRtpIpPortRange ( ) const
inline

References m_rtpIpPorts.

const PTimeInterval& OpalManager::GetSignalingTimeout ( ) const
inline

Get the amount of time to wait on signaling channel

References m_signalingTimeout.

const OpalSilenceDetector::Params& OpalManager::GetSilenceDetectParams ( ) const
inline

Get the default parameters for the silence detector.

References m_silenceDetectParams.

const PTimeInterval& OpalManager::GetStaleReceiverTimeout ( ) const
inline

Get the amount of time before an RTP receive SSRC is stale and removed.

References m_staleReceiverTimeout.

WORD OpalManager::GetTCPPortBase ( ) const
inline

Get the TCP port number base.

References m_tcpPorts.

WORD OpalManager::GetTCPPortMax ( ) const
inline

Get the TCP port number maximum.

References m_tcpPorts.

PIPSocket::PortRange& OpalManager::GetTCPPortRange ( )
inline

Get the TCP port range to use.

References m_tcpPorts.

const PIPSocket::PortRange& OpalManager::GetTCPPortRange ( ) const
inline

References m_tcpPorts.

const PTimeInterval& OpalManager::GetTransportIdleTime ( ) const
inline

Get the amount of time a transport can be idle before it is closed

References m_transportIdleTime.

const PTimeInterval& OpalManager::GetTxMediaTimeout ( ) const
inline

Get the amount of time with tx media errors (ICMP) that will cause a call to clear

References m_txMediaTimeout.

WORD OpalManager::GetUDPPortBase ( ) const
inline

Get the UDP port number base.

References m_udpPorts.

WORD OpalManager::GetUDPPortMax ( ) const
inline

Get the UDP port number maximum.

References m_udpPorts.

PIPSocket::PortRange& OpalManager::GetUDPPortRange ( )
inline

Get the UDP port range to use.

References m_udpPorts.

const PIPSocket::PortRange& OpalManager::GetUDPPortRange ( ) const
inline

References m_udpPorts.

const PVideoDevice::OpenArgs& OpalManager::GetVideoInputDevice ( OpalVideoFormat::ContentRole  role = OpalVideoFormat::eNoRole) const
inline

Get the parameters for the video device to be used for input.

Parameters
roleRole for video stream to get

References m_videoInputDevice.

Referenced by OpalPCSSEndPoint::GetVideoGrabberDevice().

const PVideoDevice::OpenArgs& OpalManager::GetVideoOutputDevice ( OpalVideoFormat::ContentRole  role = OpalVideoFormat::eNoRole) const
inline

Get the parameters for the video device to be used for input. This defaults to the value of the PSoundChannel::GetOutputDeviceNames()[0].

Parameters
roleRole for video stream to get

References m_videoOutputDevice.

Referenced by OpalPCSSEndPoint::GetVideoDisplayDevice().

const PVideoDevice::OpenArgs& OpalManager::GetVideoPreviewDevice ( OpalVideoFormat::ContentRole  role = OpalVideoFormat::eNoRole) const
inline

Get the parameters for the video device to be used for input. This defaults to the value of the PSoundChannel::GetInputDeviceNames()[0].

Parameters
roleRole for video stream to get

References m_videoPreviewDevice.

Referenced by OpalPCSSEndPoint::GetVideoPreviewDevice().

virtual PBoolean OpalManager::HasCall ( const PString &  token)
inlinevirtual

Determine if a call is active. Return true if there is an active call with the specified token. Note that the call could clear any time (even milliseconds) after this function returns true.

Parameters
tokenToken for identifying call

References m_activeCalls.

void OpalManager::InternalClearAllCalls ( OpalConnection::CallEndReason  reason,
bool  wait,
bool  first 
)
protected
OpalCall* OpalManager::InternalCreateCall ( void *  userData = NULL)
virtual PBoolean OpalManager::IsCallEstablished ( const PString &  token)
virtual

Determine if a call is established. Return true if there is an active call with the specified token and that call has at least two parties with media flowing between them. Note that the call could clear any time (even milliseconds) after this function returns true.

Parameters
tokenToken for identifying call
virtual PBoolean OpalManager::IsLocalAddress ( const PIPSocket::Address &  remoteAddress) const
virtual

Determine if the address is "local", ie does not need any address translation (fixed or via STUN) to access.

The default behaviour checks if remoteAddress is a private, non-routable, IP, e.g. 10.x.x.x, 127.x.x.x etc, the "any" or "broadcast" IP, or the IP of a local interface.

Referenced by H323EndPoint::IsLocalAddress().

virtual bool OpalManager::IsRecording ( const PString &  callToken)
virtual

Indicate if recording is currently active on call.

Parameters
callTokenCall token for call to check if recording
virtual PBoolean OpalManager::IsRTPNATEnabled ( OpalConnection connection,
const PIPSocket::Address &  localAddr,
const PIPSocket::Address &  peerAddr,
const PIPSocket::Address &  signalAddr,
PBoolean  incoming 
)
virtual

Determine if the RTP session needs to accommodate a NAT router. For endpoints that do not use STUN or something similar to set up all the correct protocol embeddded addresses correctly when a NAT router is between the endpoints, it is possible to still accommodate the call, with some restrictions. This function determines if the RTP can proceed with special NAT allowances.

The special allowance is that the RTP code will ignore whatever the remote indicates in the protocol for the address to send RTP data and wait for the first packet to arrive from the remote and will then proceed to send all RTP data back to that address AND port.

The default behaviour checks the values of the physical link (localAddr/peerAddr) against the signaling address the remote indicated in the protocol, eg H.323 SETUP sourceCallSignalAddress or SIP "To" or "Contact" fields, and makes a guess that the remote is behind a NAT router.

Parameters
connectionConnection being checked
localAddrLocal physical address of connection
peerAddrRemote physical address of connection
signalAddrRemotes signaling address as indicated by protocol of connection
incomingIncoming/outgoing connection
virtual PSafePtr<OpalConnection> OpalManager::MakeConnection ( OpalCall call,
const PString &  party,
void *  userData = NULL,
unsigned int  options = 0,
OpalConnection::StringOptions stringOptions = NULL 
)
virtual

Set up a connection to a remote party. An appropriate protocol (endpoint) is determined from the party parameter. That endpoint is then called to create a connection and that connection is attached to the call provided.

If the endpoint is already occupied in a call then the endpoints list is further searched for additional endpoints that support the protocol. For example multiple pstn endpoints may be present for multiple LID's.

The general form for this party parameter is:

 [proto:][alias@][transport$]address[:port]

where the various fields will have meanings specific to the endpoint type. For example, with H.323 it could be "h323:Fred@site.com" which indicates a user Fred at gatekeeper size.com. Whereas for the PSTN endpoint it could be "pstn:5551234" which is to call 5551234 on the first available PSTN line.

The default for the proto is the name of the protocol for the first endpoint attached to the manager. Other fields default to values on an endpoint basis.

This function usually returns almost immediately with the connection continuing to occur in a new background thread.

If false is returned then the connection could not be established. For example if a PSTN endpoint is used and the associated line is engaged then it may return immediately. Returning a non-NULL value does not mean that the connection will succeed, only that an attempt is being made.

The default behaviour is pure.

Parameters
callOwner of connection
partyParty to call
userDatauser data to pass to connections
optionsoptions to pass to conneciton
stringOptionsOptions to pass to connection
virtual PBoolean OpalManager::Message ( OpalIM message)
virtual

Send an Instant Message to a remote party. Backward compatible to old API.

Send an Instant Message to a remote party. Details of the message must be filled out in the message structure.

Note that message is non-const as this function can be used to initiate a conversation, and the created conversation ID is returned in the message.m_conversationId member variable.

This will fail if an OpalIMEndPoint has not been created.

virtual PBoolean OpalManager::Message ( const PString &  to,
const PString &  body 
)
virtual

Send an Instant Message to a remote party. Backward compatible to old API.

virtual PBoolean OpalManager::Message ( const PURL &  to,
const PString &  type,
const PString &  body,
PURL &  from,
PString &  conversationId 
)
virtual
virtual void OpalManager::OnAlerting ( OpalConnection connection,
bool  withMedia 
)
virtual

Call back for remote party being alerted on outgoing call. This function is called after the connection is informed that the remote endpoint is "ringing". This function is generally called some time after the MakeConnection() function was called.

If false is returned the connection is aborted.

If an application overrides this function, it should generally call the ancestor version for correct operation. An application would typically only intercept this function if it wishes to do some form of logging. For this you can obtain the name of the caller by using the function OpalConnection::GetRemotePartyName().

The default behaviour calls the OnAlerting() on the connection's associated OpalCall object.

Parameters
connectionConnection that indicates it is alerting
withMediaIndicated media should be started, if possible
virtual void OpalManager::OnAlerting ( OpalConnection connection)
virtual
virtual OpalConnection::AnswerCallResponse OpalManager::OnAnswerCall ( OpalConnection connection,
const PString &  caller 
)
virtual

Call back for answering an incoming call. This function is called after the connection has been acknowledged but before the connection is established

This gives the application time to wait for some event before signalling to the endpoint that the connection is to proceed. For example the user pressing an "Answer call" button.

If AnswerCallDenied is returned the connection is aborted and the connetion specific end call PDU is sent. If AnswerCallNow is returned then the connection proceeding, Finally if AnswerCallPending is returned then the protocol negotiations are paused until the AnsweringCall() function is called.

The default behaviour simply returns AnswerNow.

Parameters
connectionconnection that is being answered
callercaller
virtual void OpalManager::OnApplyStringOptions ( OpalConnection connection,
OpalConnection::StringOptions stringOptions 
)
virtual

Call back to optionally modify string options. This called when a conenction is about to apply string options for a new connection. The application has an opportunity to "tweak" them before they are used.

Parameters
connectionConnection applying options.
stringOptionsOptions being applied.
virtual bool OpalManager::OnChangedPresentationRole ( OpalConnection connection,
const PString &  newChairURI,
bool  request 
)
virtual

Indicate presentation token change. The request parameter indicates if this is an "after the fact" indication has changed, or if the connection may reject the change and retain the token it already has.

Default behaviour returns true.

Parameters
connectionCOnnection that has had the change
newChairURIURI for new confernce chair
requestIndicates change is requested

Reimplemented in OpalManagerConsole.

virtual void OpalManager::OnClearedCall ( OpalCall call)
virtual

A call back function whenever a call is cleared. A call is cleared whenever there is no longer any connections attached to it. This function is called just before the call is deleted. However, it may be used to display information on the call after completion, eg the call parties and duration.

Note that there is not a one to one relationship with the OnEstablishedCall() function. This function may be called without that function being called. For example if MakeConnection() was used but the call never completed.

The default behaviour removes the call from the activeCalls dictionary.

Parameters
callConnection that was established

Reimplemented in OpalManagerConsole.

virtual void OpalManager::OnClosedMediaStream ( const OpalMediaStream stream)
virtual

Call back for closed a media stream.

The default behaviour does nothing.

Parameters
streamStream being closed

Reimplemented in OpalManagerConsole.

virtual void OpalManager::OnCompositionIndication ( const OpalIMContext::CompositionInfo info)
virtual

Called when the remote composition indication changes state.

The default action does nothing.

Parameters
infoNew composition state information
virtual void OpalManager::OnConferenceStatusChanged ( OpalEndPoint endpoint,
const PString &  uri,
OpalConferenceState::ChangeType  change 
)
virtual

Call back when conferencing state information changes. If a conferencing endpoint type detects a change in a conference nodes state, as would be returned by GetConferenceStatus() then this function will be called on all endpoints in the OpalManager.

The uri parameter is as is the internal URI for the conference.

Default behaviour does nothing.

Parameters
uri< Endpoint sending state change Internal URI of conference node that changed
changeChange that occurred
virtual void OpalManager::OnConnected ( OpalConnection connection)
virtual

A call back function whenever a connection is "connected". This indicates that a connection to an endpoint was connected. That is the endpoint received acknowledgement via whatever protocol it uses that the connection may now start media streams.

In the context of H.323 this means that the CONNECT pdu has been received.

The default behaviour calls the OnConnected() on the connections associated OpalCall object.

Parameters
connectionConnection that was established
virtual void OpalManager::OnConversation ( const OpalIMContext::ConversationInfo info)
virtual

Call back on a changes Instant Messaging context, aka conversation. An application can intercept this and set options on the IM context.

Parameters
infoInfo for conversation that changed state
virtual void OpalManager::OnEstablished ( OpalConnection connection)
virtual

A call back function whenever a connection is "established". This indicates that a connection to an endpoint was established. This usually occurs after OnConnected() and indicates that the connection is both connected and media can flow.

In the context of H.323 this means that the CONNECT pdu has been received and either fast start was in operation or the subsequent Open Logical Channels have occurred. For SIP it indicates the INVITE/OK/ACK sequence is complete.

The default behaviour calls the OnEstablished() on the connection's associated OpalCall object.

Parameters
connectionConnection that was established
virtual void OpalManager::OnEstablishedCall ( OpalCall call)
virtual

A call back function whenever a call is completed. In telephony terminology a completed call is one where there is an established link between two parties.

This called from the OpalCall::OnEstablished() function.

The default behaviour does nothing.

Parameters
callCall that was completed

Reimplemented in OpalManagerConsole.

virtual void OpalManager::OnFailedMediaStream ( OpalConnection connection,
bool  fromRemote,
const PString &  reason 
)
virtual

Call back for a media stream that failed to open.

The default behaviour does nothing.

Parameters
connectionConnection that attempted to open media stream
fromRemoteFlag indicating the attempt to open was from remote
reasonReason for the open fail

Reimplemented in OpalManagerConsole.

virtual PBoolean OpalManager::OnForwarded ( OpalConnection connection,
const PString &  remoteParty 
)
virtual

A call back function whenever a connection is forwarded.

The default behaviour does nothing.

Parameters
connectionConnection that was held
remotePartyThe new remote party
virtual void OpalManager::OnHold ( OpalConnection connection,
bool  fromRemote,
bool  onHold 
)
virtual

A call back function whenever a connection is "held" or "retrieved". This indicates that a connection to an endpoint was held, or retrieved, either locally or by the remote endpoint.

The default behaviour does nothing.

Parameters
connectionConnection that was held/retrieved
fromRemoteIndicates remote has held local connection
onHoldIndicates have just been held/retrieved.

Reimplemented in OpalManagerConsole.

virtual void OpalManager::OnHold ( OpalConnection connection)
virtual
virtual PBoolean OpalManager::OnIncomingConnection ( OpalConnection connection,
unsigned  options,
OpalConnection::StringOptions stringOptions 
)
virtual

Call back for answering an incoming call. This function is used for an application to control the answering of incoming calls.

If true is returned then the connection continues. If false then the connection is aborted.

Note this function should not block for any length of time. If the decision to answer the call may take some time eg waiting for a user to pick up the phone, then AnswerCallPending or AnswerCallDeferred should be returned.

If an application overrides this function, it should generally call the ancestor version to complete calls. Unless the application completely takes over that responsibility. Generally, an application would only intercept this function if it wishes to do some form of logging. For this you can obtain the name of the caller by using the function OpalConnection::GetRemotePartyName().

The default behaviour is to call OnRouteConnection to determine a B party for the connection.

If the call associated with the incoming call already had two parties and this connection is a third party for a conference call then AnswerCallNow is returned as a B party is not required.

Parameters
connectionConnection that is calling
optionsoptions for new connection (can't use default as overrides will fail)
stringOptionsOptions to pass to connection
virtual bool OpalManager::OnLocalIncomingCall ( OpalLocalConnection connection)
virtual

A call back function whenever a call is being terminated locally. An application may use this function to auto-answer an incoming call from the a network. Or indicate to a user interface that an incoming call has to be answered asynchronously.

This called from the OpalLocalEndPoint::OnIncomingCall() function.

The default behaviour does nothing and returns true.

Returns
false to refuse the call.
Parameters
connectionConnection for incoming call
virtual bool OpalManager::OnLocalOutgoingCall ( const OpalLocalConnection connection)
virtual

A call back function whenever a call is being initated locally. An application may use this function to indicate that a call is in progress.

This called from the OpalLocalEndPoint::OnOutgoingCall() function.

The default behaviour does nothing and returns true.

Parameters
connectionConnection for outgoing call

Reimplemented in OpalManagerConsole.

virtual bool OpalManager::OnLocalRTP ( OpalConnection connection1,
OpalConnection connection2,
unsigned  sessionID,
bool  opened 
) const
virtual

Indicate is a local RTP connection. This is called when a new media stream has been created and it has been detected that media will be flowing between two RTP sessions within the same process. An application could take advantage of this by optimising the transfer in some way, rather than the full media path of codecs and sockets which might not be necessary.

Note this is the complement to SetMediaPassThrough() as this function stops RTP data from being sent/received, while SetMediaPassThrough() transfers RTP data between the two endpoints.

The default behaviour returns false.

Returns
true if the application is going to execute some form of bypass, and the media patch threads should not be started.
Parameters
connection1First connection
connection2Second connection
sessionIDSession ID of RTP session
openedMedia streams are opened/closed
virtual bool OpalManager::OnMediaFailed ( OpalConnection connection,
unsigned  sessionId 
)
virtual

Call back when media stops unexpectedly. This allows the application to take some action when a "no media" condition is detected. For example clear the call.

The source indicates if the media is in a source OpalMediaStream of the conenction, for example on RTP connections (SIP/H.323) true indicates incoming media, fals indicates transmitted media.

The SetNoMediaTimeout() can be used to set the default time for a source stream (e.g. received RTP) to call this function.

Default behaviour releases the connection.

true if the specific media session is to be aborted.

Parameters
connectionConnection session is in
sessionIdSession ID of media that stopped.
virtual void OpalManager::OnMessageDisposition ( const OpalIMContext::DispositionInfo info)
virtual

Called when Instant Message event is delivered, or not.

The default action does nothing.

Parameters
infoMessage disposition information
virtual void OpalManager::OnMessageReceived ( const OpalIM message)
virtual

Called when Instant Message is received.

The default action is to pass the message on to a suitable OpalPresentity function of the same name.

Parameters
messageMessage information
virtual void OpalManager::OnMWIReceived ( const PString &  party,
MessageWaitingType  type,
const PString &  extraInfo 
)
virtual

Callback called when Message Waiting Indication (MWI) is received. Multiple callbacks may occur with each MessageWaitingType. A type of NumMessageWaitingTypes indicates the server is unable to distinguish the message type.

The extraInfo parameter is generally of the form "a/b" where a and b unsigned integers representing new and old message count. However, it may be a simple "yes" or "no" if the remote cannot provide a message count.

Parameters
partyName of party MWI is for
typeType of message that is waiting
extraInfoAddition information on the MWI
virtual void OpalManager::OnNewConnection ( OpalConnection connection)
virtual

Call back for a new connection has been constructed. This is called after CreateConnection has returned a new connection. It allows an application to make any custom adjustments to the connection before it begins to process the protocol. behind it.

Parameters
connectionNew connection just created
virtual PBoolean OpalManager::OnOpenMediaStream ( OpalConnection connection,
OpalMediaStream stream 
)
virtual

Call back when opening a media stream. This function is called when a connection has created a new media stream according to the logic of its underlying protocol.

The usual requirement is that media streams are created on all other connections participating in the call and all of the media streams are attached to an instance of an OpalMediaPatch object that will read from one of the media streams passing data to the other media streams.

The default behaviour achieves the above using the FindMatchingCodecs() to determine what (if any) software codecs are required, the OpalConnection::CreateMediaStream() function to open streams and the CreateMediaPatch() function to create a patch for all of the streams and codecs just produced.

Parameters
connectionConnection that owns the media stream
streamNew media stream being opened
virtual void OpalManager::OnProceeding ( OpalConnection connection)
virtual

Call back for remote party is now responsible for completing the call. This function is called when the remote system has been contacted and it has accepted responsibility for completing, or failing, the call. This is distinct from OnAlerting() in that it is not known at this time if anything is ringing. This indication may be used to distinguish between "transport" level error, in which case another host may be tried, and that finalising the call has moved "upstream" and the local system has no more to do but await a result.

If an application overrides this function, it should generally call the ancestor version for correct operation.

The default behaviour calls the OnProceeding() on the connection's associated OpalCall object.

Parameters
connectionConnection that is proceeeding
virtual void OpalManager::OnReleased ( OpalConnection connection)
virtual

A call back function whenever a connection is released. This function can do any internal cleaning up and waiting on background threads that may be using the connection object.

Classes that override this function should make sure they call the ancestor version for correct operation.

An application will not typically call this function as it is used by the OpalManager during a release of the connection.

The default behaviour calls OnReleased() on the connection's associated OpalCall object. This indicates to the call that the connection has been released so it can release the last remaining connection and then returns true.

Parameters
connectionConnection that was established
virtual bool OpalManager::OnRouteConnection ( PStringSet &  routesTried,
const PString &  a_party,
const PString &  b_party,
OpalCall call,
unsigned  options,
OpalConnection::StringOptions stringOptions 
)
virtual

Route a connection to another connection from an endpoint.

The default behaviour gets the destination address from the connection and translates it into an address by using the routeTable member variable and uses MakeConnection() to start the B-party connection.

Parameters
routesTriedSet of routes already tried
a_partySource local address
b_partyDestination indicated by source
callCall for new connection
optionsOptions for new connection (can't use default as overrides will fail)
stringOptionsOptions to pass to connection
virtual void OpalManager::OnStartMediaPatch ( OpalConnection connection,
OpalMediaPatch patch 
)
virtual

Call back for a media patch thread starting. This function is called within the context of the thread associated with the media patch.

The default behaviour does nothing

Parameters
connectionConnection patch is in
patchMedia patch being started

Reimplemented in OpalManagerConsole.

virtual void OpalManager::OnStopMediaPatch ( OpalConnection connection,
OpalMediaPatch patch 
)
virtual

Call back when media stream patch thread stops.

Parameters
connectionConnection patch is in
patchMedia Patch being stopped
virtual bool OpalManager::OnTransferNotify ( OpalConnection connection,
const PStringToString &  info 
)
virtual

A call back function to monitor the progress of a transfer. When a transfer operation is initiated, the Transfer() function will generally return immediately and the transfer may take some time. This call back can give an indication to the application of the progress of the transfer. the transfer.

For example in SIP, the OpalCall::Transfer() function will have sent a REFER request to the remote party. The remote party sends us NOTIFY requests about the progress of the REFER request.

An application can now make a decision during the transfer operation to short circuit the sequence, or let it continue. It can also determine if the transfer did not go through, and it should "take back" the call. Note no action is required to "take back" the call other than indicate to the user that they are back on.

A return value of false will immediately disconnect the current call.

The exact format of the info parameter is dependent on the protocol being used. As a minimum, it will always have a values info["result"] and info["party"].

The info["party"] indicates the part the connection is playing in the transfer. This will be: "A" party being transferred "B" party initiating the transfer of "A" "C" party "A" is being transferred to

The info["result"] will be at least one of the following: "success" Transfer completed successfully (party A or B) "incoming" New call was from a transfer (party C) "started" Transfer operation has started (party A) "progress" Transfer is in progress (party B) "blind" Transfer is blind, no further notification (party B) "error" Transfer could not begin (party B) "failed" Transfer started but did not complete (party A or B)

For SIP, there may be an additional info["state"] containing the NOTIFY subscription state, an info["code"] entry containing the 3 digit code returned in the NOTIFY body and info["Referred-By"] indicating the URI of party B. Other fields may also be present.

The default behaviour returns false if info["result"] == "success".

Parameters
connectionConnection being transferred.
infoInformation on the transfer
virtual void OpalManager::OnUserInputString ( OpalConnection connection,
const PString &  value 
)
virtual

Call back for remote endpoint has sent user input as a string.

The default behaviour call OpalConnection::SetUserInput() which saves the value so the GetUserInput() function can return it.

Parameters
connectionConnection input has come from
valueString value of indication

Reimplemented in OpalManagerConsole.

virtual void OpalManager::OnUserInputTone ( OpalConnection connection,
char  tone,
int  duration 
)
virtual

Call back for remote enpoint has sent user input as tones. If duration is zero then this indicates the beginning of the tone. If duration is greater than zero then it indicates the end of the tone output and how long the tone had run.

Note, there is no guarantee a zero value (start tone) will occur. There is also no guarantee this function is called at all, given how the remote may send user indications. For simple, "event" based, user indications the OnUserInputString() should be used. THis function is only for when a more precise representation of the tone, and it's duration, is required.

The default behaviour calls the OpalCall function of the same name.

Parameters
connectionConnection input has come from
toneTone received
durationDuration of tone
OpalManager::OpalCall::OpalCall ( OpalManager mgr)
protected
OpalManager::P_DECLARE_TRACED_ENUM ( MediaTransferMode  ,
MediaTransferBypass  ,
MediaTransferForward  ,
MediaTransferTranscode   
)

How to handle media between two "network" connections.

OpalManager::PARRAY ( RouteTable  ,
RouteEntry   
)
OpalManager::PDECLARE_MUTEX ( m_routeMutex  )
protected
OpalManager::PDECLARE_MUTEX ( m_clearingAllCallsMutex  )
protected
OpalManager::PDECLARE_NOTIFIER ( PThread  ,
OpalManager  ,
GarbageMain   
)
protected
OpalManager::PDECLARE_READ_WRITE_MUTEX ( m_endpointsMutex  )
protected
void OpalManager::QueueDecoupledEvent ( PSafeWork *  work,
const char *  group = NULL 
)
inline

References m_decoupledEventPool.

virtual PString OpalManager::ReadUserInput ( OpalConnection connection,
const char *  terminators = "YX#\r\n",
unsigned  lastDigitTimeout = 4,
unsigned  firstDigitTimeout = 30 
)
virtual

Read a sequence of user indications from connection with timeouts.

Parameters
connectionConnection to read input from
terminatorsCharacters that can terminate input
lastDigitTimeoutTimeout on last digit in string
firstDigitTimeoutTimeout on receiving any digits
void OpalManager::SetAudioJitterDelay ( unsigned  minDelay,
unsigned  maxDelay 
)

Set the maximum audio jitter delay parameter.

If minDelay is set to zero then both the minimum and maximum will be set to zero which will disable the jitter buffer entirely.

If maxDelay is zero, or just less that minDelay, then the maximum jitter is set to the minimum and this disables the adaptive jitter, a fixed value is used.

Parameters
minDelayNew minimum jitter buffer delay in milliseconds
maxDelayNew maximum jitter buffer delay in milliseconds

Referenced by H323EndPoint::SetAudioJitterDelay().

void OpalManager::SetAutoStartReceiveVideo ( bool  can)
inline

Set if should auto-start receive video channels on connection.

References OpalMediaTypeDefinition::SetAutoStart(), and OpalMediaType::Video().

void OpalManager::SetAutoStartTransmitVideo ( bool  can)
inline

Set if should auto-start transmit video channels on connection.

References OpalMediaTypeDefinition::SetAutoStart(), and OpalMediaType::Video().

void OpalManager::SetDefaultConnectionOptions ( const OpalConnection::StringOptions stringOptions)
inline

Set default connection string options. Note that if the individual string option is already present for a connection, then it is not overridden by an entry here.

References m_defaultConnectionOptions.

void OpalManager::SetDefaultDisplayName ( const PString &  name,
bool  updateAll = true 
)

Set the default display name for all endpoints.

Parameters
nameNew name
updateAllUpdate all registered endpoints
void OpalManager::SetDefaultILSServer ( const PString &  server)
inline

Set the default ILS server to use for user lookup.

References m_ilsServer.

Referenced by H323EndPoint::SetDefaultILSServer().

void OpalManager::SetDefaultUserName ( const PString &  name,
bool  updateAll = true 
)

Set the default username for all endpoints.

Parameters
nameNew name
updateAllUpdate all registered endpoints
void OpalManager::SetJitterParameters ( const OpalJitterBuffer::Params params)
inline

Set the default jitter parameters.

References m_jitterParams.

void OpalManager::SetMaxRtpPacketSize ( PINDEX  size)
inline

Get the maximum received RTP packet size. Defaults to 10k.

References m_rtpPacketSizeMax.

void OpalManager::SetMaxRtpPayloadSize ( PINDEX  size,
bool  mtu = false 
)
inline

Get the maximum transmitted RTP payload size. Defaults to maximum safe MTU size (576 bytes as per RFC879) minus the typical size of the IP, UDP an RTP headers.

References m_rtpPayloadSizeMax.

void OpalManager::SetMediaFormatMask ( const PStringArray &  mask)

Set the default media format mask. The is the default list of media format names to be removed from media format lists bfeore use by a connection. See OpalMediaFormatList::Remove() for more information.

void OpalManager::SetMediaFormatOrder ( const PStringArray &  order)

Set the default media format order.

Parameters
orderNew order
bool OpalManager::SetMediaPassThrough ( const PString &  token1,
const PString &  token2,
bool  bypass,
unsigned  sessionID = 0,
bool  network = true 
)

Set pass though mode for media.

Bypass the internal media handling, passing RTP data directly from one call/connection to another.

This can be useful for back to back calls that happen to be the same media format and you wish to avoid double decoding and encoding of media. Note this scenario is not the same as two OpalConnections within the same OpalCall, but two completely independent OpalCall where one connection is to be bypassed. For example, two OpalCall instances might have two SIPConnection instances and two OpalMixerConnection instances connected via a single OpalMixerNode. Now while there are ONLY two calls in the node, it is a waste to decode the audio, add to mixer and re-encode it again. In practice this is identical to just bypassing the mixer node completely, until a third party is added, then we need to switch back to normal (non-pass-through) operation.

Note this is the complement to OnLocalRTP() as this function transfers RTP data directly between the two endpoints, while OnLocalRTP() stops the RTP data from being sent/received.

Returns
true if pass through is started/stopped, false if there was no such call/connection/stream, the streams are incompatible formats or a conflicting bypass is already in place.
Parameters
token1First calls token
token2Second calls token
bypassBypass the media
sessionIDSession ID of media stream, 0 indicates all
networkPass through the network connections of the calls only
static bool OpalManager::SetMediaPassThrough ( OpalConnection connection1,
OpalConnection connection2,
bool  bypass,
unsigned  sessionID = 0 
)
static
Parameters
connection1First connection
connection2Second connection
bypassBypass the media
sessionIDSession ID of media stream, 0 indicates all
void OpalManager::SetMediaQoS ( const OpalMediaType type,
const PIPSocket::QoS &  qos 
)

Set the IP Quality of Service info for media (eg RTP) channels.

void OpalManager::SetMediaTypeOfService ( unsigned  tos)

Set the IP Type Of Service byte for media (eg RTP) channels.

void OpalManager::SetMediaTypeOfService ( const OpalMediaType type,
unsigned  tos 
)

Set the IP Type Of Service byte for media (eg RTP) channels.

void OpalManager::SetNatKeepAliveTime ( const PTimeInterval &  newInterval)
inline

Set the amount of time between "keep-alive" packets to maintain NAT pin-hole.

Parameters
newIntervalNew timeout

References m_natKeepAliveTime.

void OpalManager::SetNoMediaTimeout ( const PTimeInterval &  newInterval)
inline

Set the amount of time with no media that will cause a call to clear

Parameters
newIntervalNew timeout for media

References m_noMediaTimeout.

Referenced by H323EndPoint::SetNoMediaTimeout().

void OpalManager::SetProductInfo ( const OpalProductInfo info,
bool  updateAll = true 
)

Set the product info for all endpoints.

Parameters
infoNew information
updateAllUpdate all registered endpoints
PBoolean OpalManager::SetRouteTable ( const PStringArray &  specs)

Parse a route table specification list for the manager. This removes the current routeTable and calls AddRouteEntry for every string in the array.

Returns true if at least one entry was added.

Parameters
specsArray of specification strings.
void OpalManager::SetRouteTable ( const RouteTable &  table)

Set a route table for the manager. Note that this will make a copy of the table and not maintain a reference.

Parameters
tableNew table to set for routing
void OpalManager::SetRtpIpPorts ( unsigned  udpBase,
unsigned  udpMax 
)

Set the UDP port number base and max for RTP channels.

void OpalManager::SetSignalingTimeout ( const PTimeInterval &  newInterval)
inline

Set the amount of time to wait on signaling channel

Parameters
newIntervalNew timeout for signaling

References m_signalingTimeout.

virtual void OpalManager::SetSilenceDetectParams ( const OpalSilenceDetector::Params params)
inlinevirtual

Set the default parameters for the silence detector.

References m_silenceDetectParams.

void OpalManager::SetStaleReceiverTimeout ( const PTimeInterval &  newInterval)
inline

Set the amount of time before an RTP receive SSRC is stale and removed.

Parameters
newIntervalNew timeout

References m_staleReceiverTimeout.

void OpalManager::SetTCPPorts ( unsigned  tcpBase,
unsigned  tcpMax 
)

Set the TCP port number base and max.

void OpalManager::SetTransportIdleTime ( const PTimeInterval &  newInterval)
inline

Set the amount of time a transport can be idle before it is closed

Parameters
newIntervalNew timeout

References m_transportIdleTime.

void OpalManager::SetTxMediaTimeout ( const PTimeInterval &  newInterval)
inline

Set the amount of time with tx media errors (ICMP) that will cause a call to clear

Parameters
newIntervalNew timeout for media

References m_txMediaTimeout.

void OpalManager::SetUDPPorts ( unsigned  udpBase,
unsigned  udpMax 
)

Set the UDP port number base and max for RAS channels.

virtual PSafePtr<OpalCall> OpalManager::SetUpCall ( const PString &  partyA,
const PString &  partyB,
void *  userData = NULL,
unsigned  options = 0,
OpalConnection::StringOptions stringOptions = NULL 
)
virtual

Set up a call between two parties. This is used to initiate a call. Incoming calls are "answered" using a different mechanism.

The A party and B party strings indicate the protocol and address of the party to call in the style of a URL. The A party is the initiator of the call and the B party is the remote system being called. See the MakeConnection() function for more details on the format of these strings.

The token returned is a unique identifier for the call that allows an application to gain access to the call at later time. This is necesary as any pointer being returned could become invalid (due to being deleted) at any time due to the multithreaded nature of the OPAL system.

Parameters
partyAThe A party of call
partyBThe B party of call
userDatauser data passed to Call and Connection
optionsoptions passed to connection
stringOptionsOptions to pass to connection
virtual PBoolean OpalManager::SetUpCall ( const PString &  partyA,
const PString &  partyB,
PString &  token,
void *  userData = NULL,
unsigned  options = 0,
OpalConnection::StringOptions stringOptions = NULL 
)
virtual
Parameters
partyAThe A party of call
partyBThe B party of call
tokenToken for call
userDatauser data passed to Call and Connection
optionsoptions passed to connection
stringOptionsOptions to pass to connection
virtual bool OpalManager::SetUpConference ( OpalCall call,
const char *  mixerURI = NULL,
const char *  localURI = NULL 
)
virtual

Set up a conference between the parties. The call is added to a conference specified by mixerURI.

If mixerURI is NULL or empty, then a suitable default is created based on the OpalMixerEndPoint contained in the manager.

If the conference node does not exist then it is created.

If the mixer node (conference) is empty then the localParty is also added to the conference.

If localURI is NULL then a suitable default (e.g. "pc:*") is used, hoeever, if it an empty string, then no local connection is created.

virtual bool OpalManager::SetVideoInputDevice ( const PVideoDevice::OpenArgs &  deviceArgs,
OpalVideoFormat::ContentRole  role = OpalVideoFormat::eNoRole 
)
virtual

Set the parameters for the video device to be used for input. If the name is not suitable for use with the PVideoInputDevice class then the function will return false and not change the device.

Parameters
deviceArgsFull description of device
roleRole for video stream to set
virtual PBoolean OpalManager::SetVideoOutputDevice ( const PVideoDevice::OpenArgs &  deviceArgs,
OpalVideoFormat::ContentRole  role = OpalVideoFormat::eNoRole 
)
virtual

Set the parameters for the video device to be used for output. If the name is not suitable for use with the PVideoOutputDevice class then the function will return false and not change the device.

This defaults to the value of the PVideoInputDevice::GetOutputDeviceNames() function.

Parameters
deviceArgsFull description of device
roleRole for video stream to set
virtual PBoolean OpalManager::SetVideoPreviewDevice ( const PVideoDevice::OpenArgs &  deviceArgs,
OpalVideoFormat::ContentRole  role = OpalVideoFormat::eNoRole 
)
virtual

Set the parameters for the video device to be used to preview input. If the name is not suitable for use with the PVideoOutputDevice class then the function will return false and not change the device.

This defaults to the value of the PVideoInputDevice::GetOutputDeviceNames() function.

Parameters
deviceArgsFull description of device
roleRole for video stream to set
void OpalManager::ShutDownEndpoints ( )

Shut down all of the endpoints, clearing all calls. This is synchonous and will wait till everything is shut down. This will also assure no new calls come in whilein the process of shutting down.

virtual PBoolean OpalManager::StartRecording ( const PString &  callToken,
const PFilePath &  filename,
const OpalRecordManager::Options options = false 
)
virtual

Start recording a call. Current version saves to a WAV file. It may either mix the receive and transmit audio stream to a single mono file, or the streams are placed into the left and right channels of a stereo WAV file.

Returns true if the call exists and there is no recording in progress for the call.

Parameters
callTokenCall token for call to record
filenameFile into which to record
optionsRecord mixing options
virtual bool OpalManager::StopRecording ( const PString &  callToken)
virtual

Stop a recording. Returns true if the call does exists, that recording is active is not indicated.

Parameters
callTokenCall token for call to stop recording
virtual PBoolean OpalManager::TranslateIPAddress ( PIPSocket::Address &  localAddress,
const PIPSocket::Address &  remoteAddress 
)
virtual

Provide address translation hook. This will check to see that remoteAddress is NOT a local address by using IsLocalAddress() and if not, set localAddress to the translationAddress (if valid) which would normally be the router address of a NAT system.

Friends And Related Function Documentation

void OpalCall::InternalOnClear ( )
friend

Field Documentation

atomic<unsigned> OpalManager::lastCallTokenID
protected
OpalManager::CallDict OpalManager::m_activeCalls
protected
PSyncPoint OpalManager::m_allCallsCleared
protected
atomic<PINDEX> OpalManager::m_clearingAllCallsCount
protected
PSafeThreadPool OpalManager::m_decoupledEventPool
protected

Referenced by QueueDecoupledEvent().

OpalConnection::StringOptions OpalManager::m_defaultConnectionOptions
protected
PString OpalManager::m_defaultDisplayName
protected

Referenced by GetDefaultDisplayName().

PString OpalManager::m_defaultUserName
protected

Referenced by GetDefaultUserName().

bool OpalManager::m_disableDetectInBandDTMF
protected
PList<OpalEndPoint> OpalManager::m_endpointList
protected
std::map<PString, OpalEndPoint *> OpalManager::m_endpointMap
protected
PTime OpalManager::m_garbageCollectChangeTime
protected
PSyncPoint OpalManager::m_garbageCollectExit
protected
PThread* OpalManager::m_garbageCollector
protected
PString OpalManager::m_ilsServer
protected
PStringArray OpalManager::m_mediaFormatMask
protected

Referenced by GetMediaFormatMask().

PStringArray OpalManager::m_mediaFormatOrder
protected

Referenced by GetMediaFormatOrder().

MediaQoSMap OpalManager::m_mediaQoS
mutableprotected
PTimeInterval OpalManager::m_natKeepAliveTime
protected
PTimeInterval OpalManager::m_noMediaTimeout
protected
OpalProductInfo OpalManager::m_productInfo
protected

Referenced by GetProductInfo().

RouteTable OpalManager::m_routeTable
protected

Referenced by GetRouteTable().

PIPSocket::PortRange OpalManager::m_rtpIpPorts
protected
PINDEX OpalManager::m_rtpPacketSizeMax
protected
PINDEX OpalManager::m_rtpPayloadSizeMax
protected
PTimeInterval OpalManager::m_signalingTimeout
protected
OpalSilenceDetector::Params OpalManager::m_silenceDetectParams
protected
PTimeInterval OpalManager::m_staleReceiverTimeout
protected
PIPSocket::PortRange OpalManager::m_tcpPorts
protected
PTimeInterval OpalManager::m_transportIdleTime
protected
PTimeInterval OpalManager::m_txMediaTimeout
protected
PIPSocket::PortRange OpalManager::m_udpPorts
protected
PVideoDevice::OpenArgs OpalManager::m_videoInputDevice[OpalVideoFormat::NumContentRole]
protected

Referenced by GetVideoInputDevice().

PVideoDevice::OpenArgs OpalManager::m_videoOutputDevice[OpalVideoFormat::NumContentRole]
protected

Referenced by GetVideoOutputDevice().

PVideoDevice::OpenArgs OpalManager::m_videoPreviewDevice[OpalVideoFormat::NumContentRole]
protected

Referenced by GetVideoPreviewDevice().


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