reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
recon::UserAgent Class Reference

This class is one of two main classes of concern to an application using the UserAgent library. More...

#include <UserAgent.hxx>

Inheritance diagram for recon::UserAgent:
[legend]

Public Types

enum  LoggingSubsystem {
  SubsystemAll , SubsystemContents , SubsystemDns , SubsystemDum ,
  SubsystemSdp , SubsystemSip , SubsystemTransaction , SubsystemTransport ,
  SubsystemStats , SubsystemRecon , SubsystemFlowManager , SubsystemReTurn
}
 

Public Member Functions

 UserAgent (ConversationManager *conversationManager, std::shared_ptr< UserAgentMasterProfile > masterProfile, resip::AfterSocketCreationFuncPtr socketFunc=0)
 Constructor.
 
virtual ~UserAgent ()
 
void startup ()
 Starts the SIP stack thread.
 
virtual void process (int timeoutMs)
 This should be called in a loop to give process cycles to the UserAgent.
 
void shutdown ()
 Used to initiate a shutdown of the useragent.
 
void logDnsCache ()
 Used to initiate a snapshot of the existing DNS entries in the cache to the logging subsystem.
 
void clearDnsCache ()
 Used to clear the existing DNS entries in the cache.
 
ConversationManager * getConversationManager ()
 Retrieves the ConversationManager passed in the constructor.
 
ConversationProfileHandle addConversationProfile (std::shared_ptr< ConversationProfile > conversationProfile, bool defaultOutgoing=true)
 Adds a Conversation Profile to be managed, by the user agent.
 
void setDefaultOutgoingConversationProfile (ConversationProfileHandle handle)
 Sets an existing Conversation Profile to the default profile to use for outbound calls.
 
void destroyConversationProfile (ConversationProfileHandle handle)
 Destroys an existing Conversation Profile.
 
virtual void startApplicationTimer (unsigned int timerId, std::chrono::duration< double > duration, unsigned int seqNumber)
 Used by an application to start a timer that is managed by the useragent.
 
SubscriptionHandle createSubscription (const resip::Data &eventType, const resip::NameAddr &target, unsigned int subscriptionTime, const resip::Mime &mimeType)
 Requests that the user agent create and manage an event subscription.
 
void destroySubscription (SubscriptionHandle handle)
 Destroys an existing subscriptions.
 
PublicationHandle createPublication (const resip::Data &eventType, const resip::NameAddr &target, const resip::Data &status, unsigned int publicationTime, const resip::Mime &mimeType)
 
void destroyPublication (PublicationHandle handle)
 
virtual void onApplicationTimer (unsigned int timerId, std::chrono::duration< double > duration, unsigned int seqNumber)
 Callback used when an application timer expires.
 
virtual void onSubscriptionNotify (SubscriptionHandle handle, const resip::Data &notifyData)
 Callback used when a subscription has received an event notification from the server.
 
virtual void onSubscriptionTerminated (SubscriptionHandle handle, unsigned int statusCode)
 Callback used when a subscription is terminated.
 
const char * sendMessage (const resip::NameAddr &destination, const resip::Data &msg, const resip::Mime &mimeType)
 Used to send a MESSAGE SIP message.
 
std::shared_ptr< UserAgentMasterProfile > getUserAgentMasterProfile () const noexcept
 
- Public Member Functions inherited from resip::ClientRegistrationHandler
virtual ~ClientRegistrationHandler ()
 
virtual void onFlowTerminated (ClientRegistrationHandle)
 Called when a TCP or TLS flow to the server has terminated.
 
virtual bool onRefreshRequired (ClientRegistrationHandle, const SipMessage &lastRequest)
 Called before attempting to refresh a registration Return true if the refresh should go ahead or false otherwise Default implementation always returns true.
 
- Public Member Functions inherited from resip::ClientSubscriptionHandler
virtual ~ClientSubscriptionHandler ()
 
virtual void onReadyToSend (ClientSubscriptionHandle, SipMessage &msg)
 called to allow app to adorn a message.
 
virtual void onNotifyNotReceived (ClientSubscriptionHandle)
 
virtual void onFlowTerminated (ClientSubscriptionHandle)
 Called when a TCP or TLS flow to the server has terminated.
 
- Public Member Functions inherited from resip::ClientPublicationHandler
virtual ~ClientPublicationHandler ()
 
virtual void onStaleUpdate (ClientPublicationHandle, const SipMessage &)
 
- Public Member Functions inherited from resip::DumShutdownHandler
virtual ~DumShutdownHandler ()
 
- Public Member Functions inherited from resip::Postable
virtual ~Postable ()
 

Static Public Member Functions

static void setLogLevel (resip::Log::Level level, LoggingSubsystem subsystem=SubsystemAll)
 Static method that sets the logging level for a particular subsystem, or all subsystems.
 

Protected Types

typedef std::map< SubscriptionHandle, UserAgentClientSubscription * > SubscriptionMap
 
typedef std::map< PublicationHandle, UserAgentClientPublication * > PublicationMap
 
typedef std::map< ConversationProfileHandle, std::shared_ptr< ConversationProfile > > ConversationProfileMap
 
typedef std::map< ConversationProfileHandle, UserAgentRegistration * > RegistrationMap
 

Protected Member Functions

resip::SipStack & getSipStack ()
 
resip::DialogUsageManager & getDialogUsageManager ()
 
void onDumCanBeDeleted ()
 
virtual void post (resip::Message *msg)
 
virtual void onSuccess (resip::ClientRegistrationHandle h, const resip::SipMessage &response)
 Called when registration succeeds or each time it is successfully refreshed (manual refreshes only).
 
virtual void onFailure (resip::ClientRegistrationHandle h, const resip::SipMessage &response)
 Called if registration fails, usage will be destroyed (unless a Registration retry interval is enabled in the Profile)
 
virtual void onRemoved (resip::ClientRegistrationHandle h, const resip::SipMessage &response)
 
virtual int onRequestRetry (resip::ClientRegistrationHandle h, int retryMinimum, const resip::SipMessage &msg)
 call on Retry-After failure.
 
virtual void onUpdatePending (resip::ClientSubscriptionHandle h, const resip::SipMessage &notify, bool outOfOrder)
 
virtual void onUpdateActive (resip::ClientSubscriptionHandle h, const resip::SipMessage &notify, bool outOfOrder)
 
virtual void onUpdateExtension (resip::ClientSubscriptionHandle, const resip::SipMessage &notify, bool outOfOrder)
 
virtual void onTerminated (resip::ClientSubscriptionHandle h, const resip::SipMessage *notify)
 
virtual void onNewSubscription (resip::ClientSubscriptionHandle h, const resip::SipMessage &notify)
 
virtual int onRequestRetry (resip::ClientSubscriptionHandle h, int retryMinimum, const resip::SipMessage &notify)
 
virtual void onSuccess (resip::ClientPublicationHandle h, const resip::SipMessage &status)
 Called when the publication succeeds or each time it is successfully refreshed.
 
virtual void onRemove (resip::ClientPublicationHandle h, const resip::SipMessage &status)
 
virtual int onRequestRetry (resip::ClientPublicationHandle h, int retrySeconds, const resip::SipMessage &status)
 call on Retry-After failure.
 
virtual void onFailure (resip::ClientPublicationHandle h, const resip::SipMessage &status)
 
std::shared_ptr< ConversationProfile > getDefaultOutgoingConversationProfile ()
 
std::shared_ptr< ConversationProfile > getConversationProfileByMediaAddress (const resip::Data &mediaAddress)
 
virtual std::shared_ptr< ConversationProfile > getIncomingConversationProfile (const resip::SipMessage &msg)
 
void addTransports ()
 
void post (resip::ApplicationMessage &message, std::chrono::duration< double > duration)
 
void shutdownImpl ()
 
void addConversationProfileImpl (ConversationProfileHandle handle, std::shared_ptr< ConversationProfile > conversationProfile, bool defaultOutgoing=true)
 
void setDefaultOutgoingConversationProfileImpl (ConversationProfileHandle handle)
 
void destroyConversationProfileImpl (ConversationProfileHandle handle)
 
void createSubscriptionImpl (SubscriptionHandle handle, const resip::Data &eventType, const resip::NameAddr &target, unsigned int subscriptionTime, const resip::Mime &mimeType)
 
void destroySubscriptionImpl (SubscriptionHandle handle)
 
void createPublicationImpl (PublicationHandle handle, const resip::Data &status, const resip::Data &eventType, const resip::NameAddr &target, unsigned int publicationTime, const resip::Mime &mimeType)
 
void destroyPublicationImpl (PublicationHandle handle)
 
SubscriptionHandle getNewSubscriptionHandle ()
 
void registerSubscription (UserAgentClientSubscription *)
 
void unregisterSubscription (UserAgentClientSubscription *)
 
PublicationHandle getNewPublicationHandle ()
 
void registerPublication (UserAgentClientPublication *)
 
void unregisterPublication (UserAgentClientPublication *)
 
ConversationProfileHandle getNewConversationProfileHandle ()
 
void registerRegistration (UserAgentRegistration *)
 
void unregisterRegistration (UserAgentRegistration *)
 

Protected Attributes

SubscriptionMap mSubscriptions
 
resip::Mutex mSubscriptionHandleMutex
 
SubscriptionHandle mCurrentSubscriptionHandle
 
PublicationMap mPublications
 
resip::Mutex mPublicationHandleMutex
 
PublicationHandle mCurrentPublicationHandle
 
ConversationProfileMap mConversationProfiles
 
resip::Mutex mConversationProfileHandleMutex
 
ConversationProfileHandle mCurrentConversationProfileHandle
 
ConversationProfileHandle mDefaultOutgoingConversationProfileHandle
 
RegistrationMap mRegistrations
 
ConversationManager * mConversationManager
 
std::shared_ptr< UserAgentMasterProfile > mProfile
 
resip::Security * mSecurity
 
resip::FdPollGrp * mPollGrp
 
resip::EventThreadInterruptor * mEventInterruptor
 
resip::SipStack mStack
 
resip::DialogUsageManager mDum
 
resip::EventStackThread mStackThread
 
volatile bool mDumShutdown
 
volatile bool mUserAgentShutdown
 

Friends

class ConversationManager
 
class SipXMediaStackAdapter
 
class UserAgentShutdownCmd
 
class AddConversationProfileCmd
 
class SetDefaultOutgoingConversationProfileCmd
 
class DestroyConversationProfileCmd
 
class CreateSubscriptionCmd
 
class DestroySubscriptionCmd
 
class MediaResourceParticipant
 
class CreatePublicationCmd
 
class DestroyPublicationCmd
 
class UserAgentServerAuthManager
 
class RemoteParticipant
 
class RemoteIMPagerParticipant
 
class SipXRemoteParticipant
 
class RemoteIMSessionParticipant
 
class DefaultDialogSet
 
class RemoteParticipantDialogSet
 
class SipXRemoteParticipantDialogSet
 
class RemoteIMSessionParticipantDialogSet
 
class UserAgentClientSubscription
 
class UserAgentClientPublication
 
class UserAgentRegistration
 

Detailed Description

This class is one of two main classes of concern to an application using the UserAgent library.

This class should be subclassed by the application and the UserAgent handlers should be implemented by it.

This class is responsible for handling tasks that are not directly related to managing the Conversations themselves. All conversation management is done via the ConversationManager class.

This class handles tasks such as:

  • Startup, Process Loop, and shutdown handling
  • Handling user agent settings (UserAgentMasterProfile)
  • Handling and dispatching Application Timers
  • Management of Conversation Profiles and Registrations
  • Management of Subscriptions

Author: Scott Godin (sgodin AT SipSpectrum DOT com)

Definition at line 51 of file UserAgent.hxx.

Member Typedef Documentation

◆ ConversationProfileMap

Definition at line 371 of file UserAgent.hxx.

◆ PublicationMap

◆ RegistrationMap

◆ SubscriptionMap

Member Enumeration Documentation

◆ LoggingSubsystem

Enumerator
SubsystemAll 
SubsystemContents 
SubsystemDns 
SubsystemDum 
SubsystemSdp 
SubsystemSip 
SubsystemTransaction 
SubsystemTransport 
SubsystemStats 
SubsystemRecon 
SubsystemFlowManager 
SubsystemReTurn 

Definition at line 129 of file UserAgent.hxx.

Constructor & Destructor Documentation

◆ UserAgent()

UserAgent::UserAgent ( ConversationManager *  conversationManager,
std::shared_ptr< UserAgentMasterProfile >  masterProfile,
resip::AfterSocketCreationFuncPtr  socketFunc = 0 
)

Constructor.

Parameters
conversationManagerApplication subclassed Conversation Manager
masterProfileObject containing useragent settings
socketFuncA pointer to a function that will be called after a socket in the DNS or SIP transport layers of the stack has been created. This callback can be used to control low level socket options, such as Quality-of-Service/DSCP. Note: For SIP TCP sockets there is one call for the listen socket, and one (or two) calls for each connection created afterwards. For each inbound TCP connection the first callback is called immediately before the socket is connected, and if configured it is called again after the connect call has completed and before the first data is sent out.
On some OS's you cannot set QOS until the socket is successfully connected. To enable this behavior call: Connection::setEnablePostConnectSocketFuncCall();

Definition at line 53 of file UserAgent.cxx.

◆ ~UserAgent()

UserAgent::~UserAgent ( )
virtual

Definition at line 136 of file UserAgent.cxx.

Member Function Documentation

◆ addConversationProfile()

ConversationProfileHandle UserAgent::addConversationProfile ( std::shared_ptr< ConversationProfile >  conversationProfile,
bool  defaultOutgoing = true 
)

Adds a Conversation Profile to be managed, by the user agent.

SIP Registration is performed, if required.

Parameters
conversationProfileProfile to add
defaultOutgoingSet to true to set this profile as the default profile to use for outbound calls.

Definition at line 307 of file UserAgent.cxx.

◆ addConversationProfileImpl()

void UserAgent::addConversationProfileImpl ( ConversationProfileHandle  handle,
std::shared_ptr< ConversationProfile >  conversationProfile,
bool  defaultOutgoing = true 
)
protected

Definition at line 622 of file UserAgent.cxx.

◆ addTransports()

void UserAgent::addTransports ( )
protected

Definition at line 502 of file UserAgent.cxx.

◆ clearDnsCache()

void UserAgent::clearDnsCache ( )

Used to clear the existing DNS entries in the cache.

Definition at line 244 of file UserAgent.cxx.

◆ createPublication()

PublicationHandle UserAgent::createPublication ( const resip::Data &  eventType,
const resip::NameAddr &  target,
const resip::Data &  status,
unsigned int  publicationTime,
const resip::Mime &  mimeType 
)

Definition at line 346 of file UserAgent.cxx.

◆ createPublicationImpl()

void UserAgent::createPublicationImpl ( PublicationHandle  handle,
const resip::Data &  status,
const resip::Data &  eventType,
const resip::NameAddr &  target,
unsigned int  publicationTime,
const resip::Mime &  mimeType 
)
protected

Definition at line 715 of file UserAgent.cxx.

◆ createSubscription()

SubscriptionHandle UserAgent::createSubscription ( const resip::Data &  eventType,
const resip::NameAddr &  target,
unsigned int  subscriptionTime,
const resip::Mime &  mimeType 
)

Requests that the user agent create and manage an event subscription.


When an subscribed event is received the onSubscriptionNotify callback is used. If the subscription is terminated by the server, the application or due to network failure the onSubscriptionTerminated callback is used.

Applications should override this UserAgent class and callbacks in order to use subscriptions.

Parameters
eventTypeEvent type we are subscribing to
targetA URI representing the location of the subscription server
subscriptionTimeRequested time that the subscription should stay active, before sending a refresh request is required.
mimeTypeThe mime type of event body expected

Definition at line 330 of file UserAgent.cxx.

◆ createSubscriptionImpl()

void UserAgent::createSubscriptionImpl ( SubscriptionHandle  handle,
const resip::Data &  eventType,
const resip::NameAddr &  target,
unsigned int  subscriptionTime,
const resip::Mime &  mimeType 
)
protected

Definition at line 687 of file UserAgent.cxx.

◆ destroyConversationProfile()

void UserAgent::destroyConversationProfile ( ConversationProfileHandle  handle)

Destroys an existing Conversation Profile.

SIP un-registration is performed, if required.

Parameters
handleConversationProfile handle to use
Note
If this ConversationProfile is currently the default outbound profile, then the next profile in the list will become the default

Definition at line 323 of file UserAgent.cxx.

◆ destroyConversationProfileImpl()

void UserAgent::destroyConversationProfileImpl ( ConversationProfileHandle  handle)
protected

Definition at line 659 of file UserAgent.cxx.

◆ destroyPublication()

void UserAgent::destroyPublication ( PublicationHandle  handle)

Definition at line 356 of file UserAgent.cxx.

◆ destroyPublicationImpl()

void UserAgent::destroyPublicationImpl ( PublicationHandle  handle)
protected

Definition at line 774 of file UserAgent.cxx.

◆ destroySubscription()

void UserAgent::destroySubscription ( SubscriptionHandle  handle)

Destroys an existing subscriptions.

Unsubscribe request is sent, if required.

Parameters
handleSubscription handle to destroy

Definition at line 339 of file UserAgent.cxx.

◆ destroySubscriptionImpl()

void UserAgent::destroySubscriptionImpl ( SubscriptionHandle  handle)
protected

Definition at line 705 of file UserAgent.cxx.

◆ getConversationManager()

ConversationManager * UserAgent::getConversationManager ( )

Retrieves the ConversationManager passed in the constructor.

Returns
Pointer to the conversation manager

Definition at line 466 of file UserAgent.cxx.

◆ getConversationProfileByMediaAddress()

std::shared_ptr< ConversationProfile > UserAgent::getConversationProfileByMediaAddress ( const resip::Data &  mediaAddress)
protected

Definition at line 378 of file UserAgent.cxx.

◆ getDefaultOutgoingConversationProfile()

std::shared_ptr< ConversationProfile > UserAgent::getDefaultOutgoingConversationProfile ( )
protected

Definition at line 363 of file UserAgent.cxx.

◆ getDialogUsageManager()

DialogUsageManager & UserAgent::getDialogUsageManager ( )
protected

Definition at line 460 of file UserAgent.cxx.

◆ getIncomingConversationProfile()

std::shared_ptr< ConversationProfile > UserAgent::getIncomingConversationProfile ( const resip::SipMessage &  msg)
protectedvirtual

Definition at line 395 of file UserAgent.cxx.

◆ getNewConversationProfileHandle()

ConversationProfileHandle UserAgent::getNewConversationProfileHandle ( )
protected

Definition at line 186 of file UserAgent.cxx.

◆ getNewPublicationHandle()

PublicationHandle UserAgent::getNewPublicationHandle ( )
protected

Definition at line 167 of file UserAgent.cxx.

◆ getNewSubscriptionHandle()

SubscriptionHandle UserAgent::getNewSubscriptionHandle ( )
protected

Definition at line 148 of file UserAgent.cxx.

◆ getSipStack()

resip::SipStack & recon::UserAgent::getSipStack ( )
inlineprotected

Definition at line 280 of file UserAgent.hxx.

◆ getUserAgentMasterProfile()

std::shared_ptr< UserAgentMasterProfile > UserAgent::getUserAgentMasterProfile ( ) const
noexcept

Definition at line 454 of file UserAgent.cxx.

◆ logDnsCache()

void UserAgent::logDnsCache ( )

Used to initiate a snapshot of the existing DNS entries in the cache to the logging subsystem.

Definition at line 238 of file UserAgent.cxx.

◆ onApplicationTimer()

void UserAgent::onApplicationTimer ( unsigned int  timerId,
std::chrono::duration< double >  duration,
unsigned int  seqNumber 
)
virtual

Callback used when an application timer expires.

Note
An application should override this method if it uses startApplicaitonTimer.
Parameters
timerIdId representing the timers purpose
durationthe duration of the timer in ms
seqNumberCan be used by the application to differentiate "active" from "non-active" timers, since timers cannot be stopped

Reimplemented in mohparkserver::MyUserAgent.

Definition at line 577 of file UserAgent.cxx.

◆ onDumCanBeDeleted()

void UserAgent::onDumCanBeDeleted ( )
protectedvirtual

Implements resip::DumShutdownHandler.

Definition at line 472 of file UserAgent.cxx.

◆ onFailure() [1/2]

void UserAgent::onFailure ( resip::ClientPublicationHandle  h,
const resip::SipMessage &  status 
)
protectedvirtual

Implements resip::ClientPublicationHandler.

Definition at line 871 of file UserAgent.cxx.

◆ onFailure() [2/2]

void UserAgent::onFailure ( resip::ClientRegistrationHandle  ,
const resip::SipMessage &  response 
)
protectedvirtual

Called if registration fails, usage will be destroyed (unless a Registration retry interval is enabled in the Profile)

Implements resip::ClientRegistrationHandler.

Definition at line 793 of file UserAgent.cxx.

◆ onNewSubscription()

void UserAgent::onNewSubscription ( resip::ClientSubscriptionHandle  h,
const resip::SipMessage &  notify 
)
protectedvirtual

Implements resip::ClientSubscriptionHandler.

Definition at line 838 of file UserAgent.cxx.

◆ onRemove()

void UserAgent::onRemove ( resip::ClientPublicationHandle  h,
const resip::SipMessage &  status 
)
protectedvirtual

Implements resip::ClientPublicationHandler.

Definition at line 859 of file UserAgent.cxx.

◆ onRemoved()

void UserAgent::onRemoved ( resip::ClientRegistrationHandle  h,
const resip::SipMessage &  response 
)
protectedvirtual

Implements resip::ClientRegistrationHandler.

Definition at line 799 of file UserAgent.cxx.

◆ onRequestRetry() [1/3]

int UserAgent::onRequestRetry ( resip::ClientPublicationHandle  ,
int  retrySeconds,
const resip::SipMessage &  status 
)
protectedvirtual

call on Retry-After failure.

return values: -1 = fail, 0 = retry immediately, N = retry in N seconds

Implements resip::ClientPublicationHandler.

Definition at line 865 of file UserAgent.cxx.

◆ onRequestRetry() [2/3]

int UserAgent::onRequestRetry ( resip::ClientRegistrationHandle  ,
int  retrySeconds,
const resip::SipMessage &  response 
)
protectedvirtual

call on Retry-After failure.

return values: -1 = fail, 0 = retry immediately, N = retry in N seconds

Implements resip::ClientRegistrationHandler.

Definition at line 805 of file UserAgent.cxx.

◆ onRequestRetry() [3/3]

int UserAgent::onRequestRetry ( resip::ClientSubscriptionHandle  h,
int  retryMinimum,
const resip::SipMessage &  notify 
)
protectedvirtual

Implements resip::ClientSubscriptionHandler.

Definition at line 844 of file UserAgent.cxx.

◆ onSubscriptionNotify()

void UserAgent::onSubscriptionNotify ( SubscriptionHandle  handle,
const resip::Data &  notifyData 
)
virtual

Callback used when a subscription has received an event notification from the server.

Note
An application should override this method if it uses createSubscription.
Parameters
handleSubscription handle that event applies to
notifyDataData representation of the event received

Reimplemented in mohparkserver::MyUserAgent.

Definition at line 589 of file UserAgent.cxx.

◆ onSubscriptionTerminated()

void UserAgent::onSubscriptionTerminated ( SubscriptionHandle  handle,
unsigned int  statusCode 
)
virtual

Callback used when a subscription is terminated.

Note
An application should override this method if it uses createSubscription.
Parameters
handleSubscription handle that terminated
statusCodeThe status code that caused termination. If application terminated, then statusCode will be 0.

Reimplemented in mohparkserver::MyUserAgent.

Definition at line 583 of file UserAgent.cxx.

◆ onSuccess() [1/2]

void UserAgent::onSuccess ( resip::ClientPublicationHandle  ,
const resip::SipMessage &  status 
)
protectedvirtual

Called when the publication succeeds or each time it is successfully refreshed.

Implements resip::ClientPublicationHandler.

Definition at line 853 of file UserAgent.cxx.

◆ onSuccess() [2/2]

void UserAgent::onSuccess ( resip::ClientRegistrationHandle  ,
const resip::SipMessage &  response 
)
protectedvirtual

Called when registration succeeds or each time it is successfully refreshed (manual refreshes only).


Implements resip::ClientRegistrationHandler.

Definition at line 787 of file UserAgent.cxx.

◆ onTerminated()

void UserAgent::onTerminated ( resip::ClientSubscriptionHandle  h,
const resip::SipMessage *  notify 
)
protectedvirtual

Implements resip::ClientSubscriptionHandler.

Definition at line 832 of file UserAgent.cxx.

◆ onUpdateActive()

void UserAgent::onUpdateActive ( resip::ClientSubscriptionHandle  h,
const resip::SipMessage &  notify,
bool  outOfOrder 
)
protectedvirtual

Implements resip::ClientSubscriptionHandler.

Definition at line 820 of file UserAgent.cxx.

◆ onUpdateExtension()

void UserAgent::onUpdateExtension ( resip::ClientSubscriptionHandle  h,
const resip::SipMessage &  notify,
bool  outOfOrder 
)
protectedvirtual

Implements resip::ClientSubscriptionHandler.

Definition at line 826 of file UserAgent.cxx.

◆ onUpdatePending()

void UserAgent::onUpdatePending ( resip::ClientSubscriptionHandle  h,
const resip::SipMessage &  notify,
bool  outOfOrder 
)
protectedvirtual

Implements resip::ClientSubscriptionHandler.

Definition at line 814 of file UserAgent.cxx.

◆ post() [1/2]

void UserAgent::post ( resip::ApplicationMessage &  message,
std::chrono::duration< double >  duration 
)
protected

Definition at line 250 of file UserAgent.cxx.

◆ post() [2/2]

void UserAgent::post ( resip::Message *  msg)
protectedvirtual

Implements resip::Postable.

Definition at line 479 of file UserAgent.cxx.

◆ process()

void UserAgent::process ( int  timeoutMs)
virtual

This should be called in a loop to give process cycles to the UserAgent.

Parameters
timeoutMsWill return after timeoutMs if nothing to do. Application can do some work, but should call process again ASAP.

Definition at line 205 of file UserAgent.cxx.

◆ registerPublication()

void UserAgent::registerPublication ( UserAgentClientPublication *  publication)
protected

Definition at line 174 of file UserAgent.cxx.

◆ registerRegistration()

void UserAgent::registerRegistration ( UserAgentRegistration *  registration)
protected

Definition at line 193 of file UserAgent.cxx.

◆ registerSubscription()

void UserAgent::registerSubscription ( UserAgentClientSubscription *  subscription)
protected

Definition at line 155 of file UserAgent.cxx.

◆ sendMessage()

const char * recon::UserAgent::sendMessage ( const resip::NameAddr &  destination,
const resip::Data &  msg,
const resip::Mime &  mimeType 
)

Used to send a MESSAGE SIP message.

◆ setDefaultOutgoingConversationProfile()

void UserAgent::setDefaultOutgoingConversationProfile ( ConversationProfileHandle  handle)

Sets an existing Conversation Profile to the default profile to use for outbound calls.

Parameters
handleConversationProfile handle to use

Definition at line 316 of file UserAgent.cxx.

◆ setDefaultOutgoingConversationProfileImpl()

void UserAgent::setDefaultOutgoingConversationProfileImpl ( ConversationProfileHandle  handle)
protected

Definition at line 653 of file UserAgent.cxx.

◆ setLogLevel()

void UserAgent::setLogLevel ( resip::Log::Level  level,
LoggingSubsystem  subsystem = SubsystemAll 
)
static

Static method that sets the logging level for a particular subsystem, or all subsystems.

Parameters
levelLogging level to set
subsystemSubsystem to set level on
Note
: Use UserAgent::SubsystemAll to set the logging level on all subsystems

Definition at line 263 of file UserAgent.cxx.

◆ shutdown()

void UserAgent::shutdown ( )

Used to initiate a shutdown of the useragent.

This function blocks until the shutdown is complete.

Note
There should not be an active process request when this is called.

Definition at line 212 of file UserAgent.cxx.

◆ shutdownImpl()

void UserAgent::shutdownImpl ( )
protected

Definition at line 595 of file UserAgent.cxx.

◆ startApplicationTimer()

void UserAgent::startApplicationTimer ( unsigned int  timerId,
std::chrono::duration< double >  duration,
unsigned int  seqNumber 
)
virtual

Used by an application to start a timer that is managed by the useragent.

When the timer expires the onApplicationTimer callback will be called.

Applications should override this UserAgent class and callback in order to use application timers.

Parameters
timerIdId representing the timers purpose
durationthe duration of the timer in ms
seqNumberCan be used by the application to differentiate "active" from "non-active" timers, since timers cannot be stopped

Definition at line 570 of file UserAgent.cxx.

◆ startup()

void UserAgent::startup ( )

Starts the SIP stack thread.

Note
This should be called before calling process() in a loop
Warning
Ensure you have added at least one Conversation Profile with defaultOutgoing set to true before calling this.

Definition at line 142 of file UserAgent.cxx.

◆ unregisterPublication()

void UserAgent::unregisterPublication ( UserAgentClientPublication *  publication)
protected

Definition at line 180 of file UserAgent.cxx.

◆ unregisterRegistration()

void UserAgent::unregisterRegistration ( UserAgentRegistration *  registration)
protected

Definition at line 199 of file UserAgent.cxx.

◆ unregisterSubscription()

void UserAgent::unregisterSubscription ( UserAgentClientSubscription *  subscription)
protected

Definition at line 161 of file UserAgent.cxx.

Friends And Related Symbol Documentation

◆ AddConversationProfileCmd

Definition at line 318 of file UserAgent.hxx.

◆ ConversationManager

Definition at line 315 of file UserAgent.hxx.

◆ CreatePublicationCmd

Definition at line 324 of file UserAgent.hxx.

◆ CreateSubscriptionCmd

Definition at line 321 of file UserAgent.hxx.

◆ DefaultDialogSet

Definition at line 334 of file UserAgent.hxx.

◆ DestroyConversationProfileCmd

Definition at line 320 of file UserAgent.hxx.

◆ DestroyPublicationCmd

Definition at line 325 of file UserAgent.hxx.

◆ DestroySubscriptionCmd

Definition at line 322 of file UserAgent.hxx.

◆ MediaResourceParticipant

Definition at line 323 of file UserAgent.hxx.

◆ RemoteIMPagerParticipant

Definition at line 331 of file UserAgent.hxx.

◆ RemoteIMSessionParticipant

Definition at line 333 of file UserAgent.hxx.

◆ RemoteIMSessionParticipantDialogSet

◆ RemoteParticipant

Definition at line 330 of file UserAgent.hxx.

◆ RemoteParticipantDialogSet

Definition at line 335 of file UserAgent.hxx.

◆ SetDefaultOutgoingConversationProfileCmd

◆ SipXMediaStackAdapter

Definition at line 316 of file UserAgent.hxx.

◆ SipXRemoteParticipant

Definition at line 332 of file UserAgent.hxx.

◆ SipXRemoteParticipantDialogSet

Definition at line 336 of file UserAgent.hxx.

◆ UserAgentClientPublication

Definition at line 361 of file UserAgent.hxx.

◆ UserAgentClientSubscription

Definition at line 351 of file UserAgent.hxx.

◆ UserAgentRegistration

Definition at line 378 of file UserAgent.hxx.

◆ UserAgentServerAuthManager

Definition at line 329 of file UserAgent.hxx.

◆ UserAgentShutdownCmd

Definition at line 317 of file UserAgent.hxx.

Member Data Documentation

◆ mConversationManager

ConversationManager* recon::UserAgent::mConversationManager
protected

Definition at line 384 of file UserAgent.hxx.

◆ mConversationProfileHandleMutex

resip::Mutex recon::UserAgent::mConversationProfileHandleMutex
protected

Definition at line 373 of file UserAgent.hxx.

◆ mConversationProfiles

ConversationProfileMap recon::UserAgent::mConversationProfiles
protected

Definition at line 372 of file UserAgent.hxx.

◆ mCurrentConversationProfileHandle

ConversationProfileHandle recon::UserAgent::mCurrentConversationProfileHandle
protected

Definition at line 374 of file UserAgent.hxx.

◆ mCurrentPublicationHandle

PublicationHandle recon::UserAgent::mCurrentPublicationHandle
protected

Definition at line 365 of file UserAgent.hxx.

◆ mCurrentSubscriptionHandle

SubscriptionHandle recon::UserAgent::mCurrentSubscriptionHandle
protected

Definition at line 355 of file UserAgent.hxx.

◆ mDefaultOutgoingConversationProfileHandle

ConversationProfileHandle recon::UserAgent::mDefaultOutgoingConversationProfileHandle
protected

Definition at line 375 of file UserAgent.hxx.

◆ mDum

resip::DialogUsageManager recon::UserAgent::mDum
protected

Definition at line 390 of file UserAgent.hxx.

◆ mDumShutdown

volatile bool recon::UserAgent::mDumShutdown
protected

Definition at line 392 of file UserAgent.hxx.

◆ mEventInterruptor

resip::EventThreadInterruptor* recon::UserAgent::mEventInterruptor
protected

Definition at line 388 of file UserAgent.hxx.

◆ mPollGrp

resip::FdPollGrp* recon::UserAgent::mPollGrp
protected

Definition at line 387 of file UserAgent.hxx.

◆ mProfile

std::shared_ptr<UserAgentMasterProfile> recon::UserAgent::mProfile
protected

Definition at line 385 of file UserAgent.hxx.

◆ mPublicationHandleMutex

resip::Mutex recon::UserAgent::mPublicationHandleMutex
protected

Definition at line 364 of file UserAgent.hxx.

◆ mPublications

PublicationMap recon::UserAgent::mPublications
protected

Definition at line 363 of file UserAgent.hxx.

◆ mRegistrations

RegistrationMap recon::UserAgent::mRegistrations
protected

Definition at line 380 of file UserAgent.hxx.

◆ mSecurity

resip::Security* recon::UserAgent::mSecurity
protected

Definition at line 386 of file UserAgent.hxx.

◆ mStack

resip::SipStack recon::UserAgent::mStack
protected

Definition at line 389 of file UserAgent.hxx.

◆ mStackThread

resip::EventStackThread recon::UserAgent::mStackThread
protected

Definition at line 391 of file UserAgent.hxx.

◆ mSubscriptionHandleMutex

resip::Mutex recon::UserAgent::mSubscriptionHandleMutex
protected

Definition at line 354 of file UserAgent.hxx.

◆ mSubscriptions

SubscriptionMap recon::UserAgent::mSubscriptions
protected

Definition at line 353 of file UserAgent.hxx.

◆ mUserAgentShutdown

volatile bool recon::UserAgent::mUserAgentShutdown
protected

Definition at line 393 of file UserAgent.hxx.


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