OPAL
Version 3.14.3
|
#include <sipep.h>
Data Structures | |
struct | ConnectionlessMessageInfo |
struct | RegistrationCompletion |
struct | RegistrationStatus |
Public Types | |
enum | CanNotifyResult { CannotNotify, CanNotifyImmediate, CanNotifyDeferrred } |
enum | KeepAliveType { NoKeepAlive, KeepAliveByCRLF, KeepAliveByOPTION, NumMethods } |
typedef SIPSubscribe::SubscriptionStatus | SubscriptionStatus |
typedef PNotifierTemplate < ConnectionlessMessageInfo & > | ConnectionlessMessageNotifier |
typedef KeepAliveType | NATBindingRefreshMethod |
Public Member Functions | |
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 ¶ms, PString &aor, SIP_PDU::StatusCodes *reason=NULL) |
bool | Register (const SIPRegister::Params ¶ms, 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) |
Registration function for backward compatibility. More... | |
PBoolean | IsRegistered (const PString &aor, bool includeOffline=false) |
bool | Unregister (const PString &aor) |
bool | UnregisterAll () |
unsigned | GetRegistrationsCount () const |
PStringList | GetRegistrations (bool includeOffline=false) const |
bool | GetRegistrationStatus (const PString &token, RegistrationStatus &status) |
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 (const SIPSubscribe::Params ¶ms, PString &token, bool tokenIsAOR=true) |
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) |
PStringList | GetSubscriptions (const SIPSubscribe::EventPackage &eventPackage, bool includeOffline=false) const |
bool | GetSubscriptionStatus (const PString &token, const PString &eventPackage, SubscriptionStatus &status) |
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 CanNotifyResult | CanNotify (const PString &eventPackage, const SIPURL &aor) |
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 void | OnRegInfoReceived (const SIPRegNotification &info) |
bool | SendMESSAGE (SIPMessage::Params ¶ms) |
virtual void | OnMESSAGECompleted (const SIPMessage::Params ¶ms, SIP_PDU::StatusCodes reason) |
void | SetConnectionlessMessageNotifier (const ConnectionlessMessageNotifier ¬ifier) |
virtual bool | SendOPTIONS (const SIPOptions::Params ¶ms) |
virtual void | OnOptionsCompleted (const SIPOptions::Params ¶ms, const SIP_PDU &response) |
bool | Publish (const SIPSubscribe::Params ¶ms, 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 |
PBoolean | Ping (const PURL &to) |
const PStringSet & | GetAllowedEvents () const |
SIPConnection::PRACKMode | GetDefaultPRACKMode () const |
void | SetDefaultPRACKMode (SIPConnection::PRACKMode mode) |
void | SetMaxPacketSizeUDP (PINDEX sz) |
PINDEX | GetMaxPacketSizeUDP () 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 | SetProgressTimeout (const PTimeInterval &t) |
const PTimeInterval & | GetProgressTimeout () 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 |
P_DEPRECATED void | SetNATBindingTimeout (const PTimeInterval &t) |
P_DEPRECATED const PTimeInterval & | GetNATBindingTimeout () const |
void | GetKeepAlive (PTimeInterval &timeout, KeepAliveType &type) |
void | SetKeepAlive (const PTimeInterval &timeout, KeepAliveType type) |
void | AddTransaction (SIPTransaction *transaction) |
PSafePtr< SIPTransaction > | GetTransaction (const PString &transactionID, PSafetyMode mode=PSafeReadWrite) |
unsigned | GetNextCSeq () |
void | SetRegisteredUserMode (bool v) |
bool | GetRegisteredUserMode () const |
bool | GetAuthentication (const PString &realm, PString &authId, PString &password) |
virtual SIPURL | GetDefaultLocalURL (const OpalTransport &transport) |
void | AdjustToRegistration (SIP_PDU &pdu, SIPConnection *connection=NULL, const OpalTransport *transport=NULL) |
const SIPURL & | GetProxy () 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 |
P_DEPRECATED void | SetNATBindingRefreshMethod (const NATBindingRefreshMethod type) |
virtual SIPRegisterHandler * | CreateRegisterHandler (const SIPRegister::Params ¶ms) |
virtual void | OnStartTransaction (SIPConnection &conn, SIPTransaction &transaction) |
PSafePtr< SIPHandler > | FindSIPHandlerByCallID (const PString &callID, PSafetyMode m) |
void | UpdateHandlerIndexes (SIPHandler *handler) |
SIPThreadPool & | GetThreadPool () |
Construction | |
SIPEndPoint (OpalManager &manager, unsigned maxThreads=15) | |
~SIPEndPoint () | |
Overrides from OpalEndPoint | |
virtual void | ShutDown () |
virtual PString | GetDefaultTransport () const |
virtual WORD | GetDefaultSignalPort () const |
virtual PStringList | GetNetworkURIs (const PString &name) const |
virtual void | NewIncomingConnection (OpalListener &listener, const OpalTransportPtr &transport) |
virtual PSafePtr< OpalConnection > | MakeConnection (OpalCall &call, const PString &party, void *userData, unsigned int options, OpalConnection::StringOptions *stringOptions) |
virtual void | OnReleased (OpalConnection &connection) |
virtual void | OnConferenceStatusChanged (OpalEndPoint &endpoint, const PString &uri, OpalConferenceState::ChangeType change) |
virtual PBoolean | GarbageCollection () |
virtual PStringList | GetAvailableStringOptions () const |
Customisation call backs | |
virtual SIPConnection * | CreateConnection (const SIPConnection::Init &init) |
virtual SDPSessionDescription * | CreateSDP (time_t sessionId, unsigned version, const OpalTransportAddress &address) |
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) |
Protocol handling routines | |
OpalTransportPtr | GetTransport (const SIPTransactionOwner &transactor, SIP_PDU::StatusCodes &reason) |
virtual void | HandlePDU (const OpalTransportPtr &transport) |
virtual bool | OnReceivedPDU (SIP_PDU *pdu) |
virtual void | OnReceivedResponse (SIPTransaction &transaction, SIP_PDU &response) |
virtual bool | OnReceivedINVITE (SIP_PDU *pdu) |
virtual bool | OnReceivedNOTIFY (SIP_PDU &request) |
virtual bool | OnReceivedREGISTER (SIP_PDU &request) |
virtual bool | OnReceivedSUBSCRIBE (SIP_PDU &request, SIPDialogContext *dialog) |
virtual bool | OnReceivedMESSAGE (SIP_PDU &request) |
virtual bool | OnReceivedOPTIONS (SIP_PDU &request) |
virtual void | OnTransactionFailed (SIPTransaction &transaction) |
Protected Types | |
typedef std::multimap< PString, SIPURL > | ConferenceMap |
![]() | |
typedef std::map < OpalTransportAddress, LocalRtpInfo > | LocalRtpInfoMap |
Session Initiation Protocol endpoint.
|
protected |
typedef PNotifierTemplate<ConnectionlessMessageInfo &> SIPEndPoint::ConnectionlessMessageNotifier |
Information provided on the subscription status.
Indicate notification capability for an event package. Default behaviour handles conference and presence event packages if the aor
parameter matches something we have.
All other event packages are checked against the m_allowedEvents set member variable.
Enumerator | |
---|---|
CannotNotify |
Refuse SUBSCRIBE. |
CanNotifyImmediate |
Accept SUBSCRIBE and send NOTIFY. |
CanNotifyDeferrred |
|
SIPEndPoint::SIPEndPoint | ( | OpalManager & | manager, |
unsigned | maxThreads = 15 |
||
) |
Create a new endpoint.
SIPEndPoint::~SIPEndPoint | ( | ) |
Destroy endpoint.
|
inline |
References m_transactions.
|
protected |
void SIPEndPoint::AdjustToRegistration | ( | SIP_PDU & | pdu, |
SIPConnection * | connection = NULL , |
||
const OpalTransport * | transport = NULL |
||
) |
Adjust the outgoing PDU to registered information. Various header fields of the PDU must be adjusted to agree with values provided to/from the active registration for the domain the call is being made to. For example the "From" field must agree exactly with
If no active registration is available, the result of GetLocalURL() on the given transport is set to the Contact field.
|
virtual |
Indicate notifications for the specified event package are supported.
eventPackage | Event package we support |
aor | Address of record for SUBSCRIBE |
|
virtual |
bool SIPEndPoint::ClearDialogContext | ( | const PString & | descriptor | ) |
Clear a SIP connection by dialog identifer informataion. This function does not require an OPAL connection to operate, it will attempt to send a BYE to the dialog identified by the information in the SIPDialogContext structure.
This feature can be useful for servers that had an "unexpected exit" and various clients it was talking to at the time do not implement the RFC4028 session timers, so continue to try and send media forever. They need to be told to cease and desist.
descriptor | Descriptor string for call clearance |
bool SIPEndPoint::ClearDialogContext | ( | SIPDialogContext & | context | ) |
context | Context for call clearance |
|
virtual |
Create a connection for the SIP endpoint. The default implementation is to create a OpalSIPConnection.
init | Initialisation parameters |
|
virtual |
|
virtual |
Create a SDP instance for the SIP packet. The default implementation is to create a SDPSessionDescription.
|
protected |
|
inline |
References activeSIPHandlers, and SIPHandlersList::FindSIPHandlerByCallID().
|
virtual |
Forward the connection using the same token as the specified connection. Return true if the connection is being redirected.
connection | Connection to be forwarded |
forwardParty | Remote party to forward to |
|
virtual |
Execute garbage collection for endpoint. Returns true if all garbage has been collected. Default behaviour deletes the objects in the connectionsActive list.
Reimplemented from OpalEndPoint.
|
inline |
References ackTimeout.
|
inline |
Get the allowed events for SUBSCRIBE commands.
References m_allowedEvents.
|
virtual |
Return a bit mask of the allowed SIP methods.
bool SIPEndPoint::GetAuthentication | ( | const PString & | realm, |
PString & | authId, | ||
PString & | password | ||
) |
Return the SIPAuthentication for a specific realm.
|
virtual |
Get available string option names.
Reimplemented from OpalEndPoint.
|
inline |
Get the default line appearance code for new connections.
References m_defaultAppearanceCode.
|
virtual |
Return the default Contact URL.
|
inline |
Get default mode for PRACK support.
References m_defaultPrackMode.
|
virtual |
Get the default signal port for this endpoint.
Reimplemented from OpalEndPoint.
|
virtual |
Get the default transports for the endpoint type. Overrides the default behaviour to return udp and tcp.
Reimplemented from OpalEndPoint.
|
inline |
References inviteTimeout.
|
inline |
References m_keepAliveTimeout, and m_keepAliveType.
|
inline |
References m_maxPacketSizeUDP.
|
inline |
References maxRetries.
|
inline |
References m_keepAliveTimeout.
|
virtual |
Reimplemented from OpalEndPoint.
|
inline |
Return the next CSEQ for the next transaction.
References m_lastSentCSeq.
|
inline |
References nonInviteTimeout.
|
inline |
References notifierTimeToLive.
|
inline |
References pduCleanUpTimeout.
|
inline |
References m_progressTimeout.
|
inline |
Return the outbound proxy URL, if any.
References m_proxy.
|
inline |
Returns a list of published entities.
eventPackage | Event package for publication |
includeOffline | Include offline publications |
References activeSIPHandlers, SIPHandlersList::GetAddresses(), and SIP_PDU::Method_PUBLISH.
|
inline |
References m_registeredUserMode.
|
inline |
References registrarTimeToLive.
|
inline |
Returns a list of registered accounts.
includeOffline | Include offline registrations |
References activeSIPHandlers, SIPHandlersList::GetAddresses(), and SIP_PDU::Method_REGISTER.
|
inline |
Returns the number of registered accounts.
References activeSIPHandlers, SIPHandlersList::GetCount(), and SIP_PDU::Method_REGISTER.
bool SIPEndPoint::GetRegistrationStatus | ( | const PString & | token, |
RegistrationStatus & | status | ||
) |
Get current registration status. Returns false if there is no registration that match the aor/call-id
status | Address-of-record, or call-id Returned status |
|
inline |
References retryTimeoutMax.
|
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"
token | Token to identify connection |
mode | Lock mode |
errorCode | Error code if lock fails |
|
inline |
Returns the number of registered accounts.
eventPackage | Event package of subscription |
References activeSIPHandlers, SIPHandlersList::GetCount(), and SIP_PDU::Method_SUBSCRIBE.
|
inline |
Returns a list of subscribed accounts for package.
eventPackage | Event package of subscription |
includeOffline | Include offline subscriptions |
References activeSIPHandlers, SIPHandlersList::GetAddresses(), and SIP_PDU::Method_REGISTER.
bool SIPEndPoint::GetSubscriptionStatus | ( | const PString & | token, |
const PString & | eventPackage, | ||
SubscriptionStatus & | status | ||
) |
Get current registration status. Returns false if there is no registration that match the aor/call-id
eventPackage | Address-of-record, or call-id Event package being unsubscribed |
status | Returned status |
|
inline |
References m_threadPool.
|
inline |
References m_transactions.
OpalTransportPtr SIPEndPoint::GetTransport | ( | const SIPTransactionOwner & | transactor, |
SIP_PDU::StatusCodes & | reason | ||
) |
Find or create an OpalTransport instance. A single transport exists to a specific remote system and all SIP entities (connections or handlers) use transports out of this pool.
|
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 |
|
virtual |
PBoolean SIPEndPoint::IsRegistered | ( | const PString & | aor, |
bool | includeOffline = false |
||
) |
Determine if there is a registration for the entity. The "token" parameter string is typically the string returned by the Register() function which is guaranteed to uniquely identify the specific registration.
For backward compatibility, the AOR can also be used, but as it is possible to have two registrations to the same AOR, this should be avoided.
The includeOffline parameter indicates if the caller is interested in if we are, to the best of our knowledge, currently registered (have had recent confirmation) or we are not sure if we are registered or not, but are continually re-trying.
aor | AOR returned by Register() |
includeOffline | Include offline registrations |
bool SIPEndPoint::IsSubscribed | ( | 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.
aor | AOR returned by Subscribe() |
includeOffline | Include offline subscription |
bool SIPEndPoint::IsSubscribed | ( | const PString & | eventPackage, |
const PString & | aor, | ||
bool | includeOffline = false |
||
) |
eventPackage | Event package being unsubscribed |
aor | Address-of-record for subscription |
includeOffline | Include offline subscription |
|
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 false is returned.
This function usually returns almost immediately with the connection continuing to occur in a new background thread.
If false is returned then the connection could not be established. For example if a PSTN endpoint is used and the 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.
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 |
Handle new incoming connection from listener.
listener | Listner that created transport |
transport | Transport connection came in on |
bool SIPEndPoint::Notify | ( | const SIPURL & | targetAddress, |
const PString & | eventPackage, | ||
const PObject & | body | ||
) |
Send notification to all remotes that are subcribed to the event package.
targetAddress | Address that was subscribed |
eventPackage | Event package for notification |
body | Body of notification |
|
virtual |
Call back when conferencing state information changes. If a conferencing endpoint type detects a change in a conference nodes state, as would be returned by GetConferenceStatus() then this function will be called on all endpoints in the OpalManager.
The uri
parameter is as is the internal URI for the conference.
uri | < Endpoint sending state change Internal URI of conference node that changed |
change | Change that occurred |
Reimplemented from OpalEndPoint.
|
virtual |
Callback called when dialog NOTIFY message is received
info | Information on dialog state change |
|
virtual |
Callback called when a message completes in any manner
|
virtual |
Callback called when an OPTIONS command is completed, either successfully or with error.
params | Original parameter for SendOPTIONS() call |
response | Response packet, check GetStatusCode() for result |
|
virtual |
Handle an incoming INVITE request.
pdu
is taken, false will delete it.
|
virtual |
Handle an incoming MESSAGE PDU.
|
virtual |
Handle an incoming NOTIFY PDU.
|
virtual |
Handle an incoming OPTIONS PDU.
|
virtual |
Handle an incoming SIP PDU that has been full decoded
pdu
is taken, false will delete it.
|
virtual |
Handle an incoming REGISTER PDU.
|
virtual |
Handle an incoming response PDU.
|
virtual |
Handle an incoming SUBSCRIBE PDU.
|
virtual |
Callback called when reg NOTIFY message is received
info | Information on dialog state change |
|
virtual |
Callback called when a registration or an unregistration is successful. Deprecated, maintained for backward compatibility, use OnRegistrationStatus().
|
virtual |
Callback called when a registration to a SIP registrars fails. Deprecated, maintained for backward compatibility, use OnRegistrationStatus().
|
virtual |
Callback called when a registration to a SIP registrar status.
status | Status of registration request |
Reimplemented in SIPConsoleEndPoint.
|
virtual |
|
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.
connection | Connection that was established |
Reimplemented from OpalEndPoint.
|
virtual |
|
virtual |
Callback called when a subscription to a SIP UA status changes.
status | Status of subscription request |
|
virtual |
Callback called when a subscription to a SIP UA status changes. Now deprecated - called by OnSubscriptionStatus that accepts SIPHandler
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 |
handler | Event subscription paramaters |
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 |
Handle a SIP packet transaction failure
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
PBoolean SIPEndPoint::Ping | ( | const PURL & | to | ) |
Send a SIP PING to the remote host
bool SIPEndPoint::Publish | ( | const SIPSubscribe::Params & | params, |
const PString & | body, | ||
PString & | aor | ||
) |
Publish new state information. An empty body, or expire time of zero, will cease to automatically update the publish.
bool SIPEndPoint::Publish | ( | const PString & | to, |
const PString & | body, | ||
unsigned | expire = 300 |
||
) |
to | Address to send PUBLISH |
body | Body of PUBLISH |
expire | Time between automatic updates in seconds. |
bool SIPEndPoint::Register | ( | const SIPRegister::Params & | params, |
PString & | aor, | ||
SIP_PDU::StatusCodes * | reason = NULL |
||
) |
Register an entity 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 params.m_addressOfRecord field is the only field required, though typically params.m_password is also required. A registration for the user part of params.m_addressOfRecord is made to the a registrar associated with the domain part of the field. The authentication identity is the same as the user field, though this may be set to soemthing different via the params.m_authID field.
The params.m_registrarAddress may indicate the specific hostname to use for the registrar rather than using the domain part of params.m_addressOfRecord field.
To aid in flexbility if the params.m_addressOfRecord does not contain a domain and the params.m_registrarAddress does, the the AOR is constructed from them.
The params.m_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.
The Contact address is normally constructed from the listeners active on the SIPEndPoint. This may be overridden to an explicit value via the params.m_contactAddress field.
The returned "token" is a string that can be used in functions such as Unregister() or IsRegistered(). While it possible to use the AOR for those functions, it is not recommended as a) there may be more than one registration for an AOR and b) the AOR may be constructed from
params | Registration parameters |
aor | Resultant address-of-record for unregister |
reason | If not null, wait for completion, may take some time |
bool SIPEndPoint::Register | ( | const SIPRegister::Params & | params, |
PString & | aor, | ||
bool | asynchronous | ||
) |
params | Registration parameters |
aor | Resultant address-of-record for unregister |
asynchronous | Wait for completion, may take some time |
bool P_DEPRECATED 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::SendMESSAGE | ( | SIPMessage::Params & | params | ) |
Send SIP message
void SIPEndPoint::SendNotifyDialogInfo | ( | const SIPDialogNotification & | info | ) |
info | Information on dialog state change |
|
virtual |
Send SIP OPTIONS
|
inline |
References ackTimeout.
|
inline |
References m_onConnectionlessMessage.
|
inline |
Set the default line appearance code for new connections.
References m_defaultAppearanceCode.
|
inline |
Set default mode for PRACK support.
References m_defaultPrackMode.
|
inline |
References inviteTimeout.
|
inline |
References m_keepAliveTimeout, and m_keepAliveType.
Referenced by SetNATBindingRefreshMethod().
|
inline |
References m_maxPacketSizeUDP.
|
inline |
References maxRetries.
|
inline |
References m_keepAliveTimeout, and SetKeepAlive().
|
inline |
References m_keepAliveTimeout.
|
inline |
References nonInviteTimeout.
|
inline |
References notifierTimeToLive.
|
inline |
References pduCleanUpTimeout.
|
inline |
References m_progressTimeout.
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.
|
inline |
Set registration search mode. If true then only the user indicated as "local" address (e.g. from OPAL_OPT_CALLING_PARTY_NAME etc) by the will be used in searches of the registrations. No default to first user of the same domain will be performed.
References m_registeredUserMode.
|
inline |
References registrarTimeToLive.
|
inline |
References retryTimeoutMax, and retryTimeoutMin.
|
virtual |
Setup a connection transfer a connection for the SIP endpoint.
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 |
|
inline |
Set the User Agent for the endpoint.
References m_userAgentString.
|
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 & | token, | ||
bool | tokenIsAOR = true |
||
) |
Subscribe to an agent to get event notifications. This function is asynchronous to permit several subscriptions to occur at the same time. It can be called several times for different hosts and users.
The params.m_eventPackage and params.m_addressOfRecord field are the only field required, though typically params.m_password is also required. A subscription for the user part of params.m_addressOfRecord is made to the an agent associated with the domain part of the field. The authentication identity is the same as the user field, though this may be set to soemthing different via the params.m_authID field.
The params.m_agentAddress may indicate the specific hostname to use for the registrar rather than using the domain part of params.m_addressOfRecord field.
To aid in flexbility if the params.m_addressOfRecord does not contain a domain and the params.m_agentAddress does, the the AOR is constructed from them.
The params.m_realm can be specified when subcribing, 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.
The Contact address is normally constructed from the SIPEndPoint local identity.
The returned "token" is a string that can be used in functions such as Unregister() or IsRegistered(). While it possible to use the user supplied AOR for those functions, it is not recommended as a) there may be more than one registration for an AOR and b) the AOR may be constructed from fields in the params argument and not be what the user expects.
The tokenIsAOR can also be used, if false, to return the globally unique ID used for the handler. This is the preferred method, even though the default is to not use it, that is for backward compatibility reasons.
params | Subscription parameters |
token | Resultant token for unsubscribe |
tokenIsAOR | Token is the address-of-record |
bool SIPEndPoint::Subscribe | ( | SIPSubscribe::PredefinedPackages | eventPackage, |
unsigned | expire, | ||
const PString & | aor | ||
) |
eventPackage | Event package being unsubscribed |
expire | Expiry time in seconds |
aor | Address-of-record for subscription |
|
protected |
bool SIPEndPoint::Unregister | ( | const PString & | aor | ) |
Unregister the address-of-record from a registrar. The "token" parameter string is typically the string returned by the Register() function which is guaranteed to uniquely identify the specific registration.
For backward compatibility, the AOR can also be used, but as it is possible to have two registrations to the same AOR, this should be avoided.
aor | AOR returned by Register() |
bool SIPEndPoint::UnregisterAll | ( | ) |
Unregister all current registrations. Returns true if at least one registrar is unregistered.
bool SIPEndPoint::UnsubcribeAll | ( | SIPSubscribe::PredefinedPackages | eventPackage | ) |
Unsubscribe all current subscriptions. Returns true if at least one subscription is unsubscribed.
eventPackage | Event package being unsubscribed |
bool SIPEndPoint::UnsubcribeAll | ( | const PString & | eventPackage | ) |
eventPackage | Event package being unsubscribed |
bool SIPEndPoint::Unsubscribe | ( | const PString & | aor, |
bool | invalidateNotifiers = false |
||
) |
Unsubscribe a current subscriptions. The "token" parameter string is typically the string returned by the Subscribe() function which is guaranteed to uniquely identify the specific registration.
For backward compatibility, the AOR can also be used, but as it is possible to have two susbcriptions to the same AOR, this should be avoided.
aor | Unique token for registration |
invalidateNotifiers | Notifiers in SIPSubscribe::Params are to be reset |
bool SIPEndPoint::Unsubscribe | ( | SIPSubscribe::PredefinedPackages | eventPackage, |
const PString & | aor, | ||
bool | invalidateNotifiers = false |
||
) |
eventPackage | Event package being unsubscribed |
aor | Address-of-record for subscription |
invalidateNotifiers | Notifiers in SIPSubscribe::Params are to be reset |
bool SIPEndPoint::Unsubscribe | ( | const PString & | eventPackage, |
const PString & | aor, | ||
bool | invalidateNotifiers = false |
||
) |
eventPackage | Event package being unsubscribed |
aor | Address-of-record for subscription |
invalidateNotifiers | Notifiers in SIPSubscribe::Params are to be reset |
|
inline |
References activeSIPHandlers, and SIPHandlersList::Update().
|
protected |
Referenced by GetAckTimeout(), and SetAckTimeout().
|
protected |
|
protected |
Referenced by GetInviteTimeout(), and SetInviteTimeout().
|
protected |
Referenced by GetAllowedEvents().
|
protected |
|
protected |
Referenced by GetDefaultAppearanceCode(), and SetDefaultAppearanceCode().
|
protected |
Referenced by GetDefaultPRACKMode(), and SetDefaultPRACKMode().
|
protected |
|
protected |
Referenced by GetKeepAlive(), GetNATBindingTimeout(), SetKeepAlive(), SetNATBindingRefreshMethod(), and SetNATBindingTimeout().
|
protected |
Referenced by GetKeepAlive(), and SetKeepAlive().
|
protected |
Referenced by GetNextCSeq().
|
protected |
Referenced by GetMaxPacketSizeUDP(), and SetMaxPacketSizeUDP().
|
protected |
Referenced by SetConnectionlessMessageNotifier().
|
protected |
|
protected |
|
protected |
Referenced by GetProgressTimeout(), and SetProgressTimeout().
|
protected |
Referenced by GetProxy().
|
protected |
|
protected |
|
protected |
Referenced by GetRegisteredUserMode(), and SetRegisteredUserMode().
|
protected |
|
protected |
|
protected |
Referenced by GetThreadPool().
|
protected |
Referenced by AddTransaction(), and GetTransaction().
|
protected |
|
protected |
Referenced by SetUserAgent().
|
protected |
Referenced by GetMaxRetries(), and SetMaxRetries().
|
protected |
Referenced by GetNonInviteTimeout(), and SetNonInviteTimeout().
|
protected |
Referenced by GetNotifierTimeToLive(), and SetNotifierTimeToLive().
|
protected |
Referenced by GetPduCleanUpTimeout(), and SetPduCleanUpTimeout().
|
protected |
Referenced by GetRegistrarTimeToLive(), and SetRegistrarTimeToLive().
|
protected |
Referenced by GetRetryTimeoutMax(), and SetRetryTimeouts().
|
protected |
Referenced by GetRetryTimeoutMin(), and SetRetryTimeouts().