2
0
Эх сурвалжийг харах

rtpproxy: swap tags for lookup command (l) to fix one way audio on reinvite

- affected cases when the lookup was used explicitely
Marcus Hunger 11 жил өмнө
parent
commit
21e54da18f

+ 5 - 0
modules/rtpproxy/rtpproxy.c

@@ -2454,6 +2454,11 @@ force_rtp_proxy(struct sip_msg* msg, char* str1, char* str2, int offer, int forc
 		if (to_tag.len == 0) {
 		if (to_tag.len == 0) {
 			FORCE_RTP_PROXY_RET (-1);
 			FORCE_RTP_PROXY_RET (-1);
 		}
 		}
+		if (msg->first_line.type == SIP_REQUEST) {
+			tmp = from_tag;
+			from_tag = to_tag;
+			to_tag = tmp;
+		}
 		create = 0;
 		create = 0;
 	} else if ((msg->first_line.type == SIP_REPLY && offer != 0)
 	} else if ((msg->first_line.type == SIP_REPLY && offer != 0)
 			|| (msg->first_line.type == SIP_REQUEST && offer == 0)) {
 			|| (msg->first_line.type == SIP_REQUEST && offer == 0)) {