sipep.h
Go to the documentation of this file.
/*
* sipep.h
*
* Session Initiation Protocol endpoint.
*
* 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: 28428 $
* $Author: rjongbloed $
* $Date: 2012-10-01 03:38:50 -0500 (Mon, 01 Oct 2012) $
*/
#ifndef OPAL_SIP_SIPEP_H
#define OPAL_SIP_SIPEP_H
#ifdef P_USE_PRAGMA
#pragma interface
#endif
#ifndef _PTLIB_H
#include <ptlib.h>
#endif
#include <opal/buildopts.h>
#if OPAL_SIP
#include <ptclib/threadpool.h>
#include <opal/rtpep.h>
#include <sip/sipcon.h>
#include <sip/sippdu.h>
#include <sip/handlers.h>
#if OPAL_HAS_SIPIM
#include <im/sipim.h>
#endif
class SIPRegisterHandler;
//
// provide flag so applications know if presence is available
//
#define OPAL_HAS_SIP_PRESENCE 1
class SIPAuthInfo : public PObject
{
public:
SIPAuthInfo()
{ }
SIPAuthInfo(const PString & u, const PString & p)
{ username = u; password = p; }
PString username;
PString password;
};
class SIPEndPoint : public OpalRTPEndPoint
{
PCLASSINFO(SIPEndPoint, OpalRTPEndPoint);
public:
SIPEndPoint(
OpalManager & manager,
unsigned maxConnectionThreads = 10,
unsigned maxHandlerThreads = 5
);
~SIPEndPoint();
virtual void ShutDown();
virtual PString GetDefaultTransport() const;
virtual PBoolean NewIncomingConnection(
OpalTransport * transport
);
virtual PSafePtr<OpalConnection> MakeConnection(
OpalCall & call,
const PString & party,
void * userData,
unsigned int options,
OpalConnection::StringOptions * stringOptions
);
virtual void OnReleased(
OpalConnection & connection
);
virtual PBoolean GarbageCollection();
virtual SIPConnection * CreateConnection(
OpalCall & call,
const PString & token,
void * userData,
const SIPURL & destination,
OpalTransport * transport,
SIP_PDU * invite,
unsigned int options = 0,
OpalConnection::StringOptions * stringOptions = NULL
);
virtual PBoolean SetupTransfer(
const PString & token,
const PString & callIdentity,
const PString & remoteParty,
void * userData = NULL
);
virtual PBoolean ForwardConnection(
SIPConnection & connection,
const PString & forwardParty
);
bool ClearDialogContext(
const PString & descriptor
);
bool ClearDialogContext(
SIPDialogContext & context
);
OpalTransport * CreateTransport(
const SIPURL & remoteURL,
const PString & localInterface = PString::Empty()
);
virtual void HandlePDU(
OpalTransport & transport
);
virtual PBoolean OnReceivedPDU(
OpalTransport & transport,
SIP_PDU * pdu
);
virtual bool OnReceivedConnectionlessPDU(
OpalTransport & transport,
SIP_PDU * pdu
);
virtual void OnReceivedResponse(
SIPTransaction & transaction,
SIP_PDU & response
);
virtual PBoolean OnReceivedINVITE(
OpalTransport & transport,
SIP_PDU * pdu
);
virtual PBoolean OnReceivedNOTIFY(
OpalTransport & transport,
SIP_PDU & response
);
virtual PBoolean OnReceivedREGISTER(
OpalTransport & transport,
SIP_PDU & pdu
);
virtual PBoolean OnReceivedSUBSCRIBE(
OpalTransport & transport,
SIP_PDU & pdu
);
virtual bool OnReceivedMESSAGE(
OpalTransport & transport,
SIP_PDU & response
);
virtual bool OnReceivedOPTIONS(
OpalTransport & transport,
SIP_PDU & response
);
virtual void OnTransactionFailed(
SIPTransaction & transaction
);
virtual void OnRTPStatistics(
const SIPConnection & connection,
const RTP_Session & session
) const;
PSafePtr<SIPConnection> GetSIPConnectionWithLock(
const PString & token,
PSafetyMode mode = PSafeReadWrite,
SIP_PDU::StatusCodes * errorCode = NULL
);
virtual PBoolean IsAcceptedAddress(const SIPURL & toAddr);
bool Register(
const SIPRegister::Params & params,
PString & aor,
SIP_PDU::StatusCodes * reason = NULL
);
// For backward compatibility
bool Register(
const SIPRegister::Params & params,
PString & aor,
bool asynchronous
);
bool P_DEPRECATED Register(
const PString & host,
const PString & user = PString::Empty(),
const PString & autName = PString::Empty(),
const PString & password = PString::Empty(),
const PString & authRealm = PString::Empty(),
unsigned expire = 0,
const PTimeInterval & minRetryTime = PMaxTimeInterval,
const PTimeInterval & maxRetryTime = PMaxTimeInterval
);
PBoolean IsRegistered(
const PString & aor,
bool includeOffline = false
);
bool Unregister(
const PString & aor
);
bool UnregisterAll();
unsigned GetRegistrationsCount() const { return activeSIPHandlers.GetCount(SIP_PDU::Method_REGISTER); }
PStringList GetRegistrations(
bool includeOffline = false
) const { return activeSIPHandlers.GetAddresses(includeOffline, SIP_PDU::Method_REGISTER); }
struct RegistrationStatus {
SIPRegisterHandler * m_handler;
PString m_addressofRecord;
bool m_wasRegistering;
bool m_reRegistering;
SIP_PDU::StatusCodes m_reason;
OpalProductInfo m_productInfo;
void * m_userData;
};
virtual void OnRegistrationStatus(
const RegistrationStatus & status
);
// For backward compatibility
virtual void OnRegistrationStatus(
const PString & aor,
PBoolean wasRegistering,
PBoolean reRegistering,
SIP_PDU::StatusCodes reason
);
virtual void OnRegistrationFailed(
const PString & aor,
SIP_PDU::StatusCodes reason,
PBoolean wasRegistering
);
virtual void OnRegistered(
const PString & aor,
PBoolean wasRegistering
);
bool Subscribe(
const SIPSubscribe::Params & params,
PString & token,
bool tokenIsAOR = true
);
// For backward compatibility
bool Subscribe(
SIPSubscribe::PredefinedPackages eventPackage,
unsigned expire,
const PString & aor
);
bool IsSubscribed(
const PString & aor,
bool includeOffline = false
);
bool IsSubscribed(
const PString & eventPackage,
const PString & aor,
bool includeOffline = false
);
bool Unsubscribe(
const PString & aor,
bool invalidateNotifiers = false
);
bool Unsubscribe(
SIPSubscribe::PredefinedPackages eventPackage,
const PString & aor,
bool invalidateNotifiers = false
);
bool Unsubscribe(
const PString & eventPackage,
const PString & aor,
bool invalidateNotifiers = false
);
bool UnsubcribeAll(
SIPSubscribe::PredefinedPackages eventPackage
);
bool UnsubcribeAll(
const PString & eventPackage
);
unsigned GetSubscriptionCount(
const SIPSubscribe::EventPackage & eventPackage
) { return activeSIPHandlers.GetCount(SIP_PDU::Method_SUBSCRIBE, eventPackage); }
PStringList GetSubscriptions(
const SIPSubscribe::EventPackage & eventPackage,
bool includeOffline = false
) const { return activeSIPHandlers.GetAddresses(includeOffline, SIP_PDU::Method_REGISTER, eventPackage); }
typedef SIPSubscribe::SubscriptionStatus SubscriptionStatus;
virtual void OnSubscriptionStatus(
const SubscriptionStatus & status
);
virtual void OnSubscriptionStatus(
const PString & eventPackage,
const SIPURL & uri,
bool wasSubscribing,
bool reSubscribing,
SIP_PDU::StatusCodes reason
);
virtual void OnSubscriptionStatus(
SIPSubscribeHandler & handler,
const SIPURL & uri,
bool wasSubscribing,
bool reSubscribing,
SIP_PDU::StatusCodes reason
);
virtual bool CanNotify(
const PString & eventPackage
);
bool Notify(
const SIPURL & targetAddress,
const PString & eventPackage,
const PObject & body
);
virtual void OnDialogInfoReceived(
const SIPDialogNotification & info
);
void SendNotifyDialogInfo(
const SIPDialogNotification & info
);
virtual PBoolean Message(
OpalIM & message
);
bool SendMESSAGE(
SIPMessage::Params & params
);
virtual void OnMESSAGECompleted(
const SIPMessage::Params & params,
SIP_PDU::StatusCodes reason
);
struct ConnectionlessMessageInfo {
ConnectionlessMessageInfo(OpalTransport & transport, SIP_PDU & pdu)
: m_pdu(pdu), m_transport(transport), m_status(ResponseSent)
{ }
SIP_PDU & m_pdu;
OpalTransport & m_transport;
enum {
NotHandled,
SendOK,
MethodNotAllowed,
ResponseSent
} m_status;
};
typedef PNotifierTemplate<ConnectionlessMessageInfo &> ConnectionlessMessageNotifier;
#define PDECLARE_ConnectionlessMessageNotifier(cls, fn) PDECLARE_NOTIFIER2(SIPEndPoint, cls, fn, SIPEndPoint::ConnectionlessMessageInfo &)
#define PCREATE_ConnectionlessMessageNotifier(fn) PCREATE_NOTIFIER2(fn, SIPEndPoint::ConnectionlessMessageInfo &)
void SetConnectionlessMessageNotifier(
const ConnectionlessMessageNotifier & notifier
)
{ m_onConnectionlessMessage = notifier; }
virtual bool SendOPTIONS(
const SIPOptions::Params & params
);
virtual void OnOptionsCompleted(
const SIPOptions::Params & params,
const SIP_PDU & response
);
bool Publish(
const SIPSubscribe::Params & params,
const PString & body,
PString & aor
);
bool Publish(
const PString & to,
const PString & body,
unsigned expire = 300
);
PStringList GetPublications(
const SIPSubscribe::EventPackage & eventPackage,
bool includeOffline = false
) const { return activeSIPHandlers.GetAddresses(includeOffline, SIP_PDU::Method_PUBLISH, eventPackage); }
bool PublishPresence(
const SIPPresenceInfo & info,
unsigned expire = 300
);
virtual void OnPresenceInfoReceived (
const SIPPresenceInfo & info
);
virtual void OnPresenceInfoReceived (
const PString & identity,
const PString & basic,
const PString & note
);
PBoolean Ping(
const PURL & to
);
SIPConnection::PRACKMode GetDefaultPRACKMode() const { return m_defaultPrackMode; }
void SetDefaultPRACKMode(SIPConnection::PRACKMode mode) { m_defaultPrackMode = mode; }
void SetMIMEForm(PBoolean v) { mimeForm = v; }
PBoolean GetMIMEForm() const { return mimeForm; }
void SetMaxRetries(unsigned r) { maxRetries = r; }
unsigned GetMaxRetries() const { return maxRetries; }
void SetRetryTimeouts(
const PTimeInterval & t1,
const PTimeInterval & t2
) { retryTimeoutMin = t1; retryTimeoutMax = t2; }
const PTimeInterval & GetRetryTimeoutMin() const { return retryTimeoutMin; }
const PTimeInterval & GetRetryTimeoutMax() const { return retryTimeoutMax; }
void SetNonInviteTimeout(
const PTimeInterval & t
) { nonInviteTimeout = t; }
const PTimeInterval & GetNonInviteTimeout() const { return nonInviteTimeout; }
void SetPduCleanUpTimeout(
const PTimeInterval & t
) { pduCleanUpTimeout = t; }
const PTimeInterval & GetPduCleanUpTimeout() const { return pduCleanUpTimeout; }
void SetInviteTimeout(
const PTimeInterval & t
) { inviteTimeout = t; }
const PTimeInterval & GetInviteTimeout() const { return inviteTimeout; }
void SetProgressTimeout(
const PTimeInterval & t
) { m_progressTimeout = t; }
const PTimeInterval & GetProgressTimeout() const { return m_progressTimeout; }
void SetAckTimeout(
const PTimeInterval & t
) { ackTimeout = t; }
const PTimeInterval & GetAckTimeout() const { return ackTimeout; }
void SetRegistrarTimeToLive(
const PTimeInterval & t
) { registrarTimeToLive = t; }
const PTimeInterval & GetRegistrarTimeToLive() const { return registrarTimeToLive; }
void SetNotifierTimeToLive(
const PTimeInterval & t
) { notifierTimeToLive = t; }
const PTimeInterval & GetNotifierTimeToLive() const { return notifierTimeToLive; }
void SetNATBindingTimeout(
const PTimeInterval & t
) { natBindingTimeout = t; natBindingTimer.RunContinuous (natBindingTimeout); }
const PTimeInterval & GetNATBindingTimeout() const { return natBindingTimeout; }
void AddTransaction(
SIPTransaction * transaction
) { transactions.SetAt(transaction->GetTransactionID(), transaction); }
PSafePtr<SIPTransaction> GetTransaction(const PString & transactionID, PSafetyMode mode = PSafeReadWrite)
{ return transactions.FindWithLock(transactionID, mode); }
unsigned GetNextCSeq() { return ++lastSentCSeq; }
void SetRegisteredUserMode(bool v) { m_registeredUserMode = v; }
bool GetRegisteredYserMode() const { return m_registeredUserMode; }
SIP_PDU::StatusCodes HandleAuthentication(
SIPAuthentication * & authentication,
unsigned & authenticateErrors,
const SIP_PDU & response,
const SIPURL & proxyOverride,
const PString & username,
const PString & password
);
virtual SIPURL GetRegisteredProxy(const SIPURL & remoteURL);
virtual SIPURL GetRegisteredPartyName(const SIPURL & remoteURL, const OpalTransport & transport);
virtual SIPURL GetDefaultRegisteredPartyName(const OpalTransport & transport);
void AdjustToRegistration(
SIP_PDU & pdu,
const OpalTransport & transport,
const SIPConnection * connection
);
virtual SIPURL GetLocalURL(
const OpalTransport & transport,
const PString & userName = PString::Empty()
);
const SIPURL & GetProxy() const { return proxy; }
void SetProxy(const SIPURL & url);
void SetProxy(
const PString & hostname,
const PString & username,
const PString & password
);
int GetDefaultAppearanceCode() const { return m_defaultAppearanceCode; }
void SetDefaultAppearanceCode(int code) { m_defaultAppearanceCode = code; }
virtual PString GetUserAgent() const;
void SetUserAgent(const PString & str) { userAgentString = str; }
virtual unsigned GetAllowedMethods() const;
enum NATBindingRefreshMethod{
None,
Options,
EmptyRequest,
NumMethods
};
void SetNATBindingRefreshMethod(const NATBindingRefreshMethod m) { natMethod = m; }
virtual SIPRegisterHandler * CreateRegisterHandler(const SIPRegister::Params & params);
virtual void OnStartTransaction(SIPConnection & conn, SIPTransaction & transaction);
void UpdateHandlerIndexes(SIPHandler * handler) { activeSIPHandlers.Update(handler); }
protected:
PDECLARE_NOTIFIER(PThread, SIPEndPoint, TransportThreadMain);
PDECLARE_NOTIFIER(PTimer, SIPEndPoint, NATBindingRefresh);
SIPURL proxy;
PString userAgentString;
SIPConnection::PRACKMode m_defaultPrackMode;
bool mimeForm;
unsigned maxRetries;
PTimeInterval retryTimeoutMin; // T1
PTimeInterval retryTimeoutMax; // T2
PTimeInterval nonInviteTimeout; // T3
PTimeInterval pduCleanUpTimeout; // T4
PTimeInterval inviteTimeout;
PTimeInterval m_progressTimeout;
PTimeInterval ackTimeout;
PTimeInterval registrarTimeToLive;
PTimeInterval notifierTimeToLive;
PTimeInterval natBindingTimeout;
bool m_registeredUserMode;
bool m_shuttingDown;
SIPHandlersList activeSIPHandlers;
PStringToString m_receivedConnectionTokens;
PSafeDictionary<PString, SIPTransaction> transactions;
PTimer natBindingTimer;
NATBindingRefreshMethod natMethod;
PAtomicInteger lastSentCSeq;
int m_defaultAppearanceCode;
struct RegistrationCompletion {
PSyncPoint m_sync;
SIP_PDU::StatusCodes m_reason;
RegistrationCompletion() : m_reason(SIP_PDU::Information_Trying) { }
};
std::map<PString, RegistrationCompletion> m_registrationComplete;
ConnectionlessMessageNotifier m_onConnectionlessMessage;
// Thread pooling
class SIP_Work
{
public:
SIP_Work(SIPEndPoint & ep, SIP_PDU * pdu, const PString & token);
virtual ~SIP_Work();
virtual void Work();
SIPEndPoint & m_endpoint;
SIP_PDU * m_pdu;
PString m_token;
};
class WorkThreadPool : public PQueuedThreadPool<SIP_Work>
{
public:
WorkThreadPool(unsigned maxWorkers)
: PQueuedThreadPool<SIP_Work>(maxWorkers)
{ }
virtual WorkerThreadBase * CreateWorkerThread();
} m_connectionThreadPool, m_handlerThreadPool;
// Network interface checking
enum {
HighPriority = 80,
LowPriority = 30,
};
class InterfaceMonitor : public PInterfaceMonitorClient
{
PCLASSINFO(InterfaceMonitor, PInterfaceMonitorClient);
public:
InterfaceMonitor(SIPEndPoint & manager, PINDEX priority);
virtual void OnAddInterface(const PIPSocket::InterfaceEntry & entry);
virtual void OnRemoveInterface(const PIPSocket::InterfaceEntry & entry);
protected:
SIPEndPoint & m_endpoint;
};
InterfaceMonitor m_highPriorityMonitor;
InterfaceMonitor m_lowPriorityMonitor;
friend void InterfaceMonitor::OnAddInterface(const PIPSocket::InterfaceEntry & entry);
friend void InterfaceMonitor::OnRemoveInterface(const PIPSocket::InterfaceEntry & entry);
bool m_disableTrying;
P_REMOVE_VIRTUAL_VOID(OnReceivedIntervalTooBrief(SIPTransaction &, SIP_PDU &));
P_REMOVE_VIRTUAL_VOID(OnReceivedAuthenticationRequired(SIPTransaction &, SIP_PDU &));
P_REMOVE_VIRTUAL_VOID(OnReceivedOK(SIPTransaction &, SIP_PDU &));
P_REMOVE_VIRTUAL_VOID(OnMessageFailed(const SIPURL &, SIP_PDU::StatusCodes));
};
#endif // OPAL_SIP
#endif // OPAL_SIP_SIPEP_H
// End of File ///////////////////////////////////////////////////////////////
SIPEndPoint::inviteTimeout
PTimeInterval inviteTimeout
Definition: sipep.h:1001
SIPSubscribe::EventPackage
Definition: sippdu.h:1118
SIPEndPoint::SetAckTimeout
void SetAckTimeout(const PTimeInterval &t)
Definition: sipep.h:825
SIPEndPoint::natBindingTimer
PTimer natBindingTimer
Definition: sipep.h:1015
SIPURL
Definition: sippdu.h:70
OpalManager
Definition: manager.h:74
SIPEndPoint::retryTimeoutMin
PTimeInterval retryTimeoutMin
Definition: sipep.h:997
SIPEndPoint::notifierTimeToLive
PTimeInterval notifierTimeToLive
Definition: sipep.h:1005
SIPEndPoint::OnStartTransaction
virtual void OnStartTransaction(SIPConnection &conn, SIPTransaction &transaction)
SIPEndPoint::GetRegistrationsCount
unsigned GetRegistrationsCount() const
Definition: sipep.h:457
SIPEndPoint::OnDialogInfoReceived
virtual void OnDialogInfoReceived(const SIPDialogNotification &info)
SIPEndPoint::RegistrationStatus::m_wasRegistering
bool m_wasRegistering
Was registering or unregistering.
Definition: sipep.h:469
SIPEndPoint::GetRegisteredYserMode
bool GetRegisteredYserMode() const
Definition: sipep.h:862
SIPEndPoint::PDECLARE_NOTIFIER
PDECLARE_NOTIFIER(PThread, SIPEndPoint, TransportThreadMain)
SIPEndPoint::AdjustToRegistration
void AdjustToRegistration(SIP_PDU &pdu, const OpalTransport &transport, const SIPConnection *connection)
SIPEndPoint::IsAcceptedAddress
virtual PBoolean IsAcceptedAddress(const SIPURL &toAddr)
SIPEndPoint::SetProxy
void SetProxy(const SIPURL &url)
SIPEndPoint::ConnectionlessMessageInfo::NotHandled
Definition: sipep.h:704
SIPConnection::PRACKMode
PRACKMode
Mode for reliable provisional responses.
Definition: sipcon.h:570
SIPEndPoint::SetDefaultPRACKMode
void SetDefaultPRACKMode(SIPConnection::PRACKMode mode)
Definition: sipep.h:790
SIPEndPoint::SetDefaultAppearanceCode
void SetDefaultAppearanceCode(int code)
Definition: sipep.h:946
SIPEndPoint::OnSubscriptionStatus
virtual void OnSubscriptionStatus(const SubscriptionStatus &status)
SIPEndPoint::registrarTimeToLive
PTimeInterval registrarTimeToLive
Definition: sipep.h:1004
SIPDialogNotification
Definition: handlers.h:495
RTP_Session
Definition: rtp.h:502
SIPSubscribe::PredefinedPackages
PredefinedPackages
Definition: sippdu.h:1101
SIPEndPoint::GetProxy
const SIPURL & GetProxy() const
Definition: sipep.h:923
SIPEndPoint::None
Definition: sipep.h:969
SIPTransaction
Definition: sippdu.h:854
SIPEndPoint::GetDefaultAppearanceCode
int GetDefaultAppearanceCode() const
Definition: sipep.h:942
SIPEndPoint::SubscriptionStatus
SIPSubscribe::SubscriptionStatus SubscriptionStatus
Definition: sipep.h:624
SIPEndPoint::OnReceivedMESSAGE
virtual bool OnReceivedMESSAGE(OpalTransport &transport, SIP_PDU &response)
SIPEndPoint::SetRegisteredUserMode
void SetRegisteredUserMode(bool v)
Definition: sipep.h:861
handlers.h
SIPEndPoint::ConnectionlessMessageNotifier
PNotifierTemplate< ConnectionlessMessageInfo & > ConnectionlessMessageNotifier
Definition: sipep.h:711
SIPMessage::Params
Definition: sippdu.h:1314
SIPEndPoint::m_handlerThreadPool
SIPEndPoint::WorkThreadPool m_handlerThreadPool
SIPEndPoint::GetNextCSeq
unsigned GetNextCSeq()
Definition: sipep.h:854
SIPEndPoint::OnReceivedResponse
virtual void OnReceivedResponse(SIPTransaction &transaction, SIP_PDU &response)
SIPEndPoint::SetNonInviteTimeout
void SetNonInviteTimeout(const PTimeInterval &t)
Definition: sipep.h:805
SIPEndPoint::IsRegistered
PBoolean IsRegistered(const PString &aor, bool includeOffline=false)
SIPEndPoint::natBindingTimeout
PTimeInterval natBindingTimeout
Definition: sipep.h:1006
SIPEndPoint::SIP_Work::Work
virtual void Work()
buildopts.h
SIPEndPoint::activeSIPHandlers
SIPHandlersList activeSIPHandlers
Definition: sipep.h:1010
SIPEndPoint::HighPriority
Definition: sipep.h:1055
SIPEndPoint::m_registeredUserMode
bool m_registeredUserMode
Definition: sipep.h:1007
SIPEndPoint::ConnectionlessMessageInfo
Definition: sipep.h:696
SIPEndPoint::GetUserAgent
virtual PString GetUserAgent() const
SIPConnection
Definition: sipcon.h:126
SIPEndPoint::CreateConnection
virtual SIPConnection * CreateConnection(OpalCall &call, const PString &token, void *userData, const SIPURL &destination, OpalTransport *transport, SIP_PDU *invite, unsigned int options=0, OpalConnection::StringOptions *stringOptions=NULL)
SIPHandlersList::GetCount
unsigned GetCount(SIP_PDU::Methods meth, const PString &eventPackage=PString::Empty()) const
SIPEndPoint::RegistrationStatus::m_addressofRecord
PString m_addressofRecord
Address of record for registration.
Definition: sipep.h:468
SIPEndPoint::OnPresenceInfoReceived
virtual void OnPresenceInfoReceived(const SIPPresenceInfo &info)
SIPEndPoint::CanNotify
virtual bool CanNotify(const PString &eventPackage)
OpalTransport
Definition: transports.h:703
SIP_PDU::Method_SUBSCRIBE
Definition: sippdu.h:507
SIPSubscribe::Params
Definition: sippdu.h:1169
SIPEndPoint
Definition: sipep.h:86
SIPEndPoint::GetDefaultPRACKMode
SIPConnection::PRACKMode GetDefaultPRACKMode() const
Definition: sipep.h:786
SIPEndPoint::transactions
PSafeDictionary< PString, SIPTransaction > transactions
Definition: sipep.h:1013
SIPEndPoint::GetPduCleanUpTimeout
const PTimeInterval & GetPduCleanUpTimeout() const
Definition: sipep.h:813
SIPHandlersList::Update
void Update(SIPHandler *handler)
SIPEndPoint::GetDefaultTransport
virtual PString GetDefaultTransport() const
SIPEndPoint::ConnectionlessMessageInfo::m_status
enum SIPEndPoint::ConnectionlessMessageInfo::@42 m_status
SIPEndPoint::SIP_Work::m_pdu
SIP_PDU * m_pdu
Definition: sipep.h:1039
SIPEndPoint::RegistrationCompletion::m_reason
SIP_PDU::StatusCodes m_reason
Definition: sipep.h:1022
SIPEndPoint::OnRTPStatistics
virtual void OnRTPStatistics(const SIPConnection &connection, const RTP_Session &session) const
SIP_PDU::StatusCodes
StatusCodes
Definition: sippdu.h:518
SIPEndPoint::OnRegistrationFailed
virtual void OnRegistrationFailed(const PString &aor, SIP_PDU::StatusCodes reason, PBoolean wasRegistering)
SIP_PDU
Definition: sippdu.h:496
SIPEndPoint::RegistrationStatus::m_handler
SIPRegisterHandler * m_handler
Handler for registration.
Definition: sipep.h:467
SIPEndPoint::GetSubscriptions
PStringList GetSubscriptions(const SIPSubscribe::EventPackage &eventPackage, bool includeOffline=false) const
Definition: sipep.h:618
SIPEndPoint::OnReceivedOPTIONS
virtual bool OnReceivedOPTIONS(OpalTransport &transport, SIP_PDU &response)
SIPEndPoint::OnRegistered
virtual void OnRegistered(const PString &aor, PBoolean wasRegistering)
SIPEndPoint::HandlePDU
virtual void HandlePDU(OpalTransport &transport)
SIPEndPoint::GetNATBindingTimeout
const PTimeInterval & GetNATBindingTimeout() const
Definition: sipep.h:843
SIPEndPoint::OnReceivedREGISTER
virtual PBoolean OnReceivedREGISTER(OpalTransport &transport, SIP_PDU &pdu)
SIPEndPoint::AddTransaction
void AddTransaction(SIPTransaction *transaction)
Definition: sipep.h:845
SIPEndPoint::GetNonInviteTimeout
const PTimeInterval & GetNonInviteTimeout() const
Definition: sipep.h:808
SIPEndPoint::~SIPEndPoint
~SIPEndPoint()
SIPAuthInfo
Definition: sipep.h:70
SIPEndPoint::InterfaceMonitor::m_endpoint
SIPEndPoint & m_endpoint
Definition: sipep.h:1068
SIPEndPoint::ClearDialogContext
bool ClearDialogContext(const PString &descriptor)
OpalIM
Definition: im.h:42
SIPEndPoint::ConnectionlessMessageInfo::m_transport
OpalTransport & m_transport
Definition: sipep.h:702
SIPEndPoint::InterfaceMonitor::OnRemoveInterface
virtual void OnRemoveInterface(const PIPSocket::InterfaceEntry &entry)
SIPEndPoint::Message
virtual PBoolean Message(OpalIM &message)
SIPEndPoint::SetInviteTimeout
void SetInviteTimeout(const PTimeInterval &t)
Definition: sipep.h:815
SIPEndPoint::OnOptionsCompleted
virtual void OnOptionsCompleted(const SIPOptions::Params &params, const SIP_PDU &response)
SIPEndPoint::UnregisterAll
bool UnregisterAll()
SIPEndPoint::m_progressTimeout
PTimeInterval m_progressTimeout
Definition: sipep.h:1002
SIPEndPoint::RegistrationCompletion::RegistrationCompletion
RegistrationCompletion()
Definition: sipep.h:1023
SIPEndPoint::GetInviteTimeout
const PTimeInterval & GetInviteTimeout() const
Definition: sipep.h:818
SIPEndPoint::Ping
PBoolean Ping(const PURL &to)
SIPEndPoint::RegistrationStatus::m_userData
void * m_userData
User data corresponding to this registration.
Definition: sipep.h:473
SIPEndPoint::GetAckTimeout
const PTimeInterval & GetAckTimeout() const
Definition: sipep.h:828
SIPEndPoint::RegistrationCompletion
Definition: sipep.h:1020
SIPEndPoint::GetDefaultRegisteredPartyName
virtual SIPURL GetDefaultRegisteredPartyName(const OpalTransport &transport)
SIPEndPoint::OnReceivedConnectionlessPDU
virtual bool OnReceivedConnectionlessPDU(OpalTransport &transport, SIP_PDU *pdu)
SIPEndPoint::SetNATBindingTimeout
void SetNATBindingTimeout(const PTimeInterval &t)
Definition: sipep.h:840
SIPEndPoint::SetRegistrarTimeToLive
void SetRegistrarTimeToLive(const PTimeInterval &t)
Definition: sipep.h:830
SIPEndPoint::m_defaultPrackMode
SIPConnection::PRACKMode m_defaultPrackMode
Definition: sipep.h:993
SIPAuthInfo::SIPAuthInfo
SIPAuthInfo()
Definition: sipep.h:73
SIPHandlersList
Definition: handlers.h:366
sipcon.h
SIPEndPoint::OnReceivedINVITE
virtual PBoolean OnReceivedINVITE(OpalTransport &transport, SIP_PDU *pdu)
OpalConnection::StringOptions
Definition: connection.h:462
SIPEndPoint::GetTransaction
PSafePtr< SIPTransaction > GetTransaction(const PString &transactionID, PSafetyMode mode=PSafeReadWrite)
Definition: sipep.h:849
SIPEndPoint::GetMaxRetries
unsigned GetMaxRetries() const
Definition: sipep.h:796
SIPEndPoint::OnReceivedNOTIFY
virtual PBoolean OnReceivedNOTIFY(OpalTransport &transport, SIP_PDU &response)
SIPEndPoint::GetRegisteredPartyName
virtual SIPURL GetRegisteredPartyName(const SIPURL &remoteURL, const OpalTransport &transport)
SIPOptions::Params
Definition: sippdu.h:1358
SIPEndPoint::OnRegistrationStatus
virtual void OnRegistrationStatus(const RegistrationStatus &status)
SIPEndPoint::ForwardConnection
virtual PBoolean ForwardConnection(SIPConnection &connection, const PString &forwardParty)
SIPEndPoint::SendNotifyDialogInfo
void SendNotifyDialogInfo(const SIPDialogNotification &info)
SIPEndPoint::ConnectionlessMessageInfo::SendOK
Definition: sipep.h:705
SIPEndPoint::ConnectionlessMessageInfo::ResponseSent
Definition: sipep.h:707
SIPEndPoint::m_receivedConnectionTokens
PStringToString m_receivedConnectionTokens
Definition: sipep.h:1011
SIPEndPoint::LowPriority
Definition: sipep.h:1056
SIPEndPoint::MakeConnection
virtual PSafePtr< OpalConnection > MakeConnection(OpalCall &call, const PString &party, void *userData, unsigned int options, OpalConnection::StringOptions *stringOptions)
SIPEndPoint::NATBindingRefreshMethod
NATBindingRefreshMethod
Definition: sipep.h:968
SIP_PDU::Method_PUBLISH
Definition: sippdu.h:513
SIPEndPoint::GetPublications
PStringList GetPublications(const SIPSubscribe::EventPackage &eventPackage, bool includeOffline=false) const
Definition: sipep.h:752
SIPEndPoint::SIP_Work::m_token
PString m_token
Definition: sipep.h:1040
SIPHandler
Definition: handlers.h:54
OpalCall
Definition: call.h:65
SIPEndPoint::NewIncomingConnection
virtual PBoolean NewIncomingConnection(OpalTransport *transport)
SIPEndPoint::SIPEndPoint
SIPEndPoint(OpalManager &manager, unsigned maxConnectionThreads=10, unsigned maxHandlerThreads=5)
rtpep.h
SIPEndPoint::RegistrationStatus::m_productInfo
OpalProductInfo m_productInfo
Server product info from registrar if available.
Definition: sipep.h:472
SIPEndPoint::proxy
SIPURL proxy
Definition: sipep.h:990
SIPEndPoint::m_lowPriorityMonitor
InterfaceMonitor m_lowPriorityMonitor
Definition: sipep.h:1071
SIPEndPoint::GetRegisteredProxy
virtual SIPURL GetRegisteredProxy(const SIPURL &remoteURL)
SIPEndPoint::RegistrationStatus::m_reason
SIP_PDU::StatusCodes m_reason
Reason for status change.
Definition: sipep.h:471
SIPEndPoint::OnReleased
virtual void OnReleased(OpalConnection &connection)
SIPEndPoint::SetMIMEForm
void SetMIMEForm(PBoolean v)
Definition: sipep.h:792
SIPEndPoint::RegistrationStatus::m_reRegistering
bool m_reRegistering
Was a registration refresh.
Definition: sipep.h:470
SIPEndPoint::SendMESSAGE
bool SendMESSAGE(SIPMessage::Params &params)
SIPSubscribe::SubscriptionStatus
Definition: sippdu.h:1139
SIPEndPoint::ConnectionlessMessageInfo::ConnectionlessMessageInfo
ConnectionlessMessageInfo(OpalTransport &transport, SIP_PDU &pdu)
Definition: sipep.h:697
SIPDialogContext
Definition: sippdu.h:734
SIPEndPoint::UpdateHandlerIndexes
void UpdateHandlerIndexes(SIPHandler *handler)
Definition: sipep.h:984
SIPAuthentication
PHTTPClientAuthentication SIPAuthentication
Definition: sippdu.h:471
SIPEndPoint::GetRegistrations
PStringList GetRegistrations(bool includeOffline=false) const
Definition: sipep.h:461
SIPEndPoint::SetProgressTimeout
void SetProgressTimeout(const PTimeInterval &t)
Definition: sipep.h:820
SIP_PDU::GetTransactionID
PString GetTransactionID() const
SIPEndPoint::SIP_Work::SIP_Work
SIP_Work(SIPEndPoint &ep, SIP_PDU *pdu, const PString &token)
SIPEndPoint::m_onConnectionlessMessage
ConnectionlessMessageNotifier m_onConnectionlessMessage
Definition: sipep.h:1027
SIPEndPoint::CreateTransport
OpalTransport * CreateTransport(const SIPURL &remoteURL, const PString &localInterface=PString::Empty())
SIPEndPoint::GetSIPConnectionWithLock
PSafePtr< SIPConnection > GetSIPConnectionWithLock(const PString &token, PSafetyMode mode=PSafeReadWrite, SIP_PDU::StatusCodes *errorCode=NULL)
SIPEndPoint::SetMaxRetries
void SetMaxRetries(unsigned r)
Definition: sipep.h:795
SIPEndPoint::OnTransactionFailed
virtual void OnTransactionFailed(SIPTransaction &transaction)
OpalEndPoint::manager
OpalManager & manager
Definition: endpoint.h:807
SIPEndPoint::RegistrationStatus
Definition: sipep.h:466
SIPEndPoint::maxRetries
unsigned maxRetries
Definition: sipep.h:996
SIPEndPoint::IsSubscribed
bool IsSubscribed(const PString &aor, bool includeOffline=false)
SIPEndPoint::ackTimeout
PTimeInterval ackTimeout
Definition: sipep.h:1003
sipim.h
SIPEndPoint::Unregister
bool Unregister(const PString &aor)
SIPEndPoint::m_defaultAppearanceCode
int m_defaultAppearanceCode
Definition: sipep.h:1018
SIPEndPoint::GetMIMEForm
PBoolean GetMIMEForm() const
Definition: sipep.h:793
SIPEndPoint::ConnectionlessMessageInfo::MethodNotAllowed
Definition: sipep.h:706
SIPAuthInfo::password
PString password
Definition: sipep.h:79
SIPEndPoint::SetNATBindingRefreshMethod
void SetNATBindingRefreshMethod(const NATBindingRefreshMethod m)
Definition: sipep.h:978
SIPEndPoint::HandleAuthentication
SIP_PDU::StatusCodes HandleAuthentication(SIPAuthentication *&authentication, unsigned &authenticateErrors, const SIP_PDU &response, const SIPURL &proxyOverride, const PString &username, const PString &password)
SIPEndPoint::mimeForm
bool mimeForm
Definition: sipep.h:995
SIPAuthInfo::SIPAuthInfo
SIPAuthInfo(const PString &u, const PString &p)
Definition: sipep.h:76
SIPEndPoint::Register
bool Register(const SIPRegister::Params &params, PString &aor, SIP_PDU::StatusCodes *reason=NULL)
SIPEndPoint::WorkThreadPool
Definition: sipep.h:1043
SIPSubscribeHandler
Definition: handlers.h:222
SIPAuthInfo::username
PString username
Definition: sipep.h:78
SIPEndPoint::SetNotifierTimeToLive
void SetNotifierTimeToLive(const PTimeInterval &t)
Definition: sipep.h:835
sippdu.h
SIPRegister::Params
Registrar parameters.
Definition: sippdu.h:1059
SIPEndPoint::retryTimeoutMax
PTimeInterval retryTimeoutMax
Definition: sipep.h:998
SIPEndPoint::ConnectionlessMessageInfo::m_pdu
SIP_PDU & m_pdu
Definition: sipep.h:701
SIPEndPoint::GetRegistrarTimeToLive
const PTimeInterval & GetRegistrarTimeToLive() const
Definition: sipep.h:833
SIPEndPoint::OnMESSAGECompleted
virtual void OnMESSAGECompleted(const SIPMessage::Params &params, SIP_PDU::StatusCodes reason)
SIPEndPoint::P_REMOVE_VIRTUAL_VOID
P_REMOVE_VIRTUAL_VOID(OnReceivedIntervalTooBrief(SIPTransaction &, SIP_PDU &))
SIPEndPoint::SetupTransfer
virtual PBoolean SetupTransfer(const PString &token, const PString &callIdentity, const PString &remoteParty, void *userData=NULL)
SIPEndPoint::InterfaceMonitor
Definition: sipep.h:1058
SIPEndPoint::SetUserAgent
void SetUserAgent(const PString &str)
Definition: sipep.h:958
SIPEndPoint::SIP_Work::~SIP_Work
virtual ~SIP_Work()
SIPEndPoint::InterfaceMonitor::OnAddInterface
virtual void OnAddInterface(const PIPSocket::InterfaceEntry &entry)
SIPEndPoint::EmptyRequest
Definition: sipep.h:971
OpalConnection
Definition: connection.h:353
SIPEndPoint::UnsubcribeAll
bool UnsubcribeAll(SIPSubscribe::PredefinedPackages eventPackage)
SIPEndPoint::lastSentCSeq
PAtomicInteger lastSentCSeq
Definition: sipep.h:1017
SIPEndPoint::WorkThreadPool::WorkThreadPool
WorkThreadPool(unsigned maxWorkers)
Definition: sipep.h:1046
SIPEndPoint::GetAllowedMethods
virtual unsigned GetAllowedMethods() const
SIPEndPoint::pduCleanUpTimeout
PTimeInterval pduCleanUpTimeout
Definition: sipep.h:1000
SIPRegisterHandler
Definition: handlers.h:188
SIPEndPoint::GetNotifierTimeToLive
const PTimeInterval & GetNotifierTimeToLive() const
Definition: sipep.h:838
SIPEndPoint::NumMethods
Definition: sipep.h:972
SIPEndPoint::PublishPresence
bool PublishPresence(const SIPPresenceInfo &info, unsigned expire=300)
SIPEndPoint::m_connectionThreadPool
SIPEndPoint::WorkThreadPool m_connectionThreadPool
SIPEndPoint::GetRetryTimeoutMax
const PTimeInterval & GetRetryTimeoutMax() const
Definition: sipep.h:803
SIPEndPoint::m_disableTrying
bool m_disableTrying
Definition: sipep.h:1076
SIPEndPoint::Publish
bool Publish(const SIPSubscribe::Params &params, const PString &body, PString &aor)
SIPEndPoint::OnReceivedPDU
virtual PBoolean OnReceivedPDU(OpalTransport &transport, SIP_PDU *pdu)
SIPEndPoint::SetPduCleanUpTimeout
void SetPduCleanUpTimeout(const PTimeInterval &t)
Definition: sipep.h:810
SIPEndPoint::Notify
bool Notify(const SIPURL &targetAddress, const PString &eventPackage, const PObject &body)
SIPEndPoint::SetRetryTimeouts
void SetRetryTimeouts(const PTimeInterval &t1, const PTimeInterval &t2)
Definition: sipep.h:798
SIPPresenceInfo
Definition: handlers.h:454
SIPHandlersList::GetAddresses
PStringList GetAddresses(bool includeOffline, SIP_PDU::Methods meth, const PString &eventPackage=PString::Empty()) const
SIPEndPoint::InterfaceMonitor::InterfaceMonitor
InterfaceMonitor(SIPEndPoint &manager, PINDEX priority)
SIPEndPoint::GarbageCollection
virtual PBoolean GarbageCollection()
SIPEndPoint::OnReceivedSUBSCRIBE
virtual PBoolean OnReceivedSUBSCRIBE(OpalTransport &transport, SIP_PDU &pdu)
SIPEndPoint::nonInviteTimeout
PTimeInterval nonInviteTimeout
Definition: sipep.h:999
SIPEndPoint::m_highPriorityMonitor
InterfaceMonitor m_highPriorityMonitor
Definition: sipep.h:1070
SIPEndPoint::CreateRegisterHandler
virtual SIPRegisterHandler * CreateRegisterHandler(const SIPRegister::Params &params)
SIPEndPoint::Subscribe
bool Subscribe(const SIPSubscribe::Params &params, PString &token, bool tokenIsAOR=true)
OpalRTPEndPoint
Definition: rtpep.h:44
SIPEndPoint::m_shuttingDown
bool m_shuttingDown
Definition: sipep.h:1009
SIPEndPoint::GetLocalURL
virtual SIPURL GetLocalURL(const OpalTransport &transport, const PString &userName=PString::Empty())
SIPEndPoint::WorkThreadPool::CreateWorkerThread
virtual WorkerThreadBase * CreateWorkerThread()
SIPEndPoint::SIP_Work
Definition: sipep.h:1030
SIPEndPoint::Unsubscribe
bool Unsubscribe(const PString &aor, bool invalidateNotifiers=false)
SIP_PDU::Method_REGISTER
Definition: sippdu.h:506
SIPEndPoint::natMethod
NATBindingRefreshMethod natMethod
Definition: sipep.h:1016
SIPEndPoint::userAgentString
PString userAgentString
Definition: sipep.h:991
SIPEndPoint::GetSubscriptionCount
unsigned GetSubscriptionCount(const SIPSubscribe::EventPackage &eventPackage)
Definition: sipep.h:612
SIPEndPoint::GetRetryTimeoutMin
const PTimeInterval & GetRetryTimeoutMin() const
Definition: sipep.h:802
OpalProductInfo
Definition: connection.h:312
SIPEndPoint::SendOPTIONS
virtual bool SendOPTIONS(const SIPOptions::Params &params)
SIPEndPoint::RegistrationCompletion::m_sync
PSyncPoint m_sync
Definition: sipep.h:1021
SIPEndPoint::m_registrationComplete
std::map< PString, RegistrationCompletion > m_registrationComplete
Definition: sipep.h:1025
SIPEndPoint::ShutDown
virtual void ShutDown()
SIPEndPoint::GetProgressTimeout
const PTimeInterval & GetProgressTimeout() const
Definition: sipep.h:823
SIPEndPoint::SIP_Work::m_endpoint
SIPEndPoint & m_endpoint
Definition: sipep.h:1038
SIPEndPoint::Options
Definition: sipep.h:970
SIPEndPoint::SetConnectionlessMessageNotifier
void SetConnectionlessMessageNotifier(const ConnectionlessMessageNotifier &notifier)
Definition: sipep.h:715