From b688d953ace4576a8da15bc7b20967b25a643ff0 Mon Sep 17 00:00:00 2001 From: "Deomid \"rojer\" Ryabkov" Date: Wed, 29 Sep 2021 10:14:31 +0100 Subject: [PATCH 1/3] asterisk-chan-dongle: bump for upstream fixes To pull in fixes, specifically https://github.com/wdoekes/asterisk-chan-dongle/commit/3d2a97f26ba84473a0926a9fe9a32e451a56bc36 which fixes decoding of SMS messages. Also fixes https://github.com/openwrt/telephony/issues/686 and pulls in Quectel support (alternative to https://github.com/openwrt/telephony/pull/682). Signed-off-by: Deomid "rojer" Ryabkov (cherry picked from commit 02d5dc545e2ffb2740fa2d7d63c53254eb9a9a09) --- net/asterisk-chan-dongle/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/asterisk-chan-dongle/Makefile b/net/asterisk-chan-dongle/Makefile index 2ef0c21..58c1212 100644 --- a/net/asterisk-chan-dongle/Makefile +++ b/net/asterisk-chan-dongle/Makefile @@ -11,10 +11,10 @@ PKG_NAME:=asterisk-chan-dongle PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/wdoekes/asterisk-chan-dongle.git -PKG_SOURCE_VERSION:=328b2b7ded3b3c59c2e6c7e7afca6b0ac6f146ce -PKG_SOURCE_DATE=2020-05-28 +PKG_SOURCE_VERSION:=3d2a97f26ba84473a0926a9fe9a32e451a56bc36 +PKG_SOURCE_DATE=2021-09-29 PKG_RELEASE:=1 -PKG_MIRROR_HASH:=b0af444840340722ecee111a7b1f819de441acf290799ae11bc18e16569c6388 +PKG_MIRROR_HASH:=b5baf737d39d522fa9b7055dea72c2d3241c272b20354fdf2a3bd09cce274844 PKG_FIXUP:=autoreconf From e6cf1a7b63254fb6e6a5222c58d62d374e9d0604 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 23 Oct 2021 00:12:13 +0200 Subject: [PATCH 2/3] asterisk: don't start with explicit group Currently the asterisk init script starts the service with the group "asterisk". Like this, even if the asterisk user is part of other groups, asterisk will not be able to make use of them. So for instance if you add the user to the group "dialout", asterisk will run under group "asterisk", instead of "asterisk" _and_ "dialout". Not specifying the group gets rid of this limitation. Signed-off-by: Sebastian Kemper (cherry picked from commit 9017e04b8755b298649280b3d4491666f1b0c94b) --- net/asterisk/Makefile | 2 +- net/asterisk/files/asterisk.init | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/net/asterisk/Makefile b/net/asterisk/Makefile index 2293a57..8cc8755 100644 --- a/net/asterisk/Makefile +++ b/net/asterisk/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=asterisk PKG_VERSION:=18.5.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/asterisk/releases diff --git a/net/asterisk/files/asterisk.init b/net/asterisk/files/asterisk.init index 256a3cf..0e267e7 100644 --- a/net/asterisk/files/asterisk.init +++ b/net/asterisk/files/asterisk.init @@ -51,7 +51,6 @@ start_service() { procd_open_instance procd_set_param command $COMMAND procd_append_param command \ - -G "$NAME" \ -U "$NAME" \ $options \ -f From 466cd8511146597702a3ea8e8fc4efb8911e3dc9 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 23 Oct 2021 18:28:53 +0200 Subject: [PATCH 3/3] asterisk-chan-dongle: add postinst note Provide quick hint to users to sort out possible/likely permission issue. Also refreshes some patches. Signed-off-by: Sebastian Kemper (cherry picked from commit 829c1cf031ca78ea490543fd908d820ad13fc875) --- net/asterisk-chan-dongle/Makefile | 15 +++++++++++++++ .../patches/200-fix-iconv-detection.patch | 2 +- .../patches/300-use-openwrt-flags.patch | 4 ++-- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/net/asterisk-chan-dongle/Makefile b/net/asterisk-chan-dongle/Makefile index 58c1212..0a359b7 100644 --- a/net/asterisk-chan-dongle/Makefile +++ b/net/asterisk-chan-dongle/Makefile @@ -64,4 +64,19 @@ define Package/asterisk-chan-dongle/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/chan_dongle.so $(1)$(MODULES_DIR) endef +define Package/asterisk-chan-dongle/postinst +#!/bin/sh +if [ -z "$${IPKG_INSTROOT}" ]; then + echo + echo "o-------------------------------------------------------------------o" + echo "| asterisk-chan-dongle note |" + echo "o-------------------------------------------------------------------o" + echo "| Adding the \"asterisk\" user to the \"dialout\" group might be |" + echo "| required for asterisk to be able to access the dongle. |" + echo "o-------------------------------------------------------------=^_^=-o" + echo +fi +exit 0 +endef + $(eval $(call BuildPackage,asterisk-chan-dongle)) diff --git a/net/asterisk-chan-dongle/patches/200-fix-iconv-detection.patch b/net/asterisk-chan-dongle/patches/200-fix-iconv-detection.patch index be7d933..cd39b16 100644 --- a/net/asterisk-chan-dongle/patches/200-fix-iconv-detection.patch +++ b/net/asterisk-chan-dongle/patches/200-fix-iconv-detection.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -83,7 +83,7 @@ fi +@@ -90,7 +90,7 @@ fi dnl Checks for libraries. dnl AC_CHECK_LIB([pthread], [pthread_create]) # should use ast_pthread_join everywhere? diff --git a/net/asterisk-chan-dongle/patches/300-use-openwrt-flags.patch b/net/asterisk-chan-dongle/patches/300-use-openwrt-flags.patch index f1c4850..1dea4b4 100644 --- a/net/asterisk-chan-dongle/patches/300-use-openwrt-flags.patch +++ b/net/asterisk-chan-dongle/patches/300-use-openwrt-flags.patch @@ -1,8 +1,8 @@ --- a/configure.ac +++ b/configure.ac -@@ -224,8 +224,6 @@ dnl Apply options to defines +@@ -237,8 +237,6 @@ dnl Apply options to defines if test "x$enable_debug" = "xyes" ; then - CFLAGS="$CFLAGS -O0 -g" + CFLAGS="$CFLAGS -O0 -g3" AC_DEFINE([__DEBUG__], [1], [Build with debugging]) -else - CFLAGS="$CFLAGS -O6"