manager.h
Go to the documentation of this file.
/*
* manager.h
*
* OPAL system manager.
*
* Open Phone Abstraction Library (OPAL)
* Formally known as the Open H323 project.
*
* Copyright (c) 2001 Equivalence Pty. Ltd.
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Open Phone Abstraction Library.
*
* The Initial Developer of the Original Code is Equivalence Pty. Ltd.
*
* Contributor(s): ______________________________________.
*
* $Revision: 27984 $
* $Author: rjongbloed $
* $Date: 2012-07-10 03:24:24 -0500 (Tue, 10 Jul 2012) $
*/
#ifndef OPAL_OPAL_MANAGER_H
#define OPAL_OPAL_MANAGER_H
#ifdef P_USE_PRAGMA
#pragma interface
#endif
#include <opal/buildopts.h>
#include <opal/pres_ent.h>
#include <opal/call.h>
#include <opal/connection.h> //OpalConnection::AnswerCallResponse
#include <opal/guid.h>
#include <codec/silencedetect.h>
#include <codec/echocancel.h>
#include <ptclib/pstun.h>
#include <ptclib/url.h>
#if OPAL_VIDEO
#include <ptlib/videoio.h>
#endif
class OpalEndPoint;
class OpalMediaPatch;
class OpalManager : public PObject
{
PCLASSINFO(OpalManager, PObject);
public:
OpalManager();
~OpalManager();
void AttachEndPoint(
OpalEndPoint * endpoint,
const PString & prefix = PString::Empty()
);
void DetachEndPoint(
const PString & prefix
);
void DetachEndPoint(
OpalEndPoint * endpoint
);
OpalEndPoint * FindEndPoint(
const PString & prefix
);
PList<OpalEndPoint> GetEndPoints() const;
void ShutDownEndpoints();
virtual PSafePtr<OpalCall> SetUpCall(
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 PBoolean HasCall(
const PString & token
) { return activeCalls.FindWithLock(token, PSafeReference) != NULL; }
PINDEX GetCallCount() const { return activeCalls.GetSize(); }
PArray<PString> GetAllCalls() const { return activeCalls.GetKeys(); }
PSafePtr<OpalCall> FindCallWithLock(
const PString & token,
PSafetyMode mode = PSafeReadWrite
) { return activeCalls.FindWithLock(token, mode); }
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 OpalCall * CreateCall(
void * userData
);
OpalCall * InternalCreateCall();
virtual void DestroyCall(
OpalCall * call
);
virtual PString GetNextToken(char prefix);
virtual PSafePtr<OpalPresentity> AddPresentity(
const PString & presentity
);
virtual PSafePtr<OpalPresentity> GetPresentity(
const PString & presentity,
PSafetyMode mode = PSafeReference
);
virtual PStringList GetPresentities() const;
virtual bool RemovePresentity(
const PString & presentity
);
virtual PBoolean Message(
const PString & to,
const PString & body
);
virtual PBoolean Message(
const PURL & to,
const PString & type,
const PString & body,
PURL & from,
PString & conversationId
);
virtual PBoolean Message(
OpalIM & message
);
virtual void OnMessageReceived(
const OpalIM & message
);
virtual PSafePtr<OpalConnection> MakeConnection(
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 bool OnRouteConnection(
PStringSet & routesTried,
const PString & a_party,
const PString & b_party,
OpalCall & call,
unsigned options,
OpalConnection::StringOptions * stringOptions
);
virtual void OnProceeding(
OpalConnection & connection
);
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); // For backward compatibility
virtual PBoolean OnForwarded(
OpalConnection & connection,
const PString & remoteParty
);
virtual bool OnTransferNotify(
OpalConnection & connection,
const PStringToString & info
);
virtual OpalMediaFormatList GetCommonMediaFormats(
bool transportable,
bool pcmAudio
) const;
virtual void AdjustMediaFormats(
bool local,
const OpalConnection & connection,
OpalMediaFormatList & mediaFormats
) const;
virtual PBoolean IsMediaBypassPossible(
const OpalConnection & source,
const OpalConnection & destination,
unsigned sessionID
) const;
virtual PBoolean OnOpenMediaStream(
OpalConnection & connection,
OpalMediaStream & stream
);
virtual RTP_UDP * CreateRTPSession (const RTP_Session::Params & params);
virtual void OnRTPStatistics(
const OpalConnection & connection,
const RTP_Session & session
);
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
);
static bool SetMediaPassThrough(
OpalConnection & connection1,
OpalConnection & connection2,
bool bypass,
unsigned sessionID = 0
);
virtual void OnClosedMediaStream(
const OpalMediaStream & stream
);
#if OPAL_VIDEO
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
);
#endif
virtual OpalMediaPatch * CreateMediaPatch(
OpalMediaStream & source,
PBoolean requiresPatchThread = true
);
virtual void OnStartMediaPatch(
OpalConnection & connection,
OpalMediaPatch & patch
);
virtual void OnStopMediaPatch(
OpalConnection & connection,
OpalMediaPatch & patch
);
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 = "#\r\n",
unsigned lastDigitTimeout = 4,
unsigned firstDigitTimeout = 30
);
enum MessageWaitingType {
NoMessageWaiting,
VoiceMessageWaiting,
FaxMessageWaiting,
PagerMessageWaiting,
MultimediaMessageWaiting,
TextMessageWaiting,
NumMessageWaitingTypes
};
virtual void OnMWIReceived(
const PString & party,
MessageWaitingType type,
const PString & extraInfo
);
class RouteEntry : public PObject
{
PCLASSINFO(RouteEntry, PObject);
public:
RouteEntry(const PString & pat, const PString & dest);
void PrintOn(ostream & strm) const;
PString pattern;
PString destination;
PRegularExpression regex;
};
PARRAY(RouteTable, RouteEntry);
virtual PBoolean AddRouteEntry(
const PString & spec
);
PBoolean SetRouteTable(
const PStringArray & specs
);
void SetRouteTable(
const RouteTable & table
);
const RouteTable & GetRouteTable() const { return m_routeTable; }
virtual PString ApplyRouteTable(
const PString & source,
const PString & destination,
PINDEX & entry
);
#if OPAL_HAS_MIXER
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
);
#endif
const OpalProductInfo & GetProductInfo() const { return productInfo; }
void SetProductInfo(
const OpalProductInfo & info,
bool updateAll = true
);
const PString & GetDefaultUserName() const { return defaultUserName; }
void SetDefaultUserName(
const PString & name,
bool updateAll = true
);
const PString & GetDefaultDisplayName() const { return defaultDisplayName; }
void SetDefaultDisplayName(
const PString & name,
bool updateAll = true
);
#if OPAL_VIDEO
//
// these functions are deprecated and used only for backwards compatibility
// applications should use OpalConnection::GetAutoStart() to check whether
// a specific media type can be auto-started
//
bool CanAutoStartReceiveVideo() const { return (OpalMediaType::Video().GetAutoStart()&OpalMediaType::Receive) != 0; }
void SetAutoStartReceiveVideo(bool can) { OpalMediaType::Video().GetDefinition()->SetAutoStart(OpalMediaType::Receive, can); }
bool CanAutoStartTransmitVideo() const { return (OpalMediaType::Video().GetAutoStart()&OpalMediaType::Transmit) != 0; }
void SetAutoStartTransmitVideo(bool can) { OpalMediaType::Video().GetDefinition()->SetAutoStart(OpalMediaType::Transmit, can); }
#endif
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
);
const PString & GetTranslationHost() const { return translationHost; }
bool SetTranslationHost(
const PString & host
);
const PIPSocket::Address & GetTranslationAddress() const { return translationAddress; }
void SetTranslationAddress(
const PIPSocket::Address & address
);
virtual PNatMethod * GetNatMethod(
const PIPSocket::Address & remoteAddress = PIPSocket::GetDefaultIpAny()
) const;
PSTUNClient::NatTypes SetSTUNServer(
const PString & server
);
const PString & GetSTUNServer() const { return stunServer; }
PSTUNClient * GetSTUNClient() const { return stun; }
WORD GetTCPPortBase() const { return tcpPorts.base; }
WORD GetTCPPortMax() const { return tcpPorts.max; }
void SetTCPPorts(unsigned tcpBase, unsigned tcpMax);
WORD GetNextTCPPort();
WORD GetUDPPortBase() const { return udpPorts.base; }
WORD GetUDPPortMax() const { return udpPorts.max; }
void SetUDPPorts(unsigned udpBase, unsigned udpMax);
WORD GetNextUDPPort();
WORD GetRtpIpPortBase() const { return rtpIpPorts.base; }
WORD GetRtpIpPortMax() const { return rtpIpPorts.max; }
void SetRtpIpPorts(unsigned udpBase, unsigned udpMax);
WORD GetRtpIpPortPair();
BYTE GetMediaTypeOfService() const { return m_defaultMediaTypeOfService; }
void SetMediaTypeOfService(unsigned tos) { m_defaultMediaTypeOfService = (BYTE)tos; }
// For backward compatibility
BYTE P_DEPRECATED GetRtpIpTypeofService() const { return m_defaultMediaTypeOfService; }
void P_DEPRECATED SetRtpIpTypeofService(unsigned tos) { m_defaultMediaTypeOfService = (BYTE)tos; }
BYTE GetMediaTypeOfService(const OpalMediaType & type) const;
void SetMediaTypeOfService(const OpalMediaType & type, unsigned tos);
PINDEX GetMaxRtpPayloadSize() const { return rtpPayloadSizeMax; }
void SetMaxRtpPayloadSize(
PINDEX size,
bool mtu = false
) { rtpPayloadSizeMax = size - (mtu ? (20+16+12) : 0); }
PINDEX GetMaxRtpPacketSize() const { return rtpPacketSizeMax; }
void SetMaxRtpPacketSize(
PINDEX size
) { rtpPacketSizeMax = size; }
unsigned GetMinAudioJitterDelay() const { return minAudioJitterDelay; }
unsigned GetMaxAudioJitterDelay() const { return maxAudioJitterDelay; }
void SetAudioJitterDelay(
unsigned minDelay,
unsigned maxDelay
);
const PStringArray & GetMediaFormatOrder() const { return mediaFormatOrder; }
void SetMediaFormatOrder(
const PStringArray & order
);
const PStringArray & GetMediaFormatMask() const { return mediaFormatMask; }
void SetMediaFormatMask(
const PStringArray & mask //< New mask
);
virtual void SetSilenceDetectParams(
const OpalSilenceDetector::Params & params
) { silenceDetectParams = params; }
const OpalSilenceDetector::Params & GetSilenceDetectParams() const { return silenceDetectParams; }
#if OPAL_AEC
virtual void SetEchoCancelParams(
const OpalEchoCanceler::Params & params
) { echoCancelParams = params; }
const OpalEchoCanceler::Params & GetEchoCancelParams() const { return echoCancelParams; }
#endif
#if OPAL_VIDEO
virtual PBoolean SetVideoInputDevice(
const PVideoDevice::OpenArgs & deviceArgs
);
const PVideoDevice::OpenArgs & GetVideoInputDevice() const { return videoInputDevice; }
virtual PBoolean SetVideoPreviewDevice(
const PVideoDevice::OpenArgs & deviceArgs
);
const PVideoDevice::OpenArgs & GetVideoPreviewDevice() const { return videoPreviewDevice; }
virtual PBoolean SetVideoOutputDevice(
const PVideoDevice::OpenArgs & deviceArgs
);
const PVideoDevice::OpenArgs & GetVideoOutputDevice() const { return videoOutputDevice; }
#endif
PBoolean DetectInBandDTMFDisabled() const
{ return disableDetectInBandDTMF; }
void DisableDetectInBandDTMF(
PBoolean mode
) { disableDetectInBandDTMF = mode; }
const PTimeInterval & GetNoMediaTimeout() const { return noMediaTimeout; }
PBoolean SetNoMediaTimeout(
const PTimeInterval & newInterval
);
const PString & GetDefaultILSServer() const { return ilsServer; }
void SetDefaultILSServer(
const PString & server
) { ilsServer = server; }
// needs to be public for gcc 3.4
void GarbageCollection();
#ifdef OPAL_ZRTP
virtual bool GetZRTPEnabled() const;
#endif
virtual void OnApplyStringOptions(
OpalConnection & conn,
OpalConnection::StringOptions & stringOptions
);
protected:
// Configuration variables
OpalProductInfo productInfo;
PString defaultUserName;
PString defaultDisplayName;
BYTE m_defaultMediaTypeOfService;
map<OpalMediaType, BYTE> m_mediaTypeOfService;
PINDEX rtpPayloadSizeMax;
PINDEX rtpPacketSizeMax;
unsigned minAudioJitterDelay;
unsigned maxAudioJitterDelay;
PStringArray mediaFormatOrder;
PStringArray mediaFormatMask;
PBoolean disableDetectInBandDTMF;
PTimeInterval noMediaTimeout;
PString ilsServer;
OpalSilenceDetector::Params silenceDetectParams;
#if OPAL_AEC
OpalEchoCanceler::Params echoCancelParams;
#endif
#if OPAL_VIDEO
PVideoDevice::OpenArgs videoInputDevice;
PVideoDevice::OpenArgs videoPreviewDevice;
PVideoDevice::OpenArgs videoOutputDevice;
#endif
struct PortInfo {
void Set(
unsigned base,
unsigned max,
unsigned range,
unsigned dflt
);
WORD GetNext(
unsigned increment
);
PMutex mutex;
WORD base;
WORD max;
WORD current;
} tcpPorts, udpPorts, rtpIpPorts;
class InterfaceMonitor : public PInterfaceMonitorClient
{
PCLASSINFO(InterfaceMonitor, PInterfaceMonitorClient);
enum {
OpalManagerInterfaceMonitorClientPriority = 100,
};
public:
InterfaceMonitor(OpalManager & manager);
protected:
virtual void OnAddInterface(const PIPSocket::InterfaceEntry & entry);
virtual void OnRemoveInterface(const PIPSocket::InterfaceEntry & entry);
OpalManager & m_manager;
};
PString translationHost;
PIPSocket::Address translationAddress;
PString stunServer;
PSTUNClient * stun;
InterfaceMonitor * interfaceMonitor;
RouteTable m_routeTable;
PMutex m_routeMutex;
// Dynamic variables
PReadWriteMutex endpointsMutex;
PList<OpalEndPoint> endpointList;
std::map<PString, OpalEndPoint *> endpointMap;
PAtomicInteger lastCallTokenID;
class CallDict : public PSafeDictionary<PString, OpalCall>
{
public:
CallDict(OpalManager & mgr) : manager(mgr) { }
virtual void DeleteObject(PObject * object) const;
OpalManager & manager;
} activeCalls;
PSafeDictionary<PString, OpalPresentity> m_presentities;
PAtomicInteger m_clearingAllCallsCount;
PMutex m_clearingAllCallsMutex;
PSyncPoint m_allCallsCleared;
void InternalClearAllCalls(OpalConnection::CallEndReason reason, bool wait, bool first);
PThread * garbageCollector;
PSyncPoint garbageCollectExit;
bool garbageCollectSkip;
PDECLARE_NOTIFIER(PThread, OpalManager, GarbageMain);
#ifdef OPAL_ZRTP
bool zrtpEnabled;
#endif
friend OpalCall::OpalCall(OpalManager & mgr);
friend void OpalCall::InternalOnClear();
private:
P_REMOVE_VIRTUAL(OpalCall *,CreateCall(), 0);
P_REMOVE_VIRTUAL(PBoolean, OnIncomingConnection(OpalConnection &, unsigned), false);
P_REMOVE_VIRTUAL(PBoolean, OnIncomingConnection(OpalConnection &), false);
P_REMOVE_VIRTUAL(PBoolean, OnStartMediaPatch(const OpalMediaPatch &), false);
P_REMOVE_VIRTUAL_VOID(AdjustMediaFormats(const OpalConnection &, OpalMediaFormatList &) const);
P_REMOVE_VIRTUAL_VOID(OnMessageReceived(const PURL&,const PString&,const PURL&,const PString&,const PString&,const PString&));
#ifdef OPAL_HAS_IM
public:
OpalIMManager & GetIMManager() { return *m_imManager; }
protected:
OpalIMManager * m_imManager;
#endif
};
PString OpalGetVersion();
unsigned OpalGetMajorVersion();
unsigned OpalGetMinorVersion();
unsigned OpalGetBuildNumber();
#endif // OPAL_OPAL_MANAGER_H
// End of File ///////////////////////////////////////////////////////////////
OpalGetVersion
PString OpalGetVersion()
OpalManager::GarbageCollection
void GarbageCollection()
OpalSilenceDetector::Params
Definition: silencedetect.h:54
OpalManager::m_presentities
PSafeDictionary< PString, OpalPresentity > m_presentities
Definition: manager.h:1611
OpalManager
Definition: manager.h:74
OpalManager::disableDetectInBandDTMF
PBoolean disableDetectInBandDTMF
Definition: manager.h:1538
OpalManager::rtpPayloadSizeMax
PINDEX rtpPayloadSizeMax
Definition: manager.h:1532
OpalManager::GetNextTCPPort
WORD GetNextTCPPort()
OpalManager::lastCallTokenID
PAtomicInteger lastCallTokenID
Definition: manager.h:1601
OpalManager::StartRecording
virtual PBoolean StartRecording(const PString &callToken, const PFilePath &filename, const OpalRecordManager::Options &options=false)
OpalEndPoint
Definition: endpoint.h:67
OpalManager::OnClearedCall
virtual void OnClearedCall(OpalCall &call)
OpalManager::SetAutoStartTransmitVideo
void SetAutoStartTransmitVideo(bool can)
Definition: manager.h:1166
OpalManager::GetCallCount
PINDEX GetCallCount() const
Definition: manager.h:178
OpalManager::interfaceMonitor
InterfaceMonitor * interfaceMonitor
Definition: manager.h:1591
OpalManager::tcpPorts
struct OpalManager::PortInfo tcpPorts
OpalManager::OnConnected
virtual void OnConnected(OpalConnection &connection)
OpalManager::SetMediaPassThrough
bool SetMediaPassThrough(const PString &token1, const PString &token2, bool bypass, unsigned sessionID=0, bool network=true)
OpalManager::CallDict::CallDict
CallDict(OpalManager &mgr)
Definition: manager.h:1606
OpalManager::ReadUserInput
virtual PString ReadUserInput(OpalConnection &connection, const char *terminators="#\r\n", unsigned lastDigitTimeout=4, unsigned firstDigitTimeout=30)
RTP_Session
Definition: rtp.h:502
OpalManager::Message
virtual PBoolean Message(const PString &to, const PString &body)
OpalManager::SetUpCall
virtual PSafePtr< OpalCall > SetUpCall(const PString &partyA, const PString &partyB, void *userData=NULL, unsigned options=0, OpalConnection::StringOptions *stringOptions=NULL)
OpalManager::garbageCollectSkip
bool garbageCollectSkip
Definition: manager.h:1620
OpalManager::CanAutoStartReceiveVideo
bool CanAutoStartReceiveVideo() const
Definition: manager.h:1154
OpalManager::SetUDPPorts
void SetUDPPorts(unsigned udpBase, unsigned udpMax)
OpalManager::SetVideoPreviewDevice
virtual PBoolean SetVideoPreviewDevice(const PVideoDevice::OpenArgs &deviceArgs)
OpalManager::GetMaxRtpPacketSize
PINDEX GetMaxRtpPacketSize() const
Definition: manager.h:1347
OpalManager::activeCalls
OpalManager::CallDict activeCalls
OpalManager::GetDefaultILSServer
const PString & GetDefaultILSServer() const
Definition: manager.h:1501
OpalManager::garbageCollectExit
PSyncPoint garbageCollectExit
Definition: manager.h:1619
OpalManager::silenceDetectParams
OpalSilenceDetector::Params silenceDetectParams
Definition: manager.h:1542
OpalManager::AddRouteEntry
virtual PBoolean AddRouteEntry(const PString &spec)
pres_ent.h
connection.h
buildopts.h
OpalManager::m_defaultMediaTypeOfService
BYTE m_defaultMediaTypeOfService
Definition: manager.h:1529
OpalManager::defaultDisplayName
PString defaultDisplayName
Definition: manager.h:1527
OpalManager::GetAllCalls
PArray< PString > GetAllCalls() const
Definition: manager.h:182
OpalManager::garbageCollector
PThread * garbageCollector
Definition: manager.h:1618
OpalManager::OnHold
virtual void OnHold(OpalConnection &connection, bool fromRemote, bool onHold)
OpalManager::GetMediaFormatMask
const PStringArray & GetMediaFormatMask() const
Definition: manager.h:1395
OpalManager::PortInfo::mutex
PMutex mutex
Definition: manager.h:1564
OpalManager::SetTCPPorts
void SetTCPPorts(unsigned tcpBase, unsigned tcpMax)
OpalManager::GetRtpIpPortPair
WORD GetRtpIpPortPair()
OpalManager::RouteEntry
Definition: manager.h:913
OpalManager::ClearCallSynchronous
virtual PBoolean ClearCallSynchronous(const PString &token, OpalConnection::CallEndReason reason=OpalConnection::EndedByLocalUser)
echocancel.h
OpalGetMinorVersion
unsigned OpalGetMinorVersion()
OpalManager::rtpPacketSizeMax
PINDEX rtpPacketSizeMax
Definition: manager.h:1533
OpalManager::stun
PSTUNClient * stun
Definition: manager.h:1590
OpalManager::RouteEntry::pattern
PString pattern
Definition: manager.h:919
OpalManager::PortInfo::current
WORD current
Definition: manager.h:1567
OpalManager::SetSilenceDetectParams
virtual void SetSilenceDetectParams(const OpalSilenceDetector::Params &params)
Definition: manager.h:1408
OpalManager::videoPreviewDevice
PVideoDevice::OpenArgs videoPreviewDevice
Definition: manager.h:1549
OpalManager::FaxMessageWaiting
Definition: manager.h:889
OpalManager::IsRecording
virtual bool IsRecording(const PString &callToken)
OpalManager::SetProductInfo
void SetProductInfo(const OpalProductInfo &info, bool updateAll=true)
OpalManager::GetNatMethod
virtual PNatMethod * GetNatMethod(const PIPSocket::Address &remoteAddress=PIPSocket::GetDefaultIpAny()) const
OpalMediaType::Video
static const OpalMediaType & Video()
OpalMediaType
Definition: mediatype.h:57
OpalManager::SetRtpIpPorts
void SetRtpIpPorts(unsigned udpBase, unsigned udpMax)
OpalManager::AddPresentity
virtual PSafePtr< OpalPresentity > AddPresentity(const PString &presentity)
OpalManager::RemovePresentity
virtual bool RemovePresentity(const PString &presentity)
OpalMediaTypeDefinition::SetAutoStart
void SetAutoStart(OpalMediaType::AutoStartMode v)
Definition: mediatype.h:153
guid.h
OpalManager::PDECLARE_NOTIFIER
PDECLARE_NOTIFIER(PThread, OpalManager, GarbageMain)
OpalManager::ClearAllCalls
virtual void ClearAllCalls(OpalConnection::CallEndReason reason=OpalConnection::EndedByLocalUser, PBoolean wait=true)
OpalManager::SetAutoStartReceiveVideo
void SetAutoStartReceiveVideo(bool can)
Definition: manager.h:1158
OpalManager::TextMessageWaiting
Definition: manager.h:892
OpalManager::GetTranslationAddress
const PIPSocket::Address & GetTranslationAddress() const
Definition: manager.h:1228
OpalManager::DetachEndPoint
void DetachEndPoint(const PString &prefix)
OpalManager::SetSTUNServer
PSTUNClient::NatTypes SetSTUNServer(const PString &server)
OpalManager::OnLocalRTP
virtual bool OnLocalRTP(OpalConnection &connection1, OpalConnection &connection2, unsigned sessionID, bool opened) const
OpalManager::OnRouteConnection
virtual bool OnRouteConnection(PStringSet &routesTried, const PString &a_party, const PString &b_party, OpalCall &call, unsigned options, OpalConnection::StringOptions *stringOptions)
OpalManager::GetIMManager
OpalIMManager & GetIMManager()
Definition: manager.h:1641
OpalManager::OnMWIReceived
virtual void OnMWIReceived(const PString &party, MessageWaitingType type, const PString &extraInfo)
OpalManager::OnStartMediaPatch
virtual void OnStartMediaPatch(OpalConnection &connection, OpalMediaPatch &patch)
OpalManager::GetNextToken
virtual PString GetNextToken(char prefix)
OpalManager::translationHost
PString translationHost
Definition: manager.h:1587
OpalManager::OnApplyStringOptions
virtual void OnApplyStringOptions(OpalConnection &conn, OpalConnection::StringOptions &stringOptions)
OpalManager::InterfaceMonitor
Definition: manager.h:1570
OpalManager::defaultUserName
PString defaultUserName
Definition: manager.h:1526
OpalManager::minAudioJitterDelay
unsigned minAudioJitterDelay
Definition: manager.h:1534
OpalManager::SetNoMediaTimeout
PBoolean SetNoMediaTimeout(const PTimeInterval &newInterval)
OpalManager::SetVideoInputDevice
virtual PBoolean SetVideoInputDevice(const PVideoDevice::OpenArgs &deviceArgs)
OpalManager::GetDefaultDisplayName
const PString & GetDefaultDisplayName() const
Definition: manager.h:1135
OpalManager::OpalManager
OpalManager()
OpalManager::OnUserInputTone
virtual void OnUserInputTone(OpalConnection &connection, char tone, int duration)
OpalManager::GetSTUNClient
PSTUNClient * GetSTUNClient() const
Definition: manager.h:1259
OpalManager::mediaFormatMask
PStringArray mediaFormatMask
Definition: manager.h:1537
OpalManager::SetMaxRtpPayloadSize
void SetMaxRtpPayloadSize(PINDEX size, bool mtu=false)
Definition: manager.h:1339
OpalManager::IsLocalAddress
virtual PBoolean IsLocalAddress(const PIPSocket::Address &remoteAddress) const
OpalIM
Definition: im.h:42
OpalManager::PortInfo::Set
void Set(unsigned base, unsigned max, unsigned range, unsigned dflt)
OpalManager::ilsServer
PString ilsServer
Definition: manager.h:1540
OpalManager::NoMessageWaiting
Definition: manager.h:887
OpalManager::m_imManager
OpalIMManager * m_imManager
Definition: manager.h:1644
OpalManager::CallDict::DeleteObject
virtual void DeleteObject(PObject *object) const
OpalManager::OnUserInputString
virtual void OnUserInputString(OpalConnection &connection, const PString &value)
OpalManager::CreateVideoInputDevice
virtual PBoolean CreateVideoInputDevice(const OpalConnection &connection, const OpalMediaFormat &mediaFormat, PVideoInputDevice *&device, PBoolean &autoDelete)
OpalManager::InternalCreateCall
OpalCall * InternalCreateCall()
OpalManager::InternalClearAllCalls
void InternalClearAllCalls(OpalConnection::CallEndReason reason, bool wait, bool first)
OpalManager::MakeConnection
virtual PSafePtr< OpalConnection > MakeConnection(OpalCall &call, const PString &party, void *userData=NULL, unsigned int options=0, OpalConnection::StringOptions *stringOptions=NULL)
OpalManager::OnStopMediaPatch
virtual void OnStopMediaPatch(OpalConnection &connection, OpalMediaPatch &patch)
OpalManager::GetProductInfo
const OpalProductInfo & GetProductInfo() const
Definition: manager.h:1113
OpalManager::GetPresentities
virtual PStringList GetPresentities() const
OpalManager::IsCallEstablished
virtual PBoolean IsCallEstablished(const PString &token)
OpalMediaFormatList
Definition: mediafmt.h:72
OpalManager::mediaFormatOrder
PStringArray mediaFormatOrder
Definition: manager.h:1536
OpalManager::videoOutputDevice
PVideoDevice::OpenArgs videoOutputDevice
Definition: manager.h:1550
OpalManager::GetMediaFormatOrder
const PStringArray & GetMediaFormatOrder() const
Definition: manager.h:1382
OpalManager::MultimediaMessageWaiting
Definition: manager.h:891
OpalManager::SetMediaFormatOrder
void SetMediaFormatOrder(const PStringArray &order)
OpalManager::InterfaceMonitor::OnAddInterface
virtual void OnAddInterface(const PIPSocket::InterfaceEntry &entry)
OpalConnection::AnswerCallResponse
AnswerCallResponse
Definition: connection.h:417
OpalConnection::StringOptions
Definition: connection.h:462
OpalManager::PortInfo::GetNext
WORD GetNext(unsigned increment)
OpalManager::CreateRTPSession
virtual RTP_UDP * CreateRTPSession(const RTP_Session::Params &params)
OpalManager::GetUDPPortBase
WORD GetUDPPortBase() const
Definition: manager.h:1279
OpalCall::OpalCall
OpalCall(OpalManager &manager)
OpalManager::udpPorts
struct OpalManager::PortInfo udpPorts
OpalManager::ShutDownEndpoints
void ShutDownEndpoints()
OpalManager::GetTCPPortBase
WORD GetTCPPortBase() const
Definition: manager.h:1263
OpalManager::RouteEntry::RouteEntry
RouteEntry(const PString &pat, const PString &dest)
OpalManager::InterfaceMonitor::m_manager
OpalManager & m_manager
Definition: manager.h:1584
OpalManager::OnProceeding
virtual void OnProceeding(OpalConnection &connection)
OpalMediaPatch
Definition: patch.h:60
OpalManager::MessageWaitingType
MessageWaitingType
Message waiting sub-types.
Definition: manager.h:886
OpalManager::OnClosedMediaStream
virtual void OnClosedMediaStream(const OpalMediaStream &stream)
OpalManager::FindEndPoint
OpalEndPoint * FindEndPoint(const PString &prefix)
OpalManager::VoiceMessageWaiting
Definition: manager.h:888
OpalManager::OnTransferNotify
virtual bool OnTransferNotify(OpalConnection &connection, const PStringToString &info)
OpalManager::ClearCall
virtual PBoolean ClearCall(const PString &token, OpalConnection::CallEndReason reason=OpalConnection::EndedByLocalUser, PSyncPoint *sync=NULL)
OpalMediaFormat
Definition: mediafmt.h:724
OpalManager::SetDefaultUserName
void SetDefaultUserName(const PString &name, bool updateAll=true)
OpalManager::RouteEntry::regex
PRegularExpression regex
Definition: manager.h:921
OpalManager::GetNoMediaTimeout
const PTimeInterval & GetNoMediaTimeout() const
Definition: manager.h:1491
OpalManager::CreateMediaPatch
virtual OpalMediaPatch * CreateMediaPatch(OpalMediaStream &source, PBoolean requiresPatchThread=true)
silencedetect.h
OpalCall
Definition: call.h:65
OpalManager::OnIncomingConnection
virtual PBoolean OnIncomingConnection(OpalConnection &connection, unsigned options, OpalConnection::StringOptions *stringOptions)
OpalManager::PortInfo::base
WORD base
Definition: manager.h:1565
OpalManager::PARRAY
PARRAY(RouteTable, RouteEntry)
OpalManager::GetTCPPortMax
WORD GetTCPPortMax() const
Definition: manager.h:1267
OpalManager::GetCommonMediaFormats
virtual OpalMediaFormatList GetCommonMediaFormats(bool transportable, bool pcmAudio) const
OpalManager::productInfo
OpalProductInfo productInfo
Definition: manager.h:1524
OpalManager::IsRTPNATEnabled
virtual PBoolean IsRTPNATEnabled(OpalConnection &connection, const PIPSocket::Address &localAddr, const PIPSocket::Address &peerAddr, const PIPSocket::Address &signalAddr, PBoolean incoming)
OpalManager::OnRTPStatistics
virtual void OnRTPStatistics(const OpalConnection &connection, const RTP_Session &session)
OpalManager::SetTranslationHost
bool SetTranslationHost(const PString &host)
OpalManager::CanAutoStartTransmitVideo
bool CanAutoStartTransmitVideo() const
Definition: manager.h:1162
OpalEchoCanceler::Params
Definition: echocancel.h:60
RTP_Session::Params
Definition: rtp.h:509
OpalManager::stunServer
PString stunServer
Definition: manager.h:1589
OpalManager::PagerMessageWaiting
Definition: manager.h:890
OpalManager::OnMessageReceived
virtual void OnMessageReceived(const OpalIM &message)
OpalMediaType::Transmit
Definition: mediatype.h:94
call.h
OpalManager::GetRtpIpPortMax
WORD GetRtpIpPortMax() const
Definition: manager.h:1299
OpalMediaType::GetDefinition
OpalMediaTypeDefinition * GetDefinition() const
OpalManager::NumMessageWaitingTypes
Definition: manager.h:893
OpalManager::GetSilenceDetectParams
const OpalSilenceDetector::Params & GetSilenceDetectParams() const
Definition: manager.h:1414
OpalManager::OnForwarded
virtual PBoolean OnForwarded(OpalConnection &connection, const PString &remoteParty)
OpalManager::SetAudioJitterDelay
void SetAudioJitterDelay(unsigned minDelay, unsigned maxDelay)
OpalMediaType::Receive
Definition: mediatype.h:93
OpalManager::DetectInBandDTMFDisabled
PBoolean DetectInBandDTMFDisabled() const
Definition: manager.h:1480
OpalManager::IsMediaBypassPossible
virtual PBoolean IsMediaBypassPossible(const OpalConnection &source, const OpalConnection &destination, unsigned sessionID) const
OpalManager::GetUDPPortMax
WORD GetUDPPortMax() const
Definition: manager.h:1283
OpalIMManager
Definition: im.h:257
OpalManager::InterfaceMonitor::OnRemoveInterface
virtual void OnRemoveInterface(const PIPSocket::InterfaceEntry &entry)
OpalGetMajorVersion
unsigned OpalGetMajorVersion()
OpalCall::InternalOnClear
void InternalOnClear()
OpalManager::GetSTUNServer
const PString & GetSTUNServer() const
Definition: manager.h:1255
OpalManager::OnAnswerCall
virtual OpalConnection::AnswerCallResponse OnAnswerCall(OpalConnection &connection, const PString &caller)
OpalGetBuildNumber
unsigned OpalGetBuildNumber()
OpalManager::OnEstablished
virtual void OnEstablished(OpalConnection &connection)
OpalManager::DestroyCall
virtual void DestroyCall(OpalCall *call)
OpalManager::GetRtpIpTypeofService
BYTE P_DEPRECATED GetRtpIpTypeofService() const
Definition: manager.h:1318
OpalManager::maxAudioJitterDelay
unsigned maxAudioJitterDelay
Definition: manager.h:1535
OpalManager::CreateVideoOutputDevice
virtual PBoolean CreateVideoOutputDevice(const OpalConnection &connection, const OpalMediaFormat &mediaFormat, PBoolean preview, PVideoOutputDevice *&device, PBoolean &autoDelete)
OpalManager::GetMaxRtpPayloadSize
PINDEX GetMaxRtpPayloadSize() const
Definition: manager.h:1333
OpalManager::noMediaTimeout
PTimeInterval noMediaTimeout
Definition: manager.h:1539
OpalManager::SetDefaultILSServer
void SetDefaultILSServer(const PString &server)
Definition: manager.h:1505
OpalManager::endpointMap
std::map< PString, OpalEndPoint * > endpointMap
Definition: manager.h:1599
OpalManager::m_clearingAllCallsMutex
PMutex m_clearingAllCallsMutex
Definition: manager.h:1614
OpalManager::AttachEndPoint
void AttachEndPoint(OpalEndPoint *endpoint, const PString &prefix=PString::Empty())
OpalManager::endpointList
PList< OpalEndPoint > endpointList
Definition: manager.h:1598
OpalConnection::CallEndReason
Definition: connection.h:396
OpalManager::SetDefaultDisplayName
void SetDefaultDisplayName(const PString &name, bool updateAll=true)
OpalManager::FindCallWithLock
PSafePtr< OpalCall > FindCallWithLock(const PString &token, PSafetyMode mode=PSafeReadWrite)
Definition: manager.h:192
OpalManager::rtpIpPorts
struct OpalManager::PortInfo rtpIpPorts
OpalManager::~OpalManager
~OpalManager()
OpalManager::OnEstablishedCall
virtual void OnEstablishedCall(OpalCall &call)
OpalManager::m_routeTable
RouteTable m_routeTable
Definition: manager.h:1593
OpalManager::PortInfo
Definition: manager.h:1553
OpalManager::GetNextUDPPort
WORD GetNextUDPPort()
OpalManager::RouteEntry::PrintOn
void PrintOn(ostream &strm) const
OpalManager::GetRtpIpPortBase
WORD GetRtpIpPortBase() const
Definition: manager.h:1295
OpalManager::OnNewConnection
virtual void OnNewConnection(OpalConnection &connection)
OpalManager::OnOpenMediaStream
virtual PBoolean OnOpenMediaStream(OpalConnection &connection, OpalMediaStream &stream)
OpalMediaStream
Definition: mediastrm.h:111
OpalManager::CallDict::manager
OpalManager & manager
Definition: manager.h:1608
OpalManager::RouteEntry::destination
PString destination
Definition: manager.h:920
OpalManager::ApplyRouteTable
virtual PString ApplyRouteTable(const PString &source, const PString &destination, PINDEX &entry)
OpalManager::SetTranslationAddress
void SetTranslationAddress(const PIPSocket::Address &address)
OpalManager::CallDict
Definition: manager.h:1603
OpalManager::videoInputDevice
PVideoDevice::OpenArgs videoInputDevice
Definition: manager.h:1548
OpalManager::TranslateIPAddress
virtual PBoolean TranslateIPAddress(PIPSocket::Address &localAddress, const PIPSocket::Address &remoteAddress)
OpalManager::GetMediaTypeOfService
BYTE GetMediaTypeOfService() const
Definition: manager.h:1311
OpalManager::endpointsMutex
PReadWriteMutex endpointsMutex
Definition: manager.h:1597
OpalManager::GetVideoPreviewDevice
const PVideoDevice::OpenArgs & GetVideoPreviewDevice() const
Definition: manager.h:1460
OpalConnection
Definition: connection.h:353
OpalManager::SetMediaFormatMask
void SetMediaFormatMask(const PStringArray &mask)
OpalManager::GetEndPoints
PList< OpalEndPoint > GetEndPoints() const
OpalManager::m_clearingAllCallsCount
PAtomicInteger m_clearingAllCallsCount
Definition: manager.h:1613
OpalManager::StopRecording
virtual bool StopRecording(const PString &callToken)
OpalManager::GetTranslationHost
const PString & GetTranslationHost() const
Definition: manager.h:1218
OpalManager::HasCall
virtual PBoolean HasCall(const PString &token)
Definition: manager.h:172
OpalManager::PortInfo::max
WORD max
Definition: manager.h:1566
OpalManager::GetPresentity
virtual PSafePtr< OpalPresentity > GetPresentity(const PString &presentity, PSafetyMode mode=PSafeReference)
OpalManager::SetMediaTypeOfService
void SetMediaTypeOfService(unsigned tos)
Definition: manager.h:1315
OpalManager::GetMaxAudioJitterDelay
unsigned GetMaxAudioJitterDelay() const
Definition: manager.h:1364
OpalManager::InterfaceMonitor::InterfaceMonitor
InterfaceMonitor(OpalManager &manager)
OpalManager::SetRtpIpTypeofService
void P_DEPRECATED SetRtpIpTypeofService(unsigned tos)
Definition: manager.h:1319
OpalManager::GetDefaultUserName
const PString & GetDefaultUserName() const
Definition: manager.h:1124
OpalManager::m_mediaTypeOfService
map< OpalMediaType, BYTE > m_mediaTypeOfService
Definition: manager.h:1530
OpalManager::SetRouteTable
PBoolean SetRouteTable(const PStringArray &specs)
OpalManager::GetVideoOutputDevice
const PVideoDevice::OpenArgs & GetVideoOutputDevice() const
Definition: manager.h:1476
OpalManager::SetVideoOutputDevice
virtual PBoolean SetVideoOutputDevice(const PVideoDevice::OpenArgs &deviceArgs)
OpalManager::translationAddress
PIPSocket::Address translationAddress
Definition: manager.h:1588
OpalManager::GetMinAudioJitterDelay
unsigned GetMinAudioJitterDelay() const
Definition: manager.h:1359
OpalManager::m_allCallsCleared
PSyncPoint m_allCallsCleared
Definition: manager.h:1615
OpalManager::DisableDetectInBandDTMF
void DisableDetectInBandDTMF(PBoolean mode)
Definition: manager.h:1485
OpalManager::GetRouteTable
const RouteTable & GetRouteTable() const
Definition: manager.h:1059
OpalConnection::EndedByLocalUser
Definition: connection.h:362
OpalManager::AdjustMediaFormats
virtual void AdjustMediaFormats(bool local, const OpalConnection &connection, OpalMediaFormatList &mediaFormats) const
OpalRecordManager::Options
Definition: recording.h:80
RTP_UDP
Definition: rtp.h:1098
OpalManager::OnReleased
virtual void OnReleased(OpalConnection &connection)
OpalProductInfo
Definition: connection.h:312
OpalManager::GetVideoInputDevice
const PVideoDevice::OpenArgs & GetVideoInputDevice() const
Definition: manager.h:1444
OpalManager::OnAlerting
virtual void OnAlerting(OpalConnection &connection)
OpalManager::m_routeMutex
PMutex m_routeMutex
Definition: manager.h:1594
OpalManager::SetMaxRtpPacketSize
void SetMaxRtpPacketSize(PINDEX size)
Definition: manager.h:1352
OpalManager::CreateCall
virtual OpalCall * CreateCall(void *userData)