Module: sems
Branch: 1.4
Commit: 0fbb1f9efeccf675340321a0d6af34946c1b9422
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=0fbb1f9efeccf675340321a0d6af34946c1b9422

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Mon Oct 31 18:39:57 2011 +0100

b/f: remember passive_mode for keeping symmetric RTP in a session

If NAT flag (P-MsgFlags: 2) is passed only in the initial INVITE,
re-INVITE will set up the RTP stream to the private address, but not
enable symmetric RTP (comedia style send-to-where-i-get-rtp-from)
again. this fix remembers passive_mode for the call.

---

 core/AmSession.cpp |    2 +-
 core/AmSession.h   |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/core/AmSession.cpp b/core/AmSession.cpp
index df01250..7721216 100644
--- a/core/AmSession.cpp
+++ b/core/AmSession.cpp
@@ -79,6 +79,7 @@ AmSession::AmSession()
     m_dtmfDetector(this), m_dtmfEventQueue(&m_dtmfDetector),
     m_dtmfDetectionEnabled(true),
     accept_early_session(false),
+    passive_mode(false),
     rtp_interface(-1),
     refresh_method(REFRESH_UPDATE_FB_REINV),
     processing_status(SESSION_PROCESSING_EVENTS),
@@ -287,7 +288,6 @@ void AmSession::negotiate(const string& sdp_body,
     DBG("remote party doesn't support telephone events\n");
   }
 
-  bool passive_mode = false;
   if( sdp.remote_active || force_symmetric_rtp) {
     DBG("The other UA is NATed: switched to passive mode.\n");
     DBG("remote_active = %i; force_symmetric_rtp = %i\n",
diff --git a/core/AmSession.h b/core/AmSession.h
index ca60b2a..218259b 100644
--- a/core/AmSession.h
+++ b/core/AmSession.h
@@ -157,6 +157,9 @@ private:
 
   auto_ptr<AmRtpAudio> _rtp_str;
 
+  /** set up RTP stream as passive? (comedia style NAT aware) */
+  bool passive_mode;
+
   AmDynInvoke* user_timer_ref;
   
   void getUserTimerInstance();

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to