Module: sems Branch: master Commit: a06798443cbf47618779ef16936b2c2532ecfd66 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=a06798443cbf47618779ef16936b2c2532ecfd66
Author: Raphael Coeffic <[email protected]> Committer: Raphael Coeffic <[email protected]> Date: Mon Jun 13 14:29:53 2011 +0200 b/f: add missing SDP handling in onRxReply (UAC use-case). --- core/AmSipDialog.cpp | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/core/AmSipDialog.cpp b/core/AmSipDialog.cpp index bdb2bdf..90535e3 100644 --- a/core/AmSipDialog.cpp +++ b/core/AmSipDialog.cpp @@ -226,6 +226,7 @@ void AmSipDialog::onRxRequest(const AmSipRequest& req) reply(req,err_code,err_txt); } else { // ACK + // TODO: only if reply to initial INVITE (if re-INV, app should decide) DBG("error %i with SDP received in ACK request: sending BYE\n",err_code); bye(); } @@ -687,6 +688,21 @@ void AmSipDialog::onRxReply(const AmSipReply& reply) } } + if((reply.cseq_method == SIP_METH_INVITE || + reply.cseq_method == SIP_METH_UPDATE || + reply.cseq_method == SIP_METH_PRACK) && + !reply.body.empty() && + (reply.content_type == SIP_APPLICATION_SDP)) { + + const char* err_txt=NULL; + int err_code = onRxSdp(reply.body,&err_txt); + if(err_code){ + // TODO: only if initial INVITE (if re-INV, app should decide) + DBG("error %i with SDP received in %i reply: sending ACK+BYE\n",err_code,reply.code); + bye(); + } + } + int cont = rel100OnReplyIn(reply); if(reply.code >= 200){ if((reply.code < 300) && (trans_method == SIP_METH_INVITE)) { _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
