# SIPEndPoint Class Reference

`#include <sipep.h>`

Inheritance diagram for SIPEndPoint:

List of all members.

## Public Types

enum | NATBindingRefreshMethod { None, Options, EmptyRequest, NumMethods }

## Public Member Functions

PSafePtr< SIPConnection > | GetSIPConnectionWithLock (const PString &token, PSafetyMode mode=PSafeReadWrite)
virtual PBoolean | IsAcceptedAddress (const SIPURL &toAddr)
virtual void | OnMessageReceived (const SIPURL &from, const PString &body)
bool | Register (const SIPRegister::Params &params)
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)
unsigned | GetRegistrationsCount () 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 &to)
bool | Subscribe (const SIPSubscribe::Params &params)
bool | Unsubscribe (SIPSubscribe::PredefinedPackages eventPackage, const PString &to)
bool | Unsubscribe (const PString &eventPackage, const PString &to)
bool | UnsubcribeAll (SIPSubscribe::PredefinedPackages eventPackage)
bool | UnsubcribeAll (const PString &eventPackage)
PBoolean | IsSubscribed (const PString &eventPackage, const PString &to)
unsigned | GetSubscriptionCount (const PString &eventPackage)
virtual void | OnSubscriptionStatus (const PString &eventPackage, const SIPURL &uri, bool wasSubscribing, bool reSubscribing, SIP_PDU::StatusCodes reason)
PBoolean | Message (const PString &to, const PString &body)
PBoolean | Publish (const PString &to, const PString &body, unsigned expire=0)
PBoolean | Ping (const PString &to)
virtual void | OnPresenceInfoReceived (const PString &user, const PString &basic, const PString &note)
virtual void | OnMessageFailed (const SIPURL &messageUrl, SIP_PDU::StatusCodes reason)
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< SIPTransaction > | GetTransaction (const PString &transactionID, PSafetyMode mode=PSafeReadWrite)
unsigned | GetNextCSeq ()
PBoolean | GetAuthentication (const PString &authRealm, PString &realm, PString &user, PString &password)
virtual SIPURL | GetRegisteredPartyName (const SIPURL &)
virtual SIPURL | GetDefaultRegisteredPartyName ()
SIPURL | GetContactURL (const OpalTransport &transport, const PString &userName, const PString &host)
virtual SIPURL | GetLocalURL (const OpalTransport &transport, const PString &userName=PString::Empty())
const SIPURL & | GetProxy () const
void | SetProxy (const SIPURL &url)
void | SetProxy (const PString &hostname, const PString &username, const PString &password)
virtual PString | GetUserAgent () const
void | SetUserAgent (const PString &str)
virtual unsigned | GetAllowedMethods () const
PBoolean | SendResponse (SIP_PDU::StatusCodes code, OpalTransport &transport, SIP_PDU &pdu)
void | SetNATBindingRefreshMethod (const NATBindingRefreshMethod m)
virtual SIPRegisterHandler * | CreateRegisterHandler (const SIPRegister::Params &params)
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 PBoolean | GarbageCollection ()
Customisation call backs
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)
Protocol handling routines
OpalTransport * | CreateTransport (const OpalTransportAddress &remoteAddress, const OpalTransportAddress &localAddress=OpalTransportAddress())
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 void | OnReceivedIntervalTooBrief (SIPTransaction &transaction, SIP_PDU &response)
virtual void | OnReceivedAuthenticationRequired (SIPTransaction &transaction, SIP_PDU &response)
virtual void | OnReceivedOK (SIPTransaction &transaction, SIP_PDU &response)
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

typedef std::queue< SIP_PDU_Work * > | SIP_PDUWorkQueue
typedef PThreadPool< SIP_PDU_Work, SIP_PDU_Thread > | SIPMainThreadPool

## Protected Member Functions

| PDECLARE_NOTIFIER (PThread, SIPEndPoint, TransportThreadMain)
| PDECLARE_NOTIFIER (PTimer, SIPEndPoint, NATBindingRefresh)

## 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
SIPHandlersList | activeSIPHandlers
PSafeDictionary< PString, SIPTransaction > | transactions
PTimer | natBindingTimer
NATBindingRefreshMethod | natMethod
PAtomicInteger | lastSentCSeq
SIPMainThreadPool | threadPool
SIPEndPoint::InterfaceMonitor | m_interfaceMonitor

## Friends

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

## Classes

class | InterfaceMonitor
struct | RegistrationStatus
class | SIP_PDU_Thread
struct | SIP_PDU_Work

## Detailed Description

Session Initiation Protocol endpoint.

## Member Typedef Documentation

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

typedef PThreadPool<SIP_PDU_Work, SIP_PDU_Thread> SIPEndPoint::SIPMainThreadPool `[protected]`

## Member Enumeration Documentation

enum SIPEndPoint::NATBindingRefreshMethod

NAT Binding Refresh Method

Enumerator:

  None |
  Options |
  EmptyRequest |
  NumMethods |

## Constructor & Destructor Documentation

SIPEndPoint::SIPEndPoint | ( | OpalManager & | manager | ) |

Create a new endpoint.

SIPEndPoint::~SIPEndPoint | ( |  | ) |

Destroy endpoint.

SIPEndPoint::SIPEndPoint | ( | OpalManager & | manager | ) |

Create a new endpoint.

SIPEndPoint::~SIPEndPoint | ( |  | ) |

Destroy endpoint.

## Member Function Documentation

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.

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.

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.

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.

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.

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

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

OpalTransport* SIPEndPoint::CreateTransport | ( | const OpalTransportAddress & | remoteAddress,
|  | const OpalTransportAddress & | localAddress = `OpalTransportAddress()` |
| ) |  |  |

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

virtual void SIPEndPoint::HandlePDU | ( | OpalTransport & | transport | ) | `[virtual]`

virtual PBoolean SIPEndPoint::OnReceivedPDU | ( | OpalTransport & | transport,
|  | SIP_PDU * | pdu |
| ) |  |  | `[virtual]`

Handle an incoming SIP PDU that has been full decoded

virtual bool SIPEndPoint::OnReceivedConnectionlessPDU | ( | OpalTransport & | transport,
|  | SIP_PDU * | pdu |
| ) |  |  | `[virtual]`

Handle an incoming SIP PDU not assigned to any connection

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

Handle an incoming response PDU.

virtual PBoolean SIPEndPoint::OnReceivedINVITE | ( | OpalTransport & | transport,
|  | SIP_PDU * | pdu |
| ) |  |  | `[virtual]`

Handle an incoming INVITE request.

virtual void SIPEndPoint::OnReceivedIntervalTooBrief | ( | SIPTransaction & | transaction,
|  | SIP_PDU & | response |
| ) |  |  | `[virtual]`

Handle an incoming IntervalTooBrief response PDU

virtual void SIPEndPoint::OnReceivedAuthenticationRequired | ( | SIPTransaction & | transaction,
|  | SIP_PDU & | response |
| ) |  |  | `[virtual]`

Handle an incoming Proxy Authentication Required response PDU

virtual void SIPEndPoint::OnReceivedOK | ( | SIPTransaction & | transaction,
|  | SIP_PDU & | response |
| ) |  |  | `[virtual]`

Handle an incoming OK response PDU. This actually gets any PDU of the class 2xx not just 200.

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

Handle an incoming NOTIFY PDU.

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

Handle an incoming REGISTER PDU.

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

Handle an incoming SUBSCRIBE PDU.

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

Handle an incoming MESSAGE PDU.

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

Handle an incoming OPTIONS PDU.

virtual void SIPEndPoint::OnTransactionFailed | ( | SIPTransaction & | transaction | ) | `[virtual]`

Handle a SIP packet transaction failure

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

PSafePtr<SIPConnection> SIPEndPoint::GetSIPConnectionWithLock | ( | const PString & | token,
|  | PSafetyMode | mode = `PSafeReadWrite` |
| ) |  |  | `[inline]`

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().

Parameters:

  token | Token to identify connection

virtual PBoolean SIPEndPoint::IsAcceptedAddress | ( | const SIPURL & | toAddr | ) | `[virtual]`

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

Callback for SIP message received

bool SIPEndPoint::Register | ( | const SIPRegister::Params & | params | ) |

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

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::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.

PBoolean SIPEndPoint::IsRegistered | ( | const PString & | aor | ) |

Returns PTrue if the given URL has been registered (e.g.: 6001@seconix.com).

unsigned SIPEndPoint::GetRegistrationsCount | ( |  | ) | const`[inline]`

Returns the number of registered accounts.

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::OnRegistrationStatus | ( | const PString & | aor,
|  | PBoolean | wasRegistering,
|  | PBoolean | reRegistering,
|  | SIP_PDU::StatusCodes | reason |
| ) |  |  | `[virtual]`

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::OnRegistered | ( | const PString & | aor,
|  | PBoolean | wasRegistering |
| ) |  |  | `[virtual]`

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

bool SIPEndPoint::Subscribe | ( | SIPSubscribe::PredefinedPackages | eventPackage,
|  | unsigned | expire,
|  | const PString & | to |
| ) |  |  |

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

bool SIPEndPoint::Subscribe | ( | const SIPSubscribe::Params & | params | ) |

Parameters:

  params | Registration paarameters

bool SIPEndPoint::Unsubscribe | ( | SIPSubscribe::PredefinedPackages | eventPackage,
|  | const PString & | to |
| ) |  |  |

bool SIPEndPoint::Unsubscribe | ( | const PString & | eventPackage,
|  | const PString & | to |
| ) |  |  |

bool SIPEndPoint::UnsubcribeAll | ( | SIPSubscribe::PredefinedPackages | eventPackage | ) |

Unsubscribe all current subscriptions.

bool SIPEndPoint::UnsubcribeAll | ( | const PString & | eventPackage | ) |

PBoolean SIPEndPoint::IsSubscribed | ( | const PString & | eventPackage,
|  | const PString & | to |
| ) |  |  |

Returns PTrue if the endpoint is subscribed to some event for the given to address.

unsigned SIPEndPoint::GetSubscriptionCount | ( | const PString & | eventPackage | ) | `[inline]`

Returns the number of registered accounts.

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

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

Send a message to the given URL.

PBoolean SIPEndPoint::Publish | ( | const PString & | to,
|  | const PString & | body,
|  | unsigned | expire = `0` |
| ) |  |  |

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

PBoolean SIPEndPoint::Ping | ( | const PString & | to | ) |

Send a SIP PING to the remote host

virtual void SIPEndPoint::OnPresenceInfoReceived | ( | const PString & | user,
|  | const PString & | basic,
|  | const PString & | note |
| ) |  |  | `[virtual]`

Callback called when presence is received

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.

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

PBoolean SIPEndPoint::GetMIMEForm | ( |  | ) | const`[inline]`

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

unsigned SIPEndPoint::GetMaxRetries | ( |  | ) | const`[inline]`

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

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

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

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

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

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

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

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

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

void SIPEndPoint::SetAckTimeout | ( | const PTimeInterval & | t | ) | `[inline]`

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

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

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

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

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

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

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

void SIPEndPoint::AddTransaction | ( | SIPTransaction * | transaction | ) | `[inline]`

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

unsigned SIPEndPoint::GetNextCSeq | ( |  | ) | `[inline]`

Return the next CSEQ for the next transaction.

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

Return the SIPAuthentication for a specific realm.

virtual SIPURL SIPEndPoint::GetRegisteredPartyName | ( | const SIPURL & |  | ) | `[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.

virtual SIPURL SIPEndPoint::GetDefaultRegisteredPartyName | ( |  | ) | `[virtual]`

Return the default registered party name URL.

SIPURL SIPEndPoint::GetContactURL | ( | const OpalTransport & | transport,
|  | const PString & | userName,
|  | const PString & | host |
| ) |  |  |

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.

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

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

Return the outbound proxy URL, if any.

void SIPEndPoint::SetProxy | ( | const SIPURL & | url | ) |

Set the outbound proxy URL.

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

Set the outbound proxy URL.

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.

void SIPEndPoint::SetUserAgent | ( | const PString & | str | ) | `[inline]`

Set the User Agent for the endpoint.

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

Return a bit mask of the allowed SIP methods.

PBoolean SIPEndPoint::SendResponse | ( | SIP_PDU::StatusCodes | code,
|  | OpalTransport & | transport,
|  | SIP_PDU & | pdu |
| ) |  |  |

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

Set the NAT Binding Refresh Method

virtual SIPRegisterHandler* SIPEndPoint::CreateRegisterHandler | ( | const SIPRegister::Params & | params | ) | `[virtual]`

SIPEndPoint::PDECLARE_NOTIFIER | ( | PThread | ,
|  | SIPEndPoint | ,
|  | TransportThreadMain |  |
| ) |  |  | `[protected]`

SIPEndPoint::PDECLARE_NOTIFIER | ( | PTimer | ,
|  | SIPEndPoint | ,
|  | NATBindingRefresh |  |
| ) |  |  | `[protected]`

## Friends And Related Function Documentation

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

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

## Member Data Documentation

SIPURL SIPEndPoint::proxy `[protected]`

PString SIPEndPoint::userAgentString `[protected]`

bool SIPEndPoint::mimeForm `[protected]`

unsigned SIPEndPoint::maxRetries `[protected]`

PTimeInterval SIPEndPoint::retryTimeoutMin `[protected]`

PTimeInterval SIPEndPoint::retryTimeoutMax `[protected]`

PTimeInterval SIPEndPoint::nonInviteTimeout `[protected]`

PTimeInterval SIPEndPoint::pduCleanUpTimeout `[protected]`

PTimeInterval SIPEndPoint::inviteTimeout `[protected]`

PTimeInterval SIPEndPoint::ackTimeout `[protected]`

PTimeInterval SIPEndPoint::registrarTimeToLive `[protected]`

PTimeInterval SIPEndPoint::notifierTimeToLive `[protected]`

PTimeInterval SIPEndPoint::natBindingTimeout `[protected]`

SIPHandlersList SIPEndPoint::activeSIPHandlers `[protected]`

PSafeDictionary<PString, SIPTransaction> SIPEndPoint::transactions `[protected]`

PTimer SIPEndPoint::natBindingTimer `[protected]`

NATBindingRefreshMethod SIPEndPoint::natMethod `[protected]`

PAtomicInteger SIPEndPoint::lastSentCSeq `[protected]`

SIPMainThreadPool SIPEndPoint::threadPool `[protected]`

SIPEndPoint::InterfaceMonitor SIPEndPoint::m_interfaceMonitor `[protected]`

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

- sipep.h