summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Kryvulia <o.kryvulia@flex-it.com.ua>2025-01-14 06:44:12 +0200
committerLi-Wen Hsu <lwhsu@FreeBSD.org>2025-01-19 01:42:50 +0800
commitd2de2e1ecfc00e3d271ef8a966654e7cf8f72e07 (patch)
tree2a0153f11505c10842cd9bc32d36f61b50923de5
parentgames/endless-sky-high-dpi: update 0.10.4 → 0.10.10 (diff)
Add net/asterisk22: LTS version of Asterisk PBX software
PR: 284056 Sponsored by: FLEX-IT LLC
-rw-r--r--net/Makefile1
-rw-r--r--net/asterisk22/Makefile327
-rw-r--r--net/asterisk22/distinfo11
-rw-r--r--net/asterisk22/files/asterisk.in86
-rw-r--r--net/asterisk22/files/patch-Makefile135
-rw-r--r--net/asterisk22/files/patch-Makefile.rules27
-rw-r--r--net/asterisk22/files/patch-agi_Makefile13
-rw-r--r--net/asterisk22/files/patch-build__tools_make__xml__documentation11
-rw-r--r--net/asterisk22/files/patch-channels_chan__dahdi.c33
-rw-r--r--net/asterisk22/files/patch-configure88
-rw-r--r--net/asterisk22/files/patch-contrib_Makefile23
-rw-r--r--net/asterisk22/files/patch-main_Makefile14
-rw-r--r--net/asterisk22/files/patch-main_lock.c12
-rw-r--r--net/asterisk22/files/patch-main_term.c10
-rw-r--r--net/asterisk22/files/patch-menuselect_configure11
-rw-r--r--net/asterisk22/files/patch-third-party_pjproject_Makefile30
-rw-r--r--net/asterisk22/files/patch-third-party_pjproject_Makefile.rules20
-rw-r--r--net/asterisk22/pkg-descr3
-rw-r--r--net/asterisk22/pkg-message42
-rw-r--r--net/asterisk22/pkg-plist419
20 files changed, 1316 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index 8f1970232468..e2fa5e90c569 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -35,6 +35,7 @@
SUBDIR += asterisk-g72x
SUBDIR += asterisk18
SUBDIR += asterisk20
+ SUBDIR += asterisk22
SUBDIR += astron
SUBDIR += avahi
SUBDIR += avahi-app
diff --git a/net/asterisk22/Makefile b/net/asterisk22/Makefile
new file mode 100644
index 000000000000..553da890d404
--- /dev/null
+++ b/net/asterisk22/Makefile
@@ -0,0 +1,327 @@
+PORTNAME= asterisk
+DISTVERSION= 22.1.1
+CATEGORIES= net
+MASTER_SITES= https://downloads.asterisk.org/pub/telephony/%SUBDIR%/:DEFAULT,g729
+MASTER_SITE_SUBDIR= asterisk/ \
+ asterisk/old-releases/ \
+ sounds/releases/:g729
+PKGNAMESUFFIX= 22
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
+ ${ASTERISK_CORE_G729_SOUNDS}:g729 \
+ ${ASTERISK_MOH_G729_SOUNDS}:g729
+DIST_SUBDIR= ${PORTNAME}
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
+
+MAINTAINER= o.kryvulia@flex-it.com.ua
+COMMENT= Open Source PBX and telephony toolkit
+WWW= https://www.asterisk.org
+
+LICENSE= GPLv2
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+LIB_DEPENDS= libjansson.so:devel/jansson \
+ libuuid.so:misc/e2fsprogs-libuuid
+
+USES= bison compiler:c11 cpe gmake gnome iconv libedit localbase \
+ ncurses pkgconfig shebangfix sqlite ssl
+CPE_VENDOR= digium
+USE_GITHUB= nodefault
+USE_GNOME= libxml2
+USE_LDCONFIG= yes
+USE_RC_SUBR= asterisk
+
+SHEBANG_FILES= agi/agi-test.agi \
+ agi/jukebox.agi \
+ contrib/scripts/astversion \
+ contrib/scripts/ast_coredumper
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --datarootdir=${DATADIR} \
+ --with-crypto=${OPENSSLBASE} \
+ --with-externals-cache=${DISTDIR}/${DIST_SUBDIR} \
+ --with-ilbc=internal \
+ --with-ssl=${OPENSSLBASE}
+
+MAKE_ARGS+= ASTDATADIR=${DATADIR} \
+ NOISY_BUILD=yes
+MAKE_ENV= ASTCFLAGS="${CFLAGS}" \
+ ASTLDFLAGS="${LDFLAGS}" \
+ DOCSDIR=${DOCSDIR} \
+ MKDIR="${MKDIR}" \
+ OSVERSION=${OSVERSION} \
+ PTHREAD_LIBS="-lpthread" \
+ PWLIBDIR=${LOCALBASE}/share/pwlib
+
+LDFLAGS+= -L. -Wl,--undefined-version
+
+CONFLICTS= ossp-uuid
+CONFLICTS_BUILD= linuxthreads
+CONFLICTS_INSTALL= asterisk18 asterisk20
+
+USERS= ${ASTERISK_USER}
+GROUPS= ${ASTERISK_GROUP} dahdi
+
+OPTIONS_DEFINE= ASTVERSION BACKTRACE CURL EXCHANGE FREETDS G729 LDAP LUA \
+ MP3PLAYER OOH323 OPTIMIZED_CFLAGS PJSIP PORTAUDIO RADIUS SNMP \
+ SPANDSP SRTP SYSINFO URIPARSER XMLDOC XMPP
+OPTIONS_DEFINE_aarch64= GEOLOCATION
+OPTIONS_DEFINE_amd64= DAHDI GEOLOCATION
+OPTIONS_DEFINE_i386= DAHDI GEOLOCATION
+OPTIONS_DEFINE_powerpc= DAHDI
+OPTIONS_DEFINE_powerpc64= DAHDI
+OPTIONS_DEFINE_powerpc64le= DAHDI
+OPTIONS_DEFAULT= CURL FREETDS GSM LUA MP3PLAYER NEWT ODBC OPUS MYSQL PGSQL \
+ PJSIP PORTAUDIO RADIUS SNMP SPANDSP SPEEX SRTP URIPARSER \
+ VORBIS XMLDOC
+OPTIONS_DEFAULT_amd64= DAHDI XMPP
+OPTIONS_DEFAULT_i386= DAHDI XMPP
+OPTIONS_DEFAULT_powerpc= DAHDI XMPP
+OPTIONS_DEFAULT_powerpc64= DAHDI XMPP
+OPTIONS_DEFAULT_powerpc64le= DAHDI XMPP
+
+OPTIONS_GROUP= CODECS DATABASE
+OPTIONS_GROUP_CODECS= GSM NEWG711 OPUS SPEEX VORBIS
+OPTIONS_GROUP_DATABASE= MYSQL ODBC PGSQL
+
+OPTIONS_MULTI= MENU
+OPTIONS_MULTI_MENU= NCURSES NEWT
+OPTIONS_SUB= yes
+
+ASTVERSION_DESC= Install astversion (requires bash)
+BACKTRACE_DESC= Stack backtrace support via (lib)execinfo
+CODECS_DESC= Encoder/Decoder (Codec) Support
+DAHDI_DESC= DAHDI support
+DATABASE_DESC= Database Support
+EXCHANGE_DESC= Exchange calendar support
+G729_DESC= Install G.729 format sounds for Music-on-Hold (MoH)
+GEOLOCATION_DESC= Enable SIP Geolocation support
+MENU_DESC= Menuselect Interface Backend
+MP3PLAYER_DESC= Install MP3 Player for Music-On-Hold (mpg123)
+NEWG711_DESC= New G711 Codec
+NEWT_DESC= Newt User Interface
+OOH323_DESC= ooh323 support
+OPUS_DESC= Opus Codec
+PJSIP_DESC= Build the PJSIP based SIP channel
+SRTP_DESC= SecureRTP support
+SYSINFO_DESC= Use devel/libsysinfo to get system information
+URIPARSER_DESC= Use RFC 3986 compliant uriparser library
+XMLDOC_DESC= Build and install XML documentation
+XMPP_DESC= XMPP/GTALK support
+
+ASTVERSION_RUN_DEPENDS= bash:shells/bash
+
+BACKTRACE_CONFIGURE_WITH= execinfo
+
+CURL_LIB_DEPENDS= libcurl.so:ftp/curl
+CURL_CONFIGURE_WITH= libcurl
+
+DAHDI_LIB_DEPENDS= libpri.so:misc/libpri \
+ libopenr2.so:misc/openr2 \
+ libtonezone.so:misc/dahdi
+DAHDI_CONFIGURE_WITH= dahdi openr2
+
+EXCHANGE_LIB_DEPENDS= libexpat.so:textproc/expat2 \
+ libneon.so:www/neon
+EXCHANGE_USES= gettext-runtime
+EXCHANGE_CONFIGURE_OFF= --without-neon --without-neon29
+
+FREETDS_LIB_DEPENDS= libsybdb.so:databases/freetds
+FREETDS_CONFIGURE_ON= --with-tds=${LOCALBASE}
+FREETDS_CONFIGURE_OFF= --without-tds
+
+GEOLOCATION_USE= GNOME=libxslt
+
+GSM_LIB_DEPENDS= libgsm.so:audio/gsm
+GSM_CONFIGURE_WITH= gsm
+
+LDAP_USES= ldap
+LDAP_CONFIGURE_WITH= ldap
+
+LUA_USES= lua
+LUA_CONFIGURE_WITH= lua
+LUA_CFLAGS= -I${LUA_INCDIR}
+LUA_LDFLAGS= -L${LUA_LIBDIR}
+
+MP3PLAYER_RUN_DEPENDS= mpg123:audio/mpg123
+
+MYSQL_LIB_DEPENDS= libzstd.so:archivers/zstd \
+ libunwind.so:devel/libunwind
+MYSQL_USES= mysql
+MYSQL_CONFIGURE_WITH= mysqlclient
+
+NCURSES_USES= ncurses
+
+NEWT_LIB_DEPENDS= libnewt.so:devel/newt
+
+ODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC \
+ libltdl.so:devel/libltdl
+ODBC_CONFIGURE_ON= --with-ltdl
+ODBC_CONFIGURE_WITH= unixodbc
+
+OPUS_EXTRACT_ONLY= ${DISTFILE_opus}
+OPUS_LIB_DEPENDS= libopus.so:audio/opus
+OPUS_GH_TUPLE= traud:asterisk-opus:83e1b458c77e0e287adeca494eeb79edb077b0ff:opus
+
+PGSQL_USES= pgsql
+PGSQL_CONFIGURE_WITH= postgres
+
+PJSIP_LIB_DEPENDS= libsrtp2.so:net/libsrtp2 \
+ libspeex.so:audio/speex \
+ libspeexdsp.so:audio/speexdsp
+PJSIP_GH_TUPLE= pjsip:pjproject:${PJSIP_VERSION}:pjsip
+PJSIP_CONFIGURE_WITH= pjproject pjproject-bundled
+
+PORTAUDIO_LIB_DEPENDS= libportaudio.so:audio/portaudio
+PORTAUDIO_CONFIGURE_WITH= portaudio
+
+RADIUS_LIB_DEPENDS= libradiusclient-ng.so:net/radiusclient
+RADIUS_CONFIGURE_WITH= radius
+
+SNMP_LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp \
+ libpkg.so:${PKG_ORIGIN}
+SNMP_CONFIGURE_WITH= netsnmp
+
+SPANDSP_LIB_DEPENDS= libspandsp.so:comms/spandsp \
+ libtiff.so:graphics/tiff
+SPANDSP_CONFIGURE_WITH= spandsp
+
+SPEEX_LIB_DEPENDS= libspeex.so:audio/speex \
+ libspeexdsp.so:audio/speexdsp
+SPEEX_CONFIGURE_WITH= speex
+
+SRTP_LIB_DEPENDS= libsrtp2.so:net/libsrtp2
+SRTP_CONFIGURE_WITH= srtp
+
+SYSINFO_LIB_DEPENDS= libsysinfo.so:devel/libsysinfo
+
+URIPARSER_LIB_DEPENDS= liburiparser.so:net/uriparser
+URIPARSER_CONFIGURE_WITH= uriparser
+
+VORBIS_LIB_DEPENDS= libvorbis.so:audio/libvorbis \
+ libogg.so:audio/libogg
+VORBIS_CONFIGURE_WITH= ogg
+
+XMLDOC_CONFIGURE_ENABLE= xmldoc
+
+XMPP_LIB_DEPENDS= libiksemel.so:textproc/iksemel
+XMPP_CONFIGURE_WITH= iksemel
+
+ASTERISK_CORE_G729_SOUNDS= asterisk-core-sounds-en-g729-1.6.tar.gz
+ASTERISK_MOH_G729_SOUNDS= asterisk-moh-opsound-g729-2.03.tar.gz
+
+ASTERISK_USER= asterisk
+ASTERISK_GROUP= asterisk
+
+PJSIP_VERSION= 2.14.1
+
+.include <bsd.port.options.mk>
+
+.include <bsd.port.pre.mk>
+
+.if (${OPSYS} == FreeBSD && ${OSVERSION} >= 1400092 && ${SSL_DEFAULT} == base) || \
+ ${SSL_DEFAULT:Mopenssl3*}
+LIB_DEPENDS+= libgnutls.so:security/gnutls
+CFLAGS+= -DOPENSSL_API_COMPAT=0x10100000L
+LDFLAGS+= -lgnutls
+.endif
+
+.if empty(ICONV_LIB)
+CONFIGURE_ARGS+= ac_cv_lib_iconv_iconv_open=no \
+ ac_cv_lib_iconv_libiconv_open=no
+.endif
+
+.if ${PREFIX} == ${LOCALBASE}
+VARDIR= /var
+.else
+VARDIR= ${PREFIX}/var
+.endif
+
+SUB_LIST+= ASTERISK_USER=${ASTERISK_USER}
+PLIST_SUB+= ASTERISK_GROUP=${ASTERISK_GROUP} \
+ ASTERISK_USER=${ASTERISK_USER} \
+ VARDIR=${VARDIR}
+
+.if ${PORT_OPTIONS:MGEOLOCATION}
+.if ${ARCH} == i386
+LLD_EMULATION= elf_i386
+.elif ${ARCH} == amd64
+LLD_EMULATION= elf_x86_64
+.elif ${ARCH} == aarch64
+LLD_EMULATION= aarch64elf
+.endif
+.endif
+
+post-extract:
+ @${FIND} ${WRKSRC} -name '*.d' -delete
+
+post-extract-G729-on:
+ ${CP} ${DISTDIR}/${DIST_SUBDIR}/${ASTERISK_CORE_G729_SOUNDS} ${WRKSRC}/sounds
+ ${CP} ${DISTDIR}/${DIST_SUBDIR}/${ASTERISK_MOH_G729_SOUNDS} ${WRKSRC}/sounds
+
+post-extract-OPUS-on:
+ ${CP} ${WRKSRC_opus}/include/asterisk/* ${WRKSRC}/include/asterisk
+ ${CP} ${WRKSRC_opus}/codecs/* ${WRKSRC}/codecs
+ ${CP} ${WRKSRC_opus}/res/* ${WRKSRC}/res
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|/var/lib|${PREFIX}/share|g' ${WRKSRC}/configs/samples/musiconhold.conf.sample
+ @${REINPLACE_CMD} -e 's/@XMLSTARLET@//' ${WRKSRC}/makeopts.in
+ @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/main/term.c
+.if exists(${FILESDIR}/.asterisk.makeopts)
+ ${CP} ${FILESDIR}/.asterisk.makeopts ${WRKSRC}/menuselect.makeopts
+.endif
+
+post-patch-GEOLOCATION-on:
+ @${REINPLACE_CMD} -e 's/%%LLD_EMULATION%%/${LLD_EMULATION}/' ${WRKSRC}/Makefile.rules
+
+post-patch-SYSINFO-on:
+ @${REINPLACE_CMD} -e 's/%%LIBSYSINFO%%/-lsysinfo/' ${WRKSRC}/main/Makefile
+
+post-patch-SYSINFO-off:
+ @${REINPLACE_CMD} -e '/#define HAVE_SYSINFO 1/d' ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e '/%%LIBSYSINFO%%/d' ${WRKSRC}/main/Makefile
+
+post-configure:
+ @cd ${WRKSRC} && ${MAKE_CMD} menuselect.makeopts
+ @cd ${WRKSRC} && ./menuselect/menuselect --disable res_timing_kqueue menuselect.makeopts
+
+post-configure-GEOLOCATION-on:
+ @cd ${WRKSRC} && ./menuselect/menuselect --enable res_geolocation menuselect.makeopts
+
+post-configure-GEOLOCATION-off:
+ @cd ${WRKSRC} && ./menuselect/menuselect --disable res_geolocation menuselect.makeopts
+
+post-configure-MYSQL-on:
+ @cd ${WRKSRC} && ./menuselect/menuselect --enable res_config_mysql menuselect.makeopts
+
+post-configure-OOH323-on:
+ @cd ${WRKSRC} && ./menuselect/menuselect --enable chan_ooh323 menuselect.makeopts
+
+post-configure-NEWG711-on:
+ @cd ${WRKSRC} && ./menuselect/menuselect --enable G711_NEW_ALGORITHM menuselect.makeopts
+
+post-configure-OPTIMIZED_CFLAGS-off:
+ @cd ${WRKSRC} && ./menuselect/menuselect --disable BUILD_NATIVE menuselect.makeopts
+
+post-configure-OPUS-on:
+ @cd ${WRKSRC} && ./menuselect/menuselect --enable codec_opus_open_source menuselect.makeopts
+
+post-install:
+ @${RM} ${STAGEDIR}${ETCDIR}/*.conf ${STAGEDIR}${ETCDIR}/extensions.ael ${STAGEDIR}${ETCDIR}/extensions.lua
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/ast[a-f]* ${STAGEDIR}${PREFIX}/lib/*.so.* ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/modules/*.so ${STAGEDIR}${DATADIR}/agi-bin/eagi-*
+ ${FIND} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/modules -type f -name '*.so' | ${SED} "s,^${STAGEDIR}${PREFIX}/,," >> ${TMPPLIST}
+ ${FIND} ${STAGEDIR}${DATADIR}/sounds -type f | ${SED} "s,^${STAGEDIR}${DATADIR},${DATADIR}," >> ${TMPPLIST}
+ ${FIND} ${STAGEDIR}${DATADIR}/moh -type f | ${SED} "s,^${STAGEDIR}${DATADIR},${DATADIR}," >> ${TMPPLIST}
+
+ (cd ${STAGEDIR} && \
+ ${ECHO} "@owner ${ASTERISK_USER}" >> ${TMPPLIST} && \
+ ${ECHO} "@group ${ASTERISK_GROUP}" >> ${TMPPLIST} && \
+ ${FIND} var/spool/${PORTNAME}/voicemail/default -type f | ${SED} "s,^,/," >> ${TMPPLIST} && \
+ ${FIND} var/spool/${PORTNAME}/voicemail/ -type d | ${SED} "s,^,@dir /," >> ${TMPPLIST} && \
+ ${ECHO} "@owner" >> ${TMPPLIST} && \
+ ${ECHO} "@group" >> ${TMPPLIST});
+
+post-install-ASTVERSION-off:
+ @${RM} ${STAGEDIR}${PREFIX}/sbin/astversion
+
+.include <bsd.port.post.mk>
diff --git a/net/asterisk22/distinfo b/net/asterisk22/distinfo
new file mode 100644
index 000000000000..180da5697443
--- /dev/null
+++ b/net/asterisk22/distinfo
@@ -0,0 +1,11 @@
+TIMESTAMP = 1736765958
+SHA256 (asterisk/asterisk-22.1.1.tar.gz) = e697740d91c33bf02d506d4da04635da48bfb0b5bb79bf8863c1a9b8f791264f
+SIZE (asterisk/asterisk-22.1.1.tar.gz) = 26220027
+SHA256 (asterisk/asterisk-core-sounds-en-g729-1.6.tar.gz) = b49dec15e07bb9bff6af0da3a07180651a38ef54d3ea54a3f20c35f081ed8714
+SIZE (asterisk/asterisk-core-sounds-en-g729-1.6.tar.gz) = 1557798
+SHA256 (asterisk/asterisk-moh-opsound-g729-2.03.tar.gz) = 0147ca9a97f0c550227aacb7793499057c4d2c64e021c95f93722f27d5549585
+SIZE (asterisk/asterisk-moh-opsound-g729-2.03.tar.gz) = 1103000
+SHA256 (asterisk/traud-asterisk-opus-83e1b458c77e0e287adeca494eeb79edb077b0ff_GH0.tar.gz) = 572a3c956371ed62b44a4bcd973db10eb4c84f3040cf7156e3acfad3b6bf3ded
+SIZE (asterisk/traud-asterisk-opus-83e1b458c77e0e287adeca494eeb79edb077b0ff_GH0.tar.gz) = 24044
+SHA256 (asterisk/pjsip-pjproject-2.14.1_GH0.tar.gz) = 6140f7a97e318caa89c17e8d5468599671c6eed12d64a7c160dac879ba004c68
+SIZE (asterisk/pjsip-pjproject-2.14.1_GH0.tar.gz) = 10322231
diff --git a/net/asterisk22/files/asterisk.in b/net/asterisk22/files/asterisk.in
new file mode 100644
index 000000000000..5fab82c5700e
--- /dev/null
+++ b/net/asterisk22/files/asterisk.in
@@ -0,0 +1,86 @@
+#!/bin/sh
+
+# PROVIDE: asterisk
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable asterisk:
+#
+# asterisk_enable (bool): Set it to "YES" to enable asterisk
+# Default is "NO"
+# asterisk_user (string): User asterisk runs as
+# Default is %%ASTERISK_USER%%
+# asterisk_group (string): Group asterisk runs as
+# Default is %%ASTERISK_GROUP%%
+# asterisk_args (string): Extra argumeents to pass to asterisk at startup
+# Default is "-n"
+# asterisk_pidfile (string): Location of the asterisk pid file
+# Default is /var/run/asterisk/asterisk.pid
+# asterisk_stopsleep (int): Number of seconds to sleep before sending stop command
+# Default is 0, which disables it
+# asterisk_umask (string): File creation mode mask to run asterisk with
+#
+
+. /etc/rc.subr
+
+name=asterisk
+rcvar=asterisk_enable
+desc="Asterisk PBX server"
+
+load_rc_config $name
+
+: ${asterisk_enable:=NO}
+: ${asterisk_user:=%%ASTERISK_USER%%}
+: ${asterisk_group:=%%ASTERISK_GROUP%%}
+: ${asterisk_args=-n}
+: ${asterisk_pidfile:=/var/run/asterisk/asterisk.pid}
+: ${asterisk_stopsleep:=0}
+
+extra_commands=reload
+
+start_precmd=asterisk_precmd
+stop_cmd=asterisk_stop
+reload_cmd=asterisk_reload
+
+pidfile="${asterisk_pidfile}"
+
+command="%%PREFIX%%/sbin/asterisk"
+command_args="${asterisk_args} -F -U ${asterisk_user}"
+
+asterisk_precmd()
+{
+ local rundir=${asterisk_pidfile%/*}
+ if [ ! -d $rundir ] ; then
+ install -d -m 0750 -o "${asterisk_user}" -g "${asterisk_group}" "$rundir"
+ fi
+ if [ -n "${asterisk_umask}" ]; then
+ umask ${asterisk_umask}
+ fi
+}
+
+asterisk_stop()
+{
+ if [ -z "$rc_pid" ]; then
+ [ -n "$rc_fast" ] && return 0
+ _run_rc_notrunning
+ return 1
+ fi
+ echo 'Stopping asterisk.'
+ if [ ${asterisk_stopsleep} -gt 0 ]; then
+ sleep ${asterisk_stopsleep}
+ fi
+ $command -rx 'core stop now'
+ wait_for_pids $rc_pid
+}
+
+asterisk_reload()
+{
+ if [ -z "$rc_pid" ]; then
+ _run_rc_notrunning
+ return 1
+ fi
+ echo 'Reloading asterisk.'
+ $command -rx 'reload'
+}
+
+run_rc_command "$1"
diff --git a/net/asterisk22/files/patch-Makefile b/net/asterisk22/files/patch-Makefile
new file mode 100644
index 000000000000..30def8923871
--- /dev/null
+++ b/net/asterisk22/files/patch-Makefile
@@ -0,0 +1,135 @@
+--- Makefile.orig 2022-08-18 15:18:29 UTC
++++ Makefile
+@@ -144,7 +144,7 @@ ASTTOPDIR:=$(subst $(space),\$(space),$(CURDIR))
+ OVERWRITE=y
+
+ # Include debug and macro symbols in the executables (-g) and profiling info (-pg)
+-DEBUG=-g3
++#DEBUG=-g3
+
+ # Asterisk.conf is located in ASTETCDIR or by using the -C flag
+ # when starting Asterisk
+@@ -168,7 +168,7 @@ LINKER_SYMBOL_PREFIX=
+ #_ASTCFLAGS+=-DOLD_DSP_ROUTINES
+
+ # Default install directory for DAHDI hooks.
+-DAHDI_UDEV_HOOK_DIR = /usr/share/dahdi/span_config.d
++#DAHDI_UDEV_HOOK_DIR = /usr/share/dahdi/span_config.d
+
+ # If the file .asterisk.makeopts is present in your home directory, you can
+ # include all of your favorite menuselect options so that every time you download
+@@ -226,12 +226,6 @@ else ifneq ($(findstring BSD,$(OSARCH)),)
+ _ASTCFLAGS+=-isystem /usr/local/include
+ endif
+
+-ifeq ($(OSARCH),FreeBSD)
+- # -V is understood by BSD Make, not by GNU make.
+- BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
+- _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
+-endif
+-
+ ifeq ($(OSARCH),NetBSD)
+ _ASTCFLAGS+=-pthread -D__LIBPTHREAD_SOURCE__ -I/usr/pkg/include
+ endif
+@@ -475,8 +469,12 @@ endif
+ $(INSTALL) -m 644 $$n "$(DESTDIR)$(ASTDATADIR)/static-http/docs" ; \
+ done \
+ fi
++ if [ ! -d $(DESTDIR)$(DOCSDIR)/images ]; then \
++ $(MKDIR) $(DESTDIR)$(DOCSDIR)/images; \
++ fi
++
+ for x in images/*.jpg; do \
+- $(INSTALL) -m 644 $$x "$(DESTDIR)$(ASTDATADIR)/images" ; \
++ $(INSTALL) -m 644 $$x "$(DESTDIR)$(DOCSDIR)/images" ; \
+ done
+ $(MAKE) -C sounds install
+ find rest-api -name "*.json" | while read x; do \
+@@ -545,7 +543,7 @@ INSTALLDIRS="$(ASTLIBDIR)" "$(ASTMODDIR)" "$(ASTSBINDI
+ "$(ASTDATADIR)/firmware/iax" "$(ASTDATADIR)/images" "$(ASTDATADIR)/keys" \
+ "$(ASTDATADIR)/phoneprov" "$(ASTDATADIR)/rest-api" "$(ASTDATADIR)/static-http" \
+ "$(ASTDATADIR)/sounds" "$(ASTDATADIR)/moh" "$(ASTMANDIR)/man8" "$(AGI_DIR)" "$(ASTDBDIR)" \
+- "$(ASTDATADIR)/third-party" "${ASTDATADIR}/keys/stir_shaken" "${ASTDATADIR}/keys/stir_shaken/cache"
++ "$(ASTDATADIR)/third-party" "${ASTDATADIR}/keys/stir_shaken" "$(ASTSPOOLDIR)/outgoing"
+
+ installdirs:
+ @for i in $(INSTALLDIRS); do \
+@@ -557,7 +555,7 @@ installdirs:
+ main-bininstall:
+ +@DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" ASTLIBDIR="$(ASTLIBDIR)" $(SUBMAKE) -C main bininstall
+
+-bininstall: _all installdirs $(SUBDIRS_INSTALL) main-bininstall
++bininstall: _all installdirs $(SUBDIRS_INSTALL) main-bininstall install-headers
+ $(INSTALL) -m 755 contrib/scripts/astversion "$(DESTDIR)$(ASTSBINDIR)/"
+ $(INSTALL) -m 755 contrib/scripts/astgenkey "$(DESTDIR)$(ASTSBINDIR)/"
+ $(INSTALL) -m 755 contrib/scripts/autosupport "$(DESTDIR)$(ASTSBINDIR)/"
+@@ -578,10 +576,10 @@ endif
+ if [ -f contrib/firmware/iax/iaxy.bin ] ; then \
+ $(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin "$(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin"; \
+ fi
+-ifeq ($(HAVE_DAHDI),1)
+- $(INSTALL) -d $(DESTDIR)/$(DAHDI_UDEV_HOOK_DIR)
+- $(INSTALL) -m 644 contrib/scripts/dahdi_span_config_hook $(DESTDIR)$(DAHDI_UDEV_HOOK_DIR)/40-asterisk
+-endif
++#ifeq ($(HAVE_DAHDI),1)
++# $(INSTALL) -d $(DESTDIR)/$(DAHDI_UDEV_HOOK_DIR)
++# $(INSTALL) -m 644 contrib/scripts/dahdi_span_config_hook $(DESTDIR)$(DAHDI_UDEV_HOOK_DIR)/40-asterisk
++#endif
+
+ $(SUBDIRS_INSTALL):
+ +@DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" ASTDATADIR="$(ASTDATADIR)" $(SUBMAKE) -C $(@:-install=) install
+@@ -706,7 +704,7 @@ ifeq ($(ASTERISKVERSION),UNKNOWN__git_check_fail)
+ endif
+
+
+-install: badshell versioncheck bininstall datafiles
++install: badshell versioncheck bininstall datafiles samples
+ @if [ -x /usr/sbin/asterisk-post-install ]; then \
+ /usr/sbin/asterisk-post-install "$(DESTDIR)" . ; \
+ fi
+@@ -751,23 +749,10 @@ upgrade: bininstall
+ # (2) the extension to strip off
+ define INSTALL_CONFIGS
+ @for x in $(1)/*$(2); do \
+- dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x $(2)`"; \
+- if [ -f "$${dst}" ]; then \
+- if [ "$(OVERWRITE)" = "y" ]; then \
+- if cmp -s "$${dst}" "$$x" ; then \
+- echo "Config file $$x is unchanged"; \
+- continue; \
+- fi ; \
+- mv -f "$${dst}" "$${dst}.old" ; \
+- else \
+- echo "Skipping config file $$x"; \
+- continue; \
+- fi ;\
+- fi ; \
+ echo "Installing file $$x"; \
+- $(INSTALL) -m 644 "$$x" "$${dst}" ;\
++ $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`.sample ; \
+ done ; \
+- if [ "$(OVERWRITE)" = "y" ]; then \
++ if true; then \
+ echo "Updating asterisk.conf" ; \
+ sed -e 's|^astcachedir.*$$|astcachedir => $(ASTCACHEDIR)|' \
+ -e 's|^astetcdir.*$$|astetcdir => $(ASTETCDIR)|' \
+@@ -781,8 +766,8 @@ define INSTALL_CONFIGS
+ -e 's|^astrundir.*$$|astrundir => $(ASTVARRUNDIR)|' \
+ -e 's|^astlogdir.*$$|astlogdir => $(ASTLOGDIR)|' \
+ -e 's|^astsbindir.*$$|astsbindir => $(ASTSBINDIR)|' \
+- "$(DESTDIR)$(ASTCONFPATH)" > "$(DESTDIR)$(ASTCONFPATH).tmp" ; \
+- $(INSTALL) -m 644 "$(DESTDIR)$(ASTCONFPATH).tmp" "$(DESTDIR)$(ASTCONFPATH)" ; \
++ "$(DESTDIR)$(ASTCONFPATH).sample" > "$(DESTDIR)$(ASTCONFPATH).tmp" ; \
++ $(INSTALL) -m 644 "$(DESTDIR)$(ASTCONFPATH).tmp" "$(DESTDIR)$(ASTCONFPATH).sample" ; \
+ rm -f "$(DESTDIR)$(ASTCONFPATH).tmp" ; \
+ fi
+ endef
+@@ -816,7 +801,7 @@ adsi:
+ else \
+ echo "Installing $$x" ; \
+ fi ; \
+- $(INSTALL) -m 644 "$$x" "$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
++ $(INSTALL) -m 644 "$$x" "$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`.sample" ; \
+ done
+
+ samples: adsi
diff --git a/net/asterisk22/files/patch-Makefile.rules b/net/asterisk22/files/patch-Makefile.rules
new file mode 100644
index 000000000000..4c4adf5b830a
--- /dev/null
+++ b/net/asterisk22/files/patch-Makefile.rules
@@ -0,0 +1,27 @@
+--- Makefile.rules.orig 2023-01-12 11:42:40 UTC
++++ Makefile.rules
+@@ -107,6 +107,11 @@ ifeq ($(C_COMPILER_FAMILY),clang)
+ # Clang -Werror warning suppressions
+ ifeq ($(C_COMPILER_FAMILY),clang)
+ CC_CFLAGS+=-Wno-unused-value -Wno-parentheses-equality
++ BINARY_LLD_FLAGS= -z noexecstack
++ LLD_EMULATION=%%LLD_EMULATION%%
++else
++ BINARY_LLD_FLAGS=
++ LLD_EMULATION=
+ endif
+
+ ifeq ($(GNU_LD),1)
+@@ -213,10 +218,10 @@ endif
+ # extern const size_t _binary_abc_def_xml_size;
+ %.o: %.xml
+ $(ECHO_PREFIX) echo " [LD] $^ -> $@"
+- $(CMD_PREFIX) $(CC) -g -Wl,-znoexecstack -nostartfiles -nodefaultlibs -nostdlib -r -Wl,-b,binary -o $@ $^
++ $(CMD_PREFIX) $(CC) -g -Wl,-znoexecstack -nostartfiles -nodefaultlibs -nostdlib $(BINARY_LLD_FLAGS) -r -Wl,-b,binary,-m,$(LLD_EMULATION) -o $@ $^
+
+ %.o: %.xslt
+ $(ECHO_PREFIX) echo " [LD] $^ -> $@"
+- $(CMD_PREFIX) $(CC) -g -Wl,-znoexecstack -nostartfiles -nodefaultlibs -nostdlib -r -Wl,-b,binary -o $@ $^
++ $(CMD_PREFIX) $(CC) -g -Wl,-znoexecstack -nostartfiles -nodefaultlibs -nostdlib $(BINARY_LLD_FLAGS) -r -Wl,-b,binary,-m,$(LLD_EMULATION) -o $@ $^
+
+ dist-clean:: clean
diff --git a/net/asterisk22/files/patch-agi_Makefile b/net/asterisk22/files/patch-agi_Makefile
new file mode 100644
index 000000000000..019ad10e1ef9
--- /dev/null
+++ b/net/asterisk22/files/patch-agi_Makefile
@@ -0,0 +1,13 @@
+--- agi/Makefile.orig 2020-07-09 15:39:17 UTC
++++ agi/Makefile
+@@ -16,7 +16,9 @@ ASTTOPDIR?=..
+
+ .PHONY: clean all uninstall
+
+-AGIS=$(MENUSELECT_AGIS)
++AGIS_BIN=eagi-test eagi-sphinx-test
++AGIS_SCR=agi-test.agi jukebox.agi
++AGIS=$(AGIS_SCR) $(AGIS_BIN)
+
+ ifeq ($(OSARCH),SunOS)
+ LIBS+=-lsocket -lnsl
diff --git a/net/asterisk22/files/patch-build__tools_make__xml__documentation b/net/asterisk22/files/patch-build__tools_make__xml__documentation
new file mode 100644
index 000000000000..af57b9e6dc2c
--- /dev/null
+++ b/net/asterisk22/files/patch-build__tools_make__xml__documentation
@@ -0,0 +1,11 @@
+--- build_tools/make_xml_documentation.orig 2024-10-17 16:00:41 UTC
++++ build_tools/make_xml_documentation
+@@ -220,7 +220,7 @@ for subdir in ${mod_subdirs} ; do
+ ${XMLSTARLET} val -e -d "${source_tree}/doc/appdocsxml.dtd" "${i}" || { echo "" ; exit 1 ; }
+ fi
+ fi
+- ${SED} -r "/^\s*(<[?]xml|<.DOCTYPE|<.?docs)/d" "${i}" >> "${output_file}"
++ ${SED} -r "/^[[:space:]]*(<[?]xml|<.DOCTYPE|<.?docs)/d" "${i}" >> "${output_file}"
+ done
+ done
+ echo "</docs>" >> "${output_file}"
diff --git a/net/asterisk22/files/patch-channels_chan__dahdi.c b/net/asterisk22/files/patch-channels_chan__dahdi.c
new file mode 100644
index 000000000000..e062d643f2fd
--- /dev/null
+++ b/net/asterisk22/files/patch-channels_chan__dahdi.c
@@ -0,0 +1,33 @@
+--- channels/chan_dahdi.c.orig 2024-10-17 16:00:41 UTC
++++ channels/chan_dahdi.c
+@@ -4909,6 +4909,8 @@ void dahdi_ec_enable(struct dahdi_pvt *p)
+ return;
+ }
+ if (p->echocancel.head.tap_length) {
++ struct dahdi_echocanparams *pecp;
++
+ #if defined(HAVE_PRI) || defined(HAVE_SS7)
+ switch (p->sig) {
+ #if defined(HAVE_PRI)
+@@ -4939,7 +4941,9 @@ void dahdi_ec_enable(struct dahdi_pvt *p)
+ break;
+ }
+ #endif /* defined(HAVE_PRI) || defined(HAVE_SS7) */
+- res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &p->echocancel);
++
++ pecp = &p->echocancel.head;
++ res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &pecp);
+ if (res) {
+ ast_log(LOG_WARNING, "Unable to enable echo cancellation on channel %d (%s)\n", p->channel, strerror(errno));
+ } else {
+@@ -4973,8 +4977,9 @@ void dahdi_ec_disable(struct dahdi_pvt *p)
+
+ if (p->echocanon) {
+ struct dahdi_echocanparams ecp = { .tap_length = 0 };
++ struct dahdi_echocanparams *pecp = &ecp;
+
+- res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &ecp);
++ res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &pecp);
+
+ if (res)
+ ast_log(LOG_WARNING, "Unable to disable echo cancellation on channel %d: %s\n", p->channel, strerror(errno));
diff --git a/net/asterisk22/files/patch-configure b/net/asterisk22/files/patch-configure
new file mode 100644
index 000000000000..2a0a4e4648eb
--- /dev/null
+++ b/net/asterisk22/files/patch-configure
@@ -0,0 +1,88 @@
+--- configure.orig 2024-07-25 15:24:13 UTC
++++ configure
+@@ -5101,8 +5101,6 @@ case "${host_os}" in
+ ;;
+ dragonfly*|freebsd*)
+ ac_default_prefix=/usr/local
+- CPPFLAGS=-I/usr/local/include
+- LDFLAGS=-L/usr/local/lib
+ ;;
+ openbsd*)
+ ac_default_prefix=/usr/local
+@@ -21439,8 +21437,6 @@ printf "%s\n" "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ printf "%s\n" "yes" >&6; }
+
+-printf "%s\n" "#define HAVE_SYSINFO 1" >>confdefs.h
+-
+ else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ printf "%s\n" "no" >&6; }
+@@ -23085,6 +23081,8 @@ printf %s "checking for getifaddrs() support... " >&6;
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
++ #include <sys/types.h>
++ #include <sys/socket.h>
+ #include <ifaddrs.h>
+ int
+ main (void)
+@@ -31990,6 +31988,8 @@ for ver in ${LUA_VERSIONS:-5.4 5.3 5.2 5.1}; do
+
+ for ver in ${LUA_VERSIONS:-5.4 5.3 5.2 5.1}; do
+
++vernodot=`echo ${ver} | sed 's/\.//'`
++
+ if test "x${PBX_LUA}" != "x1" -a "${USE_LUA}" != "no"; then
+ pbxlibdir=""
+ # if --with-LUA=DIR has been specified, use it.
+@@ -32004,14 +32004,14 @@ if test "x${PBX_LUA}" != "x1" -a "${USE_LUA}" != "no";
+ ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
+ CFLAGS="${CFLAGS} "
+ as_ac_Lib=`printf "%s\n" "ac_cv_lib_lua${ver}""_luaL_newstate" | $as_tr_sh`
+-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for luaL_newstate in -llua${ver}" >&5
+-printf %s "checking for luaL_newstate in -llua${ver}... " >&6; }
++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for luaL_newstate in -llua-${ver}" >&5
++printf %s "checking for luaL_newstate in -llua-${ver}... " >&6; }
+ if eval test \${$as_ac_Lib+y}
+ then :
+ printf %s "(cached) " >&6
+ else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-llua${ver} ${pbxlibdir} -lm $LIBS"
++LIBS="-llua-${ver} ${pbxlibdir} -lm $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -32052,7 +32052,7 @@ fi
+
+ # now check for the header.
+ if test "${AST_LUA_FOUND}" = "yes"; then
+- LUA_LIB="${pbxlibdir} -llua${ver} -lm"
++ LUA_LIB="${pbxlibdir} -llua-${ver} -lm"
+ # if --with-LUA=DIR has been specified, use it.
+ if test "x${LUA_DIR}" != "x"; then
+ LUA_INCLUDE="-I${LUA_DIR}/include"
+@@ -32062,8 +32062,8 @@ fi
+ # check for the header
+ ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} ${LUA_INCLUDE}"
+- as_ac_Header=`printf "%s\n" "ac_cv_header_lua${ver}/lua.h" | $as_tr_sh`
+-ac_fn_c_check_header_compile "$LINENO" "lua${ver}/lua.h" "$as_ac_Header" "$ac_includes_default"
++ as_ac_Header=`printf "%s\n" "ac_cv_header_lua${vernodot}/lua.h" | $as_tr_sh`
++ac_fn_c_check_header_compile "$LINENO" "lua${vernodot}/lua.h" "$as_ac_Header" "$ac_includes_default"
+ if eval test \"x\$"$as_ac_Header"\" = x"yes"
+ then :
+ LUA_HEADER_FOUND=1
+@@ -32090,9 +32090,9 @@ fi
+
+ if test "x${PBX_LUA}" = "x1" ; then
+ if test x"${LUA_DIR}" = x; then
+- LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua${ver}"
++ LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua${vernodot}"
+ else
+- LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua${ver}"
++ LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua${vernodot}"
+ fi
+ break;
+ fi
diff --git a/net/asterisk22/files/patch-contrib_Makefile b/net/asterisk22/files/patch-contrib_Makefile
new file mode 100644
index 000000000000..dc38a639baad
--- /dev/null
+++ b/net/asterisk22/files/patch-contrib_Makefile
@@ -0,0 +1,23 @@
+--- contrib/Makefile.orig 2020-07-09 15:39:17 UTC
++++ contrib/Makefile
+@@ -24,14 +24,14 @@ install:
+ $(INSTALL) -m 755 scripts/ast_logescalator "$(DESTDIR)$(ASTDATADIR)/scripts/ast_logescalator"
+ $(INSTALL) -m 755 scripts/ast_loggrabber "$(DESTDIR)$(ASTDATADIR)/scripts/ast_loggrabber"
+ $(INSTALL) -m 755 scripts/ast_coredumper "$(DESTDIR)$(ASTDATADIR)/scripts/ast_coredumper"
+- $(INSTALL) -m 755 scripts/refcounter.py "$(DESTDIR)$(ASTDATADIR)/scripts/refcounter.py"
+- $(INSTALL) -m 755 scripts/refstats.py "$(DESTDIR)$(ASTDATADIR)/scripts/refstats.py"
+- $(INSTALL) -m 755 scripts/reflocks.py "$(DESTDIR)$(ASTDATADIR)/scripts/reflocks.py"
++# $(INSTALL) -m 755 scripts/refcounter.py "$(DESTDIR)$(ASTDATADIR)/scripts/refcounter.py"
++# $(INSTALL) -m 755 scripts/refstats.py "$(DESTDIR)$(ASTDATADIR)/scripts/refstats.py"
++# $(INSTALL) -m 755 scripts/reflocks.py "$(DESTDIR)$(ASTDATADIR)/scripts/reflocks.py"
+
+ uninstall:
+ -rm -f "$(DESTDIR)$(ASTDATADIR)/scripts/ast_logescalator"
+ -rm -f "$(DESTDIR)$(ASTDATADIR)/scripts/ast_loggrabber"
+ -rm -f "$(DESTDIR)$(ASTDATADIR)/scripts/ast_coredumper"
+- -rm -f "$(DESTDIR)$(ASTDATADIR)/scripts/refcounter.py"
+- -rm -f "$(DESTDIR)$(ASTDATADIR)/scripts/refstats.py"
+- -rm -f "$(DESTDIR)$(ASTDATADIR)/scripts/reflocks.py"
++# -rm -f "$(DESTDIR)$(ASTDATADIR)/scripts/refcounter.py"
++# -rm -f "$(DESTDIR)$(ASTDATADIR)/scripts/refstats.py"
++# -rm -f "$(DESTDIR)$(ASTDATADIR)/scripts/reflocks.py"
diff --git a/net/asterisk22/files/patch-main_Makefile b/net/asterisk22/files/patch-main_Makefile
new file mode 100644
index 000000000000..62f7a4504a4e
--- /dev/null
+++ b/net/asterisk22/files/patch-main_Makefile
@@ -0,0 +1,14 @@
+--- main/Makefile.orig 2022-08-18 15:18:29 UTC
++++ main/Makefile
+@@ -79,9 +79,8 @@ else
+ endif
+
+ ifeq ($(OSARCH),FreeBSD)
+- # -V is understood by BSD Make, not by GNU make.
+- BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
+- AST_LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
++ AST_LIBS+=-pthread
++ CRYPT_LIB=-lcrypt
+ AST_LIBS+=-lcrypto
+ endif
+
diff --git a/net/asterisk22/files/patch-main_lock.c b/net/asterisk22/files/patch-main_lock.c
new file mode 100644
index 000000000000..5292db43b5a1
--- /dev/null
+++ b/net/asterisk22/files/patch-main_lock.c
@@ -0,0 +1,12 @@
+--- main/lock.c.orig 2024-10-17 16:00:41 UTC
++++ main/lock.c
+@@ -718,9 +718,6 @@ int __ast_rwlock_init(int tracking, const char *filena
+ #endif /* DEBUG_THREADS */
+
+ pthread_rwlockattr_init(&attr);
+-#ifdef HAVE_PTHREAD_RWLOCK_PREFER_WRITER_NP
+- pthread_rwlockattr_setkind_np(&attr, PTHREAD_RWLOCK_PREFER_WRITER_NP);
+-#endif
+ res = pthread_rwlock_init(&t->lock, &attr);
+ pthread_rwlockattr_destroy(&attr);
+
diff --git a/net/asterisk22/files/patch-main_term.c b/net/asterisk22/files/patch-main_term.c
new file mode 100644
index 000000000000..01eafa9e2633
--- /dev/null
+++ b/net/asterisk22/files/patch-main_term.c
@@ -0,0 +1,10 @@
+--- main/term.c.orig 2024-10-17 16:00:41 UTC
++++ main/term.c
+@@ -46,6 +46,7 @@ static const char * const termpath[] = {
+ static char quitdata[80] = "";
+
+ static const char * const termpath[] = {
++ "%%LOCALBASE%%/share/terminfo",
+ "/usr/share/terminfo",
+ "/usr/local/share/misc/terminfo",
+ "/usr/lib/terminfo",
diff --git a/net/asterisk22/files/patch-menuselect_configure b/net/asterisk22/files/patch-menuselect_configure
new file mode 100644
index 000000000000..0bba133d6749
--- /dev/null
+++ b/net/asterisk22/files/patch-menuselect_configure
@@ -0,0 +1,11 @@
+--- menuselect/configure.orig 2022-06-23 15:26:13 UTC
++++ menuselect/configure
+@@ -5099,7 +5099,7 @@ else
+ printf "%s\n" "yes" >&6; }
+
+ PBX_LIBXML2=1
+- LIBXML2_INCLUDE=$(echo ${LIBXML2_CFLAGS} | $SED -e "s|-std=c99||g")
++ LIBXML2_INCLUDE=$(echo ${LIBXML2_CFLAGS} | sed -e "s|-std=c99||g")
+ LIBXML2_LIB="$LIBXML2_LIBS"
+
+ printf "%s\n" "#define HAVE_LIBXML2 1" >>confdefs.h
diff --git a/net/asterisk22/files/patch-third-party_pjproject_Makefile b/net/asterisk22/files/patch-third-party_pjproject_Makefile
new file mode 100644
index 000000000000..dcfd4d618e80
--- /dev/null
+++ b/net/asterisk22/files/patch-third-party_pjproject_Makefile
@@ -0,0 +1,30 @@
+--- third-party/pjproject/Makefile.orig 2022-02-03 12:25:09 UTC
++++ third-party/pjproject/Makefile
+@@ -98,15 +98,11 @@ SHELL_ECHO_PREFIX := echo '[pjproject] '
+
+ _all: $(TARGETS)
+
+-$(DOWNLOAD_DIR)/$(TARBALL_FILE): ../versions.mak
+- $(CMD_PREFIX) ($(TARBALL_EXISTS) && $(TARBALL_VERIFY) && touch $@) || (rm -rf $@ ;\
+- $(TARBALL_DOWNLOAD)) || (rm -rf $@ ;\
+- $(SHELL_ECHO_PREFIX) Retrying download ; $(TARBALL_DOWNLOAD))
++$(DOWNLOAD_DIR)/$(TARBALL_FILE):
++ @true
+
+ source/.unpacked: $(DOWNLOAD_DIR)/$(TARBALL_FILE)
+- $(CMD_PREFIX) \
+- $(TARBALL_VERIFY) || (rm -rf $@ ; $(SHELL_ECHO_PREFIX) Retrying download ; $(TARBALL_DOWNLOAD)) ;\
+- $(SHELL_ECHO_PREFIX) Unpacking $< ;\
++ $(SHELL_ECHO_PREFIX) Unpacking $< ;\
+ rm -rf source pjproject-*/ $(REALLY_QUIET) || : ;\
+ $(TAR) -xjf $< ;\
+ mv pjproject-$(PJPROJECT_VERSION) source
+@@ -212,7 +208,7 @@ $(ALL_LIB_FILES): source/build.mak source/pjlib/includ
+
+ pjproject.symbols: $(ALL_LIB_FILES)
+ $(ECHO_PREFIX) Generating symbols
+- $(CMD_PREFIX) $(NM) -Pog $(ALL_LIB_FILES) | $(SED) -n -E -e "s/.+: ([_]?[pP][jJ][^ ]+) .+/\1/gp" | sort -u > pjproject.symbols
++ $(CMD_PREFIX) $(NM) -Pog $(ALL_LIB_FILES) | $(SED) -n -r -e "s/^([pP][jJ][^ ]+) .+/\1/gp" | sort -u > pjproject.symbols
+
+ source/pjsip-apps/src/asterisk_malloc_debug.c: patches/asterisk_malloc_debug.c
+ $(ECHO_PREFIX) Copying $< to $@
diff --git a/net/asterisk22/files/patch-third-party_pjproject_Makefile.rules b/net/asterisk22/files/patch-third-party_pjproject_Makefile.rules
new file mode 100644
index 000000000000..e908a08b6511
--- /dev/null
+++ b/net/asterisk22/files/patch-third-party_pjproject_Makefile.rules
@@ -0,0 +1,20 @@
+--- third-party/pjproject/Makefile.rules.orig 2024-10-17 16:00:41 UTC
++++ third-party/pjproject/Makefile.rules
+@@ -7,7 +7,7 @@ PACKAGE_URL ?= https://raw.githubusercontent.com/aster
+ # PACKAGE_URL ?= http://www.pjsip.org/release/$(PJPROJECT_VERSION)
+
+ PACKAGE_URL ?= https://raw.githubusercontent.com/asterisk/third-party/master/pjproject/$(PJPROJECT_VERSION)
+-TARBALL_FILE = pjproject-$(PJPROJECT_VERSION).tar.bz2
++TARBALL_FILE = pjsip-pjproject-$(PJPROJECT_VERSION)_GH0.tar.gz
+
+ # PJPROJECT_CONFIGURE_OPTS could come from the command line or could be
+ # set/modified by configure.m4 if the build or host tuples aren't the same
+@@ -38,7 +38,7 @@ PJPROJECT_CONFIG_OPTS = $(PJPROJECT_CONFIGURE_OPTS) --
+ --disable-libwebrtc \
+ --disable-upnp \
+ --without-external-pa \
+- --without-external-srtp
++ --with-external-srtp
+
+ ifneq ($(AST_DEVMODE),yes)
+ PJPROJECT_CONFIG_OPTS += --disable-resample --disable-g711-codec
diff --git a/net/asterisk22/pkg-descr b/net/asterisk22/pkg-descr
new file mode 100644
index 000000000000..52bfedc88569
--- /dev/null
+++ b/net/asterisk22/pkg-descr
@@ -0,0 +1,3 @@
+Asterisk is an Open Source PBX and telephony toolkit. It is, in a
+sense, middleware between Internet and telephony channels on the bottom,
+and Internet and telephony applications at the top.
diff --git a/net/asterisk22/pkg-message b/net/asterisk22/pkg-message
new file mode 100644
index 000000000000..c32bcc7656ec
--- /dev/null
+++ b/net/asterisk22/pkg-message
@@ -0,0 +1,42 @@
+[
+{ type: install
+ message: <<EOM
+ This port supports custom Asterisk configurations using a *user-supplied*
+ menuselect.makeopt file.
+
+ This feature is of most value for users that want to disable or override
+ default functionality that they dont want or need, particular in space
+ and/or resource constrained, or embedded environments.
+
+ If a file named ".asterisk.makeopts" is found in the ports files/
+ directory, its contents will be used to configure Asterisk at the
+ post-configure stage.
+
+ If the file is *not* found, the port will default to a 'normal' Asterisk
+ menuselect configuration, and only execute menuselect commands according
+ to what port OPTIONS the user has selected.
+
+ The format of this file is the same as the output of a standard
+ `make menuselect` command, as per standard build instructions for
+ Asterisk.
+
+ NOTE: The contents of this file *MUST* be syntactically and semantically
+ valid, as the port does *NOT* perform validation of this file.
+
+ In particular, ensure that all Asterisk options have their
+ dependencies met, using the corresponding port OPTIONS dependencies.
+
+ The `menuselect --check-deps` command can be used to verify the
+ configuration
+
+ The following related documentation resources are also available:
+
+ * https://wiki.asterisk.org/wiki/display/AST/Using+Menuselect+to+Select+Asterisk+Options
+ * http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/installing_base_configuration.html#Installing_id293213
+
+ NOTE: To get color output in the asterisk console you need to install
+ the misc/terminfo-db port
+
+EOM
+}
+]
diff --git a/net/asterisk22/pkg-plist b/net/asterisk22/pkg-plist
new file mode 100644
index 000000000000..049a56673432
--- /dev/null
+++ b/net/asterisk22/pkg-plist
@@ -0,0 +1,419 @@
+@sample %%ETCDIR%%/acl.conf.sample
+@sample %%ETCDIR%%/adsi.conf.sample
+@sample %%ETCDIR%%/aeap.conf.sample
+@sample %%ETCDIR%%/agents.conf.sample
+@sample %%ETCDIR%%/alarmreceiver.conf.sample
+@sample %%ETCDIR%%/amd.conf.sample
+@sample %%ETCDIR%%/app_skel.conf.sample
+@sample %%ETCDIR%%/ari.conf.sample
+@sample %%ETCDIR%%/ast_debug_tools.conf.sample
+@sample %%ETCDIR%%/asterisk.adsi.sample
+@sample %%ETCDIR%%/asterisk.conf.sample
+@sample %%ETCDIR%%/calendar.conf.sample
+@sample %%ETCDIR%%/ccss.conf.sample
+@sample %%ETCDIR%%/cdr.conf.sample
+@sample %%ETCDIR%%/cdr_adaptive_odbc.conf.sample
+@sample %%ETCDIR%%/cdr_beanstalkd.conf.sample
+@sample %%ETCDIR%%/cdr_custom.conf.sample
+@sample %%ETCDIR%%/cdr_manager.conf.sample
+@sample %%ETCDIR%%/cdr_odbc.conf.sample
+@sample %%ETCDIR%%/cdr_pgsql.conf.sample
+@sample %%ETCDIR%%/cdr_sqlite3_custom.conf.sample
+@sample %%ETCDIR%%/cdr_tds.conf.sample
+@sample %%ETCDIR%%/cel.conf.sample
+@sample %%ETCDIR%%/cel_beanstalkd.conf.sample
+@sample %%ETCDIR%%/cel_custom.conf.sample
+@sample %%ETCDIR%%/cel_odbc.conf.sample
+@sample %%ETCDIR%%/cel_pgsql.conf.sample
+@sample %%ETCDIR%%/cel_sqlite3_custom.conf.sample
+@sample %%ETCDIR%%/cel_tds.conf.sample
+@sample %%ETCDIR%%/chan_dahdi.conf.sample
+@sample %%ETCDIR%%/chan_mobile.conf.sample
+@sample %%ETCDIR%%/cli.conf.sample
+@sample %%ETCDIR%%/cli_aliases.conf.sample
+@sample %%ETCDIR%%/cli_permissions.conf.sample
+@sample %%ETCDIR%%/codecs.conf.sample
+@sample %%ETCDIR%%/confbridge.conf.sample
+@sample %%ETCDIR%%/config_test.conf.sample
+@sample %%ETCDIR%%/console.conf.sample
+@sample %%ETCDIR%%/dbsep.conf.sample
+@sample %%ETCDIR%%/dnsmgr.conf.sample
+@sample %%ETCDIR%%/dsp.conf.sample
+@sample %%ETCDIR%%/dundi.conf.sample
+@sample %%ETCDIR%%/enum.conf.sample
+@sample %%ETCDIR%%/extconfig.conf.sample
+@sample %%ETCDIR%%/extensions.ael.sample
+@sample %%ETCDIR%%/extensions.conf.sample
+@sample %%ETCDIR%%/extensions.lua.sample
+@sample %%ETCDIR%%/extensions_minivm.conf.sample
+@sample %%ETCDIR%%/features.conf.sample
+@sample %%ETCDIR%%/festival.conf.sample
+@sample %%ETCDIR%%/followme.conf.sample
+@sample %%ETCDIR%%/func_odbc.conf.sample
+@sample %%ETCDIR%%/geolocation.conf.sample
+@sample %%ETCDIR%%/hep.conf.sample
+@sample %%ETCDIR%%/http.conf.sample
+@sample %%ETCDIR%%/iax.conf.sample
+@sample %%ETCDIR%%/iaxprov.conf.sample
+@sample %%ETCDIR%%/indications.conf.sample
+@sample %%ETCDIR%%/logger.conf.sample
+@sample %%ETCDIR%%/manager.conf.sample
+@sample %%ETCDIR%%/meetme.conf.sample
+@sample %%ETCDIR%%/minivm.conf.sample
+@sample %%ETCDIR%%/modules.conf.sample
+@sample %%ETCDIR%%/motif.conf.sample
+@sample %%ETCDIR%%/musiconhold.conf.sample
+@sample %%ETCDIR%%/ooh323.conf.sample
+@sample %%ETCDIR%%/phoneprov.conf.sample
+@sample %%ETCDIR%%/pjproject.conf.sample
+@sample %%ETCDIR%%/pjsip.conf.sample
+@sample %%ETCDIR%%/pjsip_notify.conf.sample
+@sample %%ETCDIR%%/pjsip_wizard.conf.sample
+@sample %%ETCDIR%%/prometheus.conf.sample
+@sample %%ETCDIR%%/queuerules.conf.sample
+@sample %%ETCDIR%%/queues.conf.sample
+@sample %%ETCDIR%%/res_config_mysql.conf.sample
+@sample %%ETCDIR%%/res_config_odbc.conf.sample
+@sample %%ETCDIR%%/res_config_sqlite3.conf.sample
+@sample %%ETCDIR%%/res_corosync.conf.sample
+@sample %%ETCDIR%%/res_curl.conf.sample
+@sample %%ETCDIR%%/res_fax.conf.sample
+@sample %%ETCDIR%%/res_http_media_cache.conf.sample
+@sample %%ETCDIR%%/res_ldap.conf.sample
+@sample %%ETCDIR%%/res_odbc.conf.sample
+@sample %%ETCDIR%%/res_parking.conf.sample
+@sample %%ETCDIR%%/res_pgsql.conf.sample
+@sample %%ETCDIR%%/res_snmp.conf.sample
+@sample %%ETCDIR%%/res_stun_monitor.conf.sample
+@sample %%ETCDIR%%/resolver_unbound.conf.sample
+@sample %%ETCDIR%%/rtp.conf.sample
+@sample %%ETCDIR%%/say.conf.sample
+@sample %%ETCDIR%%/sla.conf.sample
+@sample %%ETCDIR%%/smdi.conf.sample
+@sample %%ETCDIR%%/sorcery.conf.sample
+@sample %%ETCDIR%%/ss7.timers.sample
+@sample %%ETCDIR%%/stasis.conf.sample
+@sample %%ETCDIR%%/statsd.conf.sample
+@sample %%ETCDIR%%/stir_shaken.conf.sample
+@sample %%ETCDIR%%/telcordia-1.adsi.sample
+@sample %%ETCDIR%%/test_sorcery.conf.sample
+@sample %%ETCDIR%%/udptl.conf.sample
+@sample %%ETCDIR%%/unistim.conf.sample
+@sample %%ETCDIR%%/users.conf.sample
+@sample %%ETCDIR%%/voicemail.conf.sample
+@sample %%ETCDIR%%/xmpp.conf.sample
+include/asterisk.h
+include/asterisk/_private.h
+include/asterisk/abstract_jb.h
+include/asterisk/acl.h
+include/asterisk/adsi.h
+include/asterisk/ael_structs.h
+include/asterisk/agi.h
+include/asterisk/alaw.h
+include/asterisk/alertpipe.h
+include/asterisk/aoc.h
+include/asterisk/app.h
+include/asterisk/ari.h
+include/asterisk/ast_expr.h
+include/asterisk/ast_version.h
+include/asterisk/astdb.h
+include/asterisk/astmm.h
+include/asterisk/astobj2.h
+include/asterisk/audiohook.h
+include/asterisk/autochan.h
+include/asterisk/autoconfig.h
+include/asterisk/backtrace.h
+include/asterisk/beep.h
+include/asterisk/bridge.h
+include/asterisk/bridge_after.h
+include/asterisk/bridge_basic.h
+include/asterisk/bridge_channel.h
+include/asterisk/bridge_channel_internal.h
+include/asterisk/bridge_features.h
+include/asterisk/bridge_internal.h
+include/asterisk/bridge_roles.h
+include/asterisk/bridge_technology.h
+include/asterisk/bucket.h
+include/asterisk/build.h
+include/asterisk/buildinfo.h
+include/asterisk/buildopts.h
+include/asterisk/calendar.h
+include/asterisk/callerid.h
+include/asterisk/causes.h
+include/asterisk/ccss.h
+include/asterisk/cdr.h
+include/asterisk/cel.h
+include/asterisk/celt.h
+include/asterisk/channel.h
+include/asterisk/channel_internal.h
+include/asterisk/channelstate.h
+include/asterisk/chanvars.h
+include/asterisk/cli.h
+include/asterisk/codec.h
+include/asterisk/compat.h
+include/asterisk/compiler.h
+include/asterisk/config.h
+include/asterisk/config_options.h
+include/asterisk/conversions.h
+include/asterisk/core_local.h
+include/asterisk/core_unreal.h
+include/asterisk/crypto.h
+include/asterisk/data_buffer.h
+include/asterisk/datastore.h
+include/asterisk/devicestate.h
+include/asterisk/dial.h
+include/asterisk/dlinkedlists.h
+include/asterisk/dns.h
+include/asterisk/dns_core.h
+include/asterisk/dns_internal.h
+include/asterisk/dns_naptr.h
+include/asterisk/dns_query_set.h
+include/asterisk/dns_recurring.h
+include/asterisk/dns_resolver.h
+include/asterisk/dns_srv.h
+include/asterisk/dns_test.h
+include/asterisk/dns_tlsa.h
+include/asterisk/dns_txt.h
+include/asterisk/dnsmgr.h
+include/asterisk/doxygen/architecture.h
+include/asterisk/doxygen/licensing.h
+include/asterisk/doxyref.h
+include/asterisk/dsp.h
+include/asterisk/dundi.h
+include/asterisk/endian.h
+include/asterisk/endpoints.h
+include/asterisk/enum.h
+include/asterisk/event.h
+include/asterisk/event_defs.h
+include/asterisk/extconf.h
+include/asterisk/features.h
+include/asterisk/features_config.h
+include/asterisk/file.h
+include/asterisk/format.h
+include/asterisk/format_cache.h
+include/asterisk/format_cap.h
+include/asterisk/format_compatibility.h
+include/asterisk/frame.h
+include/asterisk/framehook.h
+include/asterisk/fskmodem.h
+include/asterisk/fskmodem_float.h
+include/asterisk/fskmodem_int.h
+include/asterisk/global_datastores.h
+include/asterisk/hashtab.h
+include/asterisk/heap.h
+include/asterisk/http.h
+include/asterisk/http_websocket.h
+include/asterisk/ilbc.h
+include/asterisk/image.h
+include/asterisk/indications.h
+include/asterisk/inline_api.h
+include/asterisk/io.h
+include/asterisk/iostream.h
+include/asterisk/json.h
+include/asterisk/linkedlists.h
+include/asterisk/localtime.h
+include/asterisk/lock.h
+include/asterisk/logger.h
+include/asterisk/logger_category.h
+include/asterisk/manager.h
+include/asterisk/max_forwards.h
+include/asterisk/md5.h
+include/asterisk/media_cache.h
+include/asterisk/media_index.h
+include/asterisk/message.h
+include/asterisk/mixmonitor.h
+include/asterisk/mod_format.h
+include/asterisk/module.h
+include/asterisk/multicast_rtp.h
+include/asterisk/musiconhold.h
+include/asterisk/mwi.h
+include/asterisk/named_locks.h
+include/asterisk/netsock2.h
+include/asterisk/network.h
+include/asterisk/optional_api.h
+include/asterisk/options.h
+include/asterisk/opus.h
+include/asterisk/parking.h
+include/asterisk/paths.h
+include/asterisk/pbx.h
+include/asterisk/phoneprov.h
+include/asterisk/pickup.h
+include/asterisk/plc.h
+include/asterisk/poll-compat.h
+include/asterisk/presencestate.h
+include/asterisk/privacy.h
+include/asterisk/pval.h
+include/asterisk/refer.h
+include/asterisk/res_aeap.h
+include/asterisk/res_aeap_message.h
+include/asterisk/res_audiosocket.h
+include/asterisk/res_fax.h
+include/asterisk/res_geolocation.h
+include/asterisk/res_hep.h
+include/asterisk/res_mwi_external.h
+include/asterisk/res_odbc.h
+include/asterisk/res_odbc_transaction.h
+include/asterisk/res_pjproject.h
+include/asterisk/res_pjsip.h
+include/asterisk/res_pjsip_body_generator_types.h
+include/asterisk/res_pjsip_cli.h
+include/asterisk/res_pjsip_outbound_publish.h
+include/asterisk/res_pjsip_presence_xml.h
+include/asterisk/res_pjsip_pubsub.h
+include/asterisk/res_pjsip_session.h
+include/asterisk/res_pjsip_session_caps.h
+include/asterisk/res_prometheus.h
+include/asterisk/res_srtp.h
+include/asterisk/res_stir_shaken.h
+include/asterisk/rtp_engine.h
+include/asterisk/say.h
+include/asterisk/sched.h
+include/asterisk/sdp_srtp.h
+include/asterisk/security_events.h
+include/asterisk/security_events_defs.h
+include/asterisk/select.h
+include/asterisk/sem.h
+include/asterisk/serializer.h
+include/asterisk/sha1.h
+include/asterisk/silk.h
+include/asterisk/sip_api.h
+include/asterisk/slin.h
+include/asterisk/slinfactory.h
+include/asterisk/smdi.h
+include/asterisk/smoother.h
+include/asterisk/sorcery.h
+include/asterisk/sounds_index.h
+include/asterisk/speech.h
+include/asterisk/spinlock.h
+include/asterisk/srv.h
+include/asterisk/stasis.h
+include/asterisk/stasis_app.h
+include/asterisk/stasis_app_device_state.h
+include/asterisk/stasis_app_impl.h
+include/asterisk/stasis_app_mailbox.h
+include/asterisk/stasis_app_playback.h
+include/asterisk/stasis_app_recording.h
+include/asterisk/stasis_app_snoop.h
+include/asterisk/stasis_bridges.h
+include/asterisk/stasis_cache_pattern.h
+include/asterisk/stasis_channels.h
+include/asterisk/stasis_endpoints.h
+include/asterisk/stasis_internal.h
+include/asterisk/stasis_message_router.h
+include/asterisk/stasis_state.h
+include/asterisk/stasis_system.h
+include/asterisk/stasis_test.h
+include/asterisk/statsd.h
+include/asterisk/stream.h
+include/asterisk/stringfields.h
+include/asterisk/strings.h
+include/asterisk/stun.h
+include/asterisk/syslog.h
+include/asterisk/taskprocessor.h
+include/asterisk/tcptls.h
+include/asterisk/tdd.h
+include/asterisk/term.h
+include/asterisk/test.h
+include/asterisk/threadpool.h
+include/asterisk/threadstorage.h
+include/asterisk/time.h
+include/asterisk/timing.h
+include/asterisk/transcap.h
+include/asterisk/translate.h
+include/asterisk/udptl.h
+include/asterisk/ulaw.h
+include/asterisk/unaligned.h
+include/asterisk/uri.h
+include/asterisk/utf8.h
+include/asterisk/utils.h
+include/asterisk/uuid.h
+include/asterisk/vector.h
+include/asterisk/version.h
+include/asterisk/xml.h
+include/asterisk/xmldoc.h
+include/asterisk/xmpp.h
+%%PJSIP%%lib/libasteriskpj.so
+%%PJSIP%%lib/libasteriskpj.so.2
+lib/libasteriskssl.so
+lib/libasteriskssl.so.1
+share/man/man8/astdb2bdb.8.gz
+share/man/man8/astdb2sqlite3.8.gz
+share/man/man8/asterisk.8.gz
+share/man/man8/astgenkey.8.gz
+share/man/man8/autosupport.8.gz
+share/man/man8/safe_asterisk.8.gz
+sbin/astcanary
+sbin/astdb2bdb
+sbin/astdb2sqlite3
+sbin/asterisk
+sbin/astgenkey
+%%ASTVERSION%%sbin/astversion
+sbin/autosupport
+sbin/rasterisk
+sbin/safe_asterisk
+%%DATADIR%%/agi-bin/agi-test.agi
+%%DATADIR%%/agi-bin/eagi-sphinx-test
+%%DATADIR%%/agi-bin/eagi-test
+%%DATADIR%%/agi-bin/jukebox.agi
+%%XMLDOC%%%%DATADIR%%/documentation/appdocsxml.dtd
+%%XMLDOC%%%%DATADIR%%/documentation/appdocsxml.xslt
+%%XMLDOC%%%%DATADIR%%/documentation/core-en_US.xml
+%%DATADIR%%/phoneprov/000000000000-directory.xml
+%%DATADIR%%/phoneprov/000000000000-phone.cfg
+%%DATADIR%%/phoneprov/000000000000.cfg
+%%DATADIR%%/phoneprov/polycom.xml
+%%DATADIR%%/phoneprov/polycom_line.xml
+%%DATADIR%%/phoneprov/snom-mac.xml
+%%DATADIR%%/rest-api/applications.json
+%%DATADIR%%/rest-api/asterisk.json
+%%DATADIR%%/rest-api/bridges.json
+%%DATADIR%%/rest-api/channels.json
+%%DATADIR%%/rest-api/deviceStates.json
+%%DATADIR%%/rest-api/endpoints.json
+%%DATADIR%%/rest-api/events.json
+%%DATADIR%%/rest-api/mailboxes.json
+%%DATADIR%%/rest-api/playbacks.json
+%%DATADIR%%/rest-api/recordings.json
+%%DATADIR%%/rest-api/resources.json
+%%DATADIR%%/rest-api/sounds.json
+%%DATADIR%%/scripts/ast_coredumper
+%%DATADIR%%/scripts/ast_logescalator
+%%DATADIR%%/scripts/ast_loggrabber
+%%XMLDOC%%%%DATADIR%%/static-http/appdocsxml.xslt
+%%DATADIR%%/static-http/ajamdemo.html
+%%DATADIR%%/static-http/astman.css
+%%DATADIR%%/static-http/astman.js
+%%XMLDOC%%%%DATADIR%%/static-http/core-en_US.xml
+%%DATADIR%%/static-http/prototype.js
+%%DATADIR%%/static-http/mantest.html
+%%DOCSDIR%%/images/asterisk-intro.jpg
+%%DOCSDIR%%/images/kpad2.jpg
+@dir lib/asterisk/modules
+@dir %%DATADIR%%/documentation/thirdparty
+@dir %%DATADIR%%/firmware/iax
+@dir %%DATADIR%%/images
+@dir %%DATADIR%%/keys/stir_shaken
+@dir %%DATADIR%%/keys
+@dir %%DATADIR%%/moh
+@dir %%DATADIR%%/sounds
+@dir %%DATADIR%%/third-party
+%%PJSIP%%@dir %%DATADIR%%/third-party/pjproject
+@owner %%ASTERISK_USER%%
+@group %%ASTERISK_GROUP%%
+@dir %%VARDIR%%/cache/asterisk
+@dir %%VARDIR%%/log/asterisk/cdr-csv
+@dir %%VARDIR%%/log/asterisk/cdr-custom
+@dir %%VARDIR%%/log/asterisk/cel-custom
+@dir %%VARDIR%%/log/asterisk
+@dir %%VARDIR%%/spool/asterisk/dictate
+@dir %%VARDIR%%/spool/asterisk/meetme
+@dir %%VARDIR%%/spool/asterisk/monitor
+@dir %%VARDIR%%/spool/asterisk/outgoing
+@dir %%VARDIR%%/spool/asterisk/recording
+@dir %%VARDIR%%/spool/asterisk
+@dir %%VARDIR%%/spool/asterisk/system
+@dir %%VARDIR%%/spool/asterisk/tmp
+@dir %%VARDIR%%/db/asterisk
+@dir %%VARDIR%%/run/asterisk
+@owner
+@group