Merge pull request #570 from micmac1/1907fs10105

(19.07) freeswitch-stable: bump to 1.10.5
This commit is contained in:
micmac1 2020-09-17 19:15:38 +02:00 committed by GitHub
commit 10c68488ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 259 additions and 130 deletions

90
libs/sofia-sip/Makefile Normal file
View file

@ -0,0 +1,90 @@
#
# Copyright (C) 2020 Sebastian Kemper <sebastian_ml@gmx.net>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=sofia-sip
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/freeswitch/sofia-sip.git
PKG_SOURCE_DATE=2020-08-31
PKG_SOURCE_VERSION:=f6f29b483e9c31ce8d3e87419ec3deea8679312d
PKG_RELEASE:=1
PKG_MIRROR_HASH:=07b9b6198558542270699af2e31ff2331a49a5262e250cc78e3bf631dc444737
# sofia-sip adds a version to include path
# need to update this when the version changes
VERSION_EQUIVALENT:=1.13
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/sofia-sip/Default
SUBMENU:=Telephony
URL:=http://sofia-sip.sourceforge.net/index.html
endef
define Package/sofia-sip
$(call Package/sofia-sip/Default)
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Sofia-SIP open-source SIP User-Agent library
ABI_VERSION:=0
DEPENDS:= \
+libopenssl \
+zlib
endef
define Package/sofia-sip/description
Sofia-SIP is an open-source SIP User-Agent library, compliant with the
IETF RFC3261 specification (see the feature table). It can be used as a
building block for SIP client software for uses such as VoIP, IM, and
many other real-time and person-to-person communication services. The
primary target platform for Sofia-SIP is GNU/Linux. Sofia-SIP is based
on a SIP stack developed at the Nokia Research Center. Sofia-SIP is
licensed under the LGPL.
endef
CONFIGURE_ARGS+= \
--disable-stun \
--without-doxygen \
--without-glib
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/sofia-sip-$(VERSION_EQUIVALENT)/sofia-{sip,resolv} \
$(1)/usr/share/sofia-sip
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/usr/include/sofia-sip-$(VERSION_EQUIVALENT)/sofia-sip/*.h{,.in} \
$(1)/usr/include/sofia-sip-$(VERSION_EQUIVALENT)/sofia-sip
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/usr/include/sofia-sip-$(VERSION_EQUIVALENT)/sofia-resolv/*.h \
$(1)/usr/include/sofia-sip-$(VERSION_EQUIVALENT)/sofia-resolv
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsofia-sip-ua.{a,so*} $(1)/usr/lib
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sofia-sip-ua.pc \
$(1)/usr/lib/pkgconfig
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/sofia-sip/{msg_parser,tag_dll}.awk \
$(1)/usr/share/sofia-sip
endef
define Package/sofia-sip/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsofia-sip-ua.so.$(ABI_VERSION)* \
$(1)/usr/lib
endef
$(eval $(call BuildPackage,sofia-sip))

View file

@ -1,6 +1,6 @@
--- a/libs/sofia-sip/configure.ac
+++ b/libs/sofia-sip/configure.ac
@@ -250,7 +250,7 @@ SAC_OPENSSL
--- a/configure.ac
+++ b/configure.ac
@@ -247,7 +247,7 @@ SAC_OPENSSL
SAC_TPORT
dnl Check is used for testing

74
libs/spandsp3/Makefile Normal file
View file

@ -0,0 +1,74 @@
#
# Copyright (C) 2020 Sebastian Kemper <sebastian_ml@gmx.net>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=spandsp3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/freeswitch/spandsp.git
PKG_SOURCE_DATE=2020-08-14
PKG_SOURCE_VERSION:=6ec23e5a7e411a22d59e5678d12c4d2942c4a4b6
PKG_RELEASE:=1
PKG_MIRROR_HASH:=fcfa13576a25ff27e3746c3db30de89d2afceb963072b352a34e7a4a9f492ae5
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
PKG_LICENSE:=LGPL-2.1-or-later GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:= \
Jiri Slachta <jiri@slachta.eu> \
Sebastian Kemper <sebastian_ml@gmx.net>
include $(INCLUDE_DIR)/package.mk
define Package/libspandsp3
SUBMENU:=Telephony
SECTION:=libs
CATEGORY:=Libraries
TITLE:=spandsp3 library
DEPENDS:=+libjpeg +libtiff
URL:=https://github.com/freeswitch/spandsp
ABI_VERSION:=3
endef
# Use fixed point math when soft float support is enabled for target devices.
ifeq ($(CONFIG_SOFT_FLOAT),y)
CONFIGURE_ARGS+= \
--enable-fixed-point
endif
define Build/InstallDev
$(INSTALL_DIR) \
$(1)/usr/lib/spandsp3/{include/spandsp/private,lib}
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libspandsp* \
$(1)/usr/lib/spandsp3/lib
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/spandsp.h \
$(1)/usr/lib/spandsp3/include
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/spandsp/*.h \
$(1)/usr/lib/spandsp3/include/spandsp
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/spandsp/private/*.h \
$(1)/usr/lib/spandsp3/include/spandsp/private
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/spandsp.pc \
$(1)/usr/lib/pkgconfig/spandsp3.pc
endef
define Package/libspandsp3/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libspandsp.so.$(ABI_VERSION)* \
$(1)/usr/lib
endef
$(eval $(call BuildPackage,libspandsp3))

View file

@ -0,0 +1,18 @@
--- a/spandsp.pc.in
+++ b/spandsp.pc.in
@@ -1,12 +1,12 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
+libdir=${exec_prefix}/lib/spandsp3/lib
+includedir=${prefix}/lib/spandsp3/include
Name: spandsp
Description: A DSP library for telephony.
Requires:
Version: @VERSION@
-Libs: -L${libdir} -lspandsp
+Libs: -L${libdir} -l:libspandsp.so.3
Libs.private: -ltiff -lm
Cflags: -I${includedir}

View file

@ -9,29 +9,25 @@ include $(TOPDIR)/rules.mk
PRG_NAME:=freeswitch
PKG_NAME:=$(PRG_NAME)-stable
PKG_VERSION:=1.10.3
PKG_RELEASE:=2
PKG_VERSION:=1.10.5
PKG_RELEASE:=1
PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
PKG_SOURCE:=$(PRG_NAME)-$(PKG_VERSION).-release.tar.xz
PKG_SOURCE_URL:=https://files.$(PRG_NAME).org/releases/$(PRG_NAME)
PKG_HASH:=2d7db07a64ee2f19f9b6e3a4ce76fa42e0fe46c29d95edf1b690a3df3729f307
PKG_HASH:=3e26600767a82946eca94af2c8f14712783aa83db5fb1cc57585f544aecce327
PKG_CPE_ID:=cpe:/a:freeswitch:freeswitch
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PRG_NAME)-$(PKG_VERSION).-release
# configure in libs/spandsp fails without libjpeg and tiff
PKG_BUILD_DEPENDS:= \
libjpeg \
tiff \
perl/host \
python/host
PKG_FIXUP:=autoreconf
# With mod_ssml and mod_rayo enabled the parallel compiles always failed
PKG_BUILD_PARALLEL:=0
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_LICENSE:= \
@ -281,6 +277,10 @@ endef
$$(eval $$(call Download,$(1)))
endef
define Package/$(PKG_NAME)/enable/plugin
$(SED) '/$(1)$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf
endef
define Package/$(PKG_NAME)/install/bin
$(INSTALL_DIR) $(1)$(FS_STABLE_BIN_DIR)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)$(FS_STABLE_BIN_DIR)/$(2) \
@ -347,7 +347,7 @@ endef
define Package/$(PKG_LIBFTDM)/FTModule
define Package/$(PKG_LIBFTDM)-ftmod-$(subst _,-,$(1))
$(call Package/$(PKG_LIBFTDM)/Default)
DEPENDS:=PACKAGE_$(PKG_LIBFTDM)-ftmod-$(subst _,-,$(1)):$(PKG_LIBFTDM) \
DEPENDS:=$(PKG_LIBFTDM) \
$(patsubst +%,+PACKAGE_$(PKG_LIBFTDM)-ftmod-$(subst _,-,$(1)):%,$(4))
TITLE:=$(2) FreeTDM module
endef
@ -384,10 +384,12 @@ $(call Package/$(PKG_NAME)/Default)
+libpcre \
+libpthread \
+librt \
+libspandsp3 \
+libspeex \
+libspeexdsp \
+libsqlite3 \
+libuuid \
+sofia-sip \
+zlib
CONFLICTS:=$(PRG_NAME)
endef
@ -659,13 +661,6 @@ CONFIGURE_ARGS+= \
--with-erlang=no
endif
# Make mod_spandsp use fixed point math when soft float support is
# enabled on target devices.
ifeq ($(CONFIG_SOFT_FLOAT),y)
CONFIGURE_ARGS+= \
--enable-fixed-point
endif
# FreeSWITCH dropped postgresql support from the core. postgresql
# support is now available via mod_pgsql. We still need to pass
# '--without-pgsql', otherwise apr-util links to libpq and we still
@ -811,27 +806,36 @@ define Build/Configure
$(SED) '/^#/!s/^/#/' $(PKG_BUILD_DIR)/modules.conf
$(foreach m,$(FS_STABLE_MOD_AVAILABLE),
$(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-$(subst _,-,$(m))),
$(SED) '/mod_$(m)$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf))
$(call Package/$(PKG_NAME)/enable/plugin,mod_$(m))))
# Some of the dependencies that necessitate below hacks are documented in
# src/mod/Makefile.am.
# Hack for misc-grammar - needs mod_pocketsphinx to provide grammar files
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-grammar),)
ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-pocketsphinx),)
$(SED) '/mod_pocketsphinx$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf
endif
$(call Package/$(PKG_NAME)/enable/plugin,mod_pocketsphinx)
endif
# Hack for mod_gsmopen - it has a build-time dep on mod_spandsp
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-gsmopen),)
ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-spandsp),)
$(SED) '/mod_spandsp$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf
$(call Package/$(PKG_NAME)/enable/plugin,mod_spandsp)
endif
# Hack for mod_rayo - it has a build-time dep on mod_dingaling
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-rayo),)
$(call Package/$(PKG_NAME)/enable/plugin,mod_dingaling)
endif
# Hack for mod_ssml - it has a build-time dep on mod_rayo. And mod_rayo needs
# mod_dingaling :)
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-ssml),)
$(call Package/$(PKG_NAME)/enable/plugin,mod_rayo)
$(call Package/$(PKG_NAME)/enable/plugin,mod_dingaling)
endif
# Hack for mod_unimrcp - it has a build-time dep on mod_sofia
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-unimrcp),)
ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-sofia),)
$(SED) '/mod_sofia$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf
endif
$(call Package/$(PKG_NAME)/enable/plugin,mod_sofia)
endif
$(call Build/Configure/Default)

View file

@ -82,42 +82,6 @@
#Set default language
AC_LANG_C
--- a/libs/sofia-sip/configure.ac
+++ b/libs/sofia-sip/configure.ac
@@ -13,9 +13,12 @@ dnl ---------------------------
dnl update both the version for AC_INIT and the LIBSOFIA_SIP_UA_MAJOR_MINOR
AC_INIT([sofia-sip], [1.12.10devel])
-CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
-CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
-LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
+m4_include(../apr/build/apr_common.m4)
+
+APR_ADDTO(CFLAGS, [$CONFIGURE_CFLAGS])
+APR_ADDTO(CPPFLAGS, [$CONFIGURE_CPPFLAGS])
+APR_ADDTO(CXXFLAGS, [$CONFIGURE_CXXFLAGS])
+APR_ADDTO(LDFLAGS, [$CONFIGURE_LDFLAGS])
AC_CONFIG_SRCDIR([libsofia-sip-ua/sip/sofia-sip/sip.h])
AC_CONFIG_MACRO_DIR([m4])
--- a/libs/spandsp/configure.ac
+++ b/libs/spandsp/configure.ac
@@ -21,9 +21,12 @@
AC_PREREQ([2.59])
AC_INIT([spandsp], [1.99.0])
-CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
-CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
-LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
+m4_include(../apr/build/apr_common.m4)
+
+APR_ADDTO(CFLAGS, [$CONFIGURE_CFLAGS])
+APR_ADDTO(CPPFLAGS, [$CONFIGURE_CPPFLAGS])
+APR_ADDTO(CXXFLAGS, [$CONFIGURE_CXXFLAGS])
+APR_ADDTO(LDFLAGS, [$CONFIGURE_LDFLAGS])
SPANDSP_LT_CURRENT=3
SPANDSP_LT_REVISION=0
--- a/libs/srtp/configure.ac
+++ b/libs/srtp/configure.ac
@@ -3,9 +3,12 @@ AC_INIT(srtp, 1.4.2, mcgrew@cisco.com)

View file

@ -0,0 +1,10 @@
--- a/src/mod/applications/mod_spandsp/Makefile.am
+++ b/src/mod/applications/mod_spandsp/Makefile.am
@@ -4,6 +4,6 @@ MODNAME=mod_spandsp
mod_LTLIBRARIES = mod_spandsp.la
mod_spandsp_la_SOURCES = mod_spandsp.c udptl.c mod_spandsp_fax.c mod_spandsp_dsp.c mod_spandsp_codecs.c mod_spandsp_modem.c
mod_spandsp_la_CFLAGS = $(AM_CFLAGS)
-mod_spandsp_la_CPPFLAGS = $(SPANDSL_CFLAGS) -I.
+mod_spandsp_la_CPPFLAGS = $(SPANDSP_CFLAGS) -I.
mod_spandsp_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(SPANDSP_LIBS) -ljpeg -lz -ltiff
mod_spandsp_la_LDFLAGS = -avoid-version -module -no-undefined -shared

View file

@ -0,0 +1,24 @@
--- a/src/mod/endpoints/mod_gsmopen/Makefile.am
+++ b/src/mod/endpoints/mod_gsmopen/Makefile.am
@@ -1,19 +1,9 @@
include $(top_srcdir)/build/modmake.rulesam
MODNAME=mod_gsmopen
-SPANDSP_DIR=$(switch_srcdir)/libs/spandsp
-SPANDSP_BUILDDIR=$(switch_builddir)/libs/spandsp
-SPANDSP_LA=$(SPANDSP_BUILDDIR)/src/libspandsp.la
-
mod_LTLIBRARIES = mod_gsmopen.la
mod_gsmopen_la_SOURCES = mod_gsmopen.cpp gsmopen_protocol.cpp
mod_gsmopen_la_CXXFLAGS = $(SWITCH_AM_CXXFLAGS)
-mod_gsmopen_la_CPPFLAGS = -I$(SPANDSP_DIR)/src -I$(SPANDSP_BUILDDIR)/src -I.
-mod_gsmopen_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(SPANDSP_LA)
+mod_gsmopen_la_CPPFLAGS = $(SPANDSP_CFLAGS) -I.
+mod_gsmopen_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(SPANDSP_LIBS)
mod_gsmopen_la_LDFLAGS = -avoid-version -module -no-undefined -lctb-0.16 -lgsmme
-
-BUILT_SOURCES = $(SPANDSP_LA)
-
-$(SPANDSP_LA): $(SPANDSP_DIR) $(SPANDSP_DIR)/.update
- cd $(SPANDSP_BUILDDIR) && $(MAKE) CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)"
- $(TOUCH_TARGET)

View file

@ -0,0 +1,11 @@
--- a/configure.ac
+++ b/configure.ac
@@ -703,7 +703,7 @@ PKG_CHECK_MODULES([MARIADB], [libmariadb
])
])
-PKG_CHECK_MODULES([SPANDSP], [spandsp >= 3.0],[
+PKG_CHECK_MODULES([SPANDSP], [spandsp3 >= 3.0],[
AM_CONDITIONAL([HAVE_SPANDSP],[true])],[
AC_MSG_ERROR([no usable spandsp; please install spandsp3 devel package or equivalent])
])

View file

@ -1,66 +0,0 @@
commit 167294ea2649afd0ffedf4520b0f308979c3ca2a
Author: Sebastian Kemper <sebastian_ml@gmx.net>
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 <sebastian_ml@gmx.net>
--- a/src/mod/endpoints/mod_sofia/sofia.c
+++ b/src/mod/endpoints/mod_sofia/sofia.c
@@ -6512,6 +6512,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);
}