SIPEndPoint Class Reference

#include <sipep.h>

Inheritance diagram for SIPEndPoint:
OpalRTPEndPoint OpalEndPoint

List of all members.

Classes

class  InterfaceMonitor
class  PDUThreadPool
struct  RegistrationStatus
class  SIP_PDU_Thread
struct  SIP_PDU_Work

Public Types

enum  NATBindingRefreshMethod { None, Options, EmptyRequest, NumMethods }

Public Member Functions

PSafePtr< SIPConnectionGetSIPConnectionWithLock (const PString &token, PSafetyMode mode=PSafeReadWrite, SIP_PDU::StatusCodes *errorCode=NULL)
virtual PBoolean IsAcceptedAddress (const SIPURL &toAddr)
virtual void OnMessageReceived (const SIPURL &from, const PString &body)
virtual void OnMessageReceived (const SIPURL &from, const SIP_PDU &pdu)
bool Register (const SIPRegister::Params &params, PString &aor)
bool 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)
 Registration function for backward compatibility.
bool Unregister (const PString &aor)
bool UnregisterAll ()
PBoolean IsRegistered (const PString &aor, bool includeOffline=false)
unsigned GetRegistrationsCount () const
PStringList GetRegistrations (bool includeOffline=false) const
virtual void OnRegistrationStatus (const RegistrationStatus &status)
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 (SIPSubscribe::PredefinedPackages eventPackage, unsigned expire, const PString &aor)
bool Subscribe (const SIPSubscribe::Params &params, PString &aor)
bool Unsubscribe (SIPSubscribe::PredefinedPackages eventPackage, const PString &aor)
bool Unsubscribe (const PString &eventPackage, const PString &aor)
bool UnsubcribeAll (SIPSubscribe::PredefinedPackages eventPackage)
bool UnsubcribeAll (const PString &eventPackage)
PBoolean IsSubscribed (const PString &eventPackage, const PString &aor, bool includeOffline=false)
unsigned GetSubscriptionCount (const SIPSubscribe::EventPackage &eventPackage)
PStringList GetSubscriptions (const SIPSubscribe::EventPackage &eventPackage, bool includeOffline=false) const
virtual void OnSubscriptionStatus (const PString &eventPackage, 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)
PBoolean Message (const PString &to, const PString &body)
PBoolean Message (const PString &to, const PString &body, const PString &remoteContact, const PString &callID)
virtual void OnMessageFailed (const SIPURL &messageUrl, SIP_PDU::StatusCodes reason)
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
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 PString &to)
void SetMIMEForm (PBoolean v)
PBoolean GetMIMEForm () const
void SetMaxRetries (unsigned r)
unsigned GetMaxRetries () const
void SetRetryTimeouts (const PTimeInterval &t1, const PTimeInterval &t2)
const PTimeInterval & GetRetryTimeoutMin () const
const PTimeInterval & GetRetryTimeoutMax () const
void SetNonInviteTimeout (const PTimeInterval &t)
const PTimeInterval & GetNonInviteTimeout () const
void SetPduCleanUpTimeout (const PTimeInterval &t)
const PTimeInterval & GetPduCleanUpTimeout () const
void SetInviteTimeout (const PTimeInterval &t)
const PTimeInterval & GetInviteTimeout () const
void SetAckTimeout (const PTimeInterval &t)
const PTimeInterval & GetAckTimeout () const
void SetRegistrarTimeToLive (const PTimeInterval &t)
const PTimeInterval & GetRegistrarTimeToLive () const
void SetNotifierTimeToLive (const PTimeInterval &t)
const PTimeInterval & GetNotifierTimeToLive () const
void SetNATBindingTimeout (const PTimeInterval &t)
const PTimeInterval & GetNATBindingTimeout () const
void AddTransaction (SIPTransaction *transaction)
PSafePtr< SIPTransactionGetTransaction (const PString &transactionID, PSafetyMode mode=PSafeReadWrite)
unsigned GetNextCSeq ()
PBoolean GetAuthentication (const PString &authRealm, PString &realm, PString &user, PString &password)
virtual SIPURL GetRegisteredPartyName (const SIPURL &remoteURL, const OpalTransport &transport)
virtual SIPURL GetDefaultRegisteredPartyName (const OpalTransport &transport)
SIPURL GetContactURL (const OpalTransport &transport, const SIPURL &localURI)
virtual SIPURL GetLocalURL (const OpalTransport &transport, const PString &userName=PString::Empty())
const SIPURLGetProxy () const
void SetProxy (const SIPURL &url)
void SetProxy (const PString &hostname, const PString &username, const PString &password)
int GetDefaultAppearanceCode () const
void SetDefaultAppearanceCode (int code)
virtual PString GetUserAgent () const
void SetUserAgent (const PString &str)
virtual unsigned GetAllowedMethods () const
void SetNATBindingRefreshMethod (const NATBindingRefreshMethod m)
virtual SIPRegisterHandlerCreateRegisterHandler (const SIPRegister::Params &params)
virtual void OnStartTransaction (SIPConnection &conn, SIPTransaction &transaction)
virtual OpalSIPIMManager & GetSIPIMManager ()
Construction

 SIPEndPoint (OpalManager &manager)
 ~SIPEndPoint ()
Overrides from OpalEndPoint

virtual void ShutDown ()
virtual PString GetDefaultTransport () const
virtual PBoolean NewIncomingConnection (OpalTransport *transport)
virtual PBoolean MakeConnection (OpalCall &call, const PString &party, void *userData, unsigned int options, OpalConnection::StringOptions *stringOptions)
virtual void OnReleased (OpalConnection &connection)
virtual PBoolean GarbageCollection ()
Customisation call backs

virtual SIPConnectionCreateConnection (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)
Protocol handling routines

OpalTransportCreateTransport (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

Protected Types

enum  { HighPriority = 80, LowPriority = 30 }
typedef std::queue
< SIP_PDU_Work * > 
SIP_PDUWorkQueue

Protected Member Functions

void TransportReadLoop (OpalTransport *transport)
 PDECLARE_NOTIFIER (PThread, SIPEndPoint, TransportThreadMain)
 PDECLARE_NOTIFIER (PTimer, SIPEndPoint, NATBindingRefresh)
 P_REMOVE_VIRTUAL_VOID (OnReceivedIntervalTooBrief(SIPTransaction &, SIP_PDU &))
 P_REMOVE_VIRTUAL_VOID (OnReceivedAuthenticationRequired(SIPTransaction &, SIP_PDU &))
 P_REMOVE_VIRTUAL_VOID (OnReceivedOK(SIPTransaction &, SIP_PDU &))

Protected Attributes

SIPURL proxy
PString userAgentString
bool mimeForm
unsigned maxRetries
PTimeInterval retryTimeoutMin
PTimeInterval retryTimeoutMax
PTimeInterval nonInviteTimeout
PTimeInterval pduCleanUpTimeout
PTimeInterval inviteTimeout
PTimeInterval ackTimeout
PTimeInterval registrarTimeToLive
PTimeInterval notifierTimeToLive
PTimeInterval natBindingTimeout
bool m_shuttingDown
SIPHandlersList activeSIPHandlers
PStringToString m_receivedConnectionTokens
PSafeDictionary< PString,
SIPTransaction
transactions
PTimer natBindingTimer
NATBindingRefreshMethod natMethod
PAtomicInteger lastSentCSeq
int m_defaultAppearanceCode
SIPEndPoint::PDUThreadPool m_connectionThreadPool
SIPEndPoint::PDUThreadPool m_handlerThreadPool
InterfaceMonitor m_highPriorityMonitor
InterfaceMonitor m_lowPriorityMonitor
OpalSIPIMManager m_sipIMManager
bool m_disableTrying

Friends

void InterfaceMonitor::OnAddInterface (const PIPSocket::InterfaceEntry &entry)
void InterfaceMonitor::OnRemoveInterface (const PIPSocket::InterfaceEntry &entry)

Detailed Description

Session Initiation Protocol endpoint.


Member Typedef Documentation

typedef std::queue<SIP_PDU_Work *> SIPEndPoint::SIP_PDUWorkQueue [protected]

Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
HighPriority 
LowPriority 

NAT Binding Refresh Method

Enumerator:
None 
Options 
EmptyRequest 
NumMethods 

Constructor & Destructor Documentation

SIPEndPoint::SIPEndPoint ( OpalManager manager  ) 

Create a new endpoint.

SIPEndPoint::~SIPEndPoint (  ) 

Destroy endpoint.


Member Function Documentation

void SIPEndPoint::AddTransaction ( SIPTransaction transaction  )  [inline]
virtual bool SIPEndPoint::CanNotify ( const PString &  eventPackage  )  [virtual]

Indicate notifications for the specified event package are supported.

Parameters:
eventPackage Event package we support
virtual SIPConnection* SIPEndPoint::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]

Create a connection for the SIP endpoint. The default implementation is to create a OpalSIPConnection.

Parameters:
call Owner of connection
token token used to identify connection
userData User data for connection
destination Destination for outgoing call
transport Transport INVITE has been received on
invite Original INVITE pdu
options connection options
stringOptions complex string options
virtual SIPRegisterHandler* SIPEndPoint::CreateRegisterHandler ( const SIPRegister::Params params  )  [virtual]
OpalTransport* SIPEndPoint::CreateTransport ( const SIPURL remoteURL,
const PString &  localInterface = PString::Empty() 
)

Creates an OpalTransport instance, based on the address is interpreted as the remote address to which the transport should connect

virtual PBoolean SIPEndPoint::ForwardConnection ( SIPConnection connection,
const PString &  forwardParty 
) [virtual]

Forward the connection using the same token as the specified connection. Return PTrue if the connection is being redirected.

Parameters:
connection Connection to be forwarded
forwardParty Remote party to forward to
virtual PBoolean SIPEndPoint::GarbageCollection (  )  [virtual]

Execute garbage collection for endpoint. Returns PTrue if all garbage has been collected. Default behaviour deletes the objects in the connectionsActive list.

Reimplemented from OpalEndPoint.

const PTimeInterval& SIPEndPoint::GetAckTimeout (  )  const [inline]

References ackTimeout.

virtual unsigned SIPEndPoint::GetAllowedMethods (  )  const [virtual]

Return a bit mask of the allowed SIP methods.

PBoolean SIPEndPoint::GetAuthentication ( const PString &  authRealm,
PString &  realm,
PString &  user,
PString &  password 
)

Return the SIPAuthentication for a specific realm.

SIPURL SIPEndPoint::GetContactURL ( const OpalTransport transport,
const SIPURL localURI 
)

Return the contact URL for the given host and user name based on the listening port of the registration to that host.

That URL can be used as as contact field in outgoing requests.

The URL is translated if required.

If no active registration is used, return the result of GetLocalURL on the given transport.

int SIPEndPoint::GetDefaultAppearanceCode (  )  const [inline]

Get the default line appearance code for new connections.

References m_defaultAppearanceCode.

virtual SIPURL SIPEndPoint::GetDefaultRegisteredPartyName ( const OpalTransport transport  )  [virtual]

Return the default registered party name URL.

virtual PString SIPEndPoint::GetDefaultTransport (  )  const [virtual]

Get the default transports for the endpoint type. Overrides the default behaviour to return udp and tcp.

Reimplemented from OpalEndPoint.

const PTimeInterval& SIPEndPoint::GetInviteTimeout (  )  const [inline]

References inviteTimeout.

virtual SIPURL SIPEndPoint::GetLocalURL ( const OpalTransport transport,
const PString &  userName = PString::Empty() 
) [virtual]

Return the local URL for the given transport and user name. That URL can be used as via address, and as contact field in outgoing requests.

The URL is translated if required.

If the transport is not running, the first listener transport will be used, if any.

Parameters:
transport Transport on which we can receive new requests
userName The user name part of the contact field
unsigned SIPEndPoint::GetMaxRetries (  )  const [inline]

References maxRetries.

PBoolean SIPEndPoint::GetMIMEForm (  )  const [inline]

References mimeForm.

const PTimeInterval& SIPEndPoint::GetNATBindingTimeout (  )  const [inline]

References natBindingTimeout.

unsigned SIPEndPoint::GetNextCSeq (  )  [inline]

Return the next CSEQ for the next transaction.

References lastSentCSeq.

const PTimeInterval& SIPEndPoint::GetNonInviteTimeout (  )  const [inline]

References nonInviteTimeout.

const PTimeInterval& SIPEndPoint::GetNotifierTimeToLive (  )  const [inline]

References notifierTimeToLive.

const PTimeInterval& SIPEndPoint::GetPduCleanUpTimeout (  )  const [inline]

References pduCleanUpTimeout.

const SIPURL& SIPEndPoint::GetProxy (  )  const [inline]

Return the outbound proxy URL, if any.

References proxy.

PStringList SIPEndPoint::GetPublications ( const SIPSubscribe::EventPackage eventPackage,
bool  includeOffline = false 
) const [inline]

Returns a list of published entities.

Parameters:
eventPackage Event package for publication
includeOffline Include offline publications

References activeSIPHandlers, SIPHandlersList::GetAddresses(), and SIP_PDU::Method_PUBLISH.

virtual SIPURL SIPEndPoint::GetRegisteredPartyName ( const SIPURL remoteURL,
const OpalTransport transport 
) [virtual]

Return the registered party name URL for the given host.

That URL can be used in the FORM field of the PDU's. The host part can be different from the registration domain.

const PTimeInterval& SIPEndPoint::GetRegistrarTimeToLive (  )  const [inline]

References registrarTimeToLive.

PStringList SIPEndPoint::GetRegistrations ( bool  includeOffline = false  )  const [inline]

Returns a list of registered accounts.

Parameters:
includeOffline Include offline registrations

References activeSIPHandlers, SIPHandlersList::GetAddresses(), and SIP_PDU::Method_REGISTER.

unsigned SIPEndPoint::GetRegistrationsCount (  )  const [inline]

Returns the number of registered accounts.

References activeSIPHandlers, SIPHandlersList::GetCount(), and SIP_PDU::Method_REGISTER.

const PTimeInterval& SIPEndPoint::GetRetryTimeoutMax (  )  const [inline]

References retryTimeoutMax.

const PTimeInterval& SIPEndPoint::GetRetryTimeoutMin (  )  const [inline]

References retryTimeoutMin.

PSafePtr<SIPConnection> SIPEndPoint::GetSIPConnectionWithLock ( const PString &  token,
PSafetyMode  mode = PSafeReadWrite,
SIP_PDU::StatusCodes errorCode = NULL 
)

Find a connection that uses the specified token. This searches the endpoint for the connection that contains the token as provided by functions such as MakeConnection().

Note the token may be a "replaces" style value of the form: "callid;to-tag=tag;from-tag=tag"

Parameters:
token Token to identify connection
virtual OpalSIPIMManager& SIPEndPoint::GetSIPIMManager (  )  [inline, virtual]

References m_sipIMManager.

unsigned SIPEndPoint::GetSubscriptionCount ( const SIPSubscribe::EventPackage eventPackage  )  [inline]

Returns the number of registered accounts.

Parameters:
eventPackage Event package of subscription

References activeSIPHandlers, SIPHandlersList::GetCount(), and SIP_PDU::Method_SUBSCRIBE.

PStringList SIPEndPoint::GetSubscriptions ( const SIPSubscribe::EventPackage eventPackage,
bool  includeOffline = false 
) const [inline]

Returns a list of subscribed accounts for package.

Parameters:
eventPackage Event package of subscription
includeOffline Include offline subscriptions

References activeSIPHandlers, SIPHandlersList::GetAddresses(), and SIP_PDU::Method_REGISTER.

PSafePtr<SIPTransaction> SIPEndPoint::GetTransaction ( const PString &  transactionID,
PSafetyMode  mode = PSafeReadWrite 
) [inline]

References transactions.

virtual PString SIPEndPoint::GetUserAgent (  )  const [virtual]

Get the User Agent for this endpoint. Default behaviour returns an empty string so the SIPConnection builds a valid string from the productInfo data.

These semantics are for backward compatibility.

virtual void SIPEndPoint::HandlePDU ( OpalTransport transport  )  [virtual]
virtual PBoolean SIPEndPoint::IsAcceptedAddress ( const SIPURL toAddr  )  [virtual]
PBoolean SIPEndPoint::IsRegistered ( const PString &  aor,
bool  includeOffline = false 
)

Returns PTrue if the given URL has been registered (e.g.: 6001@seconix.com). The includeOffline parameter indicates if the caller is interested in if we are, to the best of our knowlegde, currently registered (have had recent confirmation) or we are not sure if we are registered or not, but are continually re-trying.

Parameters:
aor Address of record to check
includeOffline Include offline registrations
PBoolean SIPEndPoint::IsSubscribed ( const PString &  eventPackage,
const PString &  aor,
bool  includeOffline = false 
)

Returns true if the endpoint is subscribed to some event for the given to address. The includeOffline parameter indicates if the caller is interested in if we are, to the best of our knowlegde, currently subscribed (have had recent confirmation) or we are not sure if we are subscribed or not, but are continually re-trying.

Parameters:
eventPackage Event package being unsubscribed
aor Address-of-record for subscription
includeOffline Include offline subscriptions
virtual PBoolean SIPEndPoint::MakeConnection ( OpalCall call,
const PString &  party,
void *  userData,
unsigned int  options,
OpalConnection::StringOptions stringOptions 
) [virtual]

Set up a connection to a remote party. This is called from the OpalManager::MakeConnection() function once it has determined that this is the endpoint for the protocol.

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 proto field is optional when passed to a specific endpoint. If it is present, however, it must agree with the endpoints protocol name or PFalse is returned.

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

If PFalse is returned then the connection could not be established. For example if a PSTN endpoint is used and the assiciated 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:
call Owner of connection
party Remote party to call
userData Arbitrary data to pass to connection
options options to pass to conneciton
stringOptions complex string options

Implements OpalEndPoint.

PBoolean SIPEndPoint::Message ( const PString &  to,
const PString &  body,
const PString &  remoteContact,
const PString &  callID 
)
PBoolean SIPEndPoint::Message ( const PString &  to,
const PString &  body 
)

Send a message to the given URL.

virtual PBoolean SIPEndPoint::NewIncomingConnection ( OpalTransport transport  )  [virtual]

Handle new incoming connection from listener.

The default behaviour does nothing.

Parameters:
transport Transport connection came in on

Reimplemented from OpalEndPoint.

bool SIPEndPoint::Notify ( const SIPURL targetAddress,
const PString &  eventPackage,
const PObject &  body 
)

Send notification to all remotes that are subcribed to the event package.

Parameters:
targetAddress Address that was subscribed
eventPackage Event package for notification
body Body of notification
virtual void SIPEndPoint::OnDialogInfoReceived ( const SIPDialogNotification info  )  [virtual]

Callback called when dialog NOTIFY message is received

Parameters:
info Information on dialog state change
virtual void SIPEndPoint::OnMessageFailed ( const SIPURL messageUrl,
SIP_PDU::StatusCodes  reason 
) [virtual]

Callback called when a message sent by the endpoint didn't reach its destination or when the proxy or remote endpoint returns an error code.

virtual void SIPEndPoint::OnMessageReceived ( const SIPURL from,
const SIP_PDU pdu 
) [virtual]
virtual void SIPEndPoint::OnMessageReceived ( const SIPURL from,
const PString &  body 
) [virtual]

Callback for SIP message received

virtual void SIPEndPoint::OnPresenceInfoReceived ( const PString &  identity,
const PString &  basic,
const PString &  note 
) [virtual]
virtual void SIPEndPoint::OnPresenceInfoReceived ( const SIPPresenceInfo info  )  [virtual]

Callback called when presence is received

Parameters:
info Presence info publicised
virtual bool SIPEndPoint::OnReceivedConnectionlessPDU ( OpalTransport transport,
SIP_PDU pdu 
) [virtual]

Handle an incoming SIP PDU not assigned to any connection

virtual PBoolean SIPEndPoint::OnReceivedINVITE ( OpalTransport transport,
SIP_PDU pdu 
) [virtual]

Handle an incoming INVITE request.

virtual bool SIPEndPoint::OnReceivedMESSAGE ( OpalTransport transport,
SIP_PDU response 
) [virtual]

Handle an incoming MESSAGE PDU.

virtual PBoolean SIPEndPoint::OnReceivedNOTIFY ( OpalTransport transport,
SIP_PDU response 
) [virtual]

Handle an incoming NOTIFY PDU.

virtual bool SIPEndPoint::OnReceivedOPTIONS ( OpalTransport transport,
SIP_PDU response 
) [virtual]

Handle an incoming OPTIONS PDU.

virtual PBoolean SIPEndPoint::OnReceivedPDU ( OpalTransport transport,
SIP_PDU pdu 
) [virtual]

Handle an incoming SIP PDU that has been full decoded

virtual PBoolean SIPEndPoint::OnReceivedREGISTER ( OpalTransport transport,
SIP_PDU pdu 
) [virtual]

Handle an incoming REGISTER PDU.

virtual void SIPEndPoint::OnReceivedResponse ( SIPTransaction transaction,
SIP_PDU response 
) [virtual]

Handle an incoming response PDU.

virtual PBoolean SIPEndPoint::OnReceivedSUBSCRIBE ( OpalTransport transport,
SIP_PDU pdu 
) [virtual]

Handle an incoming SUBSCRIBE PDU.

virtual void SIPEndPoint::OnRegistered ( const PString &  aor,
PBoolean  wasRegistering 
) [virtual]

Callback called when a registration or an unregistration is successful. Deprecated, maintained for backward compatibility, use OnRegistrationStatus().

virtual void SIPEndPoint::OnRegistrationFailed ( const PString &  aor,
SIP_PDU::StatusCodes  reason,
PBoolean  wasRegistering 
) [virtual]

Callback called when a registration to a SIP registrars fails. Deprecated, maintained for backward compatibility, use OnRegistrationStatus().

virtual void SIPEndPoint::OnRegistrationStatus ( const PString &  aor,
PBoolean  wasRegistering,
PBoolean  reRegistering,
SIP_PDU::StatusCodes  reason 
) [virtual]
virtual void SIPEndPoint::OnRegistrationStatus ( const RegistrationStatus status  )  [virtual]

Callback called when a registration to a SIP registrar status.

Parameters:
status Status of registration request
virtual void SIPEndPoint::OnReleased ( OpalConnection connection  )  [virtual]

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

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

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 removes the connection from the internal database and calls the OpalManager function of the same name.

Parameters:
connection Connection that was established

Reimplemented from OpalEndPoint.

virtual void SIPEndPoint::OnRTPStatistics ( const SIPConnection connection,
const RTP_Session session 
) const [virtual]

Callback from the RTP session for statistics monitoring. This is called every so many packets on the transmitter and receiver threads of the RTP session indicating that the statistics have been updated.

The default behaviour does nothing.

Parameters:
connection Connection for the channel
session Session with statistics
virtual void SIPEndPoint::OnStartTransaction ( SIPConnection conn,
SIPTransaction transaction 
) [virtual]
virtual void SIPEndPoint::OnSubscriptionStatus ( const PString &  eventPackage,
const SIPURL uri,
bool  wasSubscribing,
bool  reSubscribing,
SIP_PDU::StatusCodes  reason 
) [virtual]

Callback called when a subscription to a SIP UA status changes.

Parameters:
eventPackage Event package subscribed to
uri Target URI for the subscription.
wasSubscribing Indication the subscribing or unsubscribing
reSubscribing If subscribing then indication was refeshing subscription
reason Status of subscription
virtual void SIPEndPoint::OnTransactionFailed ( SIPTransaction transaction  )  [virtual]

Handle a SIP packet transaction failure

SIPEndPoint::P_REMOVE_VIRTUAL_VOID ( OnReceivedOK(SIPTransaction &, SIP_PDU &)   )  [protected]
SIPEndPoint::P_REMOVE_VIRTUAL_VOID ( OnReceivedAuthenticationRequired(SIPTransaction &, SIP_PDU &)   )  [protected]
SIPEndPoint::P_REMOVE_VIRTUAL_VOID ( OnReceivedIntervalTooBrief(SIPTransaction &, SIP_PDU &)   )  [protected]
SIPEndPoint::PDECLARE_NOTIFIER ( PTimer  ,
SIPEndPoint  ,
NATBindingRefresh   
) [protected]
SIPEndPoint::PDECLARE_NOTIFIER ( PThread  ,
SIPEndPoint  ,
TransportThreadMain   
) [protected]
PBoolean SIPEndPoint::Ping ( const PString &  to  ) 

Send a SIP PING to the remote host

bool SIPEndPoint::Publish ( const PString &  to,
const PString &  body,
unsigned  expire = 300 
)
Parameters:
to Address to send PUBLISH
body Body of PUBLISH
expire Time between automatic updates in seconds.
bool SIPEndPoint::Publish ( const SIPSubscribe::Params params,
const PString &  body,
PString &  aor 
)

Publish new state information. A expire time of zero will cease to automatically update the publish.

bool SIPEndPoint::PublishPresence ( const SIPPresenceInfo info,
unsigned  expire = 300 
)

Publish new state information. Only the basic & note fields of the PIDF+xml are supported for now.

Parameters:
info Presence info to publish
expire Refresh time
bool SIPEndPoint::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 
)

Registration function for backward compatibility.

bool SIPEndPoint::Register ( const SIPRegister::Params params,
PString &  aor 
)

Register to a registrar. This function is asynchronous to permit several registrations to occur at the same time. It can be called several times for different hosts and users.

The username can be of the form user. In that case, the address-of-record field will be set to that value. If not then the address-of-record is constructed from the user and host fields.

The realm can be specified when registering, this will allow to find the correct authentication information when being requested. If no realm is specified, authentication will occur with the "best guess" of authentication parameters.

Parameters:
params Registration paarameters
aor Resultant address-of-record for unregister
void SIPEndPoint::SendNotifyDialogInfo ( const SIPDialogNotification info  ) 
Parameters:
info Information on dialog state change
void SIPEndPoint::SetAckTimeout ( const PTimeInterval &  t  )  [inline]

References ackTimeout.

void SIPEndPoint::SetDefaultAppearanceCode ( int  code  )  [inline]

Set the default line appearance code for new connections.

References m_defaultAppearanceCode.

void SIPEndPoint::SetInviteTimeout ( const PTimeInterval &  t  )  [inline]

References inviteTimeout.

void SIPEndPoint::SetMaxRetries ( unsigned  r  )  [inline]

References maxRetries.

void SIPEndPoint::SetMIMEForm ( PBoolean  v  )  [inline]

References mimeForm.

void SIPEndPoint::SetNATBindingRefreshMethod ( const NATBindingRefreshMethod  m  )  [inline]

Set the NAT Binding Refresh Method

References natMethod.

void SIPEndPoint::SetNATBindingTimeout ( const PTimeInterval &  t  )  [inline]
void SIPEndPoint::SetNonInviteTimeout ( const PTimeInterval &  t  )  [inline]

References nonInviteTimeout.

void SIPEndPoint::SetNotifierTimeToLive ( const PTimeInterval &  t  )  [inline]

References notifierTimeToLive.

void SIPEndPoint::SetPduCleanUpTimeout ( const PTimeInterval &  t  )  [inline]

References pduCleanUpTimeout.

void SIPEndPoint::SetProxy ( const PString &  hostname,
const PString &  username,
const PString &  password 
)

Set the outbound proxy URL.

void SIPEndPoint::SetProxy ( const SIPURL url  ) 

Set the outbound proxy URL.

void SIPEndPoint::SetRegistrarTimeToLive ( const PTimeInterval &  t  )  [inline]

References registrarTimeToLive.

void SIPEndPoint::SetRetryTimeouts ( const PTimeInterval &  t1,
const PTimeInterval &  t2 
) [inline]

References retryTimeoutMax, and retryTimeoutMin.

virtual PBoolean SIPEndPoint::SetupTransfer ( const PString &  token,
const PString &  callIdentity,
const PString &  remoteParty,
void *  userData = NULL 
) [virtual]

Setup a connection transfer a connection for the SIP endpoint.

Parameters:
token Existing connection to be transferred
callIdentity Call identity of the secondary call (if it exists)
remoteParty Remote party to transfer the existing call to
userData user data to pass to CreateConnection
void SIPEndPoint::SetUserAgent ( const PString &  str  )  [inline]

Set the User Agent for the endpoint.

References userAgentString.

virtual void SIPEndPoint::ShutDown (  )  [virtual]

Shut down the endpoint, this is called by the OpalManager just before destroying the object and can be handy to make sure some things are stopped before the vtable gets clobbered.

Reimplemented from OpalEndPoint.

bool SIPEndPoint::Subscribe ( const SIPSubscribe::Params params,
PString &  aor 
)
Parameters:
params Subscription paarameters
aor Resultant address-of-record for unsubscribe
bool SIPEndPoint::Subscribe ( SIPSubscribe::PredefinedPackages  eventPackage,
unsigned  expire,
const PString &  aor 
)

Subscribe to a notifier. This function is asynchronous to permit several subscriptions to occur at the same time.

Parameters:
eventPackage Event package being unsubscribed
expire Expiry time in seconds
aor Address-of-record for subscription
void SIPEndPoint::TransportReadLoop ( OpalTransport transport  )  [protected]
bool SIPEndPoint::Unregister ( const PString &  aor  ) 

Unregister from a registrar. This will unregister the specified address-of-record. If an empty string is provided then ALL registrations are removed.

bool SIPEndPoint::UnregisterAll (  ) 

Unregister all current registrations. Returns true if at least one registra is unregistered.

bool SIPEndPoint::UnsubcribeAll ( const PString &  eventPackage  ) 
Parameters:
eventPackage Event package being unsubscribed
bool SIPEndPoint::UnsubcribeAll ( SIPSubscribe::PredefinedPackages  eventPackage  ) 

Unsubscribe all current subscriptions. Returns true if at least one subscription is unsubscribed.

Parameters:
eventPackage Event package being unsubscribed
bool SIPEndPoint::Unsubscribe ( const PString &  eventPackage,
const PString &  aor 
)
Parameters:
eventPackage Event package being unsubscribed
aor Address-of-record for subscription
bool SIPEndPoint::Unsubscribe ( SIPSubscribe::PredefinedPackages  eventPackage,
const PString &  aor 
)

Unsubscribe a current subscriptions.

Parameters:
eventPackage Event package being unsubscribed
aor Address-of-record for subscription

Friends And Related Function Documentation

void InterfaceMonitor::OnAddInterface ( const PIPSocket::InterfaceEntry &  entry  )  [friend]
void InterfaceMonitor::OnRemoveInterface ( const PIPSocket::InterfaceEntry &  entry  )  [friend]

Member Data Documentation

PTimeInterval SIPEndPoint::ackTimeout [protected]

Referenced by GetAckTimeout(), and SetAckTimeout().

PTimeInterval SIPEndPoint::inviteTimeout [protected]
PAtomicInteger SIPEndPoint::lastSentCSeq [protected]

Referenced by GetNextCSeq().

bool SIPEndPoint::m_disableTrying [protected]
PStringToString SIPEndPoint::m_receivedConnectionTokens [protected]
bool SIPEndPoint::m_shuttingDown [protected]
OpalSIPIMManager SIPEndPoint::m_sipIMManager [protected]

Referenced by GetSIPIMManager().

unsigned SIPEndPoint::maxRetries [protected]

Referenced by GetMaxRetries(), and SetMaxRetries().

bool SIPEndPoint::mimeForm [protected]

Referenced by GetMIMEForm(), and SetMIMEForm().

PTimeInterval SIPEndPoint::natBindingTimeout [protected]
PTimer SIPEndPoint::natBindingTimer [protected]

Referenced by SetNATBindingTimeout().

PTimeInterval SIPEndPoint::nonInviteTimeout [protected]
PTimeInterval SIPEndPoint::notifierTimeToLive [protected]
PTimeInterval SIPEndPoint::pduCleanUpTimeout [protected]

Referenced by GetProxy().

PTimeInterval SIPEndPoint::registrarTimeToLive [protected]
PTimeInterval SIPEndPoint::retryTimeoutMax [protected]
PTimeInterval SIPEndPoint::retryTimeoutMin [protected]
PSafeDictionary<PString, SIPTransaction> SIPEndPoint::transactions [protected]

Referenced by AddTransaction(), and GetTransaction().

PString SIPEndPoint::userAgentString [protected]

Referenced by SetUserAgent().


The documentation for this class was generated from the following file:
Generated on Wed Jul 7 10:25:08 2010 for OPAL by  doxygen 1.6.3