reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
mohparkserver::MyUserAgent Class Reference
Inheritance diagram for mohparkserver::MyUserAgent:
[legend]

Public Member Functions

 MyUserAgent (Server &server, std::shared_ptr< UserAgentMasterProfile > profile, resip::AfterSocketCreationFuncPtr socketFunc)
 
void onApplicationTimer (unsigned int id, std::chrono::duration< double > duration, unsigned int seq) override
 Callback used when an application timer expires.
 
void onSubscriptionTerminated (SubscriptionHandle handle, unsigned int statusCode) override
 Callback used when a subscription is terminated.
 
void onSubscriptionNotify (SubscriptionHandle handle, const Data &notifyData) override
 Callback used when a subscription has received an event notification from the server.
 
- Public Member Functions inherited from recon::UserAgent
 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)
 
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 ()
 

Additional Inherited Members

- Public Types inherited from recon::UserAgent
enum  LoggingSubsystem {
  SubsystemAll , SubsystemContents , SubsystemDns , SubsystemDum ,
  SubsystemSdp , SubsystemSip , SubsystemTransaction , SubsystemTransport ,
  SubsystemStats , SubsystemRecon , SubsystemFlowManager , SubsystemReTurn
}
 
- Static Public Member Functions inherited from recon::UserAgent
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 inherited from recon::UserAgent
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 inherited from recon::UserAgent
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 inherited from recon::UserAgent
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
 

Detailed Description

Definition at line 59 of file Server.cxx.

Constructor & Destructor Documentation

◆ MyUserAgent()

mohparkserver::MyUserAgent::MyUserAgent ( Server &  server,
std::shared_ptr< UserAgentMasterProfile >  profile,
resip::AfterSocketCreationFuncPtr  socketFunc 
)
inline

Definition at line 62 of file Server.cxx.

Member Function Documentation

◆ onApplicationTimer()

void mohparkserver::MyUserAgent::onApplicationTimer ( unsigned int  timerId,
std::chrono::duration< double >  duration,
unsigned int  seqNumber 
)
inlineoverridevirtual

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 from recon::UserAgent.

Definition at line 66 of file Server.cxx.

◆ onSubscriptionNotify()

void mohparkserver::MyUserAgent::onSubscriptionNotify ( SubscriptionHandle  handle,
const Data &  notifyData 
)
inlineoverridevirtual

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 from recon::UserAgent.

Definition at line 86 of file Server.cxx.

◆ onSubscriptionTerminated()

void mohparkserver::MyUserAgent::onSubscriptionTerminated ( SubscriptionHandle  handle,
unsigned int  statusCode 
)
inlineoverridevirtual

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 from recon::UserAgent.

Definition at line 81 of file Server.cxx.


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