From b8fe35e965317a724171dc8d2d519fb6467f0af6 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Tue, 5 Nov 2019 23:27:26 +0100 Subject: [PATCH 1/2] freeswitch-stable: fix reINVITE after T38 is rejected For comments see added patch. Signed-off-by: Sebastian Kemper --- .../patches/390-t38-reinvite-488-fix.patch | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 net/freeswitch-stable/patches/390-t38-reinvite-488-fix.patch diff --git a/net/freeswitch-stable/patches/390-t38-reinvite-488-fix.patch b/net/freeswitch-stable/patches/390-t38-reinvite-488-fix.patch new file mode 100644 index 0000000..a16266b --- /dev/null +++ b/net/freeswitch-stable/patches/390-t38-reinvite-488-fix.patch @@ -0,0 +1,66 @@ +commit 167294ea2649afd0ffedf4520b0f308979c3ca2a +Author: Sebastian Kemper +Date: Fri Oct 18 18:28:07 2019 +0200 + + [mod-sofia] Fix reINVITE after T38 is rejected + + From FS-11833. + + After FS sends a reINVITE to T38 which gets rejected by peer it is no + longer in a state where it can properly answer a reINVITE which requests + a change of the media setup. + + 1. FS sends INVITE (destination is a fax machine) + 2. Call connects with "8 101" + 3. FS sends reINVITE to T38 + 4. T38 rejected (488) + 5. FS receives INVITE to "8" + 6. FS replies with 200 OK without SDP + 7. Call fails + + The bug is related to TFLAG_SDP. This flag is set when a media session + is established. And when there's a reINVITE sofia_glue_do_invite() from + sofia_glue.c is called and clears the flag again: + + sofia_clear_flag_locked(tech_pvt, TFLAG_SDP); + + So when FS sends a reINVITE to T38 the flag gets cleared. But when the + reINVITE is rejected with 488 the flag is not set again. It stays + cleared. So the call continues with the previously negotiated media, fax + passthrough (8 101 in this case), but TFLAG_SDP is not set. + + So when FS receives a reINVITE at this point it doesn't see the need to + renegotiate anything, even though it realizes that 2833 DTMF is now off: + + 2019-04-30 16:42:12.478025 [DEBUG] switch_core_media.c:5478 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1] + 2019-04-30 16:42:12.478025 [DEBUG] switch_core_media.c:5533 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match + 2019-04-30 16:42:12.478025 [DEBUG] switch_core_media.c:5802 No 2833 in SDP. Disable 2833 dtmf and switch to INFO + + When FS doesn't send a reINVITE (fax_enable_t38_request=false) and the + reINVITE to "8" is received, TFLAG_SDP is still set and then FS + understands that it needs to renegotiate and replies with a 200 OK that + includes SDP: + + 2019-04-30 16:41:19.358028 [DEBUG] switch_core_media.c:5478 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1] + 2019-04-30 16:41:19.358028 [DEBUG] switch_core_media.c:5533 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match + 2019-04-30 16:41:19.358028 [DEBUG] switch_core_media.c:5802 No 2833 in SDP. Disable 2833 dtmf and switch to INFO + 2019-04-30 16:41:19.358028 [DEBUG] sofia.c:8237 skemper was here in line 8232 + 2019-04-30 16:41:19.358028 [DEBUG] switch_core_media.c:8390 skemper was here in line 8390. + 2019-04-30 16:41:19.358028 [DEBUG] switch_core_media.c:8496 Audio params are unchanged for sofia/external/+called_number. + 2019-04-30 16:41:19.358028 [DEBUG] sofia.c:8243 Processing updated SDP + + This fixes the state problem after a rejected T38 reINVITE by setting + TFLAG_SDP. + + Signed-off-by: Sebastian Kemper + +--- a/src/mod/endpoints/mod_sofia/sofia.c ++++ b/src/mod/endpoints/mod_sofia/sofia.c +@@ -6501,6 +6501,7 @@ static void sofia_handle_sip_r_invite(sw + switch_channel_clear_app_flag_key("T38", tech_pvt->channel, CF_APP_T38_REQ); + switch_channel_set_app_flag_key("T38", tech_pvt->channel, CF_APP_T38_FAIL); + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s T38 invite failed\n", switch_channel_get_name(tech_pvt->channel)); ++ sofia_set_flag(tech_pvt, TFLAG_SDP); + } + + From e1b0371bcc2140fc5359c9cec0cdb1ed1d9f2a1e Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Tue, 5 Nov 2019 23:29:38 +0100 Subject: [PATCH 2/2] freeswitch-stable: update OpenSSL depend FS supports OpenSSL 1.1 but still relies on some of its deprecated symbols. This commit updates the package's depends to reflect that. Signed-off-by: Sebastian Kemper --- net/freeswitch-stable/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/freeswitch-stable/Makefile b/net/freeswitch-stable/Makefile index 9a5862f..f6d0135 100644 --- a/net/freeswitch-stable/Makefile +++ b/net/freeswitch-stable/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PRG_NAME:=freeswitch PKG_NAME:=$(PRG_NAME)-stable PKG_VERSION:=1.10.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_MAINTAINER:=Sebastian Kemper PKG_SOURCE:=$(PRG_NAME)-$(PKG_VERSION).-release.tar.xz @@ -372,6 +372,7 @@ $(call Package/$(PKG_NAME)/Default) MENU:=1 USERID:=$(PRG_NAME)=372:$(PRG_NAME)=372 DEPENDS:= \ + +@OPENSSL_WITH_DEPRECATED \ $(CXX_DEPENDS) \ $(ICONV_DEPENDS) \ +FS_STABLE_WITH_FREETYPE:libfreetype \