From b336828800dbcd4fbab0258b315c5af1543008df Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 13 Feb 2023 08:26:19 -0500 Subject: [PATCH] MT#56420 suppress port-change for sendonly streams Don't change to a new port for sendonly streams as this causes problems with NAT. A device receiving a sendonly SDP with a new port won't send any RTP to the new port, leading to a closed (non existent) NAT mapping. Change-Id: I2ea2163eb9f1203226bd781b53f421c790a86f0a --- daemon/call.c | 2 + t/auto-daemon-tests.pl | 220 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 222 insertions(+) diff --git a/daemon/call.c b/daemon/call.c index ebec67090..2e74b1b99 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -1016,6 +1016,8 @@ static struct endpoint_map *__get_endpoint_map(struct call_media *media, unsigne port_latching = true; else if (MEDIA_ISSET(media, ICE) && (!flags || !flags->no_port_latching)) port_latching = true; + else if (!MEDIA_ISSET(media, RECV) && (!flags || !flags->no_port_latching)) + port_latching = true; struct endpoint_map *em = NULL; if (port_latching) diff --git a/t/auto-daemon-tests.pl b/t/auto-daemon-tests.pl index 150b10864..500433fa2 100755 --- a/t/auto-daemon-tests.pl +++ b/t/auto-daemon-tests.pl @@ -19253,5 +19253,225 @@ SDP +new_call; + +($port_a) = offer('re-invite sendonly port change (control)', { }, <