Blob Blame History Raw
From: Vlad Paiu <vladpaiu@opensips.org>
Date: Thu, 11 Feb 2016 16:58:19 +0200
Subject: [PATCH] Don't push throug RTPProxy streams with port 0 in SDP


diff --git a/modules/rtpproxy/rtpproxy.c b/modules/rtpproxy/rtpproxy.c
index 602d66b..dbd3c70 100644
--- a/modules/rtpproxy/rtpproxy.c
+++ b/modules/rtpproxy/rtpproxy.c
@@ -3710,6 +3710,13 @@ force_rtp_proxy_body(struct sip_msg* msg, struct force_rtpp_args *args, pv_spec_
 				goto error;
 			}
 			++medianum;
+
+			/* If the callee wants to neither send nor receive a stream offered by
+			the caller, the callee sets the port number of that stream to zero in
+			its media description - don't engage rtpproxy for such streams */
+			if (oldport.s[0] == '0' && oldport.len == 1)
+				continue;
+
 			if (asymmetric != 0 || real != 0) {
 				newip = oldip;
 			} else {