MT#56321 AmB2BSession::onB2BEvent() - refresh caller if 183 media forced

B2BSipReply

We have to update the media session with the caller, if the 183 response
with the 'P-Early-Announce: force' has been received.

Change-Id: Ib39dc124ef5e8934ff617d562b222bd07dfcacc1
mr11.3.1
Donat Zenichev 3 years ago
parent cd233e18dd
commit b85bc42808

@ -312,10 +312,31 @@ void AmB2BSession::onB2BEvent(B2BEvent* ev)
DBG("reply to establishing INVITE request - not refreshing\n");
}
}
}
/* processing of the playback completion from DSM applications */
if (reply_ev->reply.code == 480 && dlg->getStatus() == AmSipDialog::Connected) {
/* 183 - coming from DSM application */
} else if (reply_ev->reply.code == 183 &&
dlg->getForcedEarlyAnnounce() &&
!reply_ev->reply.body.empty()) {
if (updateSessionDescription(reply_ev->reply.body)) {
if (dlg->getUACInvTransPending()) {
DBG("changed session, but UAC INVITE trans pending\n");
} else {
DBG("Received 183 with P-Early-Announce: force, refreshing media session.\n");
setMute(true);
AmMediaProcessor::instance()->removeSession(this);
if (sendEstablishedReInvite() < 0) {
ERROR("could not re-Invite after locally initiated request"
"in B2B leg changed session (this='%s', other='%s')\n",
getLocalTag().c_str(), other_id.c_str());
}
}
}
/* 480 - processing of the playback completion from DSM applications */
} else if (reply_ev->reply.code == 480 && dlg->getStatus() == AmSipDialog::Connected) {
string p_dsm_app = getHeader(reply_ev->reply.hdrs, SIP_HDR_P_DSM_APP, true);

@ -76,6 +76,12 @@ protected:
bool onRxReqStatus(const AmSipRequest& req);
bool onRxReplySanity(const AmSipReply& reply);
/* this function updates the status of the dialog (AmBasicSipDialog)
* and sets this to: Trying, Proceeding, Cancelling, Early, Connected etc.
* Additionally it updates remote tags with setRemoteTag()
* and updates route set with setRouteSet()
*/
bool onRxReplyStatus(const AmSipReply& reply);

Loading…
Cancel
Save