Module: sems Branch: sayer/1.4-spce3.0 Commit: 1c67e7f8a5f5bcb56ba060730b63ceb660b76b67 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=1c67e7f8a5f5bcb56ba060730b63ceb660b76b67
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Mon Sep 23 15:52:45 2013 +0200 b/f:b2bua: if 200 to INV without SDP, use SDP from 18x for caller re-Invite reported by Andrew Pogrebennyk --- core/AmB2BSession.cpp | 35 +++++++++++++++++++++++++---------- 1 files changed, 25 insertions(+), 10 deletions(-) diff --git a/core/AmB2BSession.cpp b/core/AmB2BSession.cpp index c080232..592539d 100644 --- a/core/AmB2BSession.cpp +++ b/core/AmB2BSession.cpp @@ -892,25 +892,40 @@ void AmB2BCallerSession::onB2BEvent(B2BEvent* ev) case NoReply: case Ringing: if (reply.cseq == invite_req.cseq) { - if(reply.code < 200){ - if ((!sip_relay_only) && sip_relay_early_media_sdp && - reply.code>=180 && reply.code<=183 && (!reply.body.empty())) { - if (reinviteCaller(reply)) { - ERROR("re-INVITEing caller for early session failed - " - "stopping this and other leg\n"); - terminateOtherLeg(); - terminateLeg(); + if (reply.code < 200) { + + if ((!sip_relay_only) && + (reply.code>=180 && reply.code<=183 && (!reply.body.empty()))) { + // save early media SDP + updateSessionDescription(reply.content_type, reply.body); + + if (sip_relay_early_media_sdp) { + if (reinviteCaller(reply)) { + ERROR("re-INVITEing caller for early session failed - " + "stopping this and other leg\n"); + terminateOtherLeg(); + terminateLeg(); + } } } - + callee_status = Ringing; + } else if(reply.code < 300){ callee_status = Connected; if (!sip_relay_only) { sip_relay_only = true; - if (reinviteCaller(reply)) { + AmSipReply n_reply = reply; + + if (n_reply.body.empty() && !established_body.empty()) { + DBG("callee FR without SDP, using provisional response's (18x) one\n"); + n_reply.content_type = established_content_type; + n_reply.body = established_body; + } + + if (reinviteCaller(n_reply)) { ERROR("re-INVITEing caller failed - stopping this and other leg\n"); terminateOtherLeg(); terminateLeg(); _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
