From f3c5dc06d4bd901bdf15fc63e8e66fb05b81668e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C5=A0urda?= Date: Wed, 18 Jan 2023 07:41:00 +0800 Subject: [PATCH] asterisk-chan-quecktel tuning - add asterisk to `audio` and `dialout` groups - use UAC config file for quectel --- .buildbot/openwrt/build.sh | 1 + feed/asterisk-chan-quectel/Makefile | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.buildbot/openwrt/build.sh b/.buildbot/openwrt/build.sh index c7766d8..456543f 100755 --- a/.buildbot/openwrt/build.sh +++ b/.buildbot/openwrt/build.sh @@ -46,6 +46,7 @@ make image \ kmod-usb-audio kmod-usb-net-rtl8152 \ alsa-lib pciutils usbutils \ kmod-usb-net-qmi-wwan libqmi qmi-utils uqmi luci-proto-qmi \ + shadow-usermod \ asterisk \ asterisk-app-sms asterisk-pjsip asterisk-bridge-simple \ asterisk-codec-alaw asterisk-codec-ulaw \ diff --git a/feed/asterisk-chan-quectel/Makefile b/feed/asterisk-chan-quectel/Makefile index 771c616..193ffcf 100644 --- a/feed/asterisk-chan-quectel/Makefile +++ b/feed/asterisk-chan-quectel/Makefile @@ -65,10 +65,19 @@ endef define Package/$(PKG_NAME)/install $(INSTALL_DIR) $(1)/etc/asterisk - $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/quectel.conf $(1)/etc/asterisk + $(INSTALL_DATA) $(PKG_BUILD_DIR)/uac/quectel.conf $(1)/etc/asterisk $(INSTALL_DIR) $(1)$(MODULES_DIR) $(INSTALL_BIN) $(PKG_BUILD_DIR)/chan_quectel.so $(1)$(MODULES_DIR) endef +define Package/$(PKG_NAME)/postinst +#!/bin/sh +if [ -n "$${IPKG_INSTROOT}" ]; then + exit 0 +fi +usermod -a -G audio,dialout asterisk +endef + + $(eval $(call BuildPackage,$(PKG_NAME)))