Kaynağa Gözat

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 yıl önce
ebeveyn
işleme
21e54da18f
1 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. 5 0
      modules/rtpproxy/rtpproxy.c

+ 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) {
 			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)) {