From 9e3d19fb30002600761f404bba42accc165b7649 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 (cherry picked from commit 6d7603e0640407bb7a9231353671aa5bfbb666fe) --- 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 f5b1353ab..d96d46acf 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -1012,6 +1012,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 2ff41e71b..6a5d70c15 100755 --- a/t/auto-daemon-tests.pl +++ b/t/auto-daemon-tests.pl @@ -16411,5 +16411,225 @@ SDP +new_call; + +($port_a) = offer('re-invite sendonly port change (control)', { }, <