Module: sems Branch: rco/offer_answer Commit: 65af9f3ffd8a30cd31a9c5c24c54b151adbf91ef URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=65af9f3ffd8a30cd31a9c5c24c54b151adbf91ef
Author: Raphael Coeffic <[email protected]> Committer: Raphael Coeffic <[email protected]> Date: Wed May 25 14:20:17 2011 +0200 removed AmSession::sdp. use AmSipDialog::[remote|local]_sdp instead. --- core/AmB2BSession.cpp | 19 ++++++++++--------- core/AmSdp.cpp | 9 ++++++++- core/AmSession.cpp | 2 +- core/AmSession.h | 1 - 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/core/AmB2BSession.cpp b/core/AmB2BSession.cpp index ece322a..090134b 100644 --- a/core/AmB2BSession.cpp +++ b/core/AmB2BSession.cpp @@ -349,8 +349,15 @@ void AmB2BSession::updateRelayStreams(const string& content_type, const string& media_index, r_addr.c_str(), it->port); relay_rtp_streams[media_index]->setRAddr(r_addr, it->port); - if (sdp.remote_active || rtp_relay_force_symmetric_rtp) { + if ((it->dir == SdpMedia::DirActive) || rtp_relay_force_symmetric_rtp) { + relay_rtp_streams[media_index]->setPassiveMode(true); + + if (rtp_relay_force_symmetric_rtp) { + DBG("Symmetric RTP: forced passive mode (#stream = %i)\n",media_index); + } else { + DBG("Symmetric RTP: remote NATed, passive mode enabled (#stream = %i)\n",media_index); + } } relay_rtp_streams[media_index]->resume(); } @@ -361,12 +368,6 @@ void AmB2BSession::updateRelayStreams(const string& content_type, const string& media_index ++; } - if (rtp_relay_force_symmetric_rtp) { - DBG("Symmetric RTP: forced passive mode\n"); - } else if (sdp.remote_active) { - DBG("Symmetric RTP: remote NATed, RTP stream set to passive mode\n"); - } - } bool AmB2BSession::replaceConnectionAddress(const string& content_type, @@ -1121,10 +1122,10 @@ void AmB2BCallerSession::createCalleeSession() { throw; } - callee_session->start(); - AmSessionContainer* sess_cont = AmSessionContainer::instance(); sess_cont->addSession(other_id,callee_session); + + callee_session->start(); } AmB2BCalleeSession* AmB2BCallerSession::newCalleeSession() diff --git a/core/AmSdp.cpp b/core/AmSdp.cpp index 5ff5a02..03f57de 100644 --- a/core/AmSdp.cpp +++ b/core/AmSdp.cpp @@ -194,8 +194,15 @@ void AmSdp::print(string& body) const out_buf += "\r\n" + options; - if(remote_active /* dir == SdpMedia::DirActive */) + switch(media_it->dir){ + case SdpMedia::DirActive: + out_buf += "a=direction:active\r\n"; + break; + case SdpMedia::DirPassive: out_buf += "a=direction:passive\r\n"; + break; + default: break; + } } body = out_buf; diff --git a/core/AmSession.cpp b/core/AmSession.cpp index 6d430d0..faabe44 100644 --- a/core/AmSession.cpp +++ b/core/AmSession.cpp @@ -226,7 +226,7 @@ const string& AmSession::getFirstBranch() const void AmSession::setUri(const string& uri) { DBG("AmSession::setUri(%s)\n",uri.c_str()); - sdp.uri = uri; + /* TODO: sdp.uri = uri;*/ } void AmSession::setLocalTag() diff --git a/core/AmSession.h b/core/AmSession.h index b4667fb..d9f8c65 100644 --- a/core/AmSession.h +++ b/core/AmSession.h @@ -161,7 +161,6 @@ private: void getUserTimerInstance(); protected: - AmSdp sdp; /** this is the group the media is processed with - by default local tag */ _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
