|
reSIProcate/DialogUsageManager
9694
|
#include <basicClientCall.hxx>


Definition at line 17 of file basicClientCall.hxx.
| BasicClientCall::BasicClientCall | ( | BasicClientUserAgent & | userAgent | ) |
Definition at line 55 of file basicClientCall.cxx.
References mUserAgent, and resip::BasicClientUserAgent::registerCall().
Referenced by onFlowTerminated().
: AppDialogSet(userAgent.getDialogUsageManager()), mUserAgent(userAgent), mTimerExpiredCounter(0), mPlacedCall(false), mUACConnectedDialogId(Data::Empty, Data::Empty, Data::Empty) { mUserAgent.registerCall(this); }

| BasicClientCall::~BasicClientCall | ( | ) | [virtual] |
Definition at line 65 of file basicClientCall.cxx.
References mUserAgent, and resip::BasicClientUserAgent::unregisterCall().
{
mUserAgent.unregisterCall(this);
}

| void BasicClientCall::initiateCall | ( | const Uri & | target, |
| SharedPtr< UserProfile > | profile | ||
| ) | [virtual] |
Definition at line 71 of file basicClientCall.cxx.
References resip::BasicClientUserAgent::getDialogUsageManager(), resip::DialogUsageManager::makeInviteSession(), makeOffer(), mPlacedCall, mUserAgent, and resip::DialogUsageManager::send().
Referenced by resip::BasicClientUserAgent::onCallTimeout(), resip::BasicClientUserAgent::onSuccess(), and resip::BasicClientUserAgent::startup().
{
SdpContents offer;
makeOffer(offer);
SharedPtr<SipMessage> invite = mUserAgent.getDialogUsageManager().makeInviteSession(NameAddr(target), profile, &offer, this);
mUserAgent.getDialogUsageManager().send(invite);
mPlacedCall = true;
}

| bool BasicClientCall::isStaleFork | ( | const resip::DialogId & | dialogId | ) | [private] |
Definition at line 123 of file basicClientCall.cxx.
References resip::Data::empty(), resip::DialogId::getCallId(), and mUACConnectedDialogId.
Referenced by onAnswer(), onOffer(), onOfferRejected(), onOfferRequired(), onProvisional(), and onTerminated().
{
return (!mUACConnectedDialogId.getCallId().empty() && dialogId != mUACConnectedDialogId);
}

| bool BasicClientCall::isUACConnected | ( | ) | [private] |
Definition at line 117 of file basicClientCall.cxx.
References resip::Data::empty(), resip::DialogId::getCallId(), and mUACConnectedDialogId.
Referenced by onConnected(), onNonDialogCreatingProvisional(), and onTrying().
{
return !mUACConnectedDialogId.getCallId().empty();
}

| void BasicClientCall::makeOffer | ( | SdpContents & | offer | ) | [private] |
Definition at line 129 of file basicClientCall.cxx.
References resip::Data::data(), resip::Timer::getTimeMicroSec(), resip::SdpContents::session(), resip::Data::size(), and type.
Referenced by initiateCall(), onFlowTerminated(), and onOfferRequired().
{
static Data txt("v=0\r\n"
"o=- 0 0 IN IP4 0.0.0.0\r\n"
"s=basicClient\r\n"
"c=IN IP4 0.0.0.0\r\n"
"t=0 0\r\n"
"m=audio 8000 RTP/AVP 0 101\r\n"
"a=rtpmap:0 pcmu/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 offerSdp(hfv, type);
offer = offerSdp;
// Set sessionid and version for this offer
UInt64 currentTime = Timer::getTimeMicroSec();
offer.session().origin().getSessionId() = currentTime;
offer.session().origin().getVersion() = currentTime;
}

| void BasicClientCall::onAnswer | ( | resip::InviteSessionHandle | h, |
| const resip::SipMessage & | msg, | ||
| const resip::SdpContents & | sdp | ||
| ) | [protected, virtual] |
Definition at line 353 of file basicClientCall.cxx.
References resip::Message::brief(), InfoLog, and isStaleFork().
{
if(isStaleFork(h->getDialogId()))
{
// If we receive a response from a stale fork (ie. after someone sends a 200), then we want to ignore it
InfoLog(<< "onAnswer: from stale fork, msg=" << msg.brief() << ", sdp=" << sdp);
return;
}
InfoLog(<< "onAnswer: msg=" << msg.brief() << ", sdp=" << sdp);
// Process Answer here
}

| void BasicClientCall::onConnected | ( | resip::ClientInviteSessionHandle | h, |
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 248 of file basicClientCall.cxx.
References resip::Message::brief(), CallTimerTime, resip::BasicClientUserAgent::getDialogUsageManager(), InfoLog, isUACConnected(), resip::BasicClientUserAgent::mStack, mUACConnectedDialogId, mUserAgent, and resip::SipStack::post().
{
InfoLog(<< "onConnected: msg=" << msg.brief());
if(!isUACConnected())
{
// It is possible in forking scenarios to get multiple 200 responses, if this is
// our first 200 response, then this is the leg we accept, store the connected DialogId
mUACConnectedDialogId = h->getDialogId();
// Note: each forked leg will update mInviteSessionHandle (in onNewSession call) - need to set mInviteSessionHandle for final answering leg on 200
mInviteSessionHandle = h->getSessionHandle();
// start call timer
auto_ptr<ApplicationMessage> timer(new CallTimer(mUserAgent, this));
mUserAgent.mStack.post(timer, CallTimerTime, &mUserAgent.getDialogUsageManager());
}
else
{
// We already have a connected leg - end this one with a BYE
h->end();
}
}

| void BasicClientCall::onConnected | ( | resip::InviteSessionHandle | h, |
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 271 of file basicClientCall.cxx.
References resip::Message::brief(), and InfoLog.

| void BasicClientCall::onEarlyMedia | ( | resip::ClientInviteSessionHandle | h, |
| const resip::SipMessage & | msg, | ||
| const resip::SdpContents & | sdp | ||
| ) | [protected, virtual] |
Definition at line 228 of file basicClientCall.cxx.
References resip::Message::brief(), and InfoLog.

| void BasicClientCall::onFailure | ( | resip::ClientInviteSessionHandle | h, |
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 207 of file basicClientCall.cxx.
References resip::Message::brief(), resip::SipMessage::getReceivedTransport(), h_StatusLine, resip::SipMessage::header(), resip::SipMessage::isResponse(), and WarningLog.
{
WarningLog(<< "onFailure: msg=" << msg.brief());
if (msg.isResponse())
{
switch(msg.header(h_StatusLine).statusCode())
{
case 408:
case 503:
if(msg.getReceivedTransport() == 0)
{
// Try another flow?
}
default:
break;
}
}
}

| void BasicClientCall::onFlowTerminated | ( | InviteSessionHandle | h | ) | [protected, virtual] |
Definition at line 540 of file basicClientCall.cxx.
References BasicClientCall(), resip::BasicClientUserAgent::getDialogUsageManager(), resip::AppDialogSet::getUserProfile(), InfoLog, resip::DialogUsageManager::makeInviteSession(), makeOffer(), mInviteSessionHandle, mInviteSessionHandleReplaced, mPlacedCall, mUserAgent, resip::DialogUsageManager::send(), and resip::NameAddr::uri().
{
if(h->isConnected())
{
NameAddr inviteWithReplacesTarget;
if(h->remoteTarget().uri().exists(p_gr))
{
// If remote contact is a GRUU then use it
inviteWithReplacesTarget.uri() = h->remoteTarget().uri();
}
else
{
//.Use remote AOR
inviteWithReplacesTarget.uri() = h->peerAddr().uri();
}
InfoLog(<< "BasicClientCall::onFlowTerminated: trying INVITE w/replaces to " << inviteWithReplacesTarget);
// The flow terminated - try an Invite (with Replaces) to recover the call
BasicClientCall *replacesCall = new BasicClientCall(mUserAgent);
// Copy over flag that indicates wether original call was placed or received
replacesCall->mPlacedCall = mPlacedCall;
// Note: We want to end this call since it is to be replaced. Normally the endpoint
// receiving the INVITE with replaces would send us a BYE for the session being replaced.
// However, since the old flow is dead, we will never see this BYE. We need this call to
// go away somehow, however we cannot just end it directly here via terminateCall.
// Since the flow to other party is likely fine - if we terminate this call now the BYE
// is very likely to make it to the far end, before the above INVITE - if this happens then
// the replaces logic of the INVITE will have no effect. We want to delay the release of
// this call, by passing our handle to the new INVITE call and have it terminate this call,
// once we know the far end has processed our new INVITE.
replacesCall->mInviteSessionHandleReplaced = mInviteSessionHandle;
SdpContents offer;
replacesCall->makeOffer(offer);
SharedPtr<SipMessage> invite = mUserAgent.getDialogUsageManager().makeInviteSession(inviteWithReplacesTarget, h, getUserProfile(), &offer, replacesCall);
mUserAgent.getDialogUsageManager().send(invite);
}
}

| void BasicClientCall::onForkDestroyed | ( | resip::ClientInviteSessionHandle | h | ) | [protected, virtual] |
Definition at line 529 of file basicClientCall.cxx.
References InfoLog.
{
InfoLog(<< "onForkDestroyed:");
}
| void BasicClientCall::onInfo | ( | resip::InviteSessionHandle | h, |
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 452 of file basicClientCall.cxx.
References resip::Message::brief(), and InfoLog.

| void BasicClientCall::onInfoFailure | ( | resip::InviteSessionHandle | h, |
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 467 of file basicClientCall.cxx.
References resip::Message::brief(), and WarningLog.
{
WarningLog(<< "onInfoFailure: msg=" << msg.brief());
}

| void BasicClientCall::onInfoSuccess | ( | resip::InviteSessionHandle | h, |
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 461 of file basicClientCall.cxx.
References resip::Message::brief(), and InfoLog.

| void BasicClientCall::onMessage | ( | resip::InviteSessionHandle | h, |
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 501 of file basicClientCall.cxx.
References resip::Message::brief(), InfoLog, and mPlacedCall.
{
InfoLog(<< "onMessage: msg=" << msg.brief());
// Handle message here
h->acceptNIT();
if(!mPlacedCall)
{
// If we didn't place the call - answer the message with another message
PlainContents plain("test message answer");
h->message(plain);
}
}

| void BasicClientCall::onMessageFailure | ( | resip::InviteSessionHandle | h, |
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 523 of file basicClientCall.cxx.
References resip::Message::brief(), and WarningLog.
{
WarningLog(<< "onMessageFailure: msg=" << msg.brief());
}

| void BasicClientCall::onMessageSuccess | ( | resip::InviteSessionHandle | h, |
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 517 of file basicClientCall.cxx.
References resip::Message::brief(), and InfoLog.

| void BasicClientCall::onNewSession | ( | resip::ClientInviteSessionHandle | h, |
| resip::InviteSession::OfferAnswerType | oat, | ||
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 158 of file basicClientCall.cxx.
References resip::Message::brief(), resip::Handle< T >::get(), InfoLog, resip::Handle< T >::isValid(), mInviteSessionHandle, mInviteSessionHandleReplaced, and terminateCall().
{
InfoLog(<< "onNewSession(ClientInviteSessionHandle): msg=" << msg.brief());
mInviteSessionHandle = h->getSessionHandle(); // Note: each forked leg will update mInviteSession - need to set mInviteSessionHandle for final answering leg on 200
if(mInviteSessionHandleReplaced.isValid())
{
// See comment in flowTerminated for an explanation of this logic
((BasicClientCall*)mInviteSessionHandleReplaced->getAppDialogSet().get())->terminateCall();
}
}

| virtual void resip::BasicClientCall::onNewSession | ( | resip::ServerInviteSessionHandle | h, |
| resip::InviteSession::OfferAnswerType | oat, | ||
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
| void BasicClientCall::onNewSubscription | ( | resip::ClientSubscriptionHandle | h, |
| const resip::SipMessage & | notify | ||
| ) | [protected, virtual] |
Definition at line 663 of file basicClientCall.cxx.
References resip::Message::brief(), and InfoLog.
Referenced by resip::BasicClientUserAgent::onNewSubscription().
{
InfoLog(<< "onNewSubscription(ClientSubscriptionHandle): " << msg.brief());
}

| void BasicClientCall::onNonDialogCreatingProvisional | ( | resip::AppDialogSetHandle | h, |
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 593 of file basicClientCall.cxx.
References resip::Message::brief(), InfoLog, and isUACConnected().
Referenced by resip::BasicClientUserAgent::onNonDialogCreatingProvisional().
{
InfoLog(<< "onNonDialogCreatingProvisional: msg=" << msg.brief());
if(isUACConnected()) return; // Ignore provionals if already connected
// Handle message here
}

| void BasicClientCall::onNotifyNotReceived | ( | resip::ClientSubscriptionHandle | h | ) | [protected, virtual] |
Definition at line 638 of file basicClientCall.cxx.
References InfoLog.
Referenced by resip::BasicClientUserAgent::onNotifyNotReceived().
{
InfoLog(<< "onNotifyNotReceived(ClientSubscriptionHandle)");
h->end();
}
| void BasicClientCall::onOffer | ( | resip::InviteSessionHandle | handle, |
| const resip::SipMessage & | msg, | ||
| const resip::SdpContents & | offer | ||
| ) | [protected, virtual] |
Definition at line 367 of file basicClientCall.cxx.
References resip::ServerInviteSession::accept(), resip::Message::brief(), resip::Handle< T >::get(), InfoLog, resip::InviteSession::isAccepted(), and isStaleFork().
{
if(isStaleFork(h->getDialogId()))
{
// If we receive a response from a stale fork (ie. after someone sends a 200), then we want to ignore it
InfoLog(<< "onOffer: from stale fork, msg=" << msg.brief() << ", sdp=" << sdp);
return;
}
InfoLog(<< "onOffer: msg=" << msg.brief() << ", sdp=" << sdp);
// Provide Answer here - for test client just echo back same SDP as received for now
h->provideAnswer(sdp);
ServerInviteSession* uas = dynamic_cast<ServerInviteSession*>(h.get());
if(uas && !uas->isAccepted())
{
uas->accept();
}
}

| void BasicClientCall::onOfferRejected | ( | resip::InviteSessionHandle | h, |
| const resip::SipMessage * | msg | ||
| ) | [protected, virtual] |
Definition at line 405 of file basicClientCall.cxx.
References resip::Message::brief(), isStaleFork(), and WarningLog.
{
if(isStaleFork(h->getDialogId()))
{
// If we receive a response from a stale fork (ie. after someone sends a 200), then we want to ignore it
if(msg)
{
WarningLog(<< "onOfferRejected: from stale fork, msg=" << msg->brief());
}
else
{
WarningLog(<< "onOfferRejected: from stale fork");
}
return;
}
if(msg)
{
WarningLog(<< "onOfferRejected: msg=" << msg->brief());
}
else
{
WarningLog(<< "onOfferRejected");
}
}

| void BasicClientCall::onOfferRequestRejected | ( | resip::InviteSessionHandle | h, |
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 431 of file basicClientCall.cxx.
References resip::Message::brief(), and InfoLog.
{
InfoLog(<< "onOfferRequestRejected: msg=" << msg.brief());
// This is called when we are waiting to resend a INVITE with no sdp after a glare condition, and we
// instead receive an inbound INVITE or UPDATE
}

| void BasicClientCall::onOfferRequired | ( | resip::InviteSessionHandle | h, |
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 387 of file basicClientCall.cxx.
References resip::Message::brief(), InfoLog, isStaleFork(), and makeOffer().
{
if(isStaleFork(h->getDialogId()))
{
// If we receive a response from a stale fork (ie. after someone sends a 200), then we want to ignore it
InfoLog(<< "onOfferRequired: from stale fork, msg=" << msg.brief());
return;
}
InfoLog(<< "onOfferRequired: msg=" << msg.brief());
// Provide Offer Here
SdpContents offer;
makeOffer(offer);
h->provideOffer(offer);
}

| void BasicClientCall::onProvisional | ( | resip::ClientInviteSessionHandle | h, |
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 234 of file basicClientCall.cxx.
References resip::Message::brief(), InfoLog, and isStaleFork().
{
InfoLog(<< "onProvisional: msg=" << msg.brief());
if(isStaleFork(h->getDialogId()))
{
// If we receive a response from a stale fork (ie. after someone sends a 200), then we want to ignore it
InfoLog(<< "onProvisional: from stale fork, msg=" << msg.brief());
return;
}
InfoLog(<< "onProvisional: msg=" << msg.brief());
}

| void BasicClientCall::onReadyToSend | ( | InviteSessionHandle | h, |
| SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 535 of file basicClientCall.cxx.
{
}
| void BasicClientCall::onRedirected | ( | resip::ClientInviteSessionHandle | h, |
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 346 of file basicClientCall.cxx.
References resip::Message::brief(), and InfoLog.
{
// DUM will recurse on redirect requests, so nothing to do here
InfoLog(<< "onRedirected: msg=" << msg.brief());
}

| void BasicClientCall::onRedirectReceived | ( | AppDialogSetHandle | h, |
| const SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 676 of file basicClientCall.cxx.
References resip::Message::brief(), and InfoLog.
Referenced by resip::BasicClientUserAgent::onRedirectReceived().

| void BasicClientCall::onRefer | ( | resip::InviteSessionHandle | h, |
| resip::ServerSubscriptionHandle | ss, | ||
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 473 of file basicClientCall.cxx.
References resip::Message::brief(), and InfoLog.
Referenced by resip::BasicClientUserAgent::onNewSubscriptionFromRefer().

| void BasicClientCall::onReferAccepted | ( | resip::InviteSessionHandle | h, |
| resip::ClientSubscriptionHandle | csh, | ||
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 481 of file basicClientCall.cxx.
References resip::Message::brief(), and InfoLog.

| void BasicClientCall::onReferNoSub | ( | resip::InviteSessionHandle | h, |
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 493 of file basicClientCall.cxx.
References resip::Message::brief(), and InfoLog.
{
InfoLog(<< "onReferNoSub: msg=" << msg.brief());
// Handle Refer request with (no-subscription indication) here
}

| void BasicClientCall::onReferRejected | ( | resip::InviteSessionHandle | h, |
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 487 of file basicClientCall.cxx.
References resip::Message::brief(), and WarningLog.
{
WarningLog(<< "onReferRejected: msg=" << msg.brief());
}

| void BasicClientCall::onRemoteSdpChanged | ( | resip::InviteSessionHandle | h, |
| const resip::SipMessage & | msg, | ||
| const resip::SdpContents & | sdp | ||
| ) | [protected, virtual] |
called when a modified SDP is received in a 2xx response to a session-timer reINVITE. Under normal circumstances where the response SDP is unchanged from current remote SDP no handler is called There is not much we can do about this. If session timers are used then they are managed seperately per leg and we have no real mechanism to notify the other peer of new SDP without starting a new offer/answer negotiation
Definition at line 439 of file basicClientCall.cxx.
References InfoLog.
{
InfoLog(<< "onRemoteSdpChanged: msg=" << msg << ", sdp=" << sdp);
// Process SDP Answer here
}
| int BasicClientCall::onRequestRetry | ( | resip::ClientSubscriptionHandle | h, |
| int | retrySeconds, | ||
| const resip::SipMessage & | notify | ||
| ) | [protected, virtual] |
Definition at line 669 of file basicClientCall.cxx.
References resip::Message::brief(), and InfoLog.
Referenced by resip::BasicClientUserAgent::onRequestRetry().
{
InfoLog(<< "onRequestRetry(ClientSubscriptionHandle): " << msg.brief());
return -1;
}

| void BasicClientCall::onStaleCallTimeout | ( | resip::ClientInviteSessionHandle | h | ) | [protected, virtual] |
Definition at line 277 of file basicClientCall.cxx.
References WarningLog.
{
WarningLog(<< "onStaleCallTimeout");
}
| void BasicClientCall::onTerminated | ( | resip::InviteSessionHandle | h, |
| resip::InviteSessionHandler::TerminatedReason | reason, | ||
| const resip::SipMessage * | msg | ||
| ) | [protected, virtual] |
Definition at line 283 of file basicClientCall.cxx.
References resip::Message::brief(), resip::InviteSessionHandler::Error, InfoLog, isStaleFork(), resip::InviteSessionHandler::LocalBye, resip::InviteSessionHandler::LocalCancel, resip::InviteSessionHandler::Referred, resip::InviteSessionHandler::Rejected, resip::InviteSessionHandler::RemoteBye, resip::InviteSessionHandler::RemoteCancel, resip::InviteSessionHandler::Replaced, and resip::InviteSessionHandler::Timeout.
Referenced by resip::BasicClientUserAgent::onTerminated().
{
Data reasonData;
switch(reason)
{
case InviteSessionHandler::RemoteBye:
reasonData = "received a BYE from peer";
break;
case InviteSessionHandler::RemoteCancel:
reasonData = "received a CANCEL from peer";
break;
case InviteSessionHandler::Rejected:
reasonData = "received a rejection from peer";
break;
case InviteSessionHandler::LocalBye:
reasonData = "ended locally via BYE";
break;
case InviteSessionHandler::LocalCancel:
reasonData = "ended locally via CANCEL";
break;
case InviteSessionHandler::Replaced:
reasonData = "ended due to being replaced";
break;
case InviteSessionHandler::Referred:
reasonData = "ended due to being referred";
break;
case InviteSessionHandler::Error:
reasonData = "ended due to an error";
break;
case InviteSessionHandler::Timeout:
reasonData = "ended due to a timeout";
break;
default:
assert(false);
break;
}
if(isStaleFork(h->getDialogId()))
{
// If we receive a response from a stale fork (ie. after someone sends a 200), then we want to ignore it
if(msg)
{
InfoLog(<< "onTerminated: from stale fork, reason=" << reasonData << ", msg=" << msg->brief());
}
else
{
InfoLog(<< "onTerminated: from stale fork, reason=" << reasonData);
}
return;
}
if(msg)
{
InfoLog(<< "onTerminated: reason=" << reasonData << ", msg=" << msg->brief());
}
else
{
InfoLog(<< "onTerminated: reason=" << reasonData);
}
}

| void BasicClientCall::onTerminated | ( | resip::ClientSubscriptionHandle | h, |
| const resip::SipMessage * | notify | ||
| ) | [protected, virtual] |
Definition at line 645 of file basicClientCall.cxx.
References resip::Message::brief(), resip::SipMessage::exists(), resip::SipMessage::header(), InfoLog, and resip::SipMessage::isRequest().
{
if(msg)
{
InfoLog(<< "onTerminated(ClientSubscriptionHandle): " << msg->brief());
//Note: Final notify is sometimes only passed in the onTerminated callback
if (msg->isRequest() && msg->exists(h_Event) && msg->header(h_Event).value() == "refer")
{
//process Refer Notify Here
}
}
else
{
InfoLog(<< "onTerminated(ClientSubscriptionHandle)");
}
}

| void BasicClientCall::onTrying | ( | resip::AppDialogSetHandle | h, |
| const resip::SipMessage & | msg | ||
| ) | [protected, virtual] |
Definition at line 584 of file basicClientCall.cxx.
References resip::Message::brief(), InfoLog, and isUACConnected().
Referenced by resip::BasicClientUserAgent::onTrying().
{
InfoLog(<< "onTrying: msg=" << msg.brief());
if(isUACConnected()) return; // Ignore 100's if already connected
// Handle message here
}

| void BasicClientCall::onUpdateActive | ( | resip::ClientSubscriptionHandle | h, |
| const resip::SipMessage & | notify, | ||
| bool | outOfOrder | ||
| ) | [protected, virtual] |
Definition at line 616 of file basicClientCall.cxx.
References resip::Message::brief(), resip::SipMessage::exists(), resip::SipMessage::header(), and InfoLog.
Referenced by resip::BasicClientUserAgent::onUpdateActive().
{
InfoLog(<< "onUpdateActive(ClientSubscriptionHandle): " << msg.brief());
if (msg.exists(h_Event) && msg.header(h_Event).value() == "refer")
{
//process Refer Notify Here
}
h->acceptUpdate();
}

| void BasicClientCall::onUpdateExtension | ( | resip::ClientSubscriptionHandle | h, |
| const resip::SipMessage & | notify, | ||
| bool | outOfOrder | ||
| ) | [protected, virtual] |
Definition at line 627 of file basicClientCall.cxx.
References resip::Message::brief(), resip::SipMessage::exists(), resip::SipMessage::header(), and InfoLog.
Referenced by resip::BasicClientUserAgent::onUpdateExtension().
{
InfoLog(<< "onUpdateExtension(ClientSubscriptionHandle): " << msg.brief());
if (msg.exists(h_Event) && msg.header(h_Event).value() == "refer")
{
//process Refer Notify Here
}
h->acceptUpdate();
}

| void BasicClientCall::onUpdatePending | ( | resip::ClientSubscriptionHandle | h, |
| const resip::SipMessage & | notify, | ||
| bool | outOfOrder | ||
| ) | [protected, virtual] |
Definition at line 605 of file basicClientCall.cxx.
References resip::Message::brief(), resip::SipMessage::exists(), resip::SipMessage::header(), and InfoLog.
Referenced by resip::BasicClientUserAgent::onUpdatePending().
{
InfoLog(<< "onUpdatePending(ClientSubscriptionHandle): " << msg.brief());
if (msg.exists(h_Event) && msg.header(h_Event).value() == "refer")
{
//process Refer Notify Here
}
h->acceptUpdate();
}

| SharedPtr< UserProfile > BasicClientCall::selectUASUserProfile | ( | const SipMessage & | msg | ) | [protected, virtual] |
Reimplemented from resip::AppDialogSet.
Definition at line 111 of file basicClientCall.cxx.
References resip::BasicClientUserAgent::getIncomingUserProfile(), and mUserAgent.
{
return mUserAgent.getIncomingUserProfile(msg);
}

| void BasicClientCall::terminateCall | ( | ) | [virtual] |
Definition at line 81 of file basicClientCall.cxx.
References resip::AppDialogSet::end().
Referenced by onNewSession(), and timerExpired().
{
AppDialogSet::end();
}

| void BasicClientCall::timerExpired | ( | ) | [virtual] |
Definition at line 87 of file basicClientCall.cxx.
References CallTimeCounterToByeOn, CallTimerTime, resip::BasicClientUserAgent::getDialogUsageManager(), resip::Handle< T >::isValid(), mInviteSessionHandle, resip::BasicClientUserAgent::mStack, mTimerExpiredCounter, mUserAgent, resip::SipStack::post(), and terminateCall().
Referenced by resip::BasicClientUserAgent::onCallTimeout().
{
mTimerExpiredCounter++;
if(mTimerExpiredCounter < CallTimeCounterToByeOn)
{
// First few times, send a message to the other party
if(mInviteSessionHandle.isValid())
{
PlainContents plain("test message");
mInviteSessionHandle->message(plain);
}
}
else
{
// Then hangup
terminateCall();
}
// start timer for next one
auto_ptr<ApplicationMessage> timer(new CallTimer(mUserAgent, this));
mUserAgent.mStack.post(timer, CallTimerTime, &mUserAgent.getDialogUsageManager());
}

friend class BasicClientUserAgent [friend] |
Definition at line 28 of file basicClientCall.hxx.
Definition at line 82 of file basicClientCall.hxx.
Referenced by onFlowTerminated(), onNewSession(), and timerExpired().
Definition at line 85 of file basicClientCall.hxx.
Referenced by onFlowTerminated(), and onNewSession().
bool resip::BasicClientCall::mPlacedCall [private] |
Definition at line 84 of file basicClientCall.hxx.
Referenced by initiateCall(), onFlowTerminated(), and onMessage().
unsigned int resip::BasicClientCall::mTimerExpiredCounter [private] |
Definition at line 83 of file basicClientCall.hxx.
Referenced by timerExpired().
Definition at line 90 of file basicClientCall.hxx.
Referenced by isStaleFork(), isUACConnected(), and onConnected().
Definition at line 81 of file basicClientCall.hxx.
Referenced by BasicClientCall(), initiateCall(), onConnected(), onFlowTerminated(), selectUASUserProfile(), timerExpired(), and ~BasicClientCall().
1.7.5.1