[sr-dev] git:master: rtpproxy: close rtpproxy session for INVITE req in failure route

Daniel-Constantin Mierla miconda at gmail.com
Sat May 28 18:42:07 CEST 2011


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Sat May 28 18:36:19 2011 +0200

rtpproxy: close rtpproxy session for INVITE req in failure route

- update of rtpproxy_manage() to close rtp relay session when executed
  in failure route

---

 modules/rtpproxy/rtpproxy.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/modules/rtpproxy/rtpproxy.c b/modules/rtpproxy/rtpproxy.c
index 8dd83c6..3807954 100644
--- a/modules/rtpproxy/rtpproxy.c
+++ b/modules/rtpproxy/rtpproxy.c
@@ -219,6 +219,7 @@
 #include "../../socket_info.h"
 #include "../../mod_fix.h"
 #include "../../dset.h"
+#include "../../route.h"
 #include "../../modules/tm/tm_load.h"
 #include "rtpproxy.h"
 #include "rtpproxy_funcs.h"
@@ -1717,7 +1718,10 @@ rtpproxy_manage(struct sip_msg *msg, char *flags, char *ip)
 		strcpy(newip, cp);
 	}
 
-	nosdp = parse_sdp(msg);
+	if(msg->msg_flags & FL_SDP_BODY)
+		nosdp = 0;
+	else
+		nosdp = parse_sdp(msg);
 
 	if(msg->first_line.type == SIP_REQUEST) {
 		if(method==METHOD_ACK && nosdp==0)
@@ -1727,6 +1731,8 @@ rtpproxy_manage(struct sip_msg *msg, char *flags, char *ip)
 			msg->msg_flags |= FL_SDP_BODY;
 			if(tmb.t_gett!=NULL && tmb.t_gett()!=NULL)
 				tmb.t_gett()->uas.request->msg_flags |= FL_SDP_BODY;
+			if(route_type==FAILURE_ROUTE)
+				return unforce_rtp_proxy_f(msg, 0, 0);
 			return force_rtp_proxy(msg, flags, (cp!=NULL)?newip:ip, 1,
 					(ip!=NULL)?1:0);
 		}




More information about the sr-dev mailing list