Module: sems Branch: master Commit: 167e551e6f031a90fde8d929adcfcf2f760bf907 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=167e551e6f031a90fde8d929adcfcf2f760bf907
Author: Václav Kubart <[email protected]> Committer: Václav Kubart <[email protected]> Date: Mon Dec 23 15:09:29 2013 +0100 sbc b/f: handle reINVITE within disconnected B2B call better way thanks Stefan for reporting and investigating the problem --- apps/sbc/CallLeg.cpp | 20 ++++++++++++++++++-- 1 files changed, 18 insertions(+), 2 deletions(-) diff --git a/apps/sbc/CallLeg.cpp b/apps/sbc/CallLeg.cpp index aa1bbf0..4330408 100644 --- a/apps/sbc/CallLeg.cpp +++ b/apps/sbc/CallLeg.cpp @@ -888,10 +888,26 @@ void CallLeg::onSipRequest(const AmSipRequest& req) // Note that setting sip_relay_only to false in this case doesn't solve the // problem because AmB2BSession always tries to relay the request into the // other leg. - if (getCallStatus() == Disconnected && getOtherId().empty()) { + if ((getCallStatus() == Disconnected || getCallStatus() == Disconnecting) + && getOtherId().empty()) + { TRACE("handling request %s in disconnected state", req.method.c_str()); + // this is not correct but what is? - AmSession::onSipRequest(req); + // handle reINVITEs within B2B call with no other leg + if (req.method == SIP_METH_INVITE && dlg->getStatus() == AmBasicSipDialog::Connected) { + try { + AmSession::onInvite(req); + //or dlg->reply(req, 500, SIP_REPLY_SERVER_INTERNAL_ERROR); ? + } + catch(...) { + ERROR("exception when handling INVITE in disconnected state"); + dlg->reply(req, 500, SIP_REPLY_SERVER_INTERNAL_ERROR); + // stop the call? + } + } + else AmSession::onSipRequest(req); + if (req.method == SIP_METH_BYE) { stopCall(&req); // is this needed? } _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
