reSIProcate/DialogUsageManager  9694
Classes | Public Member Functions | Protected Member Functions | Protected Attributes
resip::UserAgent Class Reference

#include <UserAgent.hxx>

Inheritance diagram for resip::UserAgent:
Inheritance graph
[legend]
Collaboration diagram for resip::UserAgent:
Collaboration graph
[legend]

List of all members.

Classes

class  EndInviteSessionCommand

Public Member Functions

 UserAgent (int argc, char **argv)
virtual ~UserAgent ()
virtual void startup ()
virtual void shutdown ()
void process ()
virtual void onNewSession (ClientInviteSessionHandle h, InviteSession::OfferAnswerType oat, const SipMessage &msg)
 called when an initial INVITE or the intial response to an outoing invite
virtual void onNewSession (ServerInviteSessionHandle h, InviteSession::OfferAnswerType oat, const SipMessage &msg)
 called when an initial INVITE or the intial response to an outoing invite
virtual void onFailure (ClientInviteSessionHandle h, const SipMessage &msg)
 Received a failure response from UAS.
virtual void onEarlyMedia (ClientInviteSessionHandle, const SipMessage &, const SdpContents &)
 called when an in-dialog provisional response is received that contains a body
virtual void onProvisional (ClientInviteSessionHandle, const SipMessage &msg)
 called when dialog enters the Early state - typically after getting 18x
virtual void onConnected (ClientInviteSessionHandle h, const SipMessage &msg)
 called when a dialog initiated as a UAC enters the connected state
virtual void onConnected (InviteSessionHandle, const SipMessage &msg)
 called when a dialog initiated as a UAS enters the connected state
virtual void onStaleCallTimeout (ClientInviteSessionHandle)
 UAC gets no final response within the stale call timeout (default is 3 minutes).
virtual void onTerminated (InviteSessionHandle h, InviteSessionHandler::TerminatedReason reason, const SipMessage *msg)
virtual void onRedirected (ClientInviteSessionHandle, const SipMessage &msg)
 called when a 3xx with valid targets is encountered in an early dialog This is different then getting a 3xx in onTerminated, as another request will be attempted, so the DialogSet will not be destroyed.
virtual void onAnswer (InviteSessionHandle, const SipMessage &msg, const SdpContents &)
 called when an answer is received - has nothing to do with user answering the call
virtual void onOffer (InviteSessionHandle handle, const SipMessage &msg, const SdpContents &offer)
 called when an offer is received - must send an answer soon after this
virtual void onOfferRequired (InviteSessionHandle, const SipMessage &msg)
 called when an Invite w/out offer is sent, or any other context which requires an offer from the user
virtual void onOfferRejected (InviteSessionHandle, const SipMessage *msg)
 called if an offer in a UPDATE or re-INVITE was rejected - not real useful.
virtual void onDialogModified (InviteSessionHandle, InviteSession::OfferAnswerType oat, const SipMessage &msg)
virtual void onInfo (InviteSessionHandle, const SipMessage &msg)
 called when INFO message is received
virtual void onInfoSuccess (InviteSessionHandle, const SipMessage &msg)
 called when response to INFO message is received
virtual void onInfoFailure (InviteSessionHandle, const SipMessage &msg)
virtual void onRefer (InviteSessionHandle, ServerSubscriptionHandle, const SipMessage &msg)
 called when an REFER message is received.
virtual void onReferAccepted (InviteSessionHandle, ClientSubscriptionHandle, const SipMessage &msg)
 called when an REFER message receives an accepted response
virtual void onReferRejected (InviteSessionHandle, const SipMessage &msg)
 called when an REFER message receives a failure response
virtual void onReferNoSub (InviteSessionHandle, const SipMessage &msg)
virtual void onMessage (InviteSessionHandle, const SipMessage &msg)
 called when MESSAGE message is received
virtual void onMessageSuccess (InviteSessionHandle, const SipMessage &msg)
 called when response to MESSAGE message is received
virtual void onMessageFailure (InviteSessionHandle, const SipMessage &msg)
virtual void onSuccess (ClientRegistrationHandle h, const SipMessage &response)
 Called when registraion succeeds or each time it is sucessfully refreshed.
virtual void onFailure (ClientRegistrationHandle h, const SipMessage &response)
 Called if registration fails, usage will be destroyed (unless a Registration retry interval is enabled in the Profile)
virtual void onRemoved (ClientRegistrationHandle h, const SipMessage &response)
virtual int onRequestRetry (ClientRegistrationHandle h, int retryMinimum, const SipMessage &msg)
 call on Retry-After failure.
virtual void onUpdatePending (ClientSubscriptionHandle h, const SipMessage &notify, bool outOfOrder)
virtual void onUpdateActive (ClientSubscriptionHandle h, const SipMessage &notify, bool outOfOrder)
virtual void onUpdateExtension (ClientSubscriptionHandle, const SipMessage &notify, bool outOfOrder)
virtual void onTerminated (ClientSubscriptionHandle h, const SipMessage *notify)
virtual void onNewSubscription (ClientSubscriptionHandle h, const SipMessage &notify)
virtual int onRequestRetry (ClientSubscriptionHandle h, int retryMinimum, const SipMessage &notify)
virtual void onSuccess (ClientPublicationHandle h, const SipMessage &status)
virtual void onRemove (ClientPublicationHandle h, const SipMessage &status)
virtual void onFailure (ClientPublicationHandle h, const SipMessage &response)
 Received a failure response from UAS.
virtual int onRequestRetry (ClientPublicationHandle h, int retryMinimum, const SipMessage &response)
 call on Retry-After failure.
virtual void onSuccess (ClientOutOfDialogReqHandle, const SipMessage &response)
virtual void onFailure (ClientOutOfDialogReqHandle, const SipMessage &response)
 Received a failure response from UAS.
virtual void onReceivedRequest (ServerOutOfDialogReqHandle, const SipMessage &request)
virtual void onForkDestroyed (ClientInviteSessionHandle)
 called when a fork that was created through a 1xx never receives a 2xx because another fork answered and this fork was canceled by a proxy.

Protected Member Functions

void addTransport (TransportType type, int port)

Protected Attributes

SharedPtr< MasterProfilemProfile
SecuritymSecurity
SipStack mStack
DialogUsageManager mDum
StackThread mStackThread

Detailed Description

Definition at line 22 of file UserAgent.hxx.


Constructor & Destructor Documentation

UserAgent::UserAgent ( int  argc,
char **  argv 
)

Definition at line 34 of file UserAgent.cxx.

References resip::DialogUsageManager::addClientPublicationHandler(), resip::DialogUsageManager::addClientSubscriptionHandler(), resip::DialogUsageManager::addOutOfDialogHandler(), addTransport(), resip::DTLS, resip::Data::empty(), resip::BaseSecurity::generateUserCert(), resip::Uri::getAor(), resip::Pidf::getStaticType(), resip::Uri::host(), resip::Log::initialize(), resip::CommandLineParser::mAor, resip::CommandLineParser::mContact, resip::CommandLineParser::mDtlsPort, mDum, resip::CommandLineParser::mGenUserCert, resip::CommandLineParser::mLogLevel, resip::CommandLineParser::mLogType, resip::CommandLineParser::mOutboundProxy, resip::CommandLineParser::mPassword, mProfile, resip::CommandLineParser::mRegisterDuration, mSecurity, mStackThread, resip::CommandLineParser::mTcpPort, resip::CommandLineParser::mTlsPort, resip::CommandLineParser::mUdpPort, resip::Symbols::Presence, resip::ThreadIf::run(), resip::DialogUsageManager::setClientAuthManager(), resip::DialogUsageManager::setClientRegistrationHandler(), resip::DialogUsageManager::setInviteSessionHandler(), resip::DialogUsageManager::setMasterProfile(), resip::TCP, resip::TLS, resip::UDP, and resip::Uri::user().

                                          : 
   CommandLineParser(argc, argv),
   mProfile(new MasterProfile),
#if defined(USE_SSL)
   mSecurity(new Security(mCertPath)),
   mStack(mSecurity),
#else
   mSecurity(0),
   mStack(mSecurity),
#endif
   mDum(mStack),
   mStackThread(mStack)
{
   Log::initialize(mLogType, mLogLevel, argv[0]);

#if defined(USE_SSL)
   if (mGenUserCert)
   {
      mSecurity->generateUserCert(mAor.getAor());
   }
#endif

   addTransport(UDP, mUdpPort);
   addTransport(TCP, mTcpPort);
#if defined(USE_SSL)
   addTransport(TLS, mTlsPort);
#endif
#if defined(USED_DTLS)
   addTransport(DTLS, mDtlsPort);
#endif

   mProfile->setDefaultRegistrationTime(mRegisterDuration);
   mProfile->addSupportedMethod(NOTIFY);
   mProfile->validateAcceptEnabled() = false;
   mProfile->validateContentEnabled() = false;
   mProfile->addSupportedMimeType(NOTIFY, Pidf::getStaticType());
   mProfile->setDefaultFrom(NameAddr(mAor));
   mProfile->setDigestCredential(mAor.host(), mAor.user(), mPassword);
   
   if (!mContact.host().empty())
   {
      mProfile->setOverrideHostAndPort(mContact);
   }
   if (!mOutboundProxy.host().empty())
   {
      mProfile->setOutboundProxy(Uri(mOutboundProxy));
   }
   mProfile->setUserAgent("limpc/1.0");
   
   mDum.setMasterProfile(mProfile);
   mDum.setClientRegistrationHandler(this);
   mDum.addClientSubscriptionHandler(Symbols::Presence, this);
   mDum.addClientPublicationHandler(Symbols::Presence, this);
   mDum.addOutOfDialogHandler(OPTIONS, this);
   mDum.setClientAuthManager(std::auto_ptr<ClientAuthManager>(new ClientAuthManager));
   mDum.setInviteSessionHandler(this);
   
   mStackThread.run(); 
}

Here is the call graph for this function:

UserAgent::~UserAgent ( ) [virtual]

Definition at line 94 of file UserAgent.cxx.

References resip::ThreadIf::join(), mStackThread, and resip::ThreadIf::shutdown().

Here is the call graph for this function:


Member Function Documentation

void UserAgent::addTransport ( TransportType  type,
int  port 
) [protected]

Definition at line 137 of file UserAgent.cxx.

References resip::DialogUsageManager::addTransport(), resip::Data::Empty, InfoLog, mDum, resip::CommandLineParser::mNoV4, resip::CommandLineParser::mNoV6, resip::CommandLineParser::mTlsDomain, resip::Tuple::toData(), resip::V4, resip::V6, and WarningLog.

Referenced by UserAgent().

{
   for (int i=0; i < 10; ++i)
   {
      try
      {
         if (port)
         {
            if (!mNoV4)
            {
               mDum.addTransport(type, port+i, V4, Data::Empty, mTlsDomain);
               return;
            }

            if (!mNoV6)
            {
               mDum.addTransport(type, port+i, V6, Data::Empty, mTlsDomain);
               return;
            }
         }
      }
      catch (BaseException& e)
      {
         InfoLog (<< "Caught: " << e);
         WarningLog (<< "Failed to add " << Tuple::toData(type) << " transport on " << port);
      }
   }
   throw Transport::Exception("Port already in use", __FILE__, __LINE__);
}

Here is the call graph for this function:

void UserAgent::onAnswer ( InviteSessionHandle  ,
const SipMessage msg,
const SdpContents  
) [virtual]

called when an answer is received - has nothing to do with user answering the call

Implements resip::InviteSessionHandler.

Definition at line 246 of file UserAgent.cxx.

{
}
void UserAgent::onConnected ( ClientInviteSessionHandle  ,
const SipMessage msg 
) [virtual]

called when a dialog initiated as a UAC enters the connected state

Implements resip::InviteSessionHandler.

Definition at line 217 of file UserAgent.cxx.

References InfoLog.

{
   InfoLog(<< h->myAddr().uri().user() << " in INVITE session with " << h->peerAddr().uri().user());
}
void UserAgent::onConnected ( InviteSessionHandle  ,
const SipMessage msg 
) [virtual]

called when a dialog initiated as a UAS enters the connected state

Implements resip::InviteSessionHandler.

Definition at line 223 of file UserAgent.cxx.

{
}
void UserAgent::onDialogModified ( InviteSessionHandle  h,
InviteSession::OfferAnswerType  oat,
const SipMessage msg 
) [virtual]

Definition at line 300 of file UserAgent.cxx.

References InfoLog.

{
   InfoLog(<< h->myAddr().uri().user() << " dialog modified " 
            << h->peerAddr().uri().user());
}
void UserAgent::onEarlyMedia ( ClientInviteSessionHandle  ,
const SipMessage ,
const SdpContents  
) [virtual]

called when an in-dialog provisional response is received that contains a body

Implements resip::InviteSessionHandler.

Definition at line 207 of file UserAgent.cxx.

{
}
void UserAgent::onFailure ( ClientInviteSessionHandle  ,
const SipMessage msg 
) [virtual]

Received a failure response from UAS.

Implements resip::InviteSessionHandler.

Definition at line 198 of file UserAgent.cxx.

References h_StatusLine, resip::SipMessage::header(), and InfoLog.

{
   InfoLog(<< h->myAddr().uri().user() 
           << " outgoing call failed " 
           << h->peerAddr().uri().user() 
           << " status=" << msg.header(h_StatusLine).statusCode());
}

Here is the call graph for this function:

void UserAgent::onFailure ( ClientRegistrationHandle  ,
const SipMessage response 
) [virtual]

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

Implements resip::ClientRegistrationHandler.

Definition at line 376 of file UserAgent.cxx.

{
}
virtual void resip::UserAgent::onFailure ( ClientPublicationHandle  ,
const SipMessage msg 
) [virtual]

Received a failure response from UAS.

Implements resip::InviteSessionHandler.

virtual void resip::UserAgent::onFailure ( ClientOutOfDialogReqHandle  ,
const SipMessage msg 
) [virtual]

Received a failure response from UAS.

Implements resip::InviteSessionHandler.

void UserAgent::onForkDestroyed ( ClientInviteSessionHandle  ) [virtual]

called when a fork that was created through a 1xx never receives a 2xx because another fork answered and this fork was canceled by a proxy.

Implements resip::InviteSessionHandler.

Definition at line 474 of file UserAgent.cxx.

{
}
void UserAgent::onInfo ( InviteSessionHandle  ,
const SipMessage msg 
) [virtual]

called when INFO message is received

Implements resip::InviteSessionHandler.

Definition at line 307 of file UserAgent.cxx.

References InfoLog.

{
   InfoLog(<< h->myAddr().uri().user() << " INFO " 
            << h->peerAddr().uri().user());
   h->acceptNIT();
}
void UserAgent::onInfoFailure ( InviteSessionHandle  ,
const SipMessage msg 
) [virtual]

Implements resip::InviteSessionHandler.

Definition at line 320 of file UserAgent.cxx.

{
}
void UserAgent::onInfoSuccess ( InviteSessionHandle  ,
const SipMessage msg 
) [virtual]

called when response to INFO message is received

Implements resip::InviteSessionHandler.

Definition at line 315 of file UserAgent.cxx.

{
}
void UserAgent::onMessage ( InviteSessionHandle  ,
const SipMessage msg 
) [virtual]

called when MESSAGE message is received

Implements resip::InviteSessionHandler.

Definition at line 349 of file UserAgent.cxx.

References InfoLog.

{
   InfoLog(<< h->myAddr().uri().user() << " MESSAGE " 
            << h->peerAddr().uri().user());
   h->acceptNIT();
}
void UserAgent::onMessageFailure ( InviteSessionHandle  ,
const SipMessage msg 
) [virtual]

Implements resip::InviteSessionHandler.

Definition at line 362 of file UserAgent.cxx.

{
}
void UserAgent::onMessageSuccess ( InviteSessionHandle  ,
const SipMessage msg 
) [virtual]

called when response to MESSAGE message is received

Implements resip::InviteSessionHandler.

Definition at line 357 of file UserAgent.cxx.

{
}
void UserAgent::onNewSession ( ClientInviteSessionHandle  ,
InviteSession::OfferAnswerType  oat,
const SipMessage msg 
) [virtual]

called when an initial INVITE or the intial response to an outoing invite

Implements resip::InviteSessionHandler.

Definition at line 169 of file UserAgent.cxx.

References InfoLog, mDum, mStack, and resip::SipStack::post().

{
   InfoLog(<< h->myAddr().uri().user() << " 180 from  " << h->peerAddr().uri().user());

   // Schedule an end() call; checks handle validity, and whether the Session
   // is already tearing down (isTerminated() check)
   mStack.post(std::auto_ptr<ApplicationMessage>(new EndInviteSessionCommand(h->getSessionHandle())), 60, &mDum);
}

Here is the call graph for this function:

virtual void resip::UserAgent::onNewSession ( ServerInviteSessionHandle  ,
InviteSession::OfferAnswerType  oat,
const SipMessage msg 
) [virtual]

called when an initial INVITE or the intial response to an outoing invite

Implements resip::InviteSessionHandler.

void UserAgent::onNewSubscription ( ClientSubscriptionHandle  h,
const SipMessage notify 
) [virtual]

Implements resip::ClientSubscriptionHandler.

Definition at line 416 of file UserAgent.cxx.

{
}
void UserAgent::onOffer ( InviteSessionHandle  ,
const SipMessage msg,
const SdpContents  
) [virtual]

called when an offer is received - must send an answer soon after this

Implements resip::InviteSessionHandler.

Definition at line 251 of file UserAgent.cxx.

References resip::ServerInviteSession::accept(), resip::Handle< T >::get(), resip::SipMessage::getContents(), InfoLog, resip::SipMessage::isRequest(), and resip::SipMessage::method().

{
   InfoLog(<< h->myAddr().uri().user() << " offer from  " << h->peerAddr().uri().user());

   SdpContents* sdp = dynamic_cast<SdpContents*>(msg.getContents());
   h->provideAnswer(*sdp);
   if(msg.isRequest() && msg.method()==INVITE && !h->isConnected())
   {
      ServerInviteSession* uas = dynamic_cast<ServerInviteSession*>(h.get());
      if(uas)
      {
         uas->accept();
      }
   }
}

Here is the call graph for this function:

void UserAgent::onOfferRejected ( InviteSessionHandle  ,
const SipMessage msg 
) [virtual]

called if an offer in a UPDATE or re-INVITE was rejected - not real useful.

A SipMessage is provided if one is available

Implements resip::InviteSessionHandler.

Definition at line 293 of file UserAgent.cxx.

References InfoLog.

{
   InfoLog(<< h->myAddr().uri().user() << " offer rejected by  " 
            << h->peerAddr().uri().user());
}
void UserAgent::onOfferRequired ( InviteSessionHandle  ,
const SipMessage msg 
) [virtual]

called when an Invite w/out offer is sent, or any other context which requires an offer from the user

Implements resip::InviteSessionHandler.

Definition at line 268 of file UserAgent.cxx.

References InfoLog, and type.

{
   InfoLog(<< h->myAddr().uri().user() << " offer requested by  " 
            << h->peerAddr().uri().user());

   static Data txt("v=0\r\n"
                  "o=1900 369696545 369696545 IN IP4 192.168.2.15\r\n"
                  "s=X-Lite\r\n"
                  "c=IN IP4 192.168.2.15\r\n"
                  "t=0 0\r\n"
                  "m=audio 8000 RTP/AVP 8 3 98 97 101\r\n"
                  "a=rtpmap:8 pcma/8000\r\n"
                  "a=rtpmap:3 gsm/8000\r\n"
                  "a=rtpmap:98 iLBC\r\n"
                  "a=rtpmap:97 speex/8000\r\n"
                  "a=rtpmap:101 telephone-event/8000\r\n"
                  "a=fmtp:101 0-15\r\n");

   static HeaderFieldValue hfv(txt.data(), txt.size());
   static Mime type("application", "sdp");
   static SdpContents sdp(hfv, type);
   h->provideOffer(sdp);
}
void UserAgent::onProvisional ( ClientInviteSessionHandle  ,
const SipMessage  
) [virtual]

called when dialog enters the Early state - typically after getting 18x

Implements resip::InviteSessionHandler.

Definition at line 212 of file UserAgent.cxx.

{
}
void UserAgent::onReceivedRequest ( ServerOutOfDialogReqHandle  h,
const SipMessage request 
) [virtual]

Implements resip::OutOfDialogHandler.

Definition at line 467 of file UserAgent.cxx.

References InfoLog, and resip::SipMessage::method().

{
   InfoLog(<< request.method() << ": Just respond.");
   h->send(h->accept());
}

Here is the call graph for this function:

void UserAgent::onRedirected ( ClientInviteSessionHandle  ,
const SipMessage msg 
) [virtual]

called when a 3xx with valid targets is encountered in an early dialog This is different then getting a 3xx in onTerminated, as another request will be attempted, so the DialogSet will not be destroyed.

Basically an onTermintated that conveys more information. checking for 3xx respones in onTerminated will not work as there may be no valid targets.

Implements resip::InviteSessionHandler.

Definition at line 240 of file UserAgent.cxx.

{
   assert(false);
}
void UserAgent::onRefer ( InviteSessionHandle  ,
ServerSubscriptionHandle  ,
const SipMessage msg 
) [virtual]

called when an REFER message is received.

The refer is accepted or rejected using the server subscription. If the offer is accepted, DialogUsageManager::makeInviteSessionFromRefer can be used to create an InviteSession that will send notify messages using the ServerSubscription

Implements resip::InviteSessionHandler.

Definition at line 325 of file UserAgent.cxx.

{
    assert(0);
}
void UserAgent::onReferAccepted ( InviteSessionHandle  ,
ClientSubscriptionHandle  ,
const SipMessage msg 
) [virtual]

called when an REFER message receives an accepted response

Implements resip::InviteSessionHandler.

Definition at line 331 of file UserAgent.cxx.

{
   assert(false);
}
void UserAgent::onReferNoSub ( InviteSessionHandle  ,
const SipMessage msg 
) [virtual]

Implements resip::InviteSessionHandler.

Definition at line 343 of file UserAgent.cxx.

{
   assert(0);
}
void UserAgent::onReferRejected ( InviteSessionHandle  ,
const SipMessage msg 
) [virtual]

called when an REFER message receives a failure response

Implements resip::InviteSessionHandler.

Definition at line 337 of file UserAgent.cxx.

{
   assert(0);
}
void UserAgent::onRemove ( ClientPublicationHandle  h,
const SipMessage status 
) [virtual]

Implements resip::ClientPublicationHandler.

Definition at line 435 of file UserAgent.cxx.

{
}
void UserAgent::onRemoved ( ClientRegistrationHandle  h,
const SipMessage response 
) [virtual]

Implements resip::ClientRegistrationHandler.

Definition at line 381 of file UserAgent.cxx.

{
}
int UserAgent::onRequestRetry ( ClientRegistrationHandle  ,
int  retrySeconds,
const SipMessage response 
) [virtual]

call on Retry-After failure.

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

Implements resip::ClientRegistrationHandler.

Definition at line 386 of file UserAgent.cxx.

{
   //assert(false);
   return -1;
}
int UserAgent::onRequestRetry ( ClientSubscriptionHandle  h,
int  retryMinimum,
const SipMessage notify 
) [virtual]

Implements resip::ClientSubscriptionHandler.

Definition at line 421 of file UserAgent.cxx.

{
   return -1;
}
int UserAgent::onRequestRetry ( ClientPublicationHandle  ,
int  retrySeconds,
const SipMessage status 
) [virtual]

call on Retry-After failure.

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

Implements resip::ClientPublicationHandler.

Definition at line 445 of file UserAgent.cxx.

{
   return -1;
}
void UserAgent::onStaleCallTimeout ( ClientInviteSessionHandle  h) [virtual]

UAC gets no final response within the stale call timeout (default is 3 minutes).

This is just a notification. After the notification is called, the InviteSession will then call InviteSessionHandler::terminate()

Reimplemented from resip::InviteSessionHandler.

Definition at line 228 of file UserAgent.cxx.

References WarningLog.

{
   WarningLog(<< "onStaleCallTimeout");
}
void UserAgent::onSuccess ( ClientRegistrationHandle  ,
const SipMessage response 
) [virtual]

Called when registraion succeeds or each time it is sucessfully refreshed.

Implements resip::ClientRegistrationHandler.

Reimplemented in TestUserAgent.

Definition at line 371 of file UserAgent.cxx.

{
}
void UserAgent::onSuccess ( ClientPublicationHandle  h,
const SipMessage status 
) [virtual]

Implements resip::OutOfDialogHandler.

Definition at line 430 of file UserAgent.cxx.

{
}
virtual void resip::UserAgent::onSuccess ( ClientOutOfDialogReqHandle  ,
const SipMessage response 
) [virtual]
void UserAgent::onTerminated ( InviteSessionHandle  h,
InviteSessionHandler::TerminatedReason  reason,
const SipMessage msg 
) [virtual]

Implements resip::InviteSessionHandler.

Definition at line 234 of file UserAgent.cxx.

References WarningLog.

{
   WarningLog(<< h->myAddr().uri().user() << " call terminated with " << h->peerAddr().uri().user() << " reason=" << reason);
}
void UserAgent::onTerminated ( ClientSubscriptionHandle  h,
const SipMessage notify 
) [virtual]

Implements resip::ClientSubscriptionHandler.

Definition at line 411 of file UserAgent.cxx.

{
}
void UserAgent::onUpdateActive ( ClientSubscriptionHandle  h,
const SipMessage notify,
bool  outOfOrder 
) [virtual]

Implements resip::ClientSubscriptionHandler.

Definition at line 401 of file UserAgent.cxx.

{
}
void UserAgent::onUpdateExtension ( ClientSubscriptionHandle  ,
const SipMessage notify,
bool  outOfOrder 
) [virtual]

Implements resip::ClientSubscriptionHandler.

Definition at line 406 of file UserAgent.cxx.

{
}
void UserAgent::onUpdatePending ( ClientSubscriptionHandle  h,
const SipMessage notify,
bool  outOfOrder 
) [virtual]

Implements resip::ClientSubscriptionHandler.

Definition at line 396 of file UserAgent.cxx.

{
}
void UserAgent::process ( )

Definition at line 131 of file UserAgent.cxx.

References mDum, and resip::DialogUsageManager::process().

Referenced by main().

{
   while (mDum.process());
}

Here is the call graph for this function:

void UserAgent::shutdown ( ) [virtual]

Definition at line 126 of file UserAgent.cxx.

{
}
void UserAgent::startup ( ) [virtual]

Reimplemented in TestUserAgent.

Definition at line 101 of file UserAgent.cxx.

References InfoLog, resip::DialogUsageManager::makeRegistration(), resip::CommandLineParser::mAor, mDum, resip::CommandLineParser::mRegisterDuration, mStack, resip::SipStack::send(), and resip::DialogUsageManager::send().

Referenced by main().

{
   if (mRegisterDuration)
   {
      InfoLog (<< "register for " << mAor);
      mDum.send(mDum.makeRegistration(NameAddr(mAor)));
   }

   //for (std::vector<Uri> i = mBuddies.begin(); i != mBuddies.end(); ++i)
   {
   }

#if 0
   mDum.send(mDum.makePublish);

   auto_ptr<SipMessage> msg( sa.dialog->makeInitialPublish(NameAddr(sa.uri),NameAddr(mAor)) );
   Pidf* pidf = new Pidf( *mPidf );
   msg->header(h_Event).value() = "presence";
   msg->setContents( pidf );
   setOutbound( *msg );
   mStack->send( *msg );
#endif
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 140 of file UserAgent.hxx.

Referenced by addTransport(), onNewSession(), process(), startup(), and UserAgent().

Definition at line 137 of file UserAgent.hxx.

Referenced by UserAgent().

Definition at line 138 of file UserAgent.hxx.

Referenced by UserAgent().

Definition at line 139 of file UserAgent.hxx.

Referenced by onNewSession(), and startup().

Definition at line 141 of file UserAgent.hxx.

Referenced by UserAgent(), and ~UserAgent().


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