pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: chan_sip support in asterisk
Replying to myself for the sake of completeness:
- Cc jnemeth%NetBSD.org@localhost, package OWNER, who asked to be shown the
change is of interest to some users (and not just me!).
- Attached a patch for the change, along with 22.3.0 upgrade.
Use it with patch -E as patch-main_config.c gets removed.
On Mon, May 12, 2025 at 08:13:23AM +0000, Emmanuel Dreyfus wrote:
> Hello
>
> Asterisk historically implemented SIP in the chan_sip module. A
> new implementation was introduced in Asterisk 12, in the chan_pjsip
> module. chan_sip has been deprecated and later removed in Asterisk
> 21.
>
> Migrating from chan_sip to chan_pjsip is not straightforward.
> Configuration files changed a lot, and features are provided by
> new modules. People struggling to make the conversion must stick
> to Asterisk 20, which fortunately is a LTS release.
>
> There is a possible alternative, we have the plain old chan_sip
> being maintained as an external module for newer Asterisk releases:
> https://github.com/InterLinked1/chan_sip
>
> I tested it with success on Asterisk 22.3. I intend to use it to
> keep up with latest Asterisk while I finalize the pjsip migration.
> I suspect it could be of interest to other pkgsrc users.
>
> Do you think it would be interesting to have an option to
> pkgsrc/comms/asterisk22 to enable legacy chan_sip support?
>
>
> --
> Emmanuel Dreyfus
> manu%netbsd.org@localhost
--
Emmanuel Dreyfus
manu%netbsd.org@localhost
--- comms/asterisk22/Makefile.orig
+++ comms/asterisk22/Makefile
@@ -4,10 +4,10 @@
# tarballs need to be checked; look in ${WRKSRC}/sounds/Makefile
# to find out the current sound file versions
# Also look in ${WRKSRC}/third-party/versions.mak for pjproject
-DISTNAME= asterisk-22.0.0
-PKGREVISION= 10
+DISTNAME= asterisk-22.3.0
+#PKGREVISION= 1
CATEGORIES= comms net audio
MASTER_SITES= https://downloads.asterisk.org/pub/telephony/asterisk/
MASTER_SITES+= https://downloads.asterisk.org/pub/telephony/asterisk/old-releases/
MASTER_SITES+= https://downloads.asterisk.org/pub/telephony/sounds/releases/
@@ -147,8 +147,14 @@
-https://raw.githubusercontent.com/asterisk/third-party/master/pjproject/${PJPROJ_VERSION}/MD5SUM.TXT
DISTFILES+= pjproject-${PJPROJ_VERSION}.tar.bz2 pjproject-${PJPROJ_VERSION}.md5
ALL_ENV+= EXTERNALS_CACHE_DIR=${DISTDIR}/${DIST_SUBDIR}
+# Plain old chan_sip
+CHAN_SIP_TAG= 86d62097332337da942fa4dd6405f136ae245be3
+DISTFILES+= ${CHAN_SIP_TAG}
+SITES.${CHAN_SIP_TAG}= ${MASTER_SITE_GITHUB:=InterLinked1}/chan_sip/tarball/
+CHAN_SIP_DIR= ${WRKDIR}/InterLinked1-chan_sip-86d6209
+
# Override default paths in config files
SUBST_CLASSES+= configs
SUBST_STAGE.configs= pre-configure
SUBST_FILES.configs= configs/samples/cli_aliases.conf.sample
@@ -239,8 +245,14 @@
.endif
PTHREAD_OPTS+= require native
+post-extract:
+ ${TAR} xzf ${DISTDIR}/${DIST_SUBDIR}/${CHAN_SIP_TAG} -C ${WRKDIR}
+ ${CP} -r ${CHAN_SIP_DIR}/channels/sip ${WRKSRC}/channels
+ ${CP} ${CHAN_SIP_DIR}/channels/chan_sip.c ${WRKSRC}/channels
+ ${CP} ${CHAN_SIP_DIR}/configs/samples/*.sample ${WRKSRC}/configs/samples
+
.if (${OPSYS} == "Darwin" && exists(/usr/include/sys/poll.h))
post-patch:
${ECHO} "#include <sys/poll.h>" > ${WRKSRC}/include/asterisk/poll-compat.h
.endif
--- comms/asterisk22/PLIST.orig
+++ comms/asterisk22/PLIST
@@ -99,8 +99,9 @@
lib/asterisk/modules/chan_iax2.so
${PLIST.jabber}lib/asterisk/modules/chan_motif.so
lib/asterisk/modules/chan_pjsip.so
lib/asterisk/modules/chan_rtp.so
+${PLIST.chan_sip}lib/asterisk/modules/chan_sip.so
lib/asterisk/modules/chan_unistim.so
lib/asterisk/modules/codec_a_mu.so
lib/asterisk/modules/codec_adpcm.so
lib/asterisk/modules/codec_alaw.so
@@ -182,8 +183,9 @@
lib/asterisk/modules/func_sysinfo.so
lib/asterisk/modules/func_talkdetect.so
lib/asterisk/modules/func_timeout.so
lib/asterisk/modules/func_uri.so
+lib/asterisk/modules/func_uuid.so
lib/asterisk/modules/func_version.so
lib/asterisk/modules/func_vmcount.so
lib/asterisk/modules/func_volume.so
lib/asterisk/modules/pbx_ael.so
@@ -2411,8 +2413,10 @@
share/examples/asterisk/res_stun_monitor.conf
share/examples/asterisk/resolver_unbound.conf
share/examples/asterisk/rtp.conf
share/examples/asterisk/say.conf
+share/examples/asterisk/sip.conf
+share/examples/asterisk/sip_notify.conf
share/examples/asterisk/sla.conf
share/examples/asterisk/smdi.conf
share/examples/asterisk/sorcery.conf
share/examples/asterisk/ss7.timers
--- comms/asterisk22/distinfo.orig
+++ comms/asterisk22/distinfo
@@ -1,18 +1,21 @@
$NetBSD: distinfo,v 1.4 2025/05/05 12:40:30 manu Exp $
-BLAKE2s (asterisk-22.0.0/asterisk-22.0.0.tar.gz) = 2447fca0966c8d19d71c11a9271c6a4aa28fbba36aaff0afacc0fa778fc643ee
-SHA512 (asterisk-22.0.0/asterisk-22.0.0.tar.gz) = fa2c530a81f7351369229b2a36ac229a75d7a1ce8c3cdae0340be331979246ecee1e4f90c31fb6bc645cc2066280d40e2385027aedc6bd2c205426b2164e1fc5
-Size (asterisk-22.0.0/asterisk-22.0.0.tar.gz) = 26196468 bytes
-BLAKE2s (asterisk-22.0.0/asterisk-extra-sounds-en-gsm-1.5.2.tar.gz) = 3f7e5fe212d7e7cdca14c52527a2552311ab7762c3f1464b09ddedc7c66aebde
-SHA512 (asterisk-22.0.0/asterisk-extra-sounds-en-gsm-1.5.2.tar.gz) = 3f2f7bf3d5bce3544bc013f913c352f0204a3ce96239987403eb9dce8bc87e64a61d437762323a422a87b2fad1f3bf3e7a5f3d0d340f912a1b1dbfea9479d41d
-Size (asterisk-22.0.0/asterisk-extra-sounds-en-gsm-1.5.2.tar.gz) = 4253587 bytes
-BLAKE2s (asterisk-22.0.0/pjproject-2.14.1.md5) = f384e59ad4f8227cd7131a5c07b68a83b75b319fa60c38d6f9d27af817a0f516
-SHA512 (asterisk-22.0.0/pjproject-2.14.1.md5) = 25ce388adcd7eaa2c21d95a58d9fc5e33a6cb96dd99c292574b8f11f6f1f985cf91f91ea252300bd1be192e396ac6c8a35a87b219864339798bf6195a7650c00
-Size (asterisk-22.0.0/pjproject-2.14.1.md5) = 172 bytes
-BLAKE2s (asterisk-22.0.0/pjproject-2.14.1.tar.bz2) = 4b22d553ddafc2d53d866b4936d465c161e2a095a6a75bd4b93be26e4803122c
-SHA512 (asterisk-22.0.0/pjproject-2.14.1.tar.bz2) = 996116df4a18fb28c8f68d122466f8664958226a38e432b6190b92fbf277b278d370a4b44fabeaf25691e3cdcde28a8879b2738ead5387d119229db01ce121d8
-Size (asterisk-22.0.0/pjproject-2.14.1.tar.bz2) = 8379251 bytes
+BLAKE2s (asterisk-22.3.0/86d62097332337da942fa4dd6405f136ae245be3) = 1f5ff77bc7a80732d66c791d455fcc1a82b643c2e1e23fcec0a4b9398228d8d0
+SHA512 (asterisk-22.3.0/86d62097332337da942fa4dd6405f136ae245be3) = 461765a5be8c386d254571e71d909afe1381c864407bdc16dfce4645c730815de4dfdd6a45caedc593f1903b65ddb4e3934bfdde655f2b8531122bb3d0c72dc2
+Size (asterisk-22.3.0/86d62097332337da942fa4dd6405f136ae245be3) = 960527 bytes
+BLAKE2s (asterisk-22.3.0/asterisk-22.3.0.tar.gz) = 78e0a95a732a37879f72ca5be0dec055b9265ae6f04f1bccca38706c4aead5c5
+SHA512 (asterisk-22.3.0/asterisk-22.3.0.tar.gz) = 4ad159e9de507da3d883141d9f5c0d33dded64465a7c6f5bf3f9d261fbc4b35521b448862eeba4db78c54456519b22351f1533bd1031c67245f62b0ae484e552
+Size (asterisk-22.3.0/asterisk-22.3.0.tar.gz) = 26299340 bytes
+BLAKE2s (asterisk-22.3.0/asterisk-extra-sounds-en-gsm-1.5.2.tar.gz) = 3f7e5fe212d7e7cdca14c52527a2552311ab7762c3f1464b09ddedc7c66aebde
+SHA512 (asterisk-22.3.0/asterisk-extra-sounds-en-gsm-1.5.2.tar.gz) = 3f2f7bf3d5bce3544bc013f913c352f0204a3ce96239987403eb9dce8bc87e64a61d437762323a422a87b2fad1f3bf3e7a5f3d0d340f912a1b1dbfea9479d41d
+Size (asterisk-22.3.0/asterisk-extra-sounds-en-gsm-1.5.2.tar.gz) = 4253587 bytes
+BLAKE2s (asterisk-22.3.0/pjproject-2.14.1.md5) = f384e59ad4f8227cd7131a5c07b68a83b75b319fa60c38d6f9d27af817a0f516
+SHA512 (asterisk-22.3.0/pjproject-2.14.1.md5) = 25ce388adcd7eaa2c21d95a58d9fc5e33a6cb96dd99c292574b8f11f6f1f985cf91f91ea252300bd1be192e396ac6c8a35a87b219864339798bf6195a7650c00
+Size (asterisk-22.3.0/pjproject-2.14.1.md5) = 172 bytes
+BLAKE2s (asterisk-22.3.0/pjproject-2.14.1.tar.bz2) = 4b22d553ddafc2d53d866b4936d465c161e2a095a6a75bd4b93be26e4803122c
+SHA512 (asterisk-22.3.0/pjproject-2.14.1.tar.bz2) = 996116df4a18fb28c8f68d122466f8664958226a38e432b6190b92fbf277b278d370a4b44fabeaf25691e3cdcde28a8879b2738ead5387d119229db01ce121d8
+Size (asterisk-22.3.0/pjproject-2.14.1.tar.bz2) = 8379251 bytes
SHA1 (patch-Makefile) = 5cf3b6937ec23a82e4d056b91e493a36bc1089b9
SHA1 (patch-addons_chan__ooh323.c) = 1775da7ca2129a962ed460bd1e78ba3ce6afa62c
SHA1 (patch-apps_app__adsiprog.c) = 031139e5cd1ef6bb2afb0a74fee3d752eded0a2c
SHA1 (patch-apps_app__chanspy.c) = 29a807909645c1ad0c8f81b6513a284b978e7c47
@@ -26,12 +29,14 @@
SHA1 (patch-build__tools_make__xml__documentation) = 2c617cfdc96b1ddf51736205b83e1b737c110ad9
SHA1 (patch-build__tools_mkpkgconfig) = 7fab8fcf46d9f8a3b98455674fec6307ec472b23
SHA1 (patch-cdr_cdr__pgsql.c) = 82b002a1f5ed3b7361a98e2bffb5cea8833949b8
SHA1 (patch-cel_cel__pgsql.c) = b280efab2b035ce60be268bac9bc8824910b2b8f
+SHA1 (patch-channels_Makefile) = 938120075aa97ac62951b670b36a463b1fcbf540
SHA1 (patch-channels_chan__pjsip.c) = efd4cbb82133fc5ddf7de70d01c99e185c585211
+SHA1 (patch-channels_chan__sip.c) = c5e185af5f6e349211893d08ccbd2856fcf8ad3f
SHA1 (patch-channels_pjsip_cli__commands.c) = 01baa9d242e3af02a1f3540cfb3064ad68c71d67
SHA1 (patch-channels_pjsip_dialplan__functions.c) = 2cf8199c4ec9d4894eb922c2703d49ecc06188ef
-SHA1 (patch-configure) = 7bb72c26abe5c362bf8e415821534b83f6241473
+SHA1 (patch-configure) = bcb1c67cf5ff3c6afd06144bc6d66ee09a43a8e2
SHA1 (patch-configure.ac) = b972730a2be3bf54502116f1f7e03afee76a02cc
SHA1 (patch-contrib_scripts_vmail.cgi) = 7935ce96ea319eb19cc2ce999813eb837d5357c0
SHA1 (patch-funcs_func__cdr.c) = 79c743df264948e5ea9e1c292012a1f6362d0c1e
SHA1 (patch-funcs_func__channel.c) = 9d6ed8a2431fbde6879782d8228030467aabe7eb
@@ -39,9 +44,9 @@
SHA1 (patch-funcs_func__pjsip__aor.c) = 9874f8d66a8afd26ae1669aa727cb5fa2a788334
SHA1 (patch-funcs_func__pjsip__contact.c) = 9b1fa54ee31a549be40d487c650cc79d625c8092
SHA1 (patch-funcs_func__pjsip__endpoint.c) = 263a4bdb6365bcc9f6392d25a5aef5c607e59d04
SHA1 (patch-funcs_func__strings.c) = 08d313add57c5be822a19311fc70a7555bd63877
-SHA1 (patch-include_asterisk_autoconfig.h.in) = 23807b08b94f5cf9c2de76c2928f7ae38997d006
+SHA1 (patch-include_asterisk_autoconfig.h.in) = adc83b19e793491b1c6ea0fd8b46cd9f32e592fc
SHA1 (patch-include_asterisk_lock.h) = 85418bcd20f3ed7eb0310f46f3b2d334980bdcef
SHA1 (patch-include_asterisk_strings.h) = 9ace78a13131bcb411eda79a98264b5cfcc7789c
SHA1 (patch-main_Makefile) = e3b5d261fd15ffd23d81060ff3aafba6b0300e7c
SHA1 (patch-main_acl.c) = 06a9d247b19d648e9ff54ac2a234dc8ac8c023bb
@@ -55,9 +60,8 @@
SHA1 (patch-main_callerid.c) = 0ea1b3df8aaf3969fcd9e06055c8e6184d50d3d3
SHA1 (patch-main_cdr.c) = 540fbdb354aba100fa37392b879b92a85d1d8620
SHA1 (patch-main_cel.c) = 22fa21db8e0afa0958d34014f52e2c4fe9c73ba2
SHA1 (patch-main_cli.c) = ee72bcaac7dce397354cbc09af4ed7441dbb4650
-SHA1 (patch-main_config.c) = 0647c59c4be846e7a9f6d523fbc93c54dc45b664
SHA1 (patch-main_conversions.c) = a516ef4f706fabbd250f66a3159825a2a6085344
SHA1 (patch-main_dns__naptr.c) = 4fa3fe5d2acf7bcd84ca2044280c644e4bd15d7f
SHA1 (patch-main_enum.c) = c5f620297cf98f95ce74aa0d98eddc697946a77b
SHA1 (patch-main_features.c) = 6e50ea4c6ee26f56edca22611aeed44787459968
@@ -92,9 +96,9 @@
SHA1 (patch-res_res__musiconhold.c) = 401999cefa3805f63df33424c635ad18a7d00748
SHA1 (patch-res_res__pjproject.c) = 0326bf12d9f798c8eae2eff4fad8b86d4bbc0589
SHA1 (patch-res_res__pjsip__diversion.c) = b7996a43b4af395392161f75319ab499ceda7f09
SHA1 (patch-res_res__pjsip_pjsip__configuration.c) = 7a9f2c293ad5c8d05df5cc9b304473859ee09d6f
-SHA1 (patch-res_res__xmpp.c) = 390376180d1fb11a41c16f59dd44f506006a8e5d
+SHA1 (patch-res_res__xmpp.c) = 81d12f52b7eeecfaaf26f000af0bae2e64613043
SHA1 (patch-sounds_Makefile) = acc15088ae2545f2822246466bfe783b5215fc54
SHA1 (patch-tests_test__locale.c) = f3f1edc86356f2a7b4d3493433c772e164c77f66
SHA1 (patch-tests_test__voicemail__api.c) = c600f726136581e47cf34da2c0bb485b8a5912eb
SHA1 (patch-third-party_pjproject_patches_0100-netbsd.patch) = fa82ca5f7340d97f9d6729734b4e698dfd26ed61
--- comms/asterisk22/options.mk.orig
+++ comms/asterisk22/options.mk
@@ -2,14 +2,15 @@
PKG_OPTIONS_VAR= PKG_OPTIONS.asterisk
PKG_SUPPORTED_OPTIONS= unixodbc ilbc webvmail ldap spandsp
PKG_SUPPORTED_OPTIONS+= jabber speex snmp pgsql asterisk-config
+PKG_SUPPORTED_OPTIONS+= chan_sip
PKG_SUGGESTED_OPTIONS= ldap jabber speex asterisk-config
.include "../../mk/bsd.options.mk"
PLIST_VARS+= zaptel unixodbc webvmail ldap spandsp jabber
-PLIST_VARS+= speex snmp pgsql srtp
+PLIST_VARS+= speex snmp pgsql srtp chan_sip
# Asterisk now uses DAHDI, not zaptel; not implemented yet...
#.if !empty(PKG_OPTIONS:Mzaptel)
## zaptel only supported under NetBSD at the moment
@@ -100,4 +101,12 @@
PLIST.pgsql= yes
.else
CONFIGURE_ARGS+= --without-postgres
.endif
+
+.if !empty(PKG_OPTIONS:Mchan_sip)
+PLIST.chan_sip= yes
+SUBST_CLASSES+= chan_sip
+SUBST_STAGE.chan_sip= post-patch
+SUBST_FILES.chan_sip= channels/chan_sip.c
+SUBST_SED.chan_sip= -e 's|<defaultenabled>no|<defaultenabled>yes|'
+.endif
--- comms/asterisk22/patches/patch-configure.orig
+++ comms/asterisk22/patches/patch-configure
@@ -1,10 +1,11 @@
$NetBSD: patch-configure,v 1.1 2024/10/21 05:12:45 jnemeth Exp $
---- configure.orig 2024-03-18 13:25:20.000000000 +0000
-+++ configure
-@@ -10124,12 +10124,12 @@ else $as_nop
-
+--- configure.orig 2025-03-27 12:54:43.000000000 +0000
++++ configure 2025-04-29 09:15:48.324681758 +0000
+@@ -20889,14 +20889,14 @@
+ else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clang -fblocks" >&5
printf %s "checking for clang -fblocks... " >&6; }
- if test "`echo 'int main(){return ^{return 42;}();}' | ${CC} -o /dev/null -fblocks -x c - 2>&1`" = ""; then
+ if test "`echo 'int main(){return ^{return 42;}();}' | ${CC} ${LDFLAGS} -o /dev/null -fblocks -x c - 2>&1`" = ""; then
@@ -16,9 +17,11 @@
+ elif test "`echo 'int main(){return ^{return 42;}();}' | ${CC} ${LDFLAGS} -o /dev/null -fblocks -x c -lBlocksRuntime - 2>&1`" = ""; then
AST_CLANG_BLOCKS_LIBS="-lBlocksRuntime"
AST_CLANG_BLOCKS="-fblocks"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-@@ -21892,6 +21892,148 @@ rm -f core conftest.err conftest.$ac_obj
+ printf "%s\n" "yes" >&6; }
+@@ -32903,8 +32903,150 @@
+ fi
+if test "${ac_cv_header_sys_atomic_h+set}" = set; then
@@ -164,5 +167,6 @@
+
+
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
- # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
--- comms/asterisk22/patches/patch-include_asterisk_autoconfig.h.in.orig
+++ comms/asterisk22/patches/patch-include_asterisk_autoconfig.h.in
@@ -1,27 +1,2 @@
$NetBSD: patch-include_asterisk_autoconfig.h.in,v 1.1 2024/10/21 05:12:46 jnemeth Exp $
---- include/asterisk/autoconfig.h.in.orig 2016-10-25 19:27:49.000000000 +0000
-+++ include/asterisk/autoconfig.h.in
-@@ -945,6 +945,12 @@
- /* Define to 1 if you have the `strstr' function. */
- #undef HAVE_STRSTR
-
-+/* Define to 1 if you have the `strftime_l' function. */
-+#undef HAVE_STRFTIME_L
-+
-+/* Define to 1 if you have the `strptime_l' function. */
-+#undef HAVE_STRPTIME_L
-+
- /* Define to 1 if you have the `strtod' function. */
- #undef HAVE_STRTOD
-
-@@ -1032,6 +1038,9 @@
- /* Define if your system has the SYSTEMD libraries. */
- #undef HAVE_SYSTEMD
-
-+/* Define to 1 if sys/atomic.h atomic operations are supported. */
-+#undef HAVE_SYS_ATOMIC_H
-+
- /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
- */
- #undef HAVE_SYS_DIR_H
Only in comms/asterisk22.orig/patches: patch-main_config.c
--- comms/asterisk22/patches/patch-res_res__xmpp.c.orig
+++ comms/asterisk22/patches/patch-res_res__xmpp.c
@@ -1,9 +1,10 @@
$NetBSD: patch-res_res__xmpp.c,v 1.1 2024/10/21 05:12:48 jnemeth Exp $
---- res/res_xmpp.c.orig 2021-06-24 12:50:57.000000000 +0000
-+++ res/res_xmpp.c
-@@ -62,6 +62,13 @@
+--- res/res_xmpp.c.orig 2025-03-27 12:54:43.000000000 +0000
++++ res/res_xmpp.c 2025-04-29 09:21:03.012021812 +0000
+@@ -61,8 +61,15 @@
+ #include "asterisk/cli.h"
#include "asterisk/config_options.h"
#include "asterisk/json.h"
+/* XXX, pthread_equal() is misused to compare non-valid thread pointers */
@@ -14,23 +15,28 @@
+}
+
/*** DOCUMENTATION
<application name="JabberSend" language="en_US" module="res_xmpp">
- <synopsis>
-@@ -3527,7 +3534,7 @@ static int xmpp_action_hook(void *data,
+ <since>
+ <version>12.0.0</version>
+@@ -3652,9 +3659,9 @@
+ }
int ast_xmpp_client_disconnect(struct ast_xmpp_client *client)
{
- if ((client->thread != AST_PTHREADT_NULL) && !pthread_equal(pthread_self(), client->thread)) {
+ if ((client->thread != AST_PTHREADT_NULL) && !pt_pthread_equal(pthread_self(), client->thread)) {
xmpp_client_change_state(client, XMPP_STATE_DISCONNECTING);
pthread_cancel(client->thread);
pthread_join(client->thread, NULL);
-@@ -3669,7 +3676,7 @@ static int xmpp_client_receive(struct as
+ client->thread = AST_PTHREADT_NULL;
+@@ -3794,9 +3801,9 @@
+ c = buf[pos];
/* if we stumble on the ending tag character,
we skip any whitespace that follows it*/
if (c == '>') {
- while (isspace(buf[pos+1])) {
+ while (isspace((unsigned char)buf[pos+1])) {
pos++;
}
}
+ newbuf[newbufpos] = c;
--- comms/asterisk22/patches/patch-channels_Makefile.orig
+++ comms/asterisk22/patches/patch-channels_Makefile
@@ -0,0 +1,21 @@
+$NetBSD$
+
+Add chan_sip
+
+--- channels/Makefile.orig 2024-10-17 17:52:14.000000000 +0200
++++ channels/Makefile 2025-04-14 17:17:43.860874446 +0200
+@@ -21,12 +21,14 @@
+
+ $(call MOD_ADD_C,chan_iax2,$(wildcard iax2/*.c))
+ iax2/parser.o: _ASTCFLAGS+=$(call get_menuselect_cflags,MALLOC_DEBUG)
+
++$(call MOD_ADD_C,chan_sip,$(wildcard sip/*.c))
+ $(call MOD_ADD_C,chan_pjsip,$(wildcard pjsip/*.c))
+ $(call MOD_ADD_C,chan_dahdi,$(wildcard dahdi/*.c) sig_analog.c sig_pri.c sig_ss7.c)
+
+ chan_dahdi.o: _ASTCFLAGS+=$(call get_menuselect_cflags,LOTS_OF_SPANS)
+ chan_unistim.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
+ chan_phone.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
++chan_sip.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
+
+ $(call MOD_ADD_C,console_video.c vgrabbers.c console_board.c)
--- comms/asterisk22/patches/patch-channels_chan__sip.c.orig
+++ comms/asterisk22/patches/patch-channels_chan__sip.c
@@ -0,0 +1,28 @@
+$NetBSD$
+
+LP64 fix
+
+--- channels/chan_sip.c.orig 2025-04-15 01:05:54.475841749 +0200
++++ channels/chan_sip.c 2025-04-15 01:06:13.837413309 +0200
+@@ -20391,9 +20391,9 @@
+ "Domain: %s\r\n"
+ "DomainPort: %d\r\n"
+ "Refresh: %d\r\n"
+ "State: %s\r\n"
+- "RegistrationTime: %ld\r\n"
++ "RegistrationTime: %jd\r\n"
+ "\r\n",
+ idtext,
+ iterator->hostname,
+ iterator->portno ? iterator->portno : STANDARD_SIP_PORT,
+@@ -20401,9 +20401,9 @@
+ S_OR(iterator->regdomain,iterator->hostname),
+ iterator->regdomainport ? iterator->regdomainport : STANDARD_SIP_PORT,
+ iterator->refresh,
+ regstate2str(iterator->regstate),
+- (long) iterator->regtime.tv_sec);
++ (intmax_t) iterator->regtime.tv_sec);
+
+ ao2_unlock(iterator);
+ ao2_t_ref(iterator, -1, "manager_show_registry iter");
+ total++;
--- comms/asterisk22/patches/patch-main_config.c.orig
+++ comms/asterisk22/patches/patch-main_config.c
@@ -1,12 +0,0 @@
-$NetBSD: patch-main_config.c,v 1.1 2024/10/21 05:12:46 jnemeth Exp $
-
---- main/config.c.orig 2024-03-25 05:41:31.131220754 +0000
-+++ main/config.c
-@@ -44,6 +44,7 @@
- #include <libgen.h>
- #include <time.h>
- #include <sys/stat.h>
-+#include <sys/wait.h>
-
- #include <math.h> /* HUGE_VAL */
- #include <regex.h>
Home |
Main Index |
Thread Index |
Old Index