Browse Source

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

- affected cases when the lookup was used explicitely

(cherry picked from commit 21e54da18f9bc6f87f913a897c9183074de4c937)
(cherry picked from commit b19a94889eed0dde7131ac5328192962504ed928)
Marcus Hunger 11 năm trước cách đây
mục cha
commit
d9604c4a7c
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      modules/rtpproxy/rtpproxy.c

+ 5 - 0
modules/rtpproxy/rtpproxy.c

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