Module: sems
Branch: master
Commit: 617f07d2c5671895cda060758bb81b0acae4d770
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=617f07d2c5671895cda060758bb81b0acae4d770

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Mon Sep 20 19:04:28 2010 +0200

b/f: relay SDP in SDP only for INVITE method

---

 core/AmB2BSession.cpp |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/core/AmB2BSession.cpp b/core/AmB2BSession.cpp
index 2963769..467bdf7 100644
--- a/core/AmB2BSession.cpp
+++ b/core/AmB2BSession.cpp
@@ -28,6 +28,7 @@
 #include "AmSessionContainer.h"
 #include "AmConfig.h"
 #include "ampi/MonitoringAPI.h"
+#include "AmSipHeaders.h"
 
 #include <assert.h>
 
@@ -216,14 +217,17 @@ void AmB2BSession::onSipReply(const AmSipReply& reply, 
int old_dlg_status)
        relayed_req.erase(t);
     }
   } else {
+    string trans_method = dlg.get_uac_trans_method(reply.cseq);
+
     bool relay_body = 
       // is a reply to request we sent, 
       // even though we are in sip_relay_only  mode
       (sip_relay_only && 
        // positive reply
-       (200 <= reply.code) && (reply.code < 300) 
+       (200 <= reply.code) && (reply.code < 300) &&
        // with body
-       && !reply.body.empty()); // todo: && method == INVITE???
+       !reply.body.empty() &&
+       trans_method == SIP_METH_INVITE);
     
     if (relay_body) {
       // is it an answer to a relayed body, or an answer to empty re-INVITE? 

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

Reply via email to