Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions net/asterisk/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2017 - 2018 Jiri Slachta <jiri@slachta.eu>
# Copyright (C) 2017 - 2026 Jiri Slachta <jiri@slachta.eu>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
Expand All @@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=asterisk
PKG_VERSION:=23.1.0
PKG_VERSION:=23.2.2
PKG_RELEASE:=1
PKG_CPE_ID:=cpe:/a:digium:asterisk

PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/asterisk/releases
PKG_HASH:=04a05b555b27a7f5cc4f86d301190d7ee2cd4621490d262aed8613495b44316a
PKG_HASH:=dfba245e993d500a4a04a7e859e5e60d9623e769b403919254a140ec1d52aa71

PKG_BUILD_DEPENDS:=libxml2/host

Expand Down Expand Up @@ -314,7 +314,6 @@ MODULES_AVAILABLE:= \
res-stun-monitor \
res-timing-dahdi \
res-timing-pthread \
res-timing-timerfd \
res-tonedetect \
res-websocket-client \
res-xmpp
Expand Down Expand Up @@ -506,7 +505,7 @@ AST_CFG_FILES:= \
res_config_sqlite3.conf

AST_EMB_MODULES:=\
app_dial app_echo app_stack app_playback \
app_dial app_echo app_playback \
func_callerid func_logic func_strings func_timeout \
pbx_config res_crypto res_timing_timerfd

Expand Down Expand Up @@ -1047,7 +1046,6 @@ $(eval $(call BuildAsteriskModule,res-stir-shaken,STIR/SHAKEN resource module,ST
$(eval $(call BuildAsteriskModule,res-stun-monitor,STUN monitoring,STUN network monitor.,,res_stun_monitor.conf,res_stun_monitor,,))
$(eval $(call BuildAsteriskModule,res-timing-dahdi,DAHDI Timing Interface,DAHDI timing interface.,+$(PKG_NAME)-chan-dahdi,,res_timing_dahdi,,))
$(eval $(call BuildAsteriskModule,res-timing-pthread,pthread Timing Interface,pthread timing interface.,,,res_timing_pthread,,))
$(eval $(call BuildAsteriskModule,res-timing-timerfd,timerfd Timing Interface,timerfd timing interface.,,,res_timing_timerfd,,))
$(eval $(call BuildAsteriskModule,res-tonedetect,Tone detection,Tone detection module.,,,res_tonedetect,,))
$(eval $(call BuildAsteriskModule,res-websocket-client,WebSocket Client,WebSocket Client module.,,websocket_client.conf,res_websocket_client,,))
$(eval $(call BuildAsteriskModule,res-xmpp,XMPP client and component module,Asterisk XMPP interface.,+libiksemel +libopenssl,xmpp.conf,res_xmpp,,))
Expand Down
1 change: 1 addition & 0 deletions net/asterisk/files/asterisk.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

config asterisk 'general'
option enabled '0'
option interface 'wan'
option log_stderr '1'
option log_stdout '0'
option options ''
29 changes: 24 additions & 5 deletions net/asterisk/files/asterisk.init
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@
START=99

USE_PROCD=1

#PROCD_DEBUG=1

NAME=asterisk
COMMAND=/usr/sbin/$NAME

LOGGER="/usr/bin/logger -p daemon.err -s -t $NAME --"
log() {
level=$1
shift
/usr/bin/logger -p daemon.$level -s -t $NAME "$@"
}

start_service() {

dbdir=/var/lib/asterisk/astdb
logdir=/var/log/asterisk
cdrcsvdir=$logdir/cdr-csv
Expand All @@ -25,7 +27,7 @@ start_service() {

config_get_bool enabled general enabled 0
if [ $enabled -eq 0 ]; then
$LOGGER service not enabled in /etc/config/$NAME
log err "service not enabled in /etc/config/$NAME"
return 1
fi

Expand Down Expand Up @@ -59,9 +61,26 @@ start_service() {
# same for stdout
procd_set_param stdout $log_stdout
procd_close_instance

}

reload_service() {
procd_send_signal $NAME
}

extra_command "reregister" "Re-register all outbound registrations"
reregister() {
MODULES=`$COMMAND -x 'module show'` || exit 1

echo "$MODULES" | grep -q -s '^res_pjsip.so' && {
log info "re-registering all outbound pjsip registrations"
$COMMAND -x 'pjsip send unregister *all' -x 'pjsip send register *all'
}
}

service_triggers() {
config_load $NAME
config_get_bool enabled general enabled 0
config_get interface general interface ""

[ $enabled -eq 1 -a -n "$interface" ] && procd_add_interface_trigger "interface.*.up" "$interface" /etc/init.d/$NAME reregister
}
86 changes: 0 additions & 86 deletions net/asterisk/patches/001-phoneprov_users.patch

This file was deleted.

2 changes: 1 addition & 1 deletion net/asterisk/patches/130-eventfd.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure.ac
+++ b/configure.ac
@@ -1291,7 +1291,7 @@ if test "${ac_cv_have_variable_fdset}x"
@@ -1304,7 +1304,7 @@ if test "${ac_cv_have_variable_fdset}x"
fi

AC_MSG_CHECKING([if we have usable eventfd support])
Expand Down
2 changes: 1 addition & 1 deletion net/asterisk/patches/140-use-default-lua.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure.ac
+++ b/configure.ac
@@ -2641,7 +2641,7 @@ if test -z "$__opus_include" -o x"$__opu
@@ -2656,7 +2656,7 @@ if test -z "$__opus_include" -o x"$__opu
fi
AST_EXT_LIB_CHECK([OPUSFILE], [opusfile], [op_open_callbacks], [opus/opusfile.h], [], [$__opus_include])

Expand Down
20 changes: 20 additions & 0 deletions net/asterisk/patches/200-res_crypto-fix-compilation.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
From 2e296a9a6864dd18ae44ad3c9a224cb41be09a3e Mon Sep 17 00:00:00 2001
From: Andre Heider <a.heider@gmail.com>
Date: Thu, 20 Oct 2022 10:02:37 +0200
Subject: [PATCH] res_crypto: fix compilation

res_crypto.c:383:84: error: 'RSA_PKCS1_PADDING' undeclared (first use in this function)
---
res/res_crypto.c | 1 +
1 file changed, 1 insertion(+)

--- a/res/res_crypto.c
+++ b/res/res_crypto.c
@@ -39,6 +39,7 @@
#include <openssl/err.h> /* for ERR_print_errors_fp */
#include <openssl/ssl.h> /* for NID_sha1, RSA */
#include <openssl/evp.h> /* for EVP_PKEY, EVP_sha1(), ... */
+#include <openssl/rsa.h> /* for EVP_PKEY_CTX_set_rsa_padding(), ... */
#include <openssl/md5.h> /* for MD5_DIGEST_LENGTH */
#include <openssl/sha.h> /* for SHA_DIGEST_LENGTH */

Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
From 0f6efaf64d11fc6b06621576ea90d06b7bba9dcd Mon Sep 17 00:00:00 2001
From: Andre Heider <a.heider@gmail.com>
Date: Tue, 21 Feb 2023 13:23:36 +0100
Subject: [PATCH] Fix compilation with OPENSSL_NO_DEPRECATED

---
main/tcptls.c | 10 ++++------
res/res_rtp_asterisk.c | 2 +-
2 files changed, 5 insertions(+), 7 deletions(-)

--- a/main/tcptls.c
+++ b/main/tcptls.c
@@ -46,8 +46,7 @@
#include <openssl/x509v3.h> /* for GENERAL_NAME, sk_GENERAL_NAME... */
#ifndef OPENSSL_NO_DH
#include <openssl/bio.h> /* for BIO_free, BIO_new_file */
-#include <openssl/dh.h> /* for DH_free */
-#include <openssl/pem.h> /* for PEM_read_bio_DHparams */
+#include <openssl/pem.h> /* for PEM_read_bio_Parameters */
#endif /* OPENSSL_NO_DH */
#ifndef OPENSSL_NO_EC
#include <openssl/ec.h> /* for EC_KEY_free, EC_KEY_new_by_cu... */
@@ -189,7 +188,7 @@ static void *handle_tcptls_connection(vo
|| (!tcptls_session->client && ast_test_flag(&tcptls_session->parent->tls_cfg->flags, AST_SSL_VERIFY_CLIENT))) {
X509 *peer;
long res;
- peer = SSL_get_peer_certificate(ssl);
+ peer = SSL_get1_peer_certificate(ssl);
if (!peer) {
ast_log(LOG_ERROR, "No SSL certificate to verify from peer '%s'\n",
ast_sockaddr_stringify(&tcptls_session->remote_address));
@@ -530,16 +529,15 @@ static int __ssl_setup(struct ast_tls_co
if (!ast_strlen_zero(cfg->pvtfile)) {
BIO *bio = BIO_new_file(cfg->pvtfile, "r");
if (bio != NULL) {
- DH *dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
+ EVP_PKEY *dh = PEM_read_bio_Parameters(bio, NULL);
if (dh != NULL) {
- if (SSL_CTX_set_tmp_dh(cfg->ssl_ctx, dh)) {
+ if (SSL_CTX_set0_tmp_dh_pkey(cfg->ssl_ctx, dh)) {
long options = SSL_OP_CIPHER_SERVER_PREFERENCE | SSL_OP_SINGLE_DH_USE | SSL_OP_SINGLE_ECDH_USE;
options = SSL_CTX_set_options(cfg->ssl_ctx, options);
if (!suppress_progress_msgs) {
ast_verb(2, "TLS/SSL DH initialized, PFS cipher-suites enabled\n");
}
}
- DH_free(dh);
}
BIO_free(bio);
}
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -3122,7 +3122,7 @@ static int dtls_srtp_setup(struct ast_rt
if (rtp->dtls_verify & AST_RTP_DTLS_VERIFY_FINGERPRINT) {
X509 *certificate;

- if (!(certificate = SSL_get_peer_certificate(dtls->ssl))) {
+ if (!(certificate = SSL_get1_peer_certificate(dtls->ssl))) {
ast_log(LOG_WARNING, "No certificate was provided by the peer on RTP instance '%p'\n", instance);
return -1;
}
34 changes: 34 additions & 0 deletions net/asterisk/patches/202-VM_MESSAGEFILE.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From e8b2e65d2130c5b1841dc4a456bfb79aa017a37e Mon Sep 17 00:00:00 2001
From: Andre Heider <a.heider@gmail.com>
Date: Wed, 21 Jan 2026 10:28:50 +0100
Subject: [PATCH] VM_MESSAGEFILE

---
apps/app_voicemail.c | 8 ++++++++
1 file changed, 8 insertions(+)

--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -5889,6 +5889,7 @@ static int sendmail(char *srcemail,
char tmp[80] = "/tmp/astmail-XXXXXX";
char tmp2[256];
char *stringp;
+ char fname[PATH_MAX] = "";

if (vmu && ast_strlen_zero(vmu->email)) {
ast_log(AST_LOG_WARNING, "E-mail address missing for mailbox [%s]. E-mail will not be sent.\n", vmu->mailbox);
@@ -5912,7 +5913,14 @@ static int sendmail(char *srcemail,
make_email_file(p, srcemail, vmu, msgnum, context, mailbox, fromfolder, cidnum, cidname, attach, attach2, format, duration, attach_user_voicemail, chan, category, 0, flag, msg_id);
fclose(p);
snprintf(tmp2, sizeof(tmp2), "( %s < %s ; rm -f %s ) &", mailcmd, tmp, tmp);
+ if (ast_strlen_zero(attach)) {
+ unsetenv("VM_MESSAGEFILE");
+ } else {
+ snprintf(fname, sizeof(fname), "%s.%s", attach, format);
+ setenv("VM_MESSAGEFILE", fname, 1);
+ }
ast_safe_system(tmp2);
+ unsetenv("VM_MESSAGEFILE");
ast_debug(1, "Sent mail to %s with command '%s'\n", vmu->email, mailcmd);
}
return 0;
Loading