From b35e23f33a6fec44bb4d7effeb6684341d4dace7 Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Tue, 7 Aug 2012 13:20:08 +0200 Subject: [PATCH 1/2] b/f: multiple extra c-lines in generated SDP after SDP filter (fixes #132) corresponds to fix in master 12f56bd35 --- core/AmSdp.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/core/AmSdp.cpp b/core/AmSdp.cpp index 86fb8780..90168cd2 100644 --- a/core/AmSdp.cpp +++ b/core/AmSdp.cpp @@ -207,19 +207,18 @@ void AmSdp::print(string& body) const for(std::vector::const_iterator media_it = media.begin(); media_it != media.end(); media_it++) { - + out_buf += "m=" + media_t_2_str(media_it->type) + " " + int2str(media_it->port) + " " + transport_p_2_str(media_it->transport); + string options; + if (media_it->transport == TP_RTPAVP || media_it->transport == TP_RTPSAVP) { - string options; + for(std::vector::const_iterator pl_it = media_it->payloads.begin(); pl_it != media_it->payloads.end(); pl_it++) { out_buf += " " + int2str(pl_it->payload_type); - if (!media_it->conn.address.empty()) - options += "c=IN IP4 "+media_it->conn.address+"\r\n"; - if (pl_it->encoding_name.empty()) // don't add rtpmap if no encoding name given continue; @@ -241,12 +240,16 @@ void AmSdp::print(string& body) const } - out_buf += "\r\n" + options; } else { // for other transports (UDP/UDPTL) just print out fmt - out_buf += " " + media_it->fmt + "\r\n"; + out_buf += " " + media_it->fmt; + // ... and continue with c=, attributes, ... } + if (!media_it->conn.address.empty()) + out_buf += "\r\nc=IN IP4 "+media_it->conn.address; + + out_buf += "\r\n" + options; // add attributes (media level) for (std::vector::const_iterator a_it= From 1cc98167704d3c3fde7197867d2a2763bff481f8 Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Tue, 7 Aug 2012 13:58:41 +0200 Subject: [PATCH 2/2] b/f:removed superfluous debug log messages introduced in 26fdaa8eaf --- core/AmSession.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/AmSession.cpp b/core/AmSession.cpp index 3806199e..b8601d39 100644 --- a/core/AmSession.cpp +++ b/core/AmSession.cpp @@ -909,11 +909,11 @@ void AmSession::onSipReply(const AmSipReply& reply, DBG("negotiate_onreply = %s\n", negotiate_onreply?"true":"false"); if (negotiate_onreply) { if(old_dlg_status < AmSipDialog::Connected){ - DBG("old is < conn\n"); + switch(dlg.getStatus()){ case AmSipDialog::Connected: - DBG("case conn\n"); + try { RTPStream()->setMonitorRTPTimeout(true); @@ -942,7 +942,7 @@ void AmSession::onSipReply(const AmSipReply& reply, break; case AmSipDialog::Pending: - DBG("case pending\n"); + switch(reply.code){ // todo: 180 with body (remote rbt) case 180: {