Module: sems Branch: master Commit: 3b2fd9f01d74e23b06552603b0a50c7be5c9741e URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=3b2fd9f01d74e23b06552603b0a50c7be5c9741e
Author: Václav Kubart <[email protected]> Committer: Václav Kubart <[email protected]> Date: Tue Dec 3 17:48:09 2013 +0100 OA b/f: do not require body in 183/INVITE --- core/AmOfferAnswer.cpp | 28 ++++++++++++++++------------ 1 files changed, 16 insertions(+), 12 deletions(-) diff --git a/core/AmOfferAnswer.cpp b/core/AmOfferAnswer.cpp index fabb969..f60b6e5 100644 --- a/core/AmOfferAnswer.cpp +++ b/core/AmOfferAnswer.cpp @@ -377,21 +377,25 @@ int AmOfferAnswer::onReplyOut(AmSipReply& reply) string sdp_buf; if(getSdpBody(sdp_buf)) { - return -1; - } - - if(!sdp_body){ - if( (sdp_body = - reply.body.addPart(SIP_APPLICATION_SDP)) - == NULL ) { - DBG("AmMimeBody::addPart() failed\n"); - return -1; + if (reply.code == 183 && reply.cseq_method == SIP_METH_INVITE) { + // just ignore if no SDP is generated (required for B2B) } + else return -1; } + else { + if(!sdp_body){ + if( (sdp_body = + reply.body.addPart(SIP_APPLICATION_SDP)) + == NULL ) { + DBG("AmMimeBody::addPart() failed\n"); + return -1; + } + } - sdp_body->setPayload((const unsigned char*)sdp_buf.c_str(), - sdp_buf.length()); - has_sdp = true; + sdp_body->setPayload((const unsigned char*)sdp_buf.c_str(), + sdp_buf.length()); + has_sdp = true; + } } else if (sdp_body && has_sdp) { // update local SDP copy if (sdp_local.parse((const char*)sdp_body->getPayload())) { _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
