package/asterisk: update to 22.3.0
PATCH v2 1/1 package/asterisk: update to 22.3.0
For a changelog see here:
https://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-22.3.0.md
Changes made by the package maintainer:
- add systemd service file
- run asterisk as non-root user asterisk
- build pjsip as bundled source code, but download it like sound files
- remove unused configure options
- chan_alsa was removed upstream in commit de3ce178ab0282445cf25161b49f3737ac2d20ff
See here for the reason behind using the bundled pjsip:
https://github.com/asterisk/asterisk/issues/671
---
- v1 -> v2:
- add a comment about the pjsip issue to the Makefile (Arnout)
- update commit log to include link to chan_alsa removal (Arnout)
- update systemd file with a comment where it come from and what changed to the orginal file (Arnout)
--- package/asterisk/asterisk.hash | 4 +++- package/asterisk/asterisk.mk | 31 ++++++++++++++++++------------- package/asterisk/asterisk.service | 23 +++++++++++++++++++++++ 3 files changed, 44 insertions(+), 14 deletions(-) create mode 100644 package/asterisk/asterisk.service
package/asterisk/asterisk.hash +3 -1
@@ -1,6 +1,8 @@ # Locally computed -sha256 94647b3f887f7dc91df51a4f88dfc3a07cc279bef86b8d05aa72f0c49d187571 asterisk-20.11.1.tar.gz +sha256 4cc403c8885d4aed3956dfb75d315d3e5bcc129eb9cd47c156d3b12ecceed1ba asterisk-22.3.0.tar.gz +# Locally computed +sha256 58bb83cec4d431f48d006e455d821668450f8cf6b6c95f090def47062fa3a60c pjproject-2.15.1.tar.bz2 # sha1 from: http://downloads.asterisk.org/pub/telephony/sounds/releases # sha256 locally computed sha1 721c512feaea102700d5bdce952fdc0bb29dc640 asterisk-core-sounds-en-gsm-1.6.1.tar.gz
package/asterisk/asterisk.mk +18 -13
@@ -4,15 +4,20 @@ # ################################################################################ -ASTERISK_VERSION = 20.11.1 +ASTERISK_VERSION = 22.3.0 # Use the github mirror: it's an official mirror maintained by Digium, and # provides tarballs, which the main Asterisk git tree (behind Gerrit) does not. ASTERISK_SITE = $(call github,asterisk,asterisk,$(ASTERISK_VERSION)) +# compilation with the external pjsip produces a non-working asterisk, which +# segfaults. The reason behind this is unclear. +# https://github.com/asterisk/asterisk/issues/671 +ASTERISK_PJSIP_URL = https://raw.githubusercontent.com/asterisk/third-party/master/pjproject/2.15.1/ ASTERISK_SOUNDS_BASE_URL = http://downloads.asterisk.org/pub/telephony/sounds/releases ASTERISK_EXTRA_DOWNLOADS = \ $(ASTERISK_SOUNDS_BASE_URL)/asterisk-core-sounds-en-gsm-1.6.1.tar.gz \ - $(ASTERISK_SOUNDS_BASE_URL)/asterisk-moh-opsound-wav-2.03.tar.gz + $(ASTERISK_SOUNDS_BASE_URL)/asterisk-moh-opsound-wav-2.03.tar.gz \ + $(ASTERISK_PJSIP_URL)/pjproject-2.15.1.tar.bz2 ASTERISK_LICENSE = GPL-2.0, BSD-3-Clause (SHA1, resample), BSD-4-Clause (db1-ast) ASTERISK_LICENSE_FILES = \
@@ -76,7 +81,6 @@ ASTERISK_CONF_OPTS = \ --without-neon29 \ --without-newt \ --without-openr2 \ - --without-osptk \ --without-postgres \ --without-popt \ --without-resample \
@@ -94,10 +98,9 @@ ASTERISK_CONF_OPTS = \ --with-libjwt="$(STAGING_DIR)/usr" \ --with-libxml2 \ --with-libedit="$(STAGING_DIR)/usr" \ - --without-pjproject-bundled \ - --with-pjproject="$(STAGING_DIR)/usr" \ + --with-pjproject-bundled \ --with-sqlite3="$(STAGING_DIR)/usr" \ - --with-sounds-cache=$(ASTERISK_DL_DIR) + --with-download-cache=$(ASTERISK_DL_DIR) # avcodec are from ffmpeg. There is virtually zero chance this could # even work; asterisk is looking for ffmpeg/avcodec.h which has not
@@ -135,13 +138,6 @@ else ASTERISK_CONF_OPTS += --without-gsm endif -ifeq ($(BR2_PACKAGE_ALSA_LIB),y) -ASTERISK_DEPENDENCIES += alsa-lib -ASTERISK_CONF_OPTS += --with-asound -else -ASTERISK_CONF_OPTS += --without-asound -endif - ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS),y) ASTERISK_DEPENDENCIES += bluez5_utils ASTERISK_CONF_OPTS += --with-bluetooth
@@ -299,6 +295,15 @@ ASTERISK_INSTALL_TARGET_OPTS = \ LDCONFIG=true \ install samples +define ASTERISK_USERS + asterisk -1 asterisk -1 * /usr/lib/asterisk - - asterisk user +endef + +define ASTERISK_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/asterisk/asterisk.service \ + $(TARGET_DIR)/usr/lib/systemd/system/asterisk.service +endef + $(eval $(autotools-package)) #-------------------------------------------------------------------------------
package/asterisk/asterisk.service new file +23 -0
@@ -0,0 +1,23 @@ +# based on included asterisk.service, but changed +# Type to simple, comments removed +[Unit] +Description=Asterisk PBX and telephony daemon. +After=network.target + +[Service] +Type=simple +Environment=HOME=/usr/lib/asterisk +WorkingDirectory=/usr/lib/asterisk +User=asterisk +Group=asterisk +ExecStart=/usr/sbin/asterisk -mqf -C /etc/asterisk/asterisk.conf +ExecReload=/usr/sbin/asterisk -rx 'core reload' +RuntimeDirectory=asterisk +LimitCORE=infinity +Restart=always +RestartSec=4 +StandardOutput=null +PrivateTmp=true + +[Install] +WantedBy=multi-user.target
Signature · 6 lines
2.39.5 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Waldemar,
Quoted 22 lines · On Thu, 3 Apr 2025 05:37:50 +0200 Waldemar Brodkorb <[email protected]> wrote:
For a changelog see here:
https://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-22.3.0.mdChanges made by the package maintainer:
- add systemd service file
- run asterisk as non-root user asterisk
- build pjsip as bundled source code, but download it like sound files
- remove unused configure options
-chan_alsawas removed upstream in commitde3ce178ab0282445cf25161b49f3737ac2d20ffSee here for the reason behind using the bundled pjsip:
https://github.com/asterisk/asterisk/issues/671Signed-off-by Waldemar Brodkorb <[email protected]>---
- v1 -> v2:
- add a comment about the pjsip issue to theMakefile(Arnout)
- update commit log to include link tochan_alsaremoval (Arnout)
- update systemd file with a comment where it come from and what changed to the orginal file (Arnout)
Quoted 6 lines
--- package/asterisk/asterisk.hash | 4 +++- package/asterisk/asterisk.mk | 31 ++++++++++++++++++------------- package/asterisk/asterisk.service | 23 +++++++++++++++++++++++ 3 files changed, 44 insertions(+), 14 deletions(-) create mode 100644 package/asterisk/asterisk.service
It is obviously not amazing that we have to use a bundled pjsip, but oh well, for now it will do the job. It'd be nice to continue to follow-up with upstream (either asterisk or pjsip or both) and see if ultimately the issue can be fixed.
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 12 lines · Waldemar Brodkorb
For a changelog see here:
https://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-22.3.0.mdChanges made by the package maintainer:
- add systemd service file
- run asterisk as non-root user asterisk
- build pjsip as bundled source code, but download it like sound files
- remove unused configure options
-chan_alsawas removed upstream in commitde3ce178ab0282445cf25161b49f3737ac2d20ff
Quoted 4 lines
See here for the reason behind using the bundled pjsip:
https://github.com/asterisk/asterisk/issues/671Signed-off-by Waldemar Brodkorb <[email protected]>
Applied to 2025.02.x, thanks.
Regards,
Arnout
Quoted 124 lines
---
- v1 -> v2:
- add a comment about the pjsip issue to theMakefile(Arnout)
- update commit log to include link tochan_alsaremoval (Arnout)
- update systemd file with a comment where it come from and what changed to the orginal file (Arnout)--- package/asterisk/asterisk.hash | 4 +++- package/asterisk/asterisk.mk | 31 ++++++++++++++++++------------- package/asterisk/asterisk.service | 23 +++++++++++++++++++++++ 3 files changed, 44 insertions(+), 14 deletions(-)create mode 100644 package/asterisk/asterisk.service
package/asterisk/asterisk.hash +3
-1@@ -1,6 +1,8 @@ # Locally computed -sha256 94647b3f887f7dc91df51a4f88dfc3a07cc279bef86b8d05aa72f0c49d187571 asterisk-20.11.1.tar.gz +sha256 4cc403c8885d4aed3956dfb75d315d3e5bcc129eb9cd47c156d3b12ecceed1ba asterisk-22.3.0.tar.gz +# Locally computed +sha256 58bb83cec4d431f48d006e455d821668450f8cf6b6c95f090def47062fa3a60c pjproject-2.15.1.tar.bz2 # sha1 from: http://downloads.asterisk.org/pub/telephony/sounds/releases # sha256 locally computed sha1 721c512feaea102700d5bdce952fdc0bb29dc640 asterisk-core-sounds-en-gsm-1.6.1.tar.gzpackage/asterisk/asterisk.mk +18
-13@@ -4,15 +4,20 @@ # ################################################################################ -ASTERISK_VERSION = 20.11.1 +ASTERISK_VERSION = 22.3.0 # Use the github mirror: it's an official mirror maintained by Digium, and # provides tarballs, which the main Asterisk git tree (behind Gerrit) does not. ASTERISK_SITE = $(call github,asterisk,asterisk,$(ASTERISK_VERSION)) +# compilation with the external pjsip produces a non-working asterisk, which +# segfaults. The reason behind this is unclear. +# https://github.com/asterisk/asterisk/issues/671 +ASTERISK_PJSIP_URL = https://raw.githubusercontent.com/asterisk/third-party/master/pjproject/2.15.1/ ASTERISK_SOUNDS_BASE_URL = http://downloads.asterisk.org/pub/telephony/sounds/releases ASTERISK_EXTRA_DOWNLOADS = \ $(ASTERISK_SOUNDS_BASE_URL)/asterisk-core-sounds-en-gsm-1.6.1.tar.gz \ - $(ASTERISK_SOUNDS_BASE_URL)/asterisk-moh-opsound-wav-2.03.tar.gz + $(ASTERISK_SOUNDS_BASE_URL)/asterisk-moh-opsound-wav-2.03.tar.gz \ + $(ASTERISK_PJSIP_URL)/pjproject-2.15.1.tar.bz2 ASTERISK_LICENSE = GPL-2.0, BSD-3-Clause (SHA1, resample), BSD-4-Clause (db1-ast) ASTERISK_LICENSE_FILES = \@@ -76,7 +81,6 @@ ASTERISK_CONF_OPTS = \ --without-neon29 \ --without-newt \ --without-openr2 \ - --without-osptk \ --without-postgres \ --without-popt \ --without-resample \@@ -94,10 +98,9 @@ ASTERISK_CONF_OPTS = \ --with-libjwt="$(STAGING_DIR)/usr" \ --with-libxml2 \ --with-libedit="$(STAGING_DIR)/usr" \ - --without-pjproject-bundled \ - --with-pjproject="$(STAGING_DIR)/usr" \ + --with-pjproject-bundled \ --with-sqlite3="$(STAGING_DIR)/usr" \ - --with-sounds-cache=$(ASTERISK_DL_DIR) + --with-download-cache=$(ASTERISK_DL_DIR) # avcodec are from ffmpeg. There is virtually zero chance this could # even work; asterisk is looking for ffmpeg/avcodec.h which has not@@ -135,13 +138,6 @@ else ASTERISK_CONF_OPTS += --without-gsm endif -ifeq ($(BR2_PACKAGE_ALSA_LIB),y) -ASTERISK_DEPENDENCIES += alsa-lib -ASTERISK_CONF_OPTS += --with-asound -else -ASTERISK_CONF_OPTS += --without-asound -endif - ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS),y) ASTERISK_DEPENDENCIES += bluez5_utils ASTERISK_CONF_OPTS += --with-bluetooth@@ -299,6 +295,15 @@ ASTERISK_INSTALL_TARGET_OPTS = \ LDCONFIG=true \ install samples +define ASTERISK_USERS + asterisk -1 asterisk -1 * /usr/lib/asterisk - - asterisk user +endef + +define ASTERISK_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/asterisk/asterisk.service \ + $(TARGET_DIR)/usr/lib/systemd/system/asterisk.service +endef + $(eval $(autotools-package)) #-------------------------------------------------------------------------------package/asterisk/asterisk.service new file +13
-0@@ -0,0 +1,23 @@ +# based on included asterisk.service, but changed +# Type to simple, comments removed +[Unit] +Description=Asterisk PBX and telephony daemon. +After=network.target + +[Service] +Type=simple +Environment=HOME=/usr/lib/asterisk +WorkingDirectory=/usr/lib/asterisk +User=asterisk +Group=asterisk +ExecStart=/usr/sbin/asterisk -mqf -C /etc/asterisk/asterisk.conf
package/asterisk/asterisk.service line 23
Quoted 10 lines
package/asterisk/asterisk.service new file +10
-0+ExecReload=/usr/sbin/asterisk -rx 'core reload' +RuntimeDirectory=asterisk +LimitCORE=infinity +Restart=always +RestartSec=4 +StandardOutput=null +PrivateTmp=true + +[Install] +WantedBy=multi-user.target
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot