commit
2e21cfdd9e
25 changed files with 752 additions and 150 deletions
12
libs/freetdm/Config.in
Normal file
12
libs/freetdm/Config.in
Normal file
|
@ -0,0 +1,12 @@
|
|||
menu "Configuration"
|
||||
depends on PACKAGE_freetdm
|
||||
|
||||
config FREETDM_WITH_DEBUG
|
||||
bool "Compile with debug information"
|
||||
default n
|
||||
help
|
||||
Enable extra debug codepaths, like asserts and extra output. If you
|
||||
want to get meaningful backtraces see
|
||||
https://wiki.openwrt.org/doc/devel/debugging for starting points.
|
||||
|
||||
endmenu
|
167
libs/freetdm/Makefile
Normal file
167
libs/freetdm/Makefile
Normal file
|
@ -0,0 +1,167 @@
|
|||
#
|
||||
# Copyright (C) 2021 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:=freetdm
|
||||
PKG_RELEASE:=1
|
||||
PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/freeswitch/freetdm.git
|
||||
PKG_SOURCE_DATE:=2021-08-30
|
||||
PKG_SOURCE_VERSION:=8918ee1c3637cad0f9d41a402d26d3aa076fc202
|
||||
PKG_MIRROR_HASH:=c910ff0fb62c8a174f6e0bbd749783da1ecd71634d4dcde48b118909f4981943
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:= \
|
||||
BSD-2-Clause \
|
||||
BSD-3-Clause \
|
||||
BSD-4-Clause \
|
||||
GPL-2.0+ \
|
||||
MIT/X11 (BSD like) \
|
||||
MPL-1.1
|
||||
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_BUILD_DEPENDS:=freeswitch
|
||||
|
||||
FS_EXAMPLES_DIR:=/usr/share/freeswitch/examples
|
||||
FS_LIB_DIR:=/usr/lib
|
||||
FS_MOD_DIR:=$(FS_LIB_DIR)/freeswitch/mod
|
||||
FS_PKGCONFIG_DIR:=$(FS_LIB_DIR)/pkgconfig
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_FT_WITH_DEBUG \
|
||||
CONFIG_LIBC \
|
||||
CONFIG_PACKAGE_libfreetdm-ftmod-libpri \
|
||||
CONFIG_PACKAGE_libfreetdm-ftmod-pritap \
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libfreetdm/install/ftmod
|
||||
$(INSTALL_DIR) $(1)$(FS_MOD_DIR)
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)$(FS_MOD_DIR)/ftmod_$(2).so \
|
||||
$(1)$(FS_MOD_DIR)
|
||||
endef
|
||||
|
||||
define Package/freetdm/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/libfreetdm/Default
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
SUBMENU:=Telephony
|
||||
URL:=https://www.freeswitch.org
|
||||
endef
|
||||
|
||||
define Package/libfreetdm
|
||||
$(call Package/libfreetdm/Default)
|
||||
DEPENDS:=
|
||||
TITLE:=TDM signaling and media API
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
define Package/libfreetdm/description
|
||||
Provides a unified interface to hardware TDM cards and SS7 stacks.
|
||||
endef
|
||||
|
||||
define Package/libfreetdm/install
|
||||
$(INSTALL_DIR) $(1)$(FS_LIB_DIR)
|
||||
$(CP) $(PKG_INSTALL_DIR)$(FS_LIB_DIR)/libfreetdm.so.* \
|
||||
$(1)$(FS_LIB_DIR)
|
||||
endef
|
||||
|
||||
define Package/freeswitch-mod-freetdm
|
||||
$(call Package/libfreetdm/Default)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Telephony
|
||||
DEPENDS:=freeswitch +libfreetdm
|
||||
TITLE:=FreeTDM endpoint module
|
||||
endef
|
||||
|
||||
define Package/freeswitch-mod-freetdm/description
|
||||
This module is the glue between FreeSWITCH and FreeTDM.
|
||||
endef
|
||||
|
||||
define Package/freeswitch-mod-freetdm/install
|
||||
$(INSTALL_DIR) $(1)$(FS_MOD_DIR)
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)$(FS_MOD_DIR)/mod_freetdm.so \
|
||||
$(1)$(FS_MOD_DIR)
|
||||
ifeq ($(CONFIG_FS_WITH_MODCONF),y)
|
||||
$(INSTALL_DIR) \
|
||||
$(1)$(FS_EXAMPLES_DIR)/mod_freetdm/freeswitch/autoload_configs
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/*.conf \
|
||||
$(1)$(FS_EXAMPLES_DIR)/mod_freetdm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_INSTALL_DIR)/etc/freeswitch/autoload_configs/freetdm.conf.xml \
|
||||
$(1)$(FS_EXAMPLES_DIR)/mod_freetdm/freeswitch/autoload_configs
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/libfreetdm/FTModule
|
||||
define Package/libfreetdm-ftmod-$(subst _,-,$(1))
|
||||
$(call Package/libfreetdm/Default)
|
||||
DEPENDS:=libfreetdm \
|
||||
$(patsubst +%,+PACKAGE_libfreetdm-ftmod-$(subst _,-,$(1)):%,$(4))
|
||||
TITLE:=$(2) FreeTDM module
|
||||
endef
|
||||
define Package/libfreetdm-ftmod-$(subst _,-,$(1))/description
|
||||
$(subst \n,$(newline),$(3))
|
||||
endef
|
||||
define Package/libfreetdm-ftmod-$(subst _,-,$(1))/install
|
||||
$(call Package/libfreetdm/install/ftmod,$$(1),$(1))
|
||||
endef
|
||||
$$(eval $$(call BuildPackage,libfreetdm-ftmod-$(subst _,-,$(1))))
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS+= \
|
||||
--srcdir=$(PKG_BUILD_DIR) \
|
||||
--disable-dependency-tracking \
|
||||
--disable-static \
|
||||
--with-modinstdir=$(FS_MOD_DIR) \
|
||||
$(call autoconf_bool,CONFIG_FREETDM_WITH_DEBUG,debug) \
|
||||
$(if $(CONFIG_PACKAGE_libfreetdm-ftmod-libpri),--with-libpri="$(STAGING_DIR)/usr",--without-libpri) \
|
||||
$(if $(CONFIG_PACKAGE_libfreetdm-ftmod-pritap),--with-pritap,--without-pritap)
|
||||
|
||||
define Build/InstallDev/libfreetdm
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_INSTALL_DIR)$(FS_PKGCONFIG_DIR)/freetdm.pc \
|
||||
$(1)$(FS_PKGCONFIG_DIR)
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)$(FS_PKGCONFIG_DIR)
|
||||
$(call Build/InstallDev/libfreetdm,$(1))
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libfreetdm))
|
||||
$(eval $(call BuildPackage,freeswitch-mod-freetdm))
|
||||
|
||||
################################
|
||||
# FreeTDM modules
|
||||
# Params:
|
||||
# 1 - Package subname
|
||||
# 2 - Package title
|
||||
# 3 - Module description
|
||||
# 4 - Module dependencies
|
||||
################################
|
||||
|
||||
$(eval $(call Package/libfreetdm/FTModule,analog,Analog,Offers generic FXO/FXS support for any type of card supported by FreeTDM.,))
|
||||
$(eval $(call Package/libfreetdm/FTModule,analog_em,Analog EM,Offers generic E&M signaling for any type of card supported by FreeTDM.,))
|
||||
$(eval $(call Package/libfreetdm/FTModule,libpri,LibPRI,Offers support for PRI lines using the open source libpri stack for any\ntype of card supported by FreeTDM. Supports both PRI and BRI signalling.,+libpri @!aarch64))
|
||||
$(eval $(call Package/libfreetdm/FTModule,pritap,PRI tapping,This module is used to tap PRI lines.,+libfreetdm-ftmod-libpri))
|
||||
$(eval $(call Package/libfreetdm/FTModule,skel,Skeleton,ftmod_skel is an example module.,))
|
||||
$(eval $(call Package/libfreetdm/FTModule,zt,DAHDI I/O,This module supports the DAHDI interface. The DAHDI interface is used by\nseveral hardware vendors.,))
|
|
@ -1,5 +1,5 @@
|
|||
--- a/libs/freetdm/configure.ac
|
||||
+++ b/libs/freetdm/configure.ac
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -88,7 +88,7 @@ AC_ARG_ENABLE([enable_64],
|
||||
|
||||
case "${ax_cv_c_compiler_vendor}" in
|
|
@ -1,5 +1,5 @@
|
|||
--- a/libs/freetdm/mod_freetdm/Makefile.in
|
||||
+++ b/libs/freetdm/mod_freetdm/Makefile.in
|
||||
--- a/mod_freetdm/Makefile.in
|
||||
+++ b/mod_freetdm/Makefile.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-FT_CFLAGS=@CFLAGS@ @COMP_VENDOR_CFLAGS@ @DEFS@
|
||||
+FT_CFLAGS=@COMP_VENDOR_CFLAGS@ @DEFS@
|
10
libs/freetdm/patches/300-install-missing_dir.patch
Normal file
10
libs/freetdm/patches/300-install-missing_dir.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -284,6 +284,7 @@ dox doxygen:
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(prefix)
|
||||
$(mkinstalldirs) $(DESTDIR)@confdir@
|
||||
+ $(mkinstalldirs) $(DESTDIR)@fsconfdir@/autoload_configs
|
||||
@[ -f "$(DESTDIR)@confdir@/freetdm.conf" ] || ( cp conf/*.conf $(DESTDIR)@confdir@)
|
||||
@[ -f "$(DESTDIR)@fsconfdir@/autoload_configs/freetdm.conf.xml" ] || ( cp -f conf/freetdm.conf.xml $(DESTDIR)@fsconfdir@/autoload_configs)
|
||||
@echo FreeTDM Installed
|
|
@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=sofia-sip
|
||||
|
||||
PKG_VERSION:=1.13.4
|
||||
PKG_VERSION:=1.13.6
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/freeswitch/$(PKG_NAME)/tar.gz/v${PKG_VERSION}?
|
||||
PKG_HASH:=3f3f7b7b26cc150dae7e1cae95a0fe2c65905311fe143145b4bcda8f97d7ed4e
|
||||
PKG_HASH:=6f3cb48a35929abd3454087b32ad4c75fa5fe50fab8a9cc6f98559e6fd1bd64b
|
||||
|
||||
# sofia-sip adds a version to include path
|
||||
# need to update this when the version changes
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
commit d2cc5ce437880ca135ef8ee857cf41ba58981675
|
||||
Author: Andrey Volk <andywolk@gmail.com>
|
||||
Date: Thu Jun 24 19:18:45 2021 +0300
|
||||
|
||||
Update library version information back to 6:0:6
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -22,9 +22,9 @@ AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_SUBST(VER_LIBSOFIA_SIP_UA_MAJOR_MINOR, [1.13])
|
||||
dnl Includedir specific to this sofia version
|
||||
AC_SUBST(include_sofiadir, '${includedir}/sofia-sip-1.13')
|
||||
-AC_SUBST(LIBVER_SOFIA_SIP_UA_CUR, [4])
|
||||
+AC_SUBST(LIBVER_SOFIA_SIP_UA_CUR, [6])
|
||||
AC_SUBST(LIBVER_SOFIA_SIP_UA_REV, [0])
|
||||
-AC_SUBST(LIBVER_SOFIA_SIP_UA_AGE, [4])
|
||||
+AC_SUBST(LIBVER_SOFIA_SIP_UA_AGE, [6])
|
||||
AC_SUBST(LIBVER_SOFIA_SIP_UA_SOVER, [0]) # CUR-AGE
|
||||
AC_SUBST(LIBVER_SOFIA_SIP_UA_GLIB_CUR, [3])
|
||||
AC_SUBST(LIBVER_SOFIA_SIP_UA_GLIB_REV, [0])
|
|
@ -8,13 +8,13 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=freeswitch
|
||||
PKG_VERSION:=1.10.6
|
||||
PKG_RELEASE:=5
|
||||
PKG_VERSION:=1.10.7
|
||||
PKG_RELEASE:=1
|
||||
PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
|
||||
|
||||
PKG_SOURCE:=freeswitch-$(PKG_VERSION).-release.tar.xz
|
||||
PKG_SOURCE_URL:=https://files.freeswitch.org/releases/freeswitch
|
||||
PKG_HASH:=9a08d4e184e6d715e1c12c43a0f901597151752ef236f0a37e40996272b5c38d
|
||||
PKG_HASH:=0919bddc2ea9cab2e4944314e71637bea9dd4f40d510722a74ea032104594c41
|
||||
|
||||
PKG_CPE_ID:=cpe:/a:freeswitch:freeswitch
|
||||
|
||||
|
@ -115,7 +115,6 @@ FS_MOD_AVAILABLE:= \
|
|||
fail2ban \
|
||||
fifo \
|
||||
format_cdr \
|
||||
freetdm \
|
||||
fsk \
|
||||
fsv \
|
||||
g723_1 \
|
||||
|
@ -152,6 +151,7 @@ FS_MOD_AVAILABLE:= \
|
|||
portaudio_stream \
|
||||
posix_timer \
|
||||
prefix \
|
||||
python3 \
|
||||
radius_cdr \
|
||||
random \
|
||||
raven \
|
||||
|
@ -224,10 +224,8 @@ PKG_CONFIG_DEPENDS:= \
|
|||
CONFIG_FS_WITH_VPX \
|
||||
CONFIG_FS_WITH_ZRTP \
|
||||
CONFIG_LIBC \
|
||||
CONFIG_PACKAGE_libfreetdm \
|
||||
CONFIG_PACKAGE_libfreetdm-ftmod-libpri \
|
||||
CONFIG_PACKAGE_libfreetdm-ftmod-pritap \
|
||||
CONFIG_PACKAGE_freeswitch-misc-perl-esl \
|
||||
CONFIG_PACKAGE_freeswitch-misc-python3-esl \
|
||||
CONFIG_SOFT_FLOAT
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
@ -236,6 +234,7 @@ include $(INCLUDE_DIR)/nls.mk
|
|||
|
||||
FS_PERL_FEED:=$(TOPDIR)/feeds/packages/lang/perl
|
||||
|
||||
include $(TOPDIR)/feeds/packages/lang/python/python3-host.mk
|
||||
include $(FS_PERL_FEED)/perlver.mk
|
||||
|
||||
PERL_SITELIB:=/usr/lib/perl$(PERL_MAJOR)/$(PERL_VERSION2)
|
||||
|
@ -244,6 +243,8 @@ FS_PERL_LIBS:=$(shell grep "^libs=" \
|
|||
$(FS_PERL_FEED)/files/base.config | \
|
||||
sed "s/^libs=//;s/'//g")
|
||||
|
||||
FS_PYTHON3_SITE_DIR:=$(FS_LIB_DIR)/python$(PYTHON3_VERSION)/site-packages
|
||||
|
||||
define Download/files
|
||||
define Download/$(1)
|
||||
FILE:=$(2)
|
||||
|
@ -279,12 +280,6 @@ define Package/freeswitch/install/dir
|
|||
done
|
||||
endef
|
||||
|
||||
define Package/libfreetdm/install/ftmod
|
||||
$(INSTALL_DIR) $(1)$(FS_MOD_DIR)
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)$(FS_MOD_DIR)/ftmod_$(2).so \
|
||||
$(1)$(FS_MOD_DIR)
|
||||
endef
|
||||
|
||||
define Package/freeswitch/install/lib
|
||||
$(INSTALL_DIR) $(1)$(FS_LIB_DIR)
|
||||
$(CP) $(PKG_INSTALL_DIR)$(FS_LIB_DIR)/$(2).so.* \
|
||||
|
@ -301,45 +296,6 @@ define Package/freeswitch/config
|
|||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/libfreetdm/Default
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
SUBMENU:=Telephony
|
||||
URL:=https://www.freeswitch.org
|
||||
endef
|
||||
|
||||
define Package/libfreetdm
|
||||
$(call Package/libfreetdm/Default)
|
||||
DEPENDS:=
|
||||
TITLE:=TDM signaling and media API
|
||||
MENU:=1
|
||||
URL:=https://www.freeswitch.org
|
||||
endef
|
||||
|
||||
define Package/libfreetdm/description
|
||||
Provides a unified interface to hardware TDM cards and SS7 stacks.
|
||||
endef
|
||||
|
||||
define Package/libfreetdm/install
|
||||
$(call Package/freeswitch/install/lib,$(1),libfreetdm)
|
||||
endef
|
||||
|
||||
define Package/libfreetdm/FTModule
|
||||
define Package/libfreetdm-ftmod-$(subst _,-,$(1))
|
||||
$(call Package/libfreetdm/Default)
|
||||
DEPENDS:=libfreetdm \
|
||||
$(patsubst +%,+PACKAGE_libfreetdm-ftmod-$(subst _,-,$(1)):%,$(4))
|
||||
TITLE:=$(2) FreeTDM module
|
||||
endef
|
||||
define Package/libfreetdm-ftmod-$(subst _,-,$(1))/description
|
||||
$(subst \n,$(newline),$(3))
|
||||
endef
|
||||
define Package/libfreetdm-ftmod-$(subst _,-,$(1))/install
|
||||
$(call Package/libfreetdm/install/ftmod,$$(1),$(1))
|
||||
endef
|
||||
$$(eval $$(call BuildPackage,libfreetdm-ftmod-$(subst _,-,$(1))))
|
||||
endef
|
||||
|
||||
define Package/freeswitch/Default
|
||||
SUBMENU:=Telephony
|
||||
SECTION:=net
|
||||
|
@ -461,6 +417,27 @@ define Package/freeswitch-misc-perl-esl/install
|
|||
$(1)$(PERL_SITELIB)/ESL
|
||||
endef
|
||||
|
||||
define Package/freeswitch-misc-python3-esl
|
||||
$(call Package/freeswitch/Default)
|
||||
TITLE:=Python3 ESL
|
||||
DEPENDS:=freeswitch +PACKAGE_freeswitch-misc-python3-esl:python3-light
|
||||
endef
|
||||
|
||||
define Package/freeswitch-misc-python3-esl/description
|
||||
This package contains the Python3 binding for FreeSWITCH's Event Socket
|
||||
Library (ESL).
|
||||
endef
|
||||
|
||||
define Package/freeswitch-misc-python3-esl/install
|
||||
$(INSTALL_DIR) $(1)$(FS_PYTHON3_SITE_DIR)
|
||||
$(INSTALL_BIN) \
|
||||
$(PKG_INSTALL_DIR)$(FS_PYTHON3_SITE_DIR)/_ESL.so \
|
||||
$(1)$(FS_PYTHON3_SITE_DIR)
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_INSTALL_DIR)$(FS_PYTHON3_SITE_DIR)/ESL.py \
|
||||
$(1)$(FS_PYTHON3_SITE_DIR)
|
||||
endef
|
||||
|
||||
define Package/freeswitch-misc-timezones
|
||||
$(call Package/freeswitch/Default)
|
||||
TITLE:=Timezones file
|
||||
|
@ -558,6 +535,12 @@ ifeq ($(1),perl)
|
|||
$(PKG_INSTALL_DIR)/usr/perl/freeswitch.pm \
|
||||
$$(1)$(PERL_SITELIB)
|
||||
endif
|
||||
ifeq ($(1),python3)
|
||||
$(INSTALL_DIR) $$(1)$(FS_PYTHON3_SITE_DIR)
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_INSTALL_DIR)$(FS_PYTHON3_SITE_DIR)/freeswitch.py \
|
||||
$$(1)$(FS_PYTHON3_SITE_DIR)
|
||||
endif
|
||||
endef
|
||||
$$(eval $$(call BuildPackage,freeswitch-mod-$(subst _,-,$(1))))
|
||||
endef
|
||||
|
@ -603,9 +586,15 @@ CONFIGURE_ARGS+= \
|
|||
$(if $(CONFIG_FS_WITH_FREETYPE),,--without-freetype) \
|
||||
$(if $(CONFIG_FS_WITH_ODBC),--with-odbc-lib="$(STAGING_DIR)$(FS_LIB_DIR)") \
|
||||
$(if $(CONFIG_FS_WITH_ODBC),--with-odbc="$(STAGING_DIR)/usr") \
|
||||
$(if $(CONFIG_FS_WITH_PNG),,--without-png) \
|
||||
$(if $(CONFIG_PACKAGE_libfreetdm-ftmod-libpri),--with-libpri="$(STAGING_DIR)/usr",--without-libpri) \
|
||||
$(if $(CONFIG_PACKAGE_libfreetdm-ftmod-pritap),--with-pritap,--without-pritap)
|
||||
$(if $(CONFIG_FS_WITH_PNG),,--without-png)
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_freeswitch-misc-python3-esl)$(CONFIG_PACKAGE_freeswitch-mod-python3),)
|
||||
CONFIGURE_ARGS+= \
|
||||
--with-python3=$(STAGING_DIR_HOST)/bin/python3
|
||||
else
|
||||
CONFIGURE_ARGS+= \
|
||||
--with-python3=no
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PACKAGE_freeswitch-mod-erlang-event)$(CONFIG_PACKAGE_freeswitch-mod-kazoo),)
|
||||
CONFIGURE_ARGS+= \
|
||||
|
@ -678,6 +667,15 @@ CONFIGURE_VARS+= \
|
|||
ac_cv_prog_PERL=false
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_freeswitch-misc-python3-esl)$(CONFIG_PACKAGE_freeswitch-mod-python3),)
|
||||
CONFIGURE_VARS+= \
|
||||
PYTHON3_CFLAGS="-I$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION)" \
|
||||
PYTHON3_LDFLAGS="-lpython$(PYTHON3_VERSION)" \
|
||||
PYTHON3_LIB="python$(PYTHON3_VERSION)" \
|
||||
PYTHON3_LIBDIR="$(FS_LIB_DIR)" \
|
||||
PYTHON3_SITE_DIR="$(FS_PYTHON3_SITE_DIR)"
|
||||
endif
|
||||
|
||||
# mod_radius_cdr runs configure in libs/freeradius-client. Let
|
||||
# freeradius-client know /dev/urandom is available on target devices.
|
||||
MAKE_VARS+= \
|
||||
|
@ -799,61 +797,41 @@ ifneq ($(CONFIG_PACKAGE_freeswitch-mod-radius-cdr),)
|
|||
$(CP) $(DL_DIR)/$(FS_FREERADIUS_CLIENT_FILE) $(PKG_BUILD_DIR)/libs
|
||||
endif
|
||||
|
||||
# Compile FreeTDM first
|
||||
ifneq ($(CONFIG_PACKAGE_libfreetdm),)
|
||||
$(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/freetdm)
|
||||
endif
|
||||
ifneq ($(CONFIG_PACKAGE_freeswitch),)
|
||||
$(call Build/Compile/Default)
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_freeswitch-misc-perl-esl),)
|
||||
$(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl perlmod)
|
||||
endif
|
||||
ifneq ($(CONFIG_PACKAGE_freeswitch-misc-python3-esl),)
|
||||
$(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl py3mod)
|
||||
endif
|
||||
endef
|
||||
|
||||
define Build/Install
|
||||
# Again, FreeTDM first
|
||||
ifneq ($(CONFIG_PACKAGE_libfreetdm),)
|
||||
$(call Build/Install/Default,-C $(PKG_BUILD_DIR)/libs/freetdm install)
|
||||
endif
|
||||
ifneq ($(CONFIG_PACKAGE_freeswitch),)
|
||||
$(call Build/Install/Default)
|
||||
endif
|
||||
ifneq ($(CONFIG_PACKAGE_freeswitch-misc-perl-esl),)
|
||||
$(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl DESTDIR=$(PKG_INSTALL_DIR) perlmod-install)
|
||||
endif
|
||||
ifneq ($(CONFIG_PACKAGE_freeswitch-misc-python3-esl),)
|
||||
$(call Build/Install/Default,-C $(PKG_BUILD_DIR)/libs/esl py3mod-install)
|
||||
endif
|
||||
endef
|
||||
|
||||
define Build/InstallDev/libfreetdm
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_INSTALL_DIR)$(FS_PKGCONFIG_DIR)/freetdm.pc \
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)$(FS_INCLUDES_DIR) $(1)$(FS_LIB_DIR) \
|
||||
$(1)$(FS_PKGCONFIG_DIR)
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include
|
||||
endef
|
||||
|
||||
define Build/InstallDev/freeswitch
|
||||
$(INSTALL_DIR) $(1)$(FS_INCLUDES_DIR)
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)$(FS_INCLUDES_DIR)/*.h \
|
||||
$(1)$(FS_INCLUDES_DIR)
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_INSTALL_DIR)$(FS_PKGCONFIG_DIR)/freeswitch.pc \
|
||||
$(1)$(FS_PKGCONFIG_DIR)
|
||||
$(CP) $(PKG_INSTALL_DIR)$(FS_LIB_DIR)/libfreeswitch.so* \
|
||||
$(1)$(FS_LIB_DIR)
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)$(FS_PKGCONFIG_DIR)
|
||||
ifneq ($(CONFIG_PACKAGE_libfreetdm),)
|
||||
$(call Build/InstallDev/libfreetdm,$(1))
|
||||
endif
|
||||
ifneq ($(CONFIG_PACKAGE_freeswitch),)
|
||||
$(call Build/InstallDev/freeswitch,$(1))
|
||||
endif
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libfreetdm))
|
||||
$(eval $(call BuildPackage,freeswitch))
|
||||
$(eval $(call BuildPackage,freeswitch-misc-perl-esl))
|
||||
$(eval $(call BuildPackage,freeswitch-misc-python3-esl))
|
||||
$(eval $(call BuildPackage,freeswitch-misc-timezones))
|
||||
|
||||
################################
|
||||
|
@ -871,22 +849,6 @@ $(eval $(call Package/freeswitch/Example,softphone))
|
|||
$(eval $(call Package/freeswitch/Example,testing))
|
||||
$(eval $(call Package/freeswitch/Example,vanilla))
|
||||
|
||||
################################
|
||||
# FreeTDM modules
|
||||
# Params:
|
||||
# 1 - Package subname
|
||||
# 2 - Package title
|
||||
# 3 - Module description
|
||||
# 4 - Module dependencies
|
||||
################################
|
||||
|
||||
$(eval $(call Package/libfreetdm/FTModule,analog,Analog,Offers generic FXO/FXS support for any type of card supported by FreeTDM.,))
|
||||
$(eval $(call Package/libfreetdm/FTModule,analog_em,Analog EM,Offers generic E&M signaling for any type of card supported by FreeTDM.,))
|
||||
$(eval $(call Package/libfreetdm/FTModule,libpri,LibPRI,Offers support for PRI lines using the open source libpri stack for any\ntype of card supported by FreeTDM. Supports both PRI and BRI signalling.,+libpri @!aarch64))
|
||||
$(eval $(call Package/libfreetdm/FTModule,pritap,PRI tapping,This module is used to tap PRI lines.,+libfreetdm-ftmod-libpri))
|
||||
$(eval $(call Package/libfreetdm/FTModule,skel,Skeleton,ftmod_skel is an example module.,))
|
||||
$(eval $(call Package/libfreetdm/FTModule,zt,DAHDI I/O,This module supports the DAHDI interface. The DAHDI interface is used by\nseveral hardware vendors.,))
|
||||
|
||||
################################
|
||||
# FreeSWITCH language files
|
||||
# Params:
|
||||
|
@ -972,7 +934,6 @@ $(eval $(call Package/freeswitch/Module,expr,Expr,This module adds expr support
|
|||
$(eval $(call Package/freeswitch/Module,fail2ban,Fail2ban logging,Provides support for Fail2ban logging.,))
|
||||
$(eval $(call Package/freeswitch/Module,fifo,FIFO,This module adds a first-in first-out queue system.,))
|
||||
$(eval $(call Package/freeswitch/Module,format_cdr,Multiformat CDR,A superset of mod_json_cdr and mod_xml_cdr.,))
|
||||
$(eval $(call Package/freeswitch/Module,freetdm,FreeTDM endpoint,This module is the glue between FreeSWITCH and FreeTDM.,+libfreetdm))
|
||||
$(eval $(call Package/freeswitch/Module,fsk,FSK,This module adds frequency-shift keying support which can be used to\nsend and receive caller ID.,))
|
||||
$(eval $(call Package/freeswitch/Module,fsv,FSV,This module provides dialplan applications for recording and playing\nvideos.,))
|
||||
$(eval $(call Package/freeswitch/Module,g723_1,G.723.1 passthrough,G.723.1 codec passthrough.,))
|
||||
|
@ -1009,6 +970,7 @@ $(eval $(call Package/freeswitch/Module,portaudio,Portaudio,Voice through a loca
|
|||
$(eval $(call Package/freeswitch/Module,portaudio_stream,Portaudio streaming,Stream from an external audio source for Music on Hold.,+portaudio))
|
||||
$(eval $(call Package/freeswitch/Module,posix_timer,POSIX timer,Add POSIX timer support.,))
|
||||
$(eval $(call Package/freeswitch/Module,prefix,Prefix match,This module provides a data store with fast lookups by the longest\nprefix match rule.,))
|
||||
$(eval $(call Package/freeswitch/Module,python3,Python3,Python3 support module.,+python3-light))
|
||||
$(eval $(call Package/freeswitch/Module,radius_cdr,Radius CDR,Radius Call Detail Record handler.,))
|
||||
$(eval $(call Package/freeswitch/Module,random,Entropy,This module extracts entropy from FreeSWITCH and feeds it into\n/dev/random.,))
|
||||
$(eval $(call Package/freeswitch/Module,raven,Raven logging,Adds support for logging to Raven instances.,))
|
||||
|
@ -1057,7 +1019,7 @@ $(eval $(call Package/freeswitch/Module,translate,Number translation,This module
|
|||
$(eval $(call Package/freeswitch/Module,tts_commandline,TTS command-line,Run a command-line and play the output file.,))
|
||||
$(eval $(call Package/freeswitch/Module,unimrcp,UniMRCP,Allows communication with Media Resource Control Protocol servers.,))
|
||||
$(eval $(call Package/freeswitch/Module,valet_parking,Valet parking,This module implements the valet call parking strategy.,))
|
||||
$(eval $(call Package/freeswitch/Module,verto,Verto,Verto signaling protocol.,))
|
||||
$(eval $(call Package/freeswitch/Module,verto,Verto,Verto signaling protocol.,+libks))
|
||||
$(eval $(call Package/freeswitch/Module,video_filter,Video filter chromakey,This module provides a media bug for chromakey functionality.,))
|
||||
$(eval $(call Package/freeswitch/Module,vmd,Voicemail detection,This module detects voicemail beeps.,))
|
||||
$(eval $(call Package/freeswitch/Module,voicemail,Voicemail,This module provides a voicemail system.,))
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no])
|
||||
|
||||
case $host in
|
||||
@@ -1643,13 +1619,7 @@ AC_CHECK_PROG(PERL,perl,[ac_cv_have_perl
|
||||
@@ -1660,13 +1636,7 @@ AC_CHECK_PROG(PERL,perl,[ac_cv_have_perl
|
||||
# -a "x$ac_cv_have_EXTERN_h" != "xno"
|
||||
|
||||
if test "x$ac_cv_have_perl" != "xno"; then
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/src/include/switch_core_media.h
|
||||
+++ b/src/include/switch_core_media.h
|
||||
@@ -197,7 +197,7 @@ SWITCH_DECLARE(switch_status_t) switch_c
|
||||
@@ -203,7 +203,7 @@ SWITCH_DECLARE(switch_status_t) switch_c
|
||||
SWITCH_DECLARE(void) switch_media_handle_set_media_flag(switch_media_handle_t *smh, switch_core_media_flag_t flag);
|
||||
SWITCH_DECLARE(void) switch_media_handle_clear_media_flag(switch_media_handle_t *smh, switch_core_media_flag_t flag);
|
||||
SWITCH_DECLARE(int32_t) switch_media_handle_test_media_flag(switch_media_handle_t *smh, switch_core_media_flag_t flag);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2075,7 +2075,12 @@ AC_SUBST(OUR_DISABLED_INSTALL_MODS)
|
||||
@@ -2263,7 +2263,12 @@ AC_SUBST(OUR_DISABLED_INSTALL_MODS)
|
||||
AC_SUBST(OUR_DISABLED_UNINSTALL_MODS)
|
||||
AC_SUBST(AM_MAKEFLAGS)
|
||||
|
||||
|
@ -84,7 +84,7 @@
|
|||
AC_LANG_C
|
||||
--- a/libs/srtp/configure.ac
|
||||
+++ b/libs/srtp/configure.ac
|
||||
@@ -3,9 +3,12 @@ AC_INIT(srtp, 1.4.2, mcgrew@cisco.com)
|
||||
@@ -3,9 +3,12 @@ AC_INIT(srtp, 2.4.0, mcgrew@cisco.com)
|
||||
AC_CONFIG_AUX_DIR(build)
|
||||
AM_INIT_AUTOMAKE
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -583,8 +583,15 @@ libs/libedit/src/.libs/libedit.a:
|
||||
@@ -585,8 +585,15 @@ libs/libedit/src/.libs/libedit.a:
|
||||
libs/libzrtp/libzrtp.a:
|
||||
cd libs/libzrtp && $(MAKE)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
$(RADCLIENT_BUILDDIR)/Makefile: $(RADCLIENT_DIR)
|
||||
mkdir -p $(RADCLIENT_BUILDDIR)
|
||||
- cd $(RADCLIENT_BUILDDIR) && $(DEFAULT_VARS) $(RADCLIENT_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(RADCLIENT_DIR)
|
||||
+ cd $(RADCLIENT_BUILDDIR) && patch -p1 < ../../src/mod/event_handlers/mod_radius_cdr/freeradius-client-1.1.6-configure-in.diff && autoreconf -v -f -i -s && $(DEFAULT_VARS) CFLAGS="${CFLAGS} -Wno-cpp" $(RADCLIENT_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(RADCLIENT_DIR)
|
||||
+ cd $(RADCLIENT_BUILDDIR) && patch -N -p1 < ../../src/mod/event_handlers/mod_radius_cdr/freeradius-client-1.1.6-configure-in.diff || echo "Assuming patch was applied previously" && autoreconf -v -f -i -s && $(DEFAULT_VARS) CFLAGS="${CFLAGS} -Wno-cpp" $(RADCLIENT_DIR)/configure $(DEFAULT_ARGS) --srcdir=$(RADCLIENT_DIR)
|
||||
$(TOUCH_TARGET)
|
||||
|
||||
$(RADCLIENT_LA): $(RADCLIENT_BUILDDIR)/Makefile
|
||||
|
@ -17,7 +17,7 @@
|
|||
+@@ -234,13 +234,11 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
||||
+ enable_getrandom=getentropy],
|
||||
+ [AC_MSG_RESULT(no)])
|
||||
+
|
||||
+
|
||||
+-AC_MSG_CHECKING([for /dev/urandom])
|
||||
+-if test -c /dev/urandom
|
||||
+-then
|
||||
|
@ -31,5 +31,5 @@
|
|||
++if test $ac_cv_dev_urandom = yes; then
|
||||
++ AC_DEFINE(HAVE_DEV_URANDOM)
|
||||
+ fi
|
||||
+
|
||||
+
|
||||
+ AC_ARG_WITH([nettle], [AS_HELP_STRING([--with-nettle],
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
--- a/libs/freetdm/mod_freetdm/Makefile.in
|
||||
+++ b/libs/freetdm/mod_freetdm/Makefile.in
|
||||
@@ -15,7 +15,6 @@ $(FTLA): $(FT_DIR)/.update
|
||||
cd $(FT_DIR) && $(MAKE)
|
||||
|
||||
local_install:
|
||||
- cd $(FT_DIR) && $(MAKE) install
|
||||
[ -f $(DESTDIR)@confdir@/autoload_configs/freetdm.conf.xml ] || cp -f $(FT_DIR)/conf/freetdm.conf.xml $(DESTDIR)@confdir@/autoload_configs
|
||||
|
||||
local_clean:
|
|
@ -1,6 +1,6 @@
|
|||
--- a/src/switch_console.c
|
||||
+++ b/src/switch_console.c
|
||||
@@ -1051,10 +1051,12 @@ static void *SWITCH_THREAD_FUNC console_
|
||||
@@ -1052,10 +1052,12 @@ static void *SWITCH_THREAD_FUNC console_
|
||||
while (running) {
|
||||
int32_t arg = 0;
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
--- a/src/switch_rtp.c
|
||||
+++ b/src/switch_rtp.c
|
||||
@@ -2155,7 +2155,7 @@ static void switch_send_rtcp_event(switc
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, header, value);
|
||||
snprintf(header, sizeof(header), "Source-Lost");
|
||||
#if SWITCH_BYTE_ORDER == __BIG_ENDIAN
|
||||
- tmpLost = report->lost; /* signed 24bit will extended signess to int32_t automatically */
|
||||
+ tmpLost = rtcp_report_block->lost; /* signed 24bit will extended signess to int32_t automatically */
|
||||
#else
|
||||
tmpLost = ntohl(rtcp_report_block->lost)>>8;
|
||||
tmpLost = tmpLost | ((tmpLost & 0x00800000) ? 0xff000000 : 0x00000000); /* ...and signess compensation */
|
20
net/freeswitch/patches/430-mod_opusfile-format-error.patch
Normal file
20
net/freeswitch/patches/430-mod_opusfile-format-error.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- a/src/mod/formats/mod_opusfile/mod_opusfile.c
|
||||
+++ b/src/mod/formats/mod_opusfile/mod_opusfile.c
|
||||
@@ -930,7 +930,7 @@ static int decode_stream_cb(void *dconte
|
||||
if (globals.debug) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[OGG/OPUS Stream Decode] decode CB called: context: %p data: %p packet_len: %d\n",
|
||||
(void *)context, data, nbytes);
|
||||
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[OGG/OPUS Stream Decode] decode_stream_cb(): switch_thread_self(): %lx\n", switch_thread_self());
|
||||
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[OGG/OPUS Stream Decode] decode_stream_cb(): switch_thread_self(): %lx\n", (unsigned long)(intptr_t)switch_thread_self());
|
||||
}
|
||||
|
||||
switch_mutex_lock(context->ogg_mutex);
|
||||
@@ -973,7 +973,7 @@ static void *SWITCH_THREAD_FUNC read_str
|
||||
int buffered_ogg_bytes;
|
||||
|
||||
if (globals.debug) {
|
||||
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[OGG/OPUS Stream Decode] read_stream_thread(): switch_thread_self(): 0x%lx\n", switch_thread_self());
|
||||
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[OGG/OPUS Stream Decode] read_stream_thread(): switch_thread_self(): 0x%lx\n", (unsigned long)(intptr_t)switch_thread_self());
|
||||
}
|
||||
switch_thread_rwlock_rdlock(context->rwlock);
|
||||
switch_mutex_lock(context->ogg_mutex);
|
|
@ -0,0 +1,23 @@
|
|||
From 9f26a15220b8b8b09c4debe41fe395d25d4cfeec Mon Sep 17 00:00:00 2001
|
||||
From: shaunjstokes <shaun@sysconfig.cloud>
|
||||
Date: Tue, 26 Oct 2021 18:25:14 +0200
|
||||
Subject: [PATCH] [mod_pgsql] Add support for postgresql 14
|
||||
|
||||
---
|
||||
src/mod/databases/mod_pgsql/mod_pgsql.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
--- a/src/mod/databases/mod_pgsql/mod_pgsql.c
|
||||
+++ b/src/mod/databases/mod_pgsql/mod_pgsql.c
|
||||
@@ -774,6 +774,11 @@ switch_status_t pgsql_next_result_timed(
|
||||
case PGRES_COPY_IN:
|
||||
case PGRES_COMMAND_OK:
|
||||
break;
|
||||
+#if POSTGRESQL_MAJOR_VERSION >= 14
|
||||
+ case PGRES_PIPELINE_ABORTED:
|
||||
+ case PGRES_PIPELINE_SYNC:
|
||||
+ break;
|
||||
+#endif
|
||||
case PGRES_EMPTY_QUERY:
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Query (%s) returned PGRES_EMPTY_QUERY\n", handle->sql);
|
||||
case PGRES_BAD_RESPONSE:
|
|
@ -0,0 +1,27 @@
|
|||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1865,24 +1865,12 @@ then
|
||||
if test "$python3_has_distutils" != "no" ; then
|
||||
AC_MSG_CHECKING([location of python3 site-packages])
|
||||
|
||||
- PYTHON3_SITE_DIR="`$PYTHON3 -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(0));'`"
|
||||
-
|
||||
if test -z "$PYTHON3_SITE_DIR" ; then
|
||||
AC_MSG_ERROR([Unable to detect python3 site-packages path])
|
||||
- elif test ! -d "$PYTHON3_SITE_DIR" ; then
|
||||
- AC_MSG_ERROR([Path $PYTHON3_SITE_DIR returned by python3 does not exist!])
|
||||
fi
|
||||
AC_MSG_RESULT([$PYTHON3_SITE_DIR])
|
||||
AC_SUBST([PYTHON3_SITE_DIR], [$PYTHON3_SITE_DIR])
|
||||
|
||||
- #
|
||||
- # python3 distutils found, get settings from python3 directly
|
||||
- #
|
||||
- PYTHON3_CFLAGS="`$PYTHON3 -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print(\" \".join(flags));' | sed -e 's/-arch i386//g;s/-arch x86_64//g'`"
|
||||
- PYTHON3_LDFLAGS="`$PYTHON3 -c 'from distutils import sysconfig; ldver = sysconfig.get_config_var(\"LDVERSION\"); libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\" + [[ldver,sysconfig.get_config_var(\"VERSION\")]][[ldver==None]]); print(\" \".join(libs));'`"
|
||||
- PYTHON3_LIB="`$PYTHON3 -c 'from distutils import sysconfig; ldver = sysconfig.get_config_var(\"LDVERSION\"); print(\"python\" + [[ldver,sysconfig.get_config_var(\"VERSION\")]][[ldver==None]]);'`"
|
||||
- PYTHON3_LIBDIR="`$PYTHON3 -c 'from distutils import sysconfig; print(sysconfig.get_config_var(\"LIBDIR\"));'`"
|
||||
-
|
||||
# handle python3 being installed into /usr/local
|
||||
AC_MSG_CHECKING([python3 libdir])
|
||||
if test -z "`echo $PYTHON3_LIBDIR | grep "/usr/lib"`" ; then
|
43
net/freeswitch/patches/470-esl-python.patch
Normal file
43
net/freeswitch/patches/470-esl-python.patch
Normal file
|
@ -0,0 +1,43 @@
|
|||
--- a/libs/esl/Makefile.am
|
||||
+++ b/libs/esl/Makefile.am
|
||||
@@ -82,7 +82,7 @@ pymod: $(MYLIB)
|
||||
$(MAKE) PYTHON=$(PYTHON) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CFLAGS)" CXXFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C python
|
||||
|
||||
py3mod: $(MYLIB)
|
||||
- $(MAKE) PYTHON3=$(PYTHON3) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CFLAGS)" CXXFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C python3
|
||||
+ $(MAKE) PYTHON3=$(PYTHON3) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CFLAGS)" CXXFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" PYTHON3_CFLAGS="$(PYTHON3_CFLAGS)" PYTHON3_LDFLAGS="$(PYTHON3_LDFLAGS)" -C python3
|
||||
|
||||
tclmod: $(MYLIB)
|
||||
$(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CFLAGS)" CXXFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C tcl
|
||||
@@ -106,7 +106,7 @@ pymod-install: pymod
|
||||
$(MAKE) PYTHON=$(PYTHON) -C python install
|
||||
|
||||
py3mod-install: py3mod
|
||||
- $(MAKE) PYTHON3=$(PYTHON3) -C python3 install
|
||||
+ $(MAKE) PYTHON3=$(PYTHON3) PYTHON3_SITE_DIR="$(PYTHON3_SITE_DIR)" -C python3 install
|
||||
|
||||
rubymod-install: rubymod
|
||||
$(MAKE) -C ruby install
|
||||
--- a/libs/esl/python3/Makefile
|
||||
+++ b/libs/esl/python3/Makefile
|
||||
@@ -1,6 +1,4 @@
|
||||
-LOCAL_CFLAGS=`$(PYTHON3) ./python-config --includes`
|
||||
-LOCAL_LDFLAGS=`$(PYTHON3) ./python-config --ldflags`
|
||||
-SITE_DIR=$(DESTDIR)/`$(PYTHON3) -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))"`
|
||||
+SITE_DIR=$(DESTDIR)/$(PYTHON3_SITE_DIR)
|
||||
|
||||
all: _ESL.so
|
||||
|
||||
@@ -8,10 +6,10 @@ esl_wrap.cpp:
|
||||
swig3.0 -module ESL -classic -python -c++ -DMULTIPLICITY -threads -I../src/include -o esl_wrap.cpp ../ESL.i
|
||||
|
||||
esl_wrap.o: esl_wrap.cpp
|
||||
- $(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(LOCAL_CFLAGS) -c esl_wrap.cpp -o esl_wrap.o
|
||||
+ $(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(PYTHON3_CFLAGS) -c esl_wrap.cpp -o esl_wrap.o
|
||||
|
||||
_ESL.so: esl_wrap.o
|
||||
- $(CXX) $(SOLINK) esl_wrap.o $(MYLIB) $(LOCAL_LDFLAGS) -o _ESL.so -L. $(LIBS)
|
||||
+ $(CXX) $(SOLINK) esl_wrap.o $(MYLIB) $(PYTHON3_LDFLAGS) -o _ESL.so -L. $(LIBS)
|
||||
|
||||
install: _ESL.so
|
||||
mkdir -p $(SITE_DIR)
|
86
net/freeswitch/patches/480-fix-libyuv-dependency.patch
Normal file
86
net/freeswitch/patches/480-fix-libyuv-dependency.patch
Normal file
|
@ -0,0 +1,86 @@
|
|||
--- a/src/include/switch_core_video.h
|
||||
+++ b/src/include/switch_core_video.h
|
||||
@@ -394,6 +394,7 @@ SWITCH_DECLARE(switch_image_t *) switch_
|
||||
SWITCH_DECLARE(switch_status_t) switch_img_write_png(switch_image_t *img, char *file_name);
|
||||
SWITCH_DECLARE(switch_status_t) switch_png_open(switch_png_t **pngP, const char *file_name);
|
||||
SWITCH_DECLARE(void) switch_png_free(switch_png_t **pngP);
|
||||
+#ifdef SWITCH_HAVE_YUV
|
||||
SWITCH_DECLARE(switch_status_t) switch_img_data_url_png(switch_image_t *img, char **urlP);
|
||||
SWITCH_DECLARE(switch_status_t) switch_img_data_url(switch_image_t *img, char **urlP, const char *type, int quality);
|
||||
|
||||
@@ -405,6 +406,7 @@ SWITCH_DECLARE(switch_image_t *) switch_
|
||||
* \param[in] quality Only used in jpg, 1 ~ 100
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_img_write_to_file(switch_image_t *img, const char* file_name, int quality);
|
||||
+#endif
|
||||
|
||||
/*!\brief put a small img over a big IMG at position x,y, with alpha transparency
|
||||
*
|
||||
--- a/src/switch_core_video.c
|
||||
+++ b/src/switch_core_video.c
|
||||
@@ -48,13 +48,13 @@
|
||||
#include <gd.h>
|
||||
#endif
|
||||
|
||||
+#ifdef SWITCH_HAVE_YUV
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#include "../libs/stb/stb_image.h"
|
||||
|
||||
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||
#include "../libs/stb/stb_image_write.h"
|
||||
|
||||
-#ifdef SWITCH_HAVE_YUV
|
||||
static inline void switch_img_get_yuv_pixel(switch_image_t *img, switch_yuv_color_t *yuv, int x, int y);
|
||||
#endif
|
||||
|
||||
@@ -3114,6 +3114,7 @@ SWITCH_DECLARE(switch_status_t) switch_i
|
||||
|
||||
#endif
|
||||
|
||||
+#ifdef SWITCH_HAVE_YUV
|
||||
SWITCH_DECLARE(switch_image_t *) switch_img_read_from_file(const char* file_name, switch_img_fmt_t img_fmt)
|
||||
{
|
||||
int width = 0, height = 0, channels = 0;
|
||||
@@ -3301,7 +3302,7 @@ SWITCH_DECLARE(switch_status_t) switch_i
|
||||
|
||||
return ret ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
|
||||
}
|
||||
-
|
||||
+#endif /* SWITCH_HAVE_YUV */
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_img_letterbox(switch_image_t *img, switch_image_t **imgP, int width, int height, const char *color)
|
||||
{
|
||||
--- a/tests/unit/switch_core_video.c
|
||||
+++ b/tests/unit/switch_core_video.c
|
||||
@@ -48,6 +48,7 @@ FST_CORE_BEGIN("./conf")
|
||||
}
|
||||
FST_TEARDOWN_END()
|
||||
|
||||
+#ifdef SWITCH_HAVE_YUV
|
||||
FST_TEST_BEGIN(data_url_test)
|
||||
{
|
||||
char *data_url = NULL;
|
||||
@@ -88,6 +89,7 @@ FST_CORE_BEGIN("./conf")
|
||||
unlink(argb_filename);
|
||||
}
|
||||
FST_TEST_END()
|
||||
+#endif /* SWITCH_HAVE_YUV */
|
||||
|
||||
FST_TEST_BEGIN(img_patch)
|
||||
{
|
||||
@@ -239,6 +241,7 @@ FST_CORE_BEGIN("./conf")
|
||||
}
|
||||
FST_TEST_END()
|
||||
|
||||
+#ifdef SWITCH_HAVE_YUV
|
||||
FST_TEST_BEGIN(stb_data_url)
|
||||
{
|
||||
switch_image_t *img = switch_img_alloc(NULL, SWITCH_IMG_FMT_I420, 120, 60, 1);
|
||||
@@ -321,6 +324,7 @@ FST_CORE_BEGIN("./conf")
|
||||
unlink(jpg_write_filename);
|
||||
}
|
||||
FST_TEST_END()
|
||||
+#endif /* SWITCH_HAVE_YUV */
|
||||
}
|
||||
FST_SUITE_END()
|
||||
}
|
|
@ -0,0 +1,177 @@
|
|||
From 80492dcd5a6a859cf4bfc7d22ba594c64e94e3fd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
|
||||
Date: Wed, 27 Oct 2021 20:38:28 -0300
|
||||
Subject: [PATCH] [build] properly fix time_t issues
|
||||
|
||||
aa71d87528643fd1b3897a64ecec8c11e92b5b55 tried fixing the issue by
|
||||
adding yet another case to the TIME_T_FMT definition, but hardcoding
|
||||
values as hinted at by internal variables or by platform is not future
|
||||
proof or allows for improvements.
|
||||
|
||||
The most portable fix for time_t handling is to always cast it to
|
||||
(long long) for printing and use "lld" for formatting.
|
||||
---
|
||||
src/include/switch_platform.h | 20 +++-----------------
|
||||
src/mod/applications/mod_httapi/mod_httapi.c | 2 +-
|
||||
src/mod/endpoints/mod_sofia/sofia_presence.c | 3 ++-
|
||||
src/switch_channel.c | 20 ++++++++++----------
|
||||
src/switch_ivr_originate.c | 2 +-
|
||||
5 files changed, 17 insertions(+), 30 deletions(-)
|
||||
|
||||
--- a/src/include/switch_platform.h
|
||||
+++ b/src/include/switch_platform.h
|
||||
@@ -245,10 +245,6 @@ typedef intptr_t switch_ssize_t;
|
||||
#define SWITCH_INT64_T_FMT "lld"
|
||||
#define SWITCH_UINT64_T_FMT "llu"
|
||||
|
||||
-#ifndef TIME_T_FMT
|
||||
-#define TIME_T_FMT SWITCH_INT64_T_FMT
|
||||
-#endif
|
||||
-
|
||||
#else
|
||||
#ifndef SWITCH_SSIZE_T_FMT
|
||||
#define SWITCH_SSIZE_T_FMT (sizeof (switch_ssize_t) == sizeof (long) ? "ld" : sizeof (switch_ssize_t) == sizeof (int) ? "d" : "lld")
|
||||
@@ -266,25 +262,15 @@ typedef intptr_t switch_ssize_t;
|
||||
#define SWITCH_UINT64_T_FMT (sizeof (long) == 8 ? "lu" : "llu")
|
||||
#endif
|
||||
|
||||
-#ifndef TIME_T_FMT
|
||||
-#if defined(__FreeBSD__) && SIZEOF_VOIDP == 4
|
||||
-#define TIME_T_FMT "d"
|
||||
-#else
|
||||
-#if __USE_TIME_BITS64
|
||||
-#define TIME_T_FMT SWITCH_INT64_T_FMT
|
||||
-#else
|
||||
-#define TIME_T_FMT "ld"
|
||||
-#endif
|
||||
-#endif
|
||||
-#endif
|
||||
-
|
||||
-
|
||||
#if UINTPTR_MAX == 0xffffffffffffffff
|
||||
#define FS_64BIT 1
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
+#define TIME_T_FMT "lld"
|
||||
+#define TIME_T_CAST(x) ((long long)(x))
|
||||
+
|
||||
#if defined(__sun__) && (defined(__x86_64) || defined(__arch64__))
|
||||
#define SWITCH_TIME_T_FMT SWITCH_SIZE_T_FMT
|
||||
#else
|
||||
--- a/src/mod/applications/mod_httapi/mod_httapi.c
|
||||
+++ b/src/mod/applications/mod_httapi/mod_httapi.c
|
||||
@@ -2745,7 +2745,7 @@ static switch_status_t write_meta_file(h
|
||||
|
||||
switch_snprintf(write_data, sizeof(write_data),
|
||||
"%" TIME_T_FMT ":%s",
|
||||
- switch_epoch_time_now(NULL) + ttl,
|
||||
+ TIME_T_CAST(switch_epoch_time_now(NULL) + ttl),
|
||||
data);
|
||||
|
||||
|
||||
--- a/src/mod/endpoints/mod_sofia/sofia_presence.c
|
||||
+++ b/src/mod/endpoints/mod_sofia/sofia_presence.c
|
||||
@@ -4200,7 +4200,8 @@ void sofia_presence_handle_sip_i_subscri
|
||||
sql = switch_mprintf("insert into sip_dialogs (sip_from_user,sip_from_host,call_info,call_info_state,hostname,expires,rcd,profile_name) "
|
||||
"values ('%q','%q','%q','seized','%q',%"TIME_T_FMT",%ld,'%q')",
|
||||
to_user, to_host, switch_str_nil(p), mod_sofia_globals.hostname,
|
||||
- switch_epoch_time_now(NULL) + exp_delta, (long)now, profile->name);
|
||||
+ TIME_T_CAST(switch_epoch_time_now(NULL) + exp_delta), (long)now,
|
||||
+ profile->name);
|
||||
|
||||
if (mod_sofia_globals.debug_sla > 1) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "SEIZE SQL %s\n", sql);
|
||||
--- a/src/switch_channel.c
|
||||
+++ b/src/switch_channel.c
|
||||
@@ -4700,39 +4700,39 @@ SWITCH_DECLARE(switch_status_t) switch_c
|
||||
|
||||
tt_created = (time_t) (caller_profile->times->created / 1000000);
|
||||
mtt_created = (time_t) (caller_profile->times->created / 1000);
|
||||
- switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, tt_created);
|
||||
+ switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, TIME_T_CAST(tt_created));
|
||||
switch_channel_set_variable(channel, "start_epoch", tmp);
|
||||
switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->created);
|
||||
switch_channel_set_variable(channel, "start_uepoch", tmp);
|
||||
|
||||
tt_prof_created = (time_t) (caller_profile->times->profile_created / 1000000);
|
||||
- switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, tt_prof_created);
|
||||
+ switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, TIME_T_CAST(tt_prof_created));
|
||||
switch_channel_set_variable(channel, "profile_start_epoch", tmp);
|
||||
switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->profile_created);
|
||||
switch_channel_set_variable(channel, "profile_start_uepoch", tmp);
|
||||
|
||||
tt_answered = (time_t) (caller_profile->times->answered / 1000000);
|
||||
mtt_answered = (time_t) (caller_profile->times->answered / 1000);
|
||||
- switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, tt_answered);
|
||||
+ switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, TIME_T_CAST(tt_answered));
|
||||
switch_channel_set_variable(channel, "answer_epoch", tmp);
|
||||
switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->answered);
|
||||
switch_channel_set_variable(channel, "answer_uepoch", tmp);
|
||||
|
||||
tt_bridged = (time_t) (caller_profile->times->bridged / 1000000);
|
||||
mtt_bridged = (time_t) (caller_profile->times->bridged / 1000);
|
||||
- switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, tt_bridged);
|
||||
+ switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, TIME_T_CAST(tt_bridged));
|
||||
switch_channel_set_variable(channel, "bridge_epoch", tmp);
|
||||
switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->bridged);
|
||||
switch_channel_set_variable(channel, "bridge_uepoch", tmp);
|
||||
|
||||
tt_last_hold = (time_t) (caller_profile->times->last_hold / 1000000);
|
||||
- switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, tt_last_hold);
|
||||
+ switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, TIME_T_CAST(tt_last_hold));
|
||||
switch_channel_set_variable(channel, "last_hold_epoch", tmp);
|
||||
switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->last_hold);
|
||||
switch_channel_set_variable(channel, "last_hold_uepoch", tmp);
|
||||
|
||||
tt_hold_accum = (time_t) (caller_profile->times->hold_accum / 1000000);
|
||||
- switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, tt_hold_accum);
|
||||
+ switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, TIME_T_CAST(tt_hold_accum));
|
||||
switch_channel_set_variable(channel, "hold_accum_seconds", tmp);
|
||||
switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->hold_accum);
|
||||
switch_channel_set_variable(channel, "hold_accum_usec", tmp);
|
||||
@@ -4740,28 +4740,28 @@ SWITCH_DECLARE(switch_status_t) switch_c
|
||||
switch_channel_set_variable(channel, "hold_accum_ms", tmp);
|
||||
|
||||
tt_resurrected = (time_t) (caller_profile->times->resurrected / 1000000);
|
||||
- switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, tt_resurrected);
|
||||
+ switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, TIME_T_CAST(tt_resurrected));
|
||||
switch_channel_set_variable(channel, "resurrect_epoch", tmp);
|
||||
switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->resurrected);
|
||||
switch_channel_set_variable(channel, "resurrect_uepoch", tmp);
|
||||
|
||||
tt_progress = (time_t) (caller_profile->times->progress / 1000000);
|
||||
mtt_progress = (time_t) (caller_profile->times->progress / 1000);
|
||||
- switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, tt_progress);
|
||||
+ switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, TIME_T_CAST(tt_progress));
|
||||
switch_channel_set_variable(channel, "progress_epoch", tmp);
|
||||
switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->progress);
|
||||
switch_channel_set_variable(channel, "progress_uepoch", tmp);
|
||||
|
||||
tt_progress_media = (time_t) (caller_profile->times->progress_media / 1000000);
|
||||
mtt_progress_media = (time_t) (caller_profile->times->progress_media / 1000);
|
||||
- switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, tt_progress_media);
|
||||
+ switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, TIME_T_CAST(tt_progress_media));
|
||||
switch_channel_set_variable(channel, "progress_media_epoch", tmp);
|
||||
switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->progress_media);
|
||||
switch_channel_set_variable(channel, "progress_media_uepoch", tmp);
|
||||
|
||||
tt_hungup = (time_t) (caller_profile->times->hungup / 1000000);
|
||||
mtt_hungup = (time_t) (caller_profile->times->hungup / 1000);
|
||||
- switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, tt_hungup);
|
||||
+ switch_snprintf(tmp, sizeof(tmp), "%" TIME_T_FMT, TIME_T_CAST(tt_hungup));
|
||||
switch_channel_set_variable(channel, "end_epoch", tmp);
|
||||
switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->hungup);
|
||||
switch_channel_set_variable(channel, "end_uepoch", tmp);
|
||||
--- a/src/switch_ivr_originate.c
|
||||
+++ b/src/switch_ivr_originate.c
|
||||
@@ -797,7 +797,7 @@ static uint8_t check_channel_status(orig
|
||||
time_t elapsed = switch_epoch_time_now(NULL) - start;
|
||||
oglobals->originate_status[i].per_channel_progress_timelimit_sec = elapsed + extend_timeout;
|
||||
oglobals->originate_status[i].per_channel_timelimit_sec = elapsed + extend_timeout;
|
||||
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "elapsed %" TIME_T_FMT ", timelimit extended to %u\n", elapsed, oglobals->originate_status[i].per_channel_timelimit_sec);
|
||||
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "elapsed %" TIME_T_FMT ", timelimit extended to %u\n", TIME_T_CAST(elapsed), oglobals->originate_status[i].per_channel_timelimit_sec);
|
||||
} else if (oglobals->cancel_timeout || cancel_timeout) {
|
||||
/* cancel timeout for this leg only */
|
||||
oglobals->originate_status[i].per_channel_progress_timelimit_sec = 0;
|
51
net/freeswitch/patches/491-mod-gsmopen-time64.patch
Normal file
51
net/freeswitch/patches/491-mod-gsmopen-time64.patch
Normal file
|
@ -0,0 +1,51 @@
|
|||
--- a/src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp
|
||||
+++ b/src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp
|
||||
@@ -853,7 +853,7 @@ int gsmopen_serial_read_AT(private_t *te
|
||||
|
||||
if (tech_pvt->interface_state != GSMOPEN_STATE_RING) {
|
||||
gettimeofday(&(tech_pvt->call_incoming_time), NULL);
|
||||
- DEBUGA_GSMOPEN("GSMOPEN_STATE_RING call_incoming_time.tv_sec=%ld\n", GSMOPEN_P_LOG, tech_pvt->call_incoming_time.tv_sec);
|
||||
+ DEBUGA_GSMOPEN("GSMOPEN_STATE_RING call_incoming_time.tv_sec=%" TIME_T_FMT "\n", GSMOPEN_P_LOG, TIME_T_CAST(tech_pvt->call_incoming_time.tv_sec));
|
||||
|
||||
}
|
||||
|
||||
@@ -1177,7 +1177,7 @@ int gsmopen_serial_read_AT(private_t *te
|
||||
//mark the time of CALLFLOW_CALL_INCOMING
|
||||
gettimeofday(&(tech_pvt->call_incoming_time), NULL);
|
||||
tech_pvt->phone_callflow = CALLFLOW_CALL_INCOMING;
|
||||
- DEBUGA_GSMOPEN("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld\n", GSMOPEN_P_LOG, tech_pvt->call_incoming_time.tv_sec);
|
||||
+ DEBUGA_GSMOPEN("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%" TIME_T_FMT "\n", GSMOPEN_P_LOG, TIME_T_CAST(tech_pvt->call_incoming_time.tv_sec));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1946,15 +1946,15 @@ int gsmopen_serial_read_AT(private_t *te
|
||||
gettimeofday(&call_incoming_timeout, NULL);
|
||||
call_incoming_timeout.tv_sec -= 3;
|
||||
DEBUGA_GSMOPEN
|
||||
- ("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n",
|
||||
- GSMOPEN_P_LOG, tech_pvt->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
|
||||
+ ("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%" TIME_T_FMT ", call_incoming_timeout.tv_sec=%" TIME_T_FMT "\n",
|
||||
+ GSMOPEN_P_LOG, TIME_T_CAST(tech_pvt->call_incoming_time.tv_sec), TIME_T_CAST(call_incoming_timeout.tv_sec));
|
||||
if (call_incoming_timeout.tv_sec > tech_pvt->call_incoming_time.tv_sec) {
|
||||
|
||||
tech_pvt->call_incoming_time.tv_sec = 0;
|
||||
tech_pvt->call_incoming_time.tv_usec = 0;
|
||||
DEBUGA_GSMOPEN
|
||||
- ("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n",
|
||||
- GSMOPEN_P_LOG, tech_pvt->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
|
||||
+ ("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%" TIME_T_FMT ", call_incoming_timeout.tv_sec=%" TIME_T_FMT "\n",
|
||||
+ GSMOPEN_P_LOG, TIME_T_CAST(tech_pvt->call_incoming_time.tv_sec), TIME_T_CAST(call_incoming_timeout.tv_sec));
|
||||
int res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CPBS=RC");
|
||||
if (res) {
|
||||
ERRORA("AT+CPBS=RC (select memory of received calls) was not answered by the phone\n", GSMOPEN_P_LOG);
|
||||
@@ -1983,8 +1983,8 @@ int gsmopen_serial_read_AT(private_t *te
|
||||
if (call_incoming_timeout.tv_sec > tech_pvt->ringtime.tv_sec) {
|
||||
ERRORA("Ringing stopped and I have not answered. Why?\n", GSMOPEN_P_LOG);
|
||||
DEBUGA_GSMOPEN
|
||||
- ("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n",
|
||||
- GSMOPEN_P_LOG, tech_pvt->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
|
||||
+ ("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%" TIME_T_FMT ", call_incoming_timeout.tv_sec=%" TIME_T_FMT "\n",
|
||||
+ GSMOPEN_P_LOG, TIME_T_CAST(tech_pvt->call_incoming_time.tv_sec), TIME_T_CAST(call_incoming_timeout.tv_sec));
|
||||
if (tech_pvt->owner) {
|
||||
gsmopen_queue_control(tech_pvt->owner, GSMOPEN_CONTROL_HANGUP);
|
||||
tech_pvt->owner->hangupcause = GSMOPEN_CAUSE_FAILURE;
|
20
net/freeswitch/patches/492-mod_verto_time64.patch
Normal file
20
net/freeswitch/patches/492-mod_verto_time64.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- a/src/mod/endpoints/mod_verto/mod_verto.c
|
||||
+++ b/src/mod/endpoints/mod_verto/mod_verto.c
|
||||
@@ -1126,7 +1126,7 @@ static switch_bool_t check_auth(jsock_t
|
||||
|
||||
if (tmp > now) {
|
||||
jsock->exptime = tmp;
|
||||
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Login expire time for %s set to %ld seconds [%ld] [%ld]\n", jsock->uid, tmp - now, jsock->exptime, now);
|
||||
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Login expire time for %s set to %" TIME_T_FMT " seconds [%" TIME_T_FMT "] [%" TIME_T_FMT "]\n", jsock->uid, TIME_T_CAST(tmp - now), TIME_T_CAST(jsock->exptime), TIME_T_CAST(now));
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid expire time for %s. Defaulting to 300 sec\n", jsock->uid);
|
||||
jsock->exptime = now + 300;
|
||||
@@ -2000,7 +2000,7 @@ static void client_run(jsock_t *jsock)
|
||||
|
||||
if (now >= jsock->exptime) {
|
||||
switch_set_flag(jsock, JPFLAG_AUTH_EXPIRED);
|
||||
- die("%s Authentication Expired [%ld] >= [%ld]\n", jsock->uid, now, jsock->exptime);
|
||||
+ die("%s Authentication Expired [%" TIME_T_FMT "] >= [%" TIME_T_FMT "]\n", jsock->uid, TIME_T_CAST(now), TIME_T_CAST(jsock->exptime));
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
From ec0c59a798ff1124295e7d5d82c2e30f1226cc07 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
|
||||
Date: Fri, 29 Oct 2021 00:17:05 -0300
|
||||
Subject: [PATCH] [core] fix switch_mprintf format string
|
||||
|
||||
Segfaults on 32-bit platforms running musl 1.2.x.
|
||||
|
||||
Reported-by: Sebastian Kemper <sebastian_ml@gmx.net>
|
||||
---
|
||||
src/switch_core_sqldb.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/src/switch_core_sqldb.c
|
||||
+++ b/src/switch_core_sqldb.c
|
||||
@@ -3551,7 +3551,7 @@ SWITCH_DECLARE(switch_status_t) switch_c
|
||||
if (force) {
|
||||
sql = switch_mprintf("delete from registrations where hostname='%q'", switch_core_get_switchname());
|
||||
} else {
|
||||
- sql = switch_mprintf("delete from registrations where expires > 0 and expires <= %ld and hostname='%q'", now, switch_core_get_switchname());
|
||||
+ sql = switch_mprintf("delete from registrations where expires > 0 and expires <= %" TIME_T_FMT " and hostname='%q'", TIME_T_CAST(now), switch_core_get_switchname());
|
||||
}
|
||||
|
||||
switch_sql_queue_manager_push(sql_manager.qm, sql, 0, SWITCH_FALSE);
|
Loading…
Reference in a new issue