pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/comms/asterisk22



Module Name:    pkgsrc
Committed By:   manu
Date:           Tue Apr 15 15:35:01 UTC 2025

Modified Files:
        pkgsrc/comms/asterisk22: Makefile PLIST distinfo
Added Files:
        pkgsrc/comms/asterisk22/patches: patch-channels_Makefile
            patch-channels_chan__sip.c

Log Message:
Restore chan_sip in asterisk from https://github.com/InterLinked1/chan_sip

chan_sip is the original SIP channel driver from Asterisk that many
have grown to love or hate over the years. Replaced by chan_pjsip
in Asterisk 12, it was deprecated in Asterisk 16, disabled from
building by default in Asterisk 19, and was removed from the Asterisk
master branch in commit 4095a382da630f8af2aac2d223fcaa70c03b81ba
on January 3, 2023 (in anticipation of removal for Asterisk 21, to
be released in late 2023).

If you are new to Asterisk or getting started with SIP, you should
almost certainly use chan_pjsip, a newer, more standards-compliant,
more feature-rich SIP channel driver. chan_pjsip (based on pjproject's
PJSIP stack) is actively core supported by Sangoma.

chan_sip is maintained here for the benefit of those who still need
or prefer it, but you are advised to avoid using it if possible.
This version of chan_sip is primarily maintained by a community
Asterisk developer, and is not official or endorsed by Sangoma in
any way. Please do not contact Sangoma or the Asterisk project with
issues - any issues should be filed in this repo only.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 pkgsrc/comms/asterisk22/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/comms/asterisk22/PLIST
cvs rdiff -u -r1.2 -r1.3 pkgsrc/comms/asterisk22/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/comms/asterisk22/patches/patch-channels_Makefile \
    pkgsrc/comms/asterisk22/patches/patch-channels_chan__sip.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/comms/asterisk22/Makefile
diff -u pkgsrc/comms/asterisk22/Makefile:1.5 pkgsrc/comms/asterisk22/Makefile:1.6
--- pkgsrc/comms/asterisk22/Makefile:1.5        Fri Jan 17 22:39:53 2025
+++ pkgsrc/comms/asterisk22/Makefile    Tue Apr 15 15:35:01 2025
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2025/01/17 22:39:53 gavan Exp $
+# $NetBSD: Makefile,v 1.6 2025/04/15 15:35:01 manu Exp $
 #
 # NOTE: when updating this package, there are two places that sound
 #       tarballs need to be checked; look in ${WRKSRC}/sounds/Makefile
@@ -6,7 +6,7 @@
 #       Also look in ${WRKSRC}/third-party/versions.mak for pjproject
 
 DISTNAME=      asterisk-22.0.0
-PKGREVISION=   4
+PKGREVISION=   5
 CATEGORIES=    comms net audio
 MASTER_SITES=  https://downloads.asterisk.org/pub/telephony/asterisk/
 MASTER_SITES+= https://downloads.asterisk.org/pub/telephony/asterisk/old-releases/
@@ -148,6 +148,12 @@ SITES.pjproject-${PJPROJ_VERSION}.md5= \
 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
@@ -240,6 +246,12 @@ CONF_FILES_PERMS+=         ${ASTEXAMPLEDIR}/${f
 
 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

Index: pkgsrc/comms/asterisk22/PLIST
diff -u pkgsrc/comms/asterisk22/PLIST:1.1 pkgsrc/comms/asterisk22/PLIST:1.2
--- pkgsrc/comms/asterisk22/PLIST:1.1   Mon Oct 21 05:12:44 2024
+++ pkgsrc/comms/asterisk22/PLIST       Tue Apr 15 15:35:01 2025
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2024/10/21 05:12:44 jnemeth Exp $
+@comment $NetBSD: PLIST,v 1.2 2025/04/15 15:35:01 manu Exp $
 lib/asterisk/libasteriskpj.so
 lib/asterisk/libasteriskpj.so.2
 lib/asterisk/modules/app_adsiprog.so
@@ -100,6 +100,7 @@ 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
+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
@@ -2412,6 +2413,8 @@ share/examples/asterisk/res_stun_monitor
 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

Index: pkgsrc/comms/asterisk22/distinfo
diff -u pkgsrc/comms/asterisk22/distinfo:1.2 pkgsrc/comms/asterisk22/distinfo:1.3
--- pkgsrc/comms/asterisk22/distinfo:1.2        Fri Jan 17 22:39:53 2025
+++ pkgsrc/comms/asterisk22/distinfo    Tue Apr 15 15:35:01 2025
@@ -1,5 +1,8 @@
-$NetBSD: distinfo,v 1.2 2025/01/17 22:39:53 gavan Exp $
+$NetBSD: distinfo,v 1.3 2025/04/15 15:35:01 manu Exp $
 
+BLAKE2s (asterisk-22.0.0/86d62097332337da942fa4dd6405f136ae245be3) = 1f5ff77bc7a80732d66c791d455fcc1a82b643c2e1e23fcec0a4b9398228d8d0
+SHA512 (asterisk-22.0.0/86d62097332337da942fa4dd6405f136ae245be3) = 461765a5be8c386d254571e71d909afe1381c864407bdc16dfce4645c730815de4dfdd6a45caedc593f1903b65ddb4e3934bfdde655f2b8531122bb3d0c72dc2
+Size (asterisk-22.0.0/86d62097332337da942fa4dd6405f136ae245be3) = 960527 bytes
 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
@@ -27,7 +30,9 @@ SHA1 (patch-build__tools_make__xml__docu
 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) = b97f1a805e076c0772e2aae1112b71d57aa31da8
 SHA1 (patch-channels_pjsip_cli__commands.c) = 01baa9d242e3af02a1f3540cfb3064ad68c71d67
 SHA1 (patch-channels_pjsip_dialplan__functions.c) = 2cf8199c4ec9d4894eb922c2703d49ecc06188ef
 SHA1 (patch-configure) = 7bb72c26abe5c362bf8e415821534b83f6241473

Added files:

Index: pkgsrc/comms/asterisk22/patches/patch-channels_Makefile
diff -u /dev/null pkgsrc/comms/asterisk22/patches/patch-channels_Makefile:1.1
--- /dev/null   Tue Apr 15 15:35:01 2025
+++ pkgsrc/comms/asterisk22/patches/patch-channels_Makefile     Tue Apr 15 15:35:01 2025
@@ -0,0 +1,21 @@
+$NetBSD: patch-channels_Makefile,v 1.1 2025/04/15 15:35:01 manu Exp $
+
+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)
Index: pkgsrc/comms/asterisk22/patches/patch-channels_chan__sip.c
diff -u /dev/null pkgsrc/comms/asterisk22/patches/patch-channels_chan__sip.c:1.1
--- /dev/null   Tue Apr 15 15:35:01 2025
+++ pkgsrc/comms/asterisk22/patches/patch-channels_chan__sip.c  Tue Apr 15 15:35:01 2025
@@ -0,0 +1,39 @@
+$NetBSD: patch-channels_chan__sip.c,v 1.1 2025/04/15 15:35:01 manu Exp $
+
+Enable chan_sip build, 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
+@@ -175,9 +175,9 @@
+ 
+ /*** MODULEINFO
+       <use type="module">res_crypto</use>
+       <use type="module">res_http_websocket</use>
+-      <defaultenabled>no</defaultenabled>
++      <defaultenabled>yes</defaultenabled>
+       <support_level>deprecated</support_level>
+       <replacement>chan_pjsip</replacement>
+       <deprecated_in>17</deprecated_in>
+       <removed_in>21</removed_in>
+@@ -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++;



Home | Main Index | Thread Index | Old Index