Import Asterisk 1.8.1:
Asterisk is a complete PBX in software. It provides all of the features you would expect from a PBX and more. Asterisk does voice over IP in three protocols, and can interoperate with almost all standards-based telephony equipment using relatively inexpensive hardware. Asterisk 1.8 is a long term support version (i.e. it will be supported for four years with an additional year of security only fixes). See: https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions What's new: Asterisk 1.8 is the next major release series of Asterisk. The release of Asterisk 1.8.0 would not have been possible without the support and contributions of the community. Since Asterisk 1.6.2, we've had over 500 reporters, more than 300 testers and greater than 200 developers contributed to this release. You can find a summary of the work involved with the 1.8.0 release in the sumary: http://svn.asterisk.org/svn/asterisk/tags/1.8.0/asterisk-1.8.0-summary.txt A short list of available features includes: * Secure RTP * IPv6 Support in the SIP channel driver * Connected Party Identification Support * Calendaring Integration * A new call logging system, Channel Event Logging (CEL) * Distributed Device State using Jabber/XMPP PubSub * Call Completion Supplementary Services support * Advice of Charge support * Much, much more! A full list of new features can be found in the CHANGES file. http://svn.digium.com/view/asterisk/branches/1.8/CHANGES?view=markup For a full list of changes in the current release candidate, please see the ChangeLog: http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-1.8.0 ----- The Asterisk Development Team has announced the release of Asterisk 1.8.1. The release of Asterisk 1.8.1 resolves several issues reported by the community and would have not been possible without your participation. Thank you! The following is a sample of the issues resolved in this release: * Fix issue when using directmedia. Asterisk needs to limit the codecs offered to just the ones that both sides recognize, otherwise they may end up sending audio that the other side doesn't understand. (Closes issue #17403. Reported, patched by one47. Tested by one47, falves11) * Resolve issue where Party A in an analog 3-way call would continue to hear ringback after party C answers. (Patched by rmudgett) * Fix playback failure when using IAX with the timerfd module. (Closes issue #18110. Reported, tested by tpanton. Patched by jpeeler) * Fix problem with qualify option packets for realtime peers never stopping. The option packets not only never stopped, but if a realtime peer was not in the peer list multiple options dialogs could accumulate over time. (Closes issue #16382. Reported by lftsy. Tested by zerohalo. Patched by jpeeler) * Fix issue where it is possible to crash Asterisk by feeding the curl engine invalid data. (Closes issue #18161. Reported by wdoekes. Patched by tilghman) For a full list of changes in this release, please see the ChangeLog: http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-1.8.1
This commit is contained in:
parent
0d333ffbf9
commit
d505e2fd48
30 changed files with 3634 additions and 0 deletions
20
comms/asterisk18/DESCR
Normal file
20
comms/asterisk18/DESCR
Normal file
|
@ -0,0 +1,20 @@
|
|||
Asterisk is a complete PBX in software. It provides all of the
|
||||
features you would expect from a PBX and more. Asterisk does voice
|
||||
over IP in three protocols, and can interoperate with almost all
|
||||
standards-based telephony equipment using relatively inexpensive
|
||||
hardware.
|
||||
|
||||
Asterisk provides Voicemail services with Directory, Call Conferencing,
|
||||
Interactive Voice Response, Call Queuing. It has support for
|
||||
three-way calling, caller ID services, ADSI, SIP and H.323 (as both
|
||||
client and gateway).
|
||||
|
||||
NOTE: This version does not work with the zaptel drivers. It
|
||||
requires the newer DAHDI drivers which are still being ported.
|
||||
So, there is no hardware support available at this moment.
|
||||
|
||||
Asterisk 1.8 is a long term support version (i.e. it will be
|
||||
supported for four years with an additional year of security only
|
||||
fixes). See:
|
||||
|
||||
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions
|
12
comms/asterisk18/MESSAGE
Normal file
12
comms/asterisk18/MESSAGE
Normal file
|
@ -0,0 +1,12 @@
|
|||
===========================================================================
|
||||
$NetBSD: MESSAGE,v 1.1.1.1 2010/12/15 03:22:43 jnemeth Exp $
|
||||
|
||||
${PKGBASE} now runs as ${ASTERISK_USER}:${ASTERISK_GROUP} instead of ${ROOT_USER}:${ROOT_GROUP} by default.
|
||||
|
||||
If you are upgrading from an older version, you should execute the
|
||||
following commands to correct permissions on existing files:
|
||||
|
||||
chown -R ${ASTERISK_USER}:${ASTERISK_GROUP} ${PKG_SYSCONFDIR} ${ASTDBDIR}
|
||||
chown -R ${ASTERISK_USER}:${ASTERISK_GROUP} ${ASTSPOOLDIR} ${ASTLOGDIR}
|
||||
|
||||
===========================================================================
|
210
comms/asterisk18/Makefile
Normal file
210
comms/asterisk18/Makefile
Normal file
|
@ -0,0 +1,210 @@
|
|||
# $NetBSD: Makefile,v 1.1.1.1 2010/12/15 03:22:43 jnemeth Exp $
|
||||
#
|
||||
# NOTE: when updating this package, there are two places that sound
|
||||
# tarballs need to be checked
|
||||
|
||||
DISTNAME= asterisk-1.8.1
|
||||
DIST_SUBDIR= ${PKGNAME_NOREV}
|
||||
DISTFILES= ${DEFAULT_DISTFILES}
|
||||
EXTRACT_ONLY= ${DISTNAME}.tar.gz
|
||||
CATEGORIES= comms net audio
|
||||
MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/ \
|
||||
http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/ \
|
||||
http://downloads.asterisk.org/pub/telephony/sounds/releases/
|
||||
|
||||
OWNER= jnemeth@NetBSD.org
|
||||
HOMEPAGE= http://www.asterisk.org/
|
||||
COMMENT= The Asterisk Software PBX
|
||||
LICENSE= gnu-gpl-v2
|
||||
|
||||
CONFLICTS+= asterisk-sounds-extra-[0-9]*
|
||||
|
||||
PKG_DESTDIR_SUPPORT= user-destdir
|
||||
|
||||
.include "../../mk/bsd.prefs.mk"
|
||||
|
||||
USE_TOOLS+= bison gmake perl:run pkg-config tar
|
||||
USE_LANGUAGES= c c++
|
||||
REPLACE_PERL+= agi/DialAnMp3.agi agi/agi-test.agi
|
||||
REPLACE_PERL+= agi/fastagi-test agi/jukebox.agi agi/numeralize
|
||||
REPLACE_PERL+= contrib/scripts/vmail.cgi
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ARGS+= --datarootdir=${PREFIX}/libdata
|
||||
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
|
||||
CONFIGURE_ARGS+= --without-gtk2
|
||||
# XXX remove when lang/lua gets builtin.mk
|
||||
CONFIGURE_ARGS+= --without-lua
|
||||
|
||||
INSTALL_TARGET= install samples
|
||||
INSTALLATION_DIRS+= lib/pkgconfig share/doc/${PKGBASE}
|
||||
INSTALLATION_DIRS+= share/examples/asterisk share/examples/rc.d
|
||||
INSTALLATION_DIRS+= ${ASTDATADIR}/sounds/en ${ASTDATADIR}/moh
|
||||
|
||||
BUILD_DEFS+= VARBASE
|
||||
|
||||
# Running as non-root will come later
|
||||
ASTERISK_USER?= asterisk
|
||||
ASTERISK_GROUP?= asterisk
|
||||
PKG_GROUPS= ${ASTERISK_GROUP}
|
||||
PKG_USERS= ${ASTERISK_USER}:${ASTERISK_GROUP}
|
||||
PKG_GECOS.${ASTERISK_USER}= Asterisk PBX
|
||||
PKG_GROUPS_VARS= ASTERISK_GROUP
|
||||
PKG_USERS_VARS= ASTERISK_USER
|
||||
FILES_SUBST+= ASTERISK_USER=${ASTERISK_USER}
|
||||
FILES_SUBST+= ASTERISK_GROUP=${ASTERISK_GROUP}
|
||||
MESSAGE_SUBST+= ASTERISK_USER=${ASTERISK_USER}
|
||||
MESSAGE_SUBST+= ASTERISK_GROUP=${ASTERISK_GROUP}
|
||||
|
||||
# Various path settings for Asterisk
|
||||
PKG_SYSCONFSUBDIR= asterisk
|
||||
PKG_SYSCONFDIR_PERMS= ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
|
||||
ASTETCDIR= ${PKG_SYSCONFDIR}
|
||||
ASTEXAMPLEDIR= ${PREFIX}/share/examples/asterisk
|
||||
ASTDBDIR= ${VARBASE}/db/asterisk
|
||||
ASTSPOOLDIR= ${VARBASE}/spool/asterisk
|
||||
ASTLOGDIR= ${VARBASE}/log/asterisk
|
||||
MESSAGE_SUBST+= ASTDBDIR=${ASTDBDIR}
|
||||
MESSAGE_SUBST+= ASTSPOOLDIR=${ASTSPOOLDIR}
|
||||
MESSAGE_SUBST+= ASTLOGDIR=${ASTLOGDIR}
|
||||
ASTVARRUNDIR= ${VARBASE}/run/asterisk
|
||||
FILES_SUBST+= ASTVARRUNDIR=${ASTVARRUNDIR}
|
||||
ASTDATADIR= ${PREFIX}/libdata/asterisk
|
||||
MAKE_FLAGS+= ASTLIBDIR=${PREFIX}/lib/asterisk
|
||||
MAKE_FLAGS+= ASTVARLIBDIR=${ASTDATADIR}
|
||||
MAKE_FLAGS+= ASTKEYDIR=${ASTDATADIR}
|
||||
MAKE_FLAGS+= ASTDATADIR=${ASTDATADIR}
|
||||
MAKE_FLAGS+= ASTSPOOLDIR=${ASTSPOOLDIR}
|
||||
MAKE_FLAGS+= ASTLOGDIR=${ASTLOGDIR}
|
||||
MAKE_FLAGS+= ASTHEADERDIR=${PREFIX}/include/asterisk
|
||||
MAKE_FLAGS+= ASTCONFPATH=${ASTETCDIR}/asterisk.conf
|
||||
MAKE_FLAGS+= ASTBINDIR=${PREFIX}/bin
|
||||
MAKE_FLAGS+= ASTSBINDIR=${PREFIX}/sbin
|
||||
MAKE_FLAGS+= ASTVARRUNDIR=${ASTVARRUNDIR}
|
||||
MAKE_FLAGS+= ASTMANDIR=${PREFIX}/${PKGMANDIR}
|
||||
MAKE_FLAGS+= ASTETCDIR=${ASTETCDIR}
|
||||
MAKE_FLAGS+= ASTDBDIR=${ASTDBDIR}
|
||||
MAKE_FLAGS+= AGI_DIR=${PREFIX}/libexec/agi-bin
|
||||
MAKE_FLAGS+= ASTEXAMPLEDIR=${ASTEXAMPLEDIR}
|
||||
MAKE_FLAGS+= WRKSRC=${WRKSRC}
|
||||
MAKE_FLAGS+= LDOPTS=${LDFLAGS:M*:Q}
|
||||
MAKE_FLAGS+= HTTP_DOCSDIR=${PREFIX}/share/httpd/htdocs
|
||||
MAKE_FLAGS+= HTTP_CGIDIR=${PREFIX}/libexec/cgi-bin
|
||||
|
||||
.include "options.mk"
|
||||
|
||||
# check sounds/Makefile for current version when upgrading package
|
||||
DISTFILES+= asterisk-extra-sounds-en-gsm-1.4.11.tar.gz
|
||||
|
||||
# Override default paths in config files
|
||||
SUBST_CLASSES+= configs
|
||||
SUBST_STAGE.configs= pre-configure
|
||||
SUBST_FILES.configs= configs/festival.conf.sample
|
||||
SUBST_FILES.configs+= configs/http.conf.sample
|
||||
SUBST_FILES.configs+= configs/musiconhold.conf.sample
|
||||
SUBST_FILES.configs+= configs/osp.conf.sample
|
||||
SUBST_FILES.configs+= configs/phoneprov.conf.sample
|
||||
SUBST_FILES.configs+= configs/res_config_sqlite.conf.sample
|
||||
SUBST_SED.configs+= -e 's|/var/lib/asterisk|${ASTVARLIBDIR}|'
|
||||
SUBST_SED.configs+= -e "s|/usr/local/man|${ASTMANDIR}|"
|
||||
SUBST_SED.configs+= -e "s|/usr/local|${PREFIX}|"
|
||||
SUBST_SED.configs+= -e "s|/var|${VARBASE}|"
|
||||
|
||||
# XXX gross hack, remove when atomics properly implemented
|
||||
.if (${OPSYS} == "NetBSD")
|
||||
SUBST_CLASSES+= atomics
|
||||
SUBST_STAGE.atomics= post-configure
|
||||
SUBST_FILES.atomics= include/asterisk/autoconfig.h
|
||||
SUBST_SED.atomics= -e "s|^\#define HAVE_GCC_ATOMICS 1|\#undef HAVE_GCC_ATOMICS|"
|
||||
.endif
|
||||
|
||||
RCD_SCRIPTS= asterisk
|
||||
OWN_DIRS_PERMS+= ${ASTDBDIR} ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
|
||||
OWN_DIRS_PERMS+= ${ASTSPOOLDIR} ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
|
||||
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/dictate ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
|
||||
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/meetme ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
|
||||
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/monitor ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
|
||||
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/system ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
|
||||
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/tmp ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
|
||||
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
|
||||
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
|
||||
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default/1234 ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
|
||||
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default/1234/INBOX ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
|
||||
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default/1234/en ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
|
||||
SPECIAL_PERMS+= ${ASTSPOOLDIR}/voicemail/default/1234/en/busy.gsm ${ASTERISK_USER} ${ASTERISK_GROUP} 0644
|
||||
SPECIAL_PERMS+= ${ASTSPOOLDIR}/voicemail/default/1234/en/unavail.gsm ${ASTERISK_USER} ${ASTERISK_GROUP} 0644
|
||||
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default/INBOX ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
|
||||
OWN_DIRS_PERMS+= ${ASTSPOOLDIR}/voicemail/default/en ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
|
||||
OWN_DIRS_PERMS+= ${ASTLOGDIR} ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
|
||||
OWN_DIRS_PERMS+= ${ASTLOGDIR}/cdr-csv ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
|
||||
OWN_DIRS_PERMS+= ${ASTLOGDIR}/cdr-custom ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
|
||||
|
||||
CONF_FILES_PERMS= # empty
|
||||
.for f in asterisk.conf extensions.conf
|
||||
CONF_FILES_PERMS+= ${ASTEXAMPLEDIR}/${f:Q} ${PKG_SYSCONFDIR}/${f:Q} ${ASTERISK_USER} ${ASTERISK_GROUP} 0644
|
||||
.endfor
|
||||
|
||||
# if we put all the files in $CONF_FILES, the message is _way_ too long.
|
||||
.for f in adsi.conf agents.conf ais.conf alarmreceiver.conf alsa.conf \
|
||||
amd.conf app_mysql.conf asterisk.adsi calendar.conf ccss.conf \
|
||||
cdr.conf cdr_adaptive_odbc.conf cdr_custom.conf \
|
||||
cdr_manager.conf cdr_mysql.conf cdr_odbc.conf cdr_pgsql.conf \
|
||||
cdr_sqlite3_custom.conf cdr_tds.conf cel.conf cel_custom.conf \
|
||||
cel_odbc.conf cel_pgsql.conf cel_sqlite3_custom.conf \
|
||||
cel_tds.conf chan_dahdi.conf chan_mobile.conf chan_ooh323.conf \
|
||||
cli.conf cli_aliases.conf cli_permissions.conf codecs.conf \
|
||||
console.conf dbsep.conf dnsmgr.conf dsp.conf dundi.conf \
|
||||
enum.conf extconfig.conf extensions.ael extensions.conf \
|
||||
extensions.lua extensions_minivm.conf features.conf \
|
||||
festival.conf followme.conf func_odbc.conf gtalk.conf h323.conf \
|
||||
http.conf iax.conf iaxprov.conf indications.conf jabber.conf \
|
||||
jingle.conf logger.conf manager.conf meetme.conf mgcp.conf \
|
||||
minivm.conf misdn.conf modules.conf musiconhold.conf muted.conf \
|
||||
osp.conf oss.conf phone.conf phoneprov.conf queuerules.conf \
|
||||
queues.conf res_config_mysql.conf res_config_sqlite.conf \
|
||||
res_curl.conf res_fax.conf res_ldap.conf res_odbc.conf \
|
||||
res_pgsql.conf res_pktccops.conf res_snmp.conf \
|
||||
res_stun_monitor.conf rpt.conf rtp.conf say.conf sip.conf \
|
||||
sip_notify.conf skinny.conf sla.conf smdi.conf telcordia-1.adsi \
|
||||
udptl.conf unistim.conf usbradio.conf users.conf voicemail.conf \
|
||||
vpb.conf
|
||||
CONF_FILES_PERMS+= ${ASTEXAMPLEDIR}/${f:Q} ${PKG_SYSCONFDIR}/${f:Q} ${ASTERISK_USER} ${ASTERISK_GROUP} 0644
|
||||
.endfor
|
||||
|
||||
PTHREAD_OPTS+= require native
|
||||
|
||||
.if (${OPSYS} == "Darwin" && exists(/usr/include/sys/poll.h))
|
||||
post-patch:
|
||||
${ECHO} "#include <sys/poll.h>" > ${WRKSRC}/include/asterisk/poll-compat.h
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
# check sounds directory for current versions when upgrading package
|
||||
${TAR} xzf ${WRKSRC}/sounds/asterisk-core-sounds-en-gsm-1.4.20.tar.gz -C ${DESTDIR}${ASTDATADIR}/sounds/en
|
||||
${TAR} xzf ${WRKSRC}/sounds/asterisk-moh-opsound-wav-2.03.tar.gz -C ${DESTDIR}${ASTDATADIR}/moh
|
||||
${TAR} xzf ${DISTDIR}/${DIST_SUBDIR}/asterisk-extra-sounds-en-gsm-1.4.11.tar.gz -C ${DESTDIR}${ASTDATADIR}/sounds/en
|
||||
${INSTALL_DATA} ${WRKSRC}/BUGS ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
|
||||
${INSTALL_DATA} ${WRKSRC}/CHANGES ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
|
||||
${INSTALL_DATA} ${WRKSRC}/COPYING ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
|
||||
${INSTALL_DATA} ${WRKSRC}/CREDITS ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
|
||||
${INSTALL_DATA} ${WRKSRC}/ChangeLog ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
|
||||
${INSTALL_DATA} ${WRKSRC}/LICENSE ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
|
||||
${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
|
||||
${INSTALL_DATA} ${WRKSRC}/README-SERIOUSLY.bestpractices.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
|
||||
${INSTALL_DATA} ${WRKSRC}/UPGRADE-1.2.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
|
||||
${INSTALL_DATA} ${WRKSRC}/UPGRADE-1.4.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
|
||||
${INSTALL_DATA} ${WRKSRC}/UPGRADE-1.6.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
|
||||
${INSTALL_DATA} ${WRKSRC}/UPGRADE.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
|
||||
${INSTALL_DATA} ${WRKSRC}/Zaptel-to-DAHDI.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/AST.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/IAX2-security.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/README.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/api-1.6.2-changes.txt ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
|
||||
|
||||
.include "../../devel/zlib/buildlink3.mk"
|
||||
.include "../../security/openssl/buildlink3.mk"
|
||||
.include "../../textproc/libxml2/buildlink3.mk"
|
||||
.include "../../www/curl/buildlink3.mk"
|
||||
.include "../../mk/curses.buildlink3.mk"
|
||||
.include "../../mk/pthread.buildlink3.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
2237
comms/asterisk18/PLIST
Normal file
2237
comms/asterisk18/PLIST
Normal file
File diff suppressed because it is too large
Load diff
37
comms/asterisk18/distinfo
Normal file
37
comms/asterisk18/distinfo
Normal file
|
@ -0,0 +1,37 @@
|
|||
$NetBSD: distinfo,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
SHA1 (asterisk-1.8.1/asterisk-1.8.1.tar.gz) = c64de899eebaa9699ab6439328332c7c8d3f5b1d
|
||||
RMD160 (asterisk-1.8.1/asterisk-1.8.1.tar.gz) = 237a41b2b1cc845f02b3904583da58e53a66b4c8
|
||||
Size (asterisk-1.8.1/asterisk-1.8.1.tar.gz) = 26115774 bytes
|
||||
SHA1 (asterisk-1.8.1/asterisk-extra-sounds-en-gsm-1.4.11.tar.gz) = 8692fa61423b4769dc8bfa78faf9ed5ef7a259b9
|
||||
RMD160 (asterisk-1.8.1/asterisk-extra-sounds-en-gsm-1.4.11.tar.gz) = 68170c769d739d6b5b35b00f999ad6bbf876f9f6
|
||||
Size (asterisk-1.8.1/asterisk-extra-sounds-en-gsm-1.4.11.tar.gz) = 3349898 bytes
|
||||
SHA1 (asterisk-1.8.1/extract-cfile.awk) = c4f08eee1ab83c041bde1ab91672a4a3c43c28b8
|
||||
RMD160 (asterisk-1.8.1/extract-cfile.awk) = cd59f8e5807732023d5aec95187e2d5572f400a4
|
||||
Size (asterisk-1.8.1/extract-cfile.awk) = 667 bytes
|
||||
SHA1 (asterisk-1.8.1/rfc3951.txt) = 1a6c769be750fb02456d60db2470909254496017
|
||||
RMD160 (asterisk-1.8.1/rfc3951.txt) = 15f7ec61653ec9953172f8f2150e7d8f6f620926
|
||||
Size (asterisk-1.8.1/rfc3951.txt) = 373442 bytes
|
||||
SHA1 (patch-aa) = a157fe745bde7880cbbdcfdf9e4bb4381f1df185
|
||||
SHA1 (patch-af) = ebad62fcb31b600d30235cc5e93284c93b2c8af9
|
||||
SHA1 (patch-ag) = c71c61350cefbbe53eefa99245ca7712753f22d5
|
||||
SHA1 (patch-ai) = e92edab5c1ff323478f41d0b0783102ed527fe39
|
||||
SHA1 (patch-ak) = adee75b7716a8794de1b8cb054af7a5a8f0e5ffd
|
||||
SHA1 (patch-al) = b2a1134786d7c3b118ee8c47892f91dd2a4c783a
|
||||
SHA1 (patch-am) = 5f9cbf47ec1cb66758492a5ed1bf843006eae9b7
|
||||
SHA1 (patch-an) = 93a5df66fd6459fb76e9191dc3bf37b9ee5483b5
|
||||
SHA1 (patch-ao) = 0663a698469550b22bb97ee1b18980bc2bc67495
|
||||
SHA1 (patch-ap) = c36531be80784d47c2c772ccc386ef2b8f71c72f
|
||||
SHA1 (patch-aq) = 9e05e8d099b92f6c087ca083c5a6d89a0c345061
|
||||
SHA1 (patch-ar) = 5e117f173e6743703d5d83787877e7a9ce8500f3
|
||||
SHA1 (patch-as) = 0d2a04afe1f08df9eb27c5001271d3b75f8a6ad3
|
||||
SHA1 (patch-at) = ce094dc436cc4fd6aeafca3460a25c2db077eaf8
|
||||
SHA1 (patch-au) = 57100ee55338c5ab8be1f8d73d4126d26227786b
|
||||
SHA1 (patch-av) = 3424013b5bf22624aa664e972e2b495ab3296cbe
|
||||
SHA1 (patch-aw) = 0534acd67ea5da1eee8cf282035ebf4c559278ab
|
||||
SHA1 (patch-ax) = 3b41e66a8c926e0afc4f73587e3557370e6c5f6e
|
||||
SHA1 (patch-ay) = 824fc560f4f2775ecf9272525025d26d8fee4361
|
||||
SHA1 (patch-az) = 64365b12cb47ec0fba358e4326eda172f96068cf
|
||||
SHA1 (patch-ba) = ffb20f4788f2f253e822fb48c68fec04c31b0619
|
||||
SHA1 (patch-bb) = 9a10f8892e29bd7ba67e133c98d2d756b470402f
|
||||
SHA1 (patch-bc) = 0efc99595d1ef82a879361e8bf3b2ef7fd84af62
|
43
comms/asterisk18/files/asterisk.sh
Normal file
43
comms/asterisk18/files/asterisk.sh
Normal file
|
@ -0,0 +1,43 @@
|
|||
#!@RCD_SCRIPTS_SHELL@
|
||||
#
|
||||
# $NetBSD: asterisk.sh,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
#
|
||||
# PROVIDE: asterisk
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# You will need to set some variables in /etc/rc.conf to start Asterisk:
|
||||
#
|
||||
# asterisk=YES
|
||||
|
||||
if [ -f /etc/rc.subr ]
|
||||
then
|
||||
. /etc/rc.subr
|
||||
fi
|
||||
|
||||
name="asterisk"
|
||||
rcvar=$name
|
||||
command="@PREFIX@/sbin/asterisk"
|
||||
pidfile=@ASTVARRUNDIR@/${name}.pid
|
||||
required_files="@PKG_SYSCONFDIR@/asterisk.conf"
|
||||
extra_commands="reload"
|
||||
start_precmd=asterisk_prestart
|
||||
|
||||
auser="@ASTERISK_USER@"
|
||||
agroup="@ASTERISK_GROUP@"
|
||||
command_args="-U $auser -G $agroup -n"
|
||||
|
||||
asterisk_prestart() {
|
||||
if test ! -d @ASTVARRUNDIR@; then
|
||||
mkdir @ASTVARRUNDIR@
|
||||
fi
|
||||
chown $auser:$agroup @ASTVARRUNDIR@
|
||||
chmod 0755 @ASTVARRUNDIR@
|
||||
}
|
||||
|
||||
stop_cmd="$command -nr -x 'core stop gracefully' >/dev/null"
|
||||
reload_cmd="$command -nr -x 'core reload' >/dev/null"
|
||||
asterisk_nice="-20"
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
93
comms/asterisk18/options.mk
Normal file
93
comms/asterisk18/options.mk
Normal file
|
@ -0,0 +1,93 @@
|
|||
# $NetBSD: options.mk,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
PKG_OPTIONS_VAR= PKG_OPTIONS.asterisk
|
||||
PKG_SUPPORTED_OPTIONS= zaptel x11 unixodbc ilbc webvmail ldap
|
||||
PKG_OPTIONS_LEGACY_OPTS+= gtk:x11
|
||||
PKG_SUGGESTED_OPTIONS= ldap
|
||||
|
||||
.include "../../mk/bsd.options.mk"
|
||||
|
||||
PLIST_VARS+= zaptel x11 unixodbc ilbc webvmail ldap
|
||||
|
||||
# Asterisk now uses DAHDI, not zaptel; not implemented yet...
|
||||
#.if !empty(PKG_OPTIONS:Mzaptel)
|
||||
## zaptel only supported under NetBSD at the moment
|
||||
#. include "../../comms/zaptel-netbsd/buildlink3.mk"
|
||||
#PLIST.zaptel= yes
|
||||
#.else
|
||||
#MAKE_FLAGS+= WITHOUT_ZAPTEL=1
|
||||
#.endif
|
||||
|
||||
# gtkconsole depends on GTK 1.x
|
||||
.if !empty(PKG_OPTIONS:Mx11)
|
||||
. include "../../x11/gtk/buildlink3.mk"
|
||||
. include "../../devel/SDL/buildlink3.mk"
|
||||
CONFIGURE_ARGS+= --with-sdl
|
||||
CONFIGURE_ARGS+= --with-gtk
|
||||
PLIST.x11= yes
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-sdl
|
||||
CONFIGURE_ARGS+= --without-gtk
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Munixodbc)
|
||||
. include "../../databases/unixodbc/buildlink3.mk"
|
||||
. include "../../devel/libltdl/buildlink3.mk"
|
||||
CONFIGURE_ARGS+= --with-ltdl
|
||||
CONFIGURE_ARGS+= --with-unixodbc
|
||||
PLIST.unixodbc= yes
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-ltdl
|
||||
CONFIGURE_ARGS+= --without-odbc
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Milbc)
|
||||
DISTFILES+= rfc3951.txt
|
||||
SITES.rfc3951.txt= http://www.ietf.org/rfc/
|
||||
DISTFILES+= extract-cfile.awk
|
||||
SITES.extract-cfile.awk= http://www.ilbcfreeware.org/documentation/
|
||||
USE_TOOLS+= awk
|
||||
PLIST.ilbc= yes
|
||||
.endif
|
||||
|
||||
MAKE_FLAGS+= GLOBAL_MAKEOPTS=${WRKSRC}/pkgsrc.makeopts
|
||||
post-configure:
|
||||
.if !empty(PKG_OPTIONS:Mx11)
|
||||
${ECHO} "MENUSELECT_PBX=-pbx_gtkconsole" >> ${WRKSRC}/pkgsrc.makeopts
|
||||
.endif
|
||||
.if !empty(PKG_OPTIONS:Munixodbc)
|
||||
${ECHO} "MENUSELECT_OPTS_app_voicemail=ODBC_STORAGE" >> ${WRKSRC}/pkgsrc.makeopts
|
||||
.endif
|
||||
.if !empty(PKG_OPTIONS:Milbc)
|
||||
${ECHO} "MENUSELECT_CODECS=-codec_ilbc" >> ${WRKSRC}/pkgsrc.makeopts
|
||||
.endif
|
||||
# this is a hack to work around a bug in menuselect
|
||||
${ECHO} "MENUSELECT_AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi" >> ${WRKSRC}/pkgsrc.makeopts
|
||||
cd ${WRKSRC} && make menuselect.makeopts
|
||||
|
||||
post-extract:
|
||||
.if !empty(PKG_OPTIONS:Milbc)
|
||||
cp ${DISTDIR}/${DIST_SUBDIR}/rfc3951.txt ${WRKSRC}/codecs/ilbc
|
||||
cp ${DISTDIR}/${DIST_SUBDIR}/extract-cfile.awk ${WRKSRC}/codecs/ilbc
|
||||
cd ${WRKSRC}/codecs/ilbc && ${AWK} -f extract-cfile.awk < rfc3951.txt
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mwebvmail)
|
||||
DEPENDS+= p5-DBI-[0-9]*:../../databases/p5-DBI
|
||||
SUBST_CLASSES+= webvmail
|
||||
SUBST_STAGE.webvmail= post-patch
|
||||
SUBST_FILES.webvmail= contrib/scripts/vmail.cgi
|
||||
SUBST_SED.webvmail+= -e 's|@ASTETCDIR@|${ASTETCDIR}|'
|
||||
SUBST_SED.webvmail+= -e "s|@ASTSPOOLDIR@|${ASTSPOOLDIR}|"
|
||||
INSTALLATION_DIRS+= ${PREFIX}/libexec/cgi-bin ${PREFIX}/share/httpd/htdocs
|
||||
SPECIAL_PERMS+= ${PREFIX}/libexec/cgi-bin/vmail ${ASTERISK_USER} ${ASTERISK_GROUP} 04555
|
||||
INSTALL_TARGET+= webvmail
|
||||
PLIST.webvmail= yes
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mldap)
|
||||
.include "../../databases/openldap-client/buildlink3.mk"
|
||||
PLIST.ldap= yes
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-ldap
|
||||
.endif
|
126
comms/asterisk18/patches/patch-aa
Normal file
126
comms/asterisk18/patches/patch-aa
Normal file
|
@ -0,0 +1,126 @@
|
|||
$NetBSD: patch-aa,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- Makefile.orig 2010-11-11 22:13:38.000000000 +0000
|
||||
+++ Makefile
|
||||
@@ -126,7 +126,7 @@ DEBUG=-g3
|
||||
|
||||
# Asterisk.conf is located in ASTETCDIR or by using the -C flag
|
||||
# when starting Asterisk
|
||||
-ASTCONFPATH=$(ASTETCDIR)/asterisk.conf
|
||||
+ASTCONFPATH=$(ASTEXAMPLEDIR)/asterisk.conf
|
||||
MODULES_DIR=$(ASTLIBDIR)/modules
|
||||
AGI_DIR=$(ASTDATADIR)/agi-bin
|
||||
|
||||
@@ -216,10 +216,6 @@ ifeq ($(AST_DEVMODE),yes)
|
||||
_ASTCFLAGS+=-Wformat=2
|
||||
endif
|
||||
|
||||
-ifneq ($(findstring BSD,$(OSARCH)),)
|
||||
- _ASTCFLAGS+=-isystem /usr/local/include
|
||||
-endif
|
||||
-
|
||||
ifeq ($(findstring -march,$(_ASTCFLAGS) $(ASTCFLAGS)),)
|
||||
ifneq ($(PROC),ultrasparc)
|
||||
_ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
|
||||
@@ -449,7 +445,7 @@ distclean: $(SUBDIRS_DIST_CLEAN) _clean
|
||||
rm -rf doc/api
|
||||
rm -f build_tools/menuselect-deps
|
||||
|
||||
-datafiles: _all doc/core-en_US.xml
|
||||
+datafiles: doc/core-en_US.xml
|
||||
CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig $(DESTDIR)$(libdir)/pkgconfig;
|
||||
# Should static HTTP be installed during make samples or even with its own target ala
|
||||
# webvoicemail? There are portions here that *could* be customized but might also be
|
||||
@@ -468,7 +464,6 @@ datafiles: _all doc/core-en_US.xml
|
||||
for x in images/*.jpg; do \
|
||||
$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTDATADIR)/images ; \
|
||||
done
|
||||
- $(MAKE) -C sounds install
|
||||
|
||||
doc/core-en_US.xml: $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
|
||||
@printf "Building Documentation For: "
|
||||
@@ -520,7 +515,7 @@ OLDHEADERS=$(filter-out $(NEWHEADERS),$(
|
||||
installdirs:
|
||||
$(INSTALL) -d "$(DESTDIR)$(MODULES_DIR)"
|
||||
$(INSTALL) -d "$(DESTDIR)$(ASTSBINDIR)"
|
||||
- $(INSTALL) -d "$(DESTDIR)$(ASTETCDIR)"
|
||||
+ $(INSTALL) -d "$(DESTDIR)$(ASTEXAMPLEDIR)"
|
||||
$(INSTALL) -d "$(DESTDIR)$(ASTVARRUNDIR)"
|
||||
$(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)"
|
||||
$(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/dictate"
|
||||
@@ -547,8 +542,9 @@ installdirs:
|
||||
$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/static-http"
|
||||
$(INSTALL) -d "$(DESTDIR)$(ASTMANDIR)/man8"
|
||||
$(INSTALL) -d "$(DESTDIR)$(AGI_DIR)"
|
||||
+ $(INSTALL) -d "$(DESTDIR)$(ASTDBDIR)"
|
||||
|
||||
-bininstall: _all installdirs $(SUBDIRS_INSTALL)
|
||||
+bininstall: installdirs $(SUBDIRS_INSTALL)
|
||||
$(INSTALL) -m 755 main/asterisk $(DESTDIR)$(ASTSBINDIR)/
|
||||
$(LN) -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk
|
||||
$(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
|
||||
@@ -640,21 +636,21 @@ upgrade: bininstall
|
||||
# XXX why *.adsi is installed first ?
|
||||
adsi:
|
||||
@echo Installing adsi config files...
|
||||
- $(INSTALL) -d $(DESTDIR)$(ASTETCDIR)
|
||||
+ $(INSTALL) -d $(DESTDIR)$(ASTEXAMPLEDIR)
|
||||
@for x in configs/*.adsi; do \
|
||||
- dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
|
||||
+ dst="$(DESTDIR)$(ASTEXAMPLEDIR)/`$(BASENAME) $$x`" ; \
|
||||
if [ -f $${dst} ] ; then \
|
||||
echo "Overwriting $$x" ; \
|
||||
else \
|
||||
echo "Installing $$x" ; \
|
||||
fi ; \
|
||||
- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x` ; \
|
||||
+ $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTEXAMPLEDIR)/`$(BASENAME) $$x` ; \
|
||||
done
|
||||
|
||||
samples: adsi
|
||||
@echo Installing other config files...
|
||||
@for x in configs/*.sample; do \
|
||||
- dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`" ; \
|
||||
+ dst="$(DESTDIR)$(ASTEXAMPLEDIR)/`$(BASENAME) $$x .sample`" ; \
|
||||
if [ -f $${dst} ]; then \
|
||||
if [ "$(OVERWRITE)" = "y" ]; then \
|
||||
if cmp -s $${dst} $$x ; then \
|
||||
@@ -682,9 +678,9 @@ samples: adsi
|
||||
-e 's|^astspooldir.*$$|astspooldir => $(ASTSPOOLDIR)|' \
|
||||
-e 's|^astrundir.*$$|astrundir => $(ASTVARRUNDIR)|' \
|
||||
-e 's|^astlogdir.*$$|astlogdir => $(ASTLOGDIR)|' \
|
||||
- $(DESTDIR)$(ASTCONFPATH) > $(DESTDIR)$(ASTCONFPATH).tmp ; \
|
||||
- $(INSTALL) -m 644 $(DESTDIR)$(ASTCONFPATH).tmp $(DESTDIR)$(ASTCONFPATH) ; \
|
||||
- rm -f $(DESTDIR)$(ASTCONFPATH).tmp ; \
|
||||
+ $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf > $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf.tmp ; \
|
||||
+ $(INSTALL) -m 644 $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf.tmp $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf ; \
|
||||
+ rm -f $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf.tmp ; \
|
||||
fi ; \
|
||||
$(INSTALL) -d $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX
|
||||
build_tools/make_sample_voicemail $(DESTDIR)/$(ASTDATADIR) $(DESTDIR)/$(ASTSPOOLDIR)
|
||||
@@ -710,7 +706,7 @@ samples: adsi
|
||||
webvmail:
|
||||
@[ -d $(DESTDIR)$(HTTP_DOCSDIR)/ ] || ( printf "http docs directory not found.\nUpdate assignment of variable HTTP_DOCSDIR in Makefile!\n" && exit 1 )
|
||||
@[ -d $(DESTDIR)$(HTTP_CGIDIR) ] || ( printf "cgi-bin directory not found.\nUpdate assignment of variable HTTP_CGIDIR in Makefile!\n" && exit 1 )
|
||||
- $(INSTALL) -m 4755 contrib/scripts/vmail.cgi $(DESTDIR)$(HTTP_CGIDIR)/vmail.cgi
|
||||
+ $(INSTALL) contrib/scripts/vmail.cgi $(DESTDIR)$(HTTP_CGIDIR)/vmail
|
||||
$(INSTALL) -d $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk
|
||||
for x in images/*.gif; do \
|
||||
$(INSTALL) -m 644 $$x $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk/; \
|
||||
@@ -854,7 +850,7 @@ uninstall-all: _uninstall
|
||||
rm -rf $(DESTDIR)$(ASTVARLIBDIR)
|
||||
rm -rf $(DESTDIR)$(ASTDATADIR)
|
||||
rm -rf $(DESTDIR)$(ASTSPOOLDIR)
|
||||
- rm -rf $(DESTDIR)$(ASTETCDIR)
|
||||
+ rm -rf $(DESTDIR)$(ASTEXAMPLEDIR)
|
||||
rm -rf $(DESTDIR)$(ASTLOGDIR)
|
||||
|
||||
menuconfig: menuselect
|
||||
@@ -923,6 +919,7 @@ menuselect-tree: $(foreach dir,$(filter-
|
||||
@echo "</menu>" >> $@
|
||||
|
||||
.PHONY: menuselect
|
||||
+.PHONY: menuselect.makeopts
|
||||
.PHONY: main
|
||||
.PHONY: sounds
|
||||
.PHONY: clean
|
26
comms/asterisk18/patches/patch-af
Normal file
26
comms/asterisk18/patches/patch-af
Normal file
|
@ -0,0 +1,26 @@
|
|||
$NetBSD: patch-af,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
Index: utils/Makefile
|
||||
===================================================================
|
||||
--- utils/Makefile.orig 2010-04-22 22:10:17.000000000 +0000
|
||||
+++ utils/Makefile
|
||||
@@ -41,6 +41,10 @@ ifeq ($(OSARCH),SunOS)
|
||||
UTILS:=$(filter-out muted,$(UTILS))
|
||||
endif
|
||||
|
||||
+ifeq ($(OSARCH),NetBSD)
|
||||
+ UTILS:=$(filter-out muted,$(UTILS))
|
||||
+endif
|
||||
+
|
||||
ifeq ($(OSARCH),OpenBSD)
|
||||
UTILS:=$(filter-out muted,$(UTILS))
|
||||
endif
|
||||
@@ -75,7 +79,7 @@ all: $(UTILS)
|
||||
install:
|
||||
for x in $(UTILS); do \
|
||||
if [ "$$x" != "none" ]; then \
|
||||
- $(INSTALL) -m 755 $$x $(DESTDIR)$(ASTSBINDIR)/$$x; \
|
||||
+ $(BSD_INSTALL_PROGRAM) -m 755 $$x $(DESTDIR)$(ASTSBINDIR)/$$x; \
|
||||
fi; \
|
||||
done
|
||||
|
34
comms/asterisk18/patches/patch-ag
Normal file
34
comms/asterisk18/patches/patch-ag
Normal file
|
@ -0,0 +1,34 @@
|
|||
$NetBSD: patch-ag,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- codecs/lpc10/Makefile.orig 2007-10-29 15:24:44.000000000 -0700
|
||||
+++ codecs/lpc10/Makefile
|
||||
@@ -31,19 +31,21 @@ ASTCFLAGS:= $(ASTCFLAGS:-Werror=)
|
||||
ifneq ($(OSARCH),Darwin)
|
||||
ifneq ($(findstring BSD,${OSARCH}),BSD)
|
||||
ifneq ($(PROC),ppc)
|
||||
- ifneq ($(PROC),x86_64)
|
||||
- ifneq ($(PROC),alpha)
|
||||
+ ifneq ($(PROC),powerpc)
|
||||
+ ifneq ($(PROC),x86_64)
|
||||
+ ifneq ($(PROC),alpha)
|
||||
#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
|
||||
#This works for even old (2.96) versions of gcc and provides a small boost either way.
|
||||
#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn.t support it.
|
||||
#So we go lowest common available by gcc and go a step down, still a step up from
|
||||
#the default as we now have a better instruction set to work with. - Belgarath
|
||||
- ifeq ($(PROC),ultrasparc)
|
||||
- CFLAGS+= -mtune=$(PROC) -mcpu=v8 -O3 -fomit-frame-pointer
|
||||
- else
|
||||
- ifneq ($(OSARCH),SunOS)
|
||||
- ifneq ($(OSARCH),arm)
|
||||
-# CFLAGS+= -march=$(PROC)
|
||||
+ ifeq ($(PROC),ultrasparc)
|
||||
+ CFLAGS+= -mtune=$(PROC) -mcpu=v8 -O3 -fomit-frame-pointer
|
||||
+ else
|
||||
+ ifneq ($(OSARCH),SunOS)
|
||||
+ ifneq ($(OSARCH),arm)
|
||||
+# CFLAGS+= -march=$(PROC)
|
||||
+ endif
|
||||
endif
|
||||
endif
|
||||
endif
|
16
comms/asterisk18/patches/patch-ai
Normal file
16
comms/asterisk18/patches/patch-ai
Normal file
|
@ -0,0 +1,16 @@
|
|||
$NetBSD: patch-ai,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- include/asterisk/endian.h.orig 2008-10-09 10:51:25.000000000 -0700
|
||||
+++ include/asterisk/endian.h
|
||||
@@ -31,6 +31,11 @@
|
||||
#ifndef __BYTE_ORDER
|
||||
#ifdef __linux__
|
||||
#include <endian.h>
|
||||
+#elif defined(__DragonFly__)
|
||||
+#include <sys/endian.h>
|
||||
+#define __BYTE_ORDER BYTE_ORDER
|
||||
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
|
||||
+#define __BIG_ENDIAN BIG_ENDIAN
|
||||
#elif defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
|
||||
#if defined(__OpenBSD__)
|
||||
#include "asterisk/compat.h"
|
13
comms/asterisk18/patches/patch-ak
Normal file
13
comms/asterisk18/patches/patch-ak
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-ak,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- channels/chan_oss.c.orig 2008-11-02 16:39:04.000000000 -0800
|
||||
+++ channels/chan_oss.c
|
||||
@@ -47,7 +47,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
|
||||
|
||||
#ifdef __linux
|
||||
#include <linux/soundcard.h>
|
||||
-#elif defined(__FreeBSD__) || defined(__CYGWIN__)
|
||||
+#elif defined(__FreeBSD__) || defined(__CYGWIN__) || defined(__DragonFly__)
|
||||
#include <sys/soundcard.h>
|
||||
#else
|
||||
#include <soundcard.h>
|
13
comms/asterisk18/patches/patch-al
Normal file
13
comms/asterisk18/patches/patch-al
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-al,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- pbx/pbx_dundi.c.orig 2010-06-22 15:00:11.000000000 +0000
|
||||
+++ pbx/pbx_dundi.c
|
||||
@@ -37,7 +37,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
|
||||
#include <pthread.h>
|
||||
#include <net/if.h>
|
||||
|
||||
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__Darwin__)
|
||||
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__Darwin__) || defined(__DragonFly__)
|
||||
#include <net/if_dl.h>
|
||||
#include <ifaddrs.h>
|
||||
#include <signal.h>
|
13
comms/asterisk18/patches/patch-am
Normal file
13
comms/asterisk18/patches/patch-am
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-am,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- apps/app_sms.c.orig 2010-09-30 15:39:45.000000000 +0000
|
||||
+++ apps/app_sms.c
|
||||
@@ -549,7 +549,7 @@ static void packdate(unsigned char *o, t
|
||||
int z;
|
||||
|
||||
ast_localtime(&topack, &t, NULL);
|
||||
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__) || defined(__CYGWIN__)
|
||||
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__DragonFly__)
|
||||
z = -t.tm_gmtoff / 60 / 15;
|
||||
#else
|
||||
z = timezone / 60 / 15;
|
13
comms/asterisk18/patches/patch-an
Normal file
13
comms/asterisk18/patches/patch-an
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-an,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- utils/streamplayer.c.orig 2008-11-02 16:39:04.000000000 -0800
|
||||
+++ utils/streamplayer.c
|
||||
@@ -49,7 +49,7 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__Darwin__) || defined(__CYGWIN__)
|
||||
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__Darwin__) || defined(__CYGWIN__) || defined(__DragonFly__)
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#include <sys/time.h>
|
22
comms/asterisk18/patches/patch-ao
Normal file
22
comms/asterisk18/patches/patch-ao
Normal file
|
@ -0,0 +1,22 @@
|
|||
$NetBSD: patch-ao,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- build_tools/mkpkgconfig.orig 2007-08-22 11:54:30.000000000 -0700
|
||||
+++ build_tools/mkpkgconfig
|
||||
@@ -21,12 +25,15 @@ else
|
||||
fi
|
||||
|
||||
## Clean out CFLAGS for the spec file.
|
||||
+## pkgsrc -- the regex below isn't sed compatible, so always use perl
|
||||
+EXTREGEX="perl -pe"
|
||||
|
||||
-LOCAL_CFLAGS=`echo $CFLAGS | ${EXTREGEX} 's/\s*-pipe\s*//g' | ${EXTREGEX} 's/-[Wmp]\S*\s*//g' | \
|
||||
+LOCAL_CFLAGS=`echo $CFLAGS | ${EXTREGEX} 's/\-pipe\s*//g' | ${EXTREGEX} 's/-[Wmp]\S*\s*//g' | \
|
||||
${EXTREGEX} 's/-I(include|\.\.\/include) //g' | \
|
||||
${EXTREGEX} 's/-DINSTALL_PREFIX=\S* //g' | \
|
||||
${EXTREGEX} 's/-DASTERISK_VERSION=\S* //g' | \
|
||||
- ${EXTREGEX} 's/-DAST(ETCDIR|LIBDIR|VARLIBDIR|VARRUNDIR|SPOOLDIR|LOGDIR|CONFPATH|MODDIR|AGIDIR)=\S* //g'`
|
||||
+ ${EXTREGEX} 's/-DAST(ETCDIR|LIBDIR|VARLIBDIR|VARRUNDIR|SPOOLDIR|LOGDIR|CONFPATH|MODDIR|AGIDIR)=\S* //g' | \
|
||||
+ ${EXTREGEX} "s;${WRKSRC};${PREFIX};g"`
|
||||
|
||||
|
||||
cat <<EOF > $PPATH/asterisk.pc
|
14
comms/asterisk18/patches/patch-ap
Normal file
14
comms/asterisk18/patches/patch-ap
Normal file
|
@ -0,0 +1,14 @@
|
|||
$NetBSD: patch-ap,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- configure.ac.orig 2010-11-09 20:33:05.000000000 +0000
|
||||
+++ configure.ac
|
||||
@@ -981,6 +981,9 @@ AST_C_DEFINE_CHECK([IP_MTU_DISCOVER], [I
|
||||
AC_CHECK_HEADER([libkern/OSAtomic.h],
|
||||
[AC_DEFINE_UNQUOTED([HAVE_OSX_ATOMICS], 1, [Define to 1 if OSX atomic operations are supported.])])
|
||||
|
||||
+AC_CHECK_HEADER([sys/atomic.h],
|
||||
+ [AC_DEFINE_UNQUOTED([HAVE_SYS_ATOMIC_H], 1, [Define to 1 if sys/atomic.h atomic operations are supported.])])
|
||||
+
|
||||
AC_CHECK_SIZEOF([int])
|
||||
AC_CHECK_SIZEOF([long])
|
||||
AC_CHECK_SIZEOF([long long])
|
31
comms/asterisk18/patches/patch-aq
Normal file
31
comms/asterisk18/patches/patch-aq
Normal file
|
@ -0,0 +1,31 @@
|
|||
$NetBSD: patch-aq,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- configure.orig 2010-11-09 20:33:05.000000000 +0000
|
||||
+++ configure
|
||||
@@ -16365,6 +16365,17 @@ fi
|
||||
|
||||
|
||||
|
||||
+ac_fn_c_check_header_mongrel "$LINENO" "sys/atomic.h" "ac_cv_header_sys_atomic_h" "$ac_includes_default"
|
||||
+if test "x$ac_cv_header_sys_atomic_h" = x""yes; then :
|
||||
+
|
||||
+cat >>confdefs.h <<_ACEOF
|
||||
+#define HAVE_SYS_ATOMIC_H 1
|
||||
+_ACEOF
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+
|
||||
# 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]];'.
|
||||
@@ -17346,6 +17357,8 @@ $as_echo_n "checking if \"struct ifaddrs
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
+ #include <sys/types.h>
|
||||
+ #include <sys/socket.h>
|
||||
#include <ifaddrs.h>
|
||||
int
|
||||
main ()
|
14
comms/asterisk18/patches/patch-ar
Normal file
14
comms/asterisk18/patches/patch-ar
Normal file
|
@ -0,0 +1,14 @@
|
|||
$NetBSD: patch-ar,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- include/asterisk/autoconfig.h.in.orig 2010-11-09 20:33:05.000000000 +0000
|
||||
+++ include/asterisk/autoconfig.h.in
|
||||
@@ -864,6 +864,9 @@
|
||||
/* Define to 1 if you have the <syslog.h> header file. */
|
||||
#undef HAVE_SYSLOG_H
|
||||
|
||||
+/* 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
|
41
comms/asterisk18/patches/patch-as
Normal file
41
comms/asterisk18/patches/patch-as
Normal file
|
@ -0,0 +1,41 @@
|
|||
$NetBSD: patch-as,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- include/asterisk/lock.h.orig 2010-07-03 02:36:31.000000000 +0000
|
||||
+++ include/asterisk/lock.h
|
||||
@@ -580,6 +580,10 @@ int ast_atomic_fetchadd_int_slow(volatil
|
||||
#include "libkern/OSAtomic.h"
|
||||
#endif
|
||||
|
||||
+#if defined(HAVE_SYS_ATOMIC_H)
|
||||
+#include <sys/atomic.h>
|
||||
+#endif
|
||||
+
|
||||
/*! \brief Atomically add v to *p and return * the previous value of *p.
|
||||
* This can be used to handle reference counts, and the return value
|
||||
* can be used to generate unique identifiers.
|
||||
@@ -599,6 +603,12 @@ AST_INLINE_API(int ast_atomic_fetchadd_i
|
||||
AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
|
||||
{
|
||||
return OSAtomicAdd64(v, (int64_t *) p) - v;
|
||||
+})
|
||||
+#elif defined(HAVE_SYS_ATOMIC_H)
|
||||
+AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
|
||||
+{
|
||||
+ return atomic_add_int_nv((unsigned int *)p, v) - v;
|
||||
+})
|
||||
#elif defined (__i386__) || defined(__x86_64__)
|
||||
#ifdef sun
|
||||
AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
|
||||
@@ -645,6 +655,12 @@ AST_INLINE_API(int ast_atomic_dec_and_te
|
||||
AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
|
||||
{
|
||||
return OSAtomicAdd64( -1, (int64_t *) p) == 0;
|
||||
+})
|
||||
+#elif defined(HAVE_SYS_ATOMIC_H)
|
||||
+AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
|
||||
+{
|
||||
+ return atomic_dec_uint_nv((unsigned int *)p) == 0;
|
||||
+})
|
||||
#else
|
||||
AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
|
||||
{
|
49
comms/asterisk18/patches/patch-at
Normal file
49
comms/asterisk18/patches/patch-at
Normal file
|
@ -0,0 +1,49 @@
|
|||
$NetBSD: patch-at,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- utils/extconf.c.orig 2010-06-10 08:15:45.000000000 +0000
|
||||
+++ utils/extconf.c
|
||||
@@ -790,6 +790,10 @@ static void __attribute__((destructor))
|
||||
#include "libkern/OSAtomic.h"
|
||||
#endif
|
||||
|
||||
+#if defined(HAVE_SYS_ATOMIC_H)
|
||||
+#include <sys/atomic.h>
|
||||
+#endif
|
||||
+
|
||||
/*! \brief Atomically add v to *p and return * the previous value of *p.
|
||||
* This can be used to handle reference counts, and the return value
|
||||
* can be used to generate unique identifiers.
|
||||
@@ -803,12 +807,18 @@ AST_INLINE_API(int ast_atomic_fetchadd_i
|
||||
#elif defined(HAVE_OSX_ATOMICS) && (SIZEOF_INT == 4)
|
||||
AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
|
||||
{
|
||||
- return OSAtomicAdd32(v, (int32_t *) p);
|
||||
+ return OSAtomicAdd32(v, (int32_t *) p) - v;
|
||||
})
|
||||
#elif defined(HAVE_OSX_ATOMICS) && (SIZEOF_INT == 8)
|
||||
AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
|
||||
{
|
||||
- return OSAtomicAdd64(v, (int64_t *) p);
|
||||
+ return OSAtomicAdd64(v, (int64_t *) p) - v;
|
||||
+})
|
||||
+#elif defined(HAVE_SYS_ATOMIC_H)
|
||||
+AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
|
||||
+{
|
||||
+ return atomic_add_int_nv((unsigned int *)p, v) - v;
|
||||
+})
|
||||
#elif defined (__i386__) || defined(__x86_64__)
|
||||
AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
|
||||
{
|
||||
@@ -850,6 +860,12 @@ AST_INLINE_API(int ast_atomic_dec_and_te
|
||||
AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
|
||||
{
|
||||
return OSAtomicAdd64( -1, (int64_t *) p) == 0;
|
||||
+})
|
||||
+#elif defined(HAVE_SYS_ATOMIC_H)
|
||||
+AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
|
||||
+{
|
||||
+ return atomic_dec_uint_nv((unsigned int *)p) == 0;
|
||||
+})
|
||||
#else
|
||||
AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
|
||||
{
|
25
comms/asterisk18/patches/patch-au
Normal file
25
comms/asterisk18/patches/patch-au
Normal file
|
@ -0,0 +1,25 @@
|
|||
$NetBSD: patch-au,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- sounds/Makefile.orig 2010-10-18 22:01:16.000000000 +0000
|
||||
+++ sounds/Makefile
|
||||
@@ -135,20 +135,6 @@ endif
|
||||
all: $(SOUNDS_CACHE_DIR) $(CORE_SOUNDS) $(EXTRA_SOUNDS) $(MOH)
|
||||
|
||||
have_download:
|
||||
- @if test "$(DOWNLOAD)" = ":" ; then \
|
||||
- echo "**************************************************"; \
|
||||
- echo "*** ***"; \
|
||||
- echo "*** You must have either wget or fetch to be ***"; \
|
||||
- echo "*** able to automatically download and install ***"; \
|
||||
- echo "*** the requested sound packages. ***"; \
|
||||
- echo "*** ***"; \
|
||||
- echo "*** Please install one of these, or remove any ***"; \
|
||||
- echo "*** extra sound package selections in ***"; \
|
||||
- echo "*** menuselect before installing Asterisk. ***"; \
|
||||
- echo "*** ***"; \
|
||||
- echo "**************************************************"; \
|
||||
- exit 1; \
|
||||
- fi
|
||||
|
||||
$(eval $(call sound_format_lang_rule,$(SOUNDS_DIR),core-sounds,en,$(CORE_SOUNDS_VERSION)))
|
||||
|
19
comms/asterisk18/patches/patch-av
Normal file
19
comms/asterisk18/patches/patch-av
Normal file
|
@ -0,0 +1,19 @@
|
|||
$NetBSD: patch-av,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- apps/app_dial.c.orig 2010-10-21 00:07:17.000000000 +0000
|
||||
+++ apps/app_dial.c
|
||||
@@ -1728,12 +1728,12 @@ static void end_bridge_callback(void *da
|
||||
|
||||
ast_channel_lock(chan);
|
||||
if (chan->cdr->answer.tv_sec) {
|
||||
- snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->answer.tv_sec);
|
||||
+ snprintf(buf, sizeof(buf), "%jd", (intmax_t) ((long) end - chan->cdr->answer.tv_sec));
|
||||
pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", buf);
|
||||
}
|
||||
|
||||
if (chan->cdr->start.tv_sec) {
|
||||
- snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->start.tv_sec);
|
||||
+ snprintf(buf, sizeof(buf), "%jd", (intmax_t) ((long) end - chan->cdr->start.tv_sec));
|
||||
pbx_builtin_setvar_helper(chan, "DIALEDTIME", buf);
|
||||
}
|
||||
ast_channel_unlock(chan);
|
19
comms/asterisk18/patches/patch-aw
Normal file
19
comms/asterisk18/patches/patch-aw
Normal file
|
@ -0,0 +1,19 @@
|
|||
$NetBSD: patch-aw,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- apps/app_followme.c.orig 2010-09-02 05:20:59.000000000 +0000
|
||||
+++ apps/app_followme.c
|
||||
@@ -992,12 +992,12 @@ static void end_bridge_callback(void *da
|
||||
|
||||
ast_channel_lock(chan);
|
||||
if (chan->cdr->answer.tv_sec) {
|
||||
- snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->answer.tv_sec);
|
||||
+ snprintf(buf, sizeof(buf), "%jd", (intmax_t) ((long) end - chan->cdr->answer.tv_sec));
|
||||
pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", buf);
|
||||
}
|
||||
|
||||
if (chan->cdr->start.tv_sec) {
|
||||
- snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->start.tv_sec);
|
||||
+ snprintf(buf, sizeof(buf), "%jd", (intmax_t) ((long) end - chan->cdr->start.tv_sec));
|
||||
pbx_builtin_setvar_helper(chan, "DIALEDTIME", buf);
|
||||
}
|
||||
ast_channel_unlock(chan);
|
165
comms/asterisk18/patches/patch-ax
Normal file
165
comms/asterisk18/patches/patch-ax
Normal file
|
@ -0,0 +1,165 @@
|
|||
$NetBSD: patch-ax,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- apps/app_queue.c.orig 2010-09-21 20:29:59.000000000 +0000
|
||||
+++ apps/app_queue.c
|
||||
@@ -3180,8 +3180,8 @@ static void record_abandoned(struct queu
|
||||
"Uniqueid: %s\r\n"
|
||||
"Position: %d\r\n"
|
||||
"OriginalPosition: %d\r\n"
|
||||
- "HoldTime: %d\r\n",
|
||||
- qe->parent->name, qe->chan->uniqueid, qe->pos, qe->opos, (int)(time(NULL) - qe->start));
|
||||
+ "HoldTime: %jd\r\n",
|
||||
+ qe->parent->name, qe->chan->uniqueid, qe->pos, qe->opos, (intmax_t)(time(NULL) - qe->start));
|
||||
|
||||
qe->parent->callsabandoned++;
|
||||
ao2_unlock(qe->parent);
|
||||
@@ -3768,7 +3768,7 @@ static int wait_our_turn(struct queue_en
|
||||
|
||||
if ((status = get_member_status(qe->parent, qe->max_penalty, qe->min_penalty, qe->parent->leavewhenempty))) {
|
||||
*reason = QUEUE_LEAVEEMPTY;
|
||||
- ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
|
||||
+ ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%jd", qe->pos, qe->opos, (intmax_t) time(NULL) - qe->start);
|
||||
leave_queue(qe);
|
||||
break;
|
||||
}
|
||||
@@ -3972,12 +3972,12 @@ static void send_agent_complete(const st
|
||||
"Channel: %s\r\n"
|
||||
"Member: %s\r\n"
|
||||
"MemberName: %s\r\n"
|
||||
- "HoldTime: %ld\r\n"
|
||||
- "TalkTime: %ld\r\n"
|
||||
+ "HoldTime: %jd\r\n"
|
||||
+ "TalkTime: %jd\r\n"
|
||||
"Reason: %s\r\n"
|
||||
"%s",
|
||||
queuename, qe->chan->uniqueid, peer->name, member->interface, member->membername,
|
||||
- (long)(callstart - qe->start), (long)(time(NULL) - callstart), reason,
|
||||
+ (intmax_t)(callstart - qe->start), (intmax_t)(time(NULL) - callstart), reason,
|
||||
qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, vars_len) : "");
|
||||
}
|
||||
|
||||
@@ -4020,9 +4020,9 @@ static void queue_transfer_fixup(void *d
|
||||
int callcompletedinsl = qtds->callcompletedinsl;
|
||||
struct ast_datastore *datastore;
|
||||
|
||||
- ast_queue_log(qe->parent->name, qe->chan->uniqueid, member->membername, "TRANSFER", "%s|%s|%ld|%ld|%d",
|
||||
- new_chan->exten, new_chan->context, (long) (callstart - qe->start),
|
||||
- (long) (time(NULL) - callstart), qe->opos);
|
||||
+ ast_queue_log(qe->parent->name, qe->chan->uniqueid, member->membername, "TRANSFER", "%s|%s|%jd|%jd|%d",
|
||||
+ new_chan->exten, new_chan->context, (intmax_t) (callstart - qe->start),
|
||||
+ (intmax_t) (time(NULL) - callstart), qe->opos);
|
||||
|
||||
update_queue(qe->parent, member, callcompletedinsl, (time(NULL) - callstart));
|
||||
|
||||
@@ -4516,7 +4516,7 @@ static int try_calling(struct queue_ent
|
||||
} else if (res2) {
|
||||
/* Caller must have hung up just before being connected*/
|
||||
ast_log(LOG_NOTICE, "Caller was about to talk to agent on %s but the caller hungup.\n", peer->name);
|
||||
- ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "ABANDON", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
|
||||
+ ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "ABANDON", "%d|%d|%jd", qe->pos, qe->opos, (intmax_t) time(NULL) - qe->start);
|
||||
record_abandoned(qe);
|
||||
ast_hangup(peer);
|
||||
ao2_ref(member, -1);
|
||||
@@ -4562,8 +4562,8 @@ static int try_calling(struct queue_ent
|
||||
/* if setqueueentryvar is defined, make queue entry (i.e. the caller) variables available to the channel */
|
||||
/* use pbx_builtin_setvar to set a load of variables with one call */
|
||||
if (qe->parent->setqueueentryvar) {
|
||||
- snprintf(interfacevar, sizeof(interfacevar), "QEHOLDTIME=%ld,QEORIGINALPOS=%d",
|
||||
- (long) time(NULL) - qe->start, qe->opos);
|
||||
+ snprintf(interfacevar, sizeof(interfacevar), "QEHOLDTIME=%jd,QEORIGINALPOS=%d",
|
||||
+ (intmax_t) time(NULL) - qe->start, qe->opos);
|
||||
pbx_builtin_setvar_multiple(qe->chan, interfacevar);
|
||||
pbx_builtin_setvar_multiple(peer, interfacevar);
|
||||
}
|
||||
@@ -4808,8 +4808,8 @@ static int try_calling(struct queue_ent
|
||||
ast_log(LOG_WARNING, "Asked to execute an AGI on this channel, but could not find application (agi)!\n");
|
||||
}
|
||||
qe->handled++;
|
||||
- ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "CONNECT", "%ld|%s|%ld", (long) time(NULL) - qe->start, peer->uniqueid,
|
||||
- (long)(orig - to > 0 ? (orig - to) / 1000 : 0));
|
||||
+ ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "CONNECT", "%jd|%s|%jd", (intmax_t) time(NULL) - qe->start, peer->uniqueid,
|
||||
+ (intmax_t)(orig - to > 0 ? (orig - to) / 1000 : 0));
|
||||
if (update_cdr && qe->chan->cdr)
|
||||
ast_copy_string(qe->chan->cdr->dstchannel, member->membername, sizeof(qe->chan->cdr->dstchannel));
|
||||
if (qe->parent->eventwhencalled)
|
||||
@@ -4819,12 +4819,12 @@ static int try_calling(struct queue_ent
|
||||
"Channel: %s\r\n"
|
||||
"Member: %s\r\n"
|
||||
"MemberName: %s\r\n"
|
||||
- "Holdtime: %ld\r\n"
|
||||
+ "Holdtime: %jd\r\n"
|
||||
"BridgedChannel: %s\r\n"
|
||||
- "Ringtime: %ld\r\n"
|
||||
+ "Ringtime: %jd\r\n"
|
||||
"%s",
|
||||
queuename, qe->chan->uniqueid, peer->name, member->interface, member->membername,
|
||||
- (long) time(NULL) - qe->start, peer->uniqueid, (long)(orig - to > 0 ? (orig - to) / 1000 : 0),
|
||||
+ (intmax_t) time(NULL) - qe->start, peer->uniqueid, (intmax_t)(orig - to > 0 ? (orig - to) / 1000 : 0),
|
||||
qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
|
||||
ast_copy_string(oldcontext, qe->chan->context, sizeof(oldcontext));
|
||||
ast_copy_string(oldexten, qe->chan->exten, sizeof(oldexten));
|
||||
@@ -4856,17 +4856,17 @@ static int try_calling(struct queue_ent
|
||||
|
||||
/* detect a blind transfer */
|
||||
if (!(qe->chan->_softhangup | peer->_softhangup) && (strcasecmp(oldcontext, qe->chan->context) || strcasecmp(oldexten, qe->chan->exten))) {
|
||||
- ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "TRANSFER", "%s|%s|%ld|%ld|%d",
|
||||
- qe->chan->exten, qe->chan->context, (long) (callstart - qe->start),
|
||||
- (long) (time(NULL) - callstart), qe->opos);
|
||||
+ ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "TRANSFER", "%s|%s|%jd|%jd|%d",
|
||||
+ qe->chan->exten, qe->chan->context, (intmax_t) (callstart - qe->start),
|
||||
+ (intmax_t) (time(NULL) - callstart), qe->opos);
|
||||
send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), TRANSFER);
|
||||
} else if (ast_check_hangup(qe->chan)) {
|
||||
- ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "COMPLETECALLER", "%ld|%ld|%d",
|
||||
- (long) (callstart - qe->start), (long) (time(NULL) - callstart), qe->opos);
|
||||
+ ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "COMPLETECALLER", "%jd|%jd|%d",
|
||||
+ (intmax_t) (callstart - qe->start), (intmax_t) (time(NULL) - callstart), qe->opos);
|
||||
send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), CALLER);
|
||||
} else {
|
||||
- ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "COMPLETEAGENT", "%ld|%ld|%d",
|
||||
- (long) (callstart - qe->start), (long) (time(NULL) - callstart), qe->opos);
|
||||
+ ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "COMPLETEAGENT", "%jd|%jd|%d",
|
||||
+ (intmax_t) (callstart - qe->start), (intmax_t) (time(NULL) - callstart), qe->opos);
|
||||
send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), AGENT);
|
||||
}
|
||||
if ((tds = ast_channel_datastore_find(qe->chan, &queue_transfer_info, NULL))) {
|
||||
@@ -5765,8 +5765,8 @@ check_turns:
|
||||
record_abandoned(&qe);
|
||||
reason = QUEUE_TIMEOUT;
|
||||
res = 0;
|
||||
- ast_queue_log(args.queuename, chan->uniqueid,"NONE", "EXITWITHTIMEOUT", "%d|%d|%ld",
|
||||
- qe.pos, qe.opos, (long) time(NULL) - qe.start);
|
||||
+ ast_queue_log(args.queuename, chan->uniqueid,"NONE", "EXITWITHTIMEOUT", "%d|%d|%jd",
|
||||
+ qe.pos, qe.opos, (intmax_t) time(NULL) - qe.start);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -5808,7 +5808,7 @@ check_turns:
|
||||
if ((status = get_member_status(qe.parent, qe.max_penalty, qe.min_penalty, qe.parent->leavewhenempty))) {
|
||||
record_abandoned(&qe);
|
||||
reason = QUEUE_LEAVEEMPTY;
|
||||
- ast_queue_log(args.queuename, chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe.pos, qe.opos, (long)(time(NULL) - qe.start));
|
||||
+ ast_queue_log(args.queuename, chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%jd", qe.pos, qe.opos, (intmax_t)(time(NULL) - qe.start));
|
||||
res = 0;
|
||||
break;
|
||||
}
|
||||
@@ -5830,7 +5830,7 @@ check_turns:
|
||||
record_abandoned(&qe);
|
||||
reason = QUEUE_TIMEOUT;
|
||||
res = 0;
|
||||
- ast_queue_log(qe.parent->name, qe.chan->uniqueid,"NONE", "EXITWITHTIMEOUT", "%d|%d|%ld", qe.pos, qe.opos, (long) time(NULL) - qe.start);
|
||||
+ ast_queue_log(qe.parent->name, qe.chan->uniqueid,"NONE", "EXITWITHTIMEOUT", "%d|%d|%jd", qe.pos, qe.opos, (intmax_t) time(NULL) - qe.start);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -5857,8 +5857,8 @@ stop:
|
||||
if (!qe.handled) {
|
||||
record_abandoned(&qe);
|
||||
ast_queue_log(args.queuename, chan->uniqueid, "NONE", "ABANDON",
|
||||
- "%d|%d|%ld", qe.pos, qe.opos,
|
||||
- (long) time(NULL) - qe.start);
|
||||
+ "%d|%d|%jd", qe.pos, qe.opos,
|
||||
+ (intmax_t) time(NULL) - qe.start);
|
||||
res = -1;
|
||||
} else if (qcontinue) {
|
||||
reason = QUEUE_CONTINUE;
|
84
comms/asterisk18/patches/patch-ay
Normal file
84
comms/asterisk18/patches/patch-ay
Normal file
|
@ -0,0 +1,84 @@
|
|||
$NetBSD: patch-ay,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- main/features.c.orig 2010-09-29 21:12:43.000000000 +0000
|
||||
+++ main/features.c
|
||||
@@ -1005,12 +1005,12 @@ static int park_call_full(struct ast_cha
|
||||
"Channel: %s\r\n"
|
||||
"Parkinglot: %s\r\n"
|
||||
"From: %s\r\n"
|
||||
- "Timeout: %ld\r\n"
|
||||
+ "Timeout: %jd\r\n"
|
||||
"CallerIDNum: %s\r\n"
|
||||
"CallerIDName: %s\r\n"
|
||||
"Uniqueid: %s\r\n",
|
||||
pu->parkingexten, pu->chan->name, pu->parkinglot->name, event_from ? event_from : "",
|
||||
- (long)pu->start.tv_sec + (long)(pu->parkingtime/1000) - (long)time(NULL),
|
||||
+ (intmax_t)pu->start.tv_sec + (intmax_t)(pu->parkingtime/1000) - (intmax_t)time(NULL),
|
||||
S_COR(pu->chan->caller.id.number.valid, pu->chan->caller.id.number.str, "<unknown>"),
|
||||
S_COR(pu->chan->caller.id.name.valid, pu->chan->caller.id.name.str, "<unknown>"),
|
||||
pu->chan->uniqueid
|
||||
@@ -1473,7 +1473,7 @@ static int builtin_automonitor(struct as
|
||||
len = strlen(touch_monitor) + 50;
|
||||
args = alloca(len);
|
||||
touch_filename = alloca(len);
|
||||
- snprintf(touch_filename, len, "%s-%ld-%s", S_OR(touch_monitor_prefix, "auto"), (long)time(NULL), touch_monitor);
|
||||
+ snprintf(touch_filename, len, "%s-%jd-%s", S_OR(touch_monitor_prefix, "auto"), (intmax_t)time(NULL), touch_monitor);
|
||||
snprintf(args, len, "%s,%s,m", S_OR(touch_format, "wav"), touch_filename);
|
||||
} else {
|
||||
caller_chan_id = ast_strdupa(S_COR(caller_chan->caller.id.number.valid,
|
||||
@@ -1483,7 +1483,7 @@ static int builtin_automonitor(struct as
|
||||
len = strlen(caller_chan_id) + strlen(callee_chan_id) + 50;
|
||||
args = alloca(len);
|
||||
touch_filename = alloca(len);
|
||||
- snprintf(touch_filename, len, "%s-%ld-%s-%s", S_OR(touch_monitor_prefix, "auto"), (long)time(NULL), caller_chan_id, callee_chan_id);
|
||||
+ snprintf(touch_filename, len, "%s-%jd-%s-%s", S_OR(touch_monitor_prefix, "auto"), (intmax_t)time(NULL), caller_chan_id, callee_chan_id);
|
||||
snprintf(args, len, "%s,%s,m", S_OR(touch_format, "wav"), touch_filename);
|
||||
}
|
||||
|
||||
@@ -1589,7 +1589,7 @@ static int builtin_automixmonitor(struct
|
||||
len = strlen(touch_monitor) + 50;
|
||||
args = alloca(len);
|
||||
touch_filename = alloca(len);
|
||||
- snprintf(touch_filename, len, "auto-%ld-%s", (long)time(NULL), touch_monitor);
|
||||
+ snprintf(touch_filename, len, "auto-%jd-%s", (intmax_t)time(NULL), touch_monitor);
|
||||
snprintf(args, len, "%s.%s,b", touch_filename, (touch_format) ? touch_format : "wav");
|
||||
} else {
|
||||
caller_chan_id = ast_strdupa(S_COR(caller_chan->caller.id.number.valid,
|
||||
@@ -1599,7 +1599,7 @@ static int builtin_automixmonitor(struct
|
||||
len = strlen(caller_chan_id) + strlen(callee_chan_id) + 50;
|
||||
args = alloca(len);
|
||||
touch_filename = alloca(len);
|
||||
- snprintf(touch_filename, len, "auto-%ld-%s-%s", (long)time(NULL), caller_chan_id, callee_chan_id);
|
||||
+ snprintf(touch_filename, len, "auto-%jd-%s-%s", (intmax_t)time(NULL), caller_chan_id, callee_chan_id);
|
||||
snprintf(args, len, "%s.%s,b", touch_filename, S_OR(touch_format, "wav"));
|
||||
}
|
||||
|
||||
@@ -5089,10 +5089,10 @@ static char *handle_parkedcalls(struct a
|
||||
|
||||
AST_LIST_LOCK(&curlot->parkings);
|
||||
AST_LIST_TRAVERSE(&curlot->parkings, cur, list) {
|
||||
- ast_cli(a->fd, "%-10.10s %25s (%-15s %-12s %-4d) %6lds\n"
|
||||
+ ast_cli(a->fd, "%-10.10s %25s (%-15s %-12s %-4d) %6jds\n"
|
||||
,cur->parkingexten, cur->chan->name, cur->context, cur->exten
|
||||
,cur->priority,
|
||||
- (long)(cur->start.tv_sec + (cur->parkingtime/1000) - time(NULL)) );
|
||||
+ (intmax_t)(cur->start.tv_sec + (cur->parkingtime/1000) - time(NULL)) );
|
||||
numparked++;
|
||||
numparked += lotparked;
|
||||
}
|
||||
@@ -5144,13 +5144,13 @@ static int manager_parking_status(struct
|
||||
"Exten: %d\r\n"
|
||||
"Channel: %s\r\n"
|
||||
"From: %s\r\n"
|
||||
- "Timeout: %ld\r\n"
|
||||
+ "Timeout: %jd\r\n"
|
||||
"CallerIDNum: %s\r\n"
|
||||
"CallerIDName: %s\r\n"
|
||||
"%s"
|
||||
"\r\n",
|
||||
cur->parkingnum, cur->chan->name, cur->peername,
|
||||
- (long) cur->start.tv_sec + (long) (cur->parkingtime / 1000) - (long) time(NULL),
|
||||
+ (intmax_t) cur->start.tv_sec + (intmax_t) (cur->parkingtime / 1000) - (intmax_t) time(NULL),
|
||||
S_COR(cur->chan->caller.id.number.valid, cur->chan->caller.id.number.str, ""), /* XXX in other places it is <unknown> */
|
||||
S_COR(cur->chan->caller.id.name.valid, cur->chan->caller.id.name.str, ""),
|
||||
idText);
|
22
comms/asterisk18/patches/patch-az
Normal file
22
comms/asterisk18/patches/patch-az
Normal file
|
@ -0,0 +1,22 @@
|
|||
$NetBSD: patch-az,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- main/manager.c.orig 2010-11-02 20:45:09.000000000 +0000
|
||||
+++ main/manager.c
|
||||
@@ -1600,7 +1600,7 @@ static char *handle_showmanconn(struct a
|
||||
struct mansession_session *session;
|
||||
time_t now = time(NULL);
|
||||
#define HSMCONN_FORMAT1 " %-15.15s %-15.15s %-10.10s %-10.10s %-8.8s %-8.8s %-5.5s %-5.5s\n"
|
||||
-#define HSMCONN_FORMAT2 " %-15.15s %-15.15s %-10d %-10d %-8d %-8d %-5.5d %-5.5d\n"
|
||||
+#define HSMCONN_FORMAT2 " %-15.15s %-15.15s %-10jd %-10jd %-8d %-8d %-5.5d %-5.5d\n"
|
||||
int count = 0;
|
||||
struct ao2_iterator i;
|
||||
|
||||
@@ -1621,7 +1621,7 @@ static char *handle_showmanconn(struct a
|
||||
i = ao2_iterator_init(sessions, 0);
|
||||
while ((session = ao2_iterator_next(&i))) {
|
||||
ao2_lock(session);
|
||||
- ast_cli(a->fd, HSMCONN_FORMAT2, session->username, ast_inet_ntoa(session->sin.sin_addr), (int)(session->sessionstart), (int)(now - session->sessionstart), session->fd, session->inuse, session->readperm, session->writeperm);
|
||||
+ ast_cli(a->fd, HSMCONN_FORMAT2, session->username, ast_inet_ntoa(session->sin.sin_addr), (intmax_t)(session->sessionstart), (intmax_t)(now - session->sessionstart), session->fd, session->inuse, session->readperm, session->writeperm);
|
||||
count++;
|
||||
ao2_unlock(session);
|
||||
unref_mansession(session);
|
20
comms/asterisk18/patches/patch-ba
Normal file
20
comms/asterisk18/patches/patch-ba
Normal file
|
@ -0,0 +1,20 @@
|
|||
$NetBSD: patch-ba,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- main/sched.c.orig 2010-08-10 18:05:07.000000000 +0000
|
||||
+++ main/sched.c
|
||||
@@ -579,12 +579,12 @@ void ast_sched_dump(struct sched_context
|
||||
struct timeval delta;
|
||||
q = ast_heap_peek(con->sched_heap, x);
|
||||
delta = ast_tvsub(q->when, when);
|
||||
- ast_debug(1, "|%.4d | %-15p | %-15p | %.6ld : %.6ld |\n",
|
||||
+ ast_debug(1, "|%.4d | %-15p | %-15p | %.6jd : %.6jd |\n",
|
||||
q->id,
|
||||
q->callback,
|
||||
q->data,
|
||||
- (long)delta.tv_sec,
|
||||
- (long int)delta.tv_usec);
|
||||
+ (intmax_t)delta.tv_sec,
|
||||
+ (intmax_t)delta.tv_usec);
|
||||
}
|
||||
ast_mutex_unlock(&con->lock);
|
||||
ast_debug(1, "=============================================================\n");
|
22
comms/asterisk18/patches/patch-bb
Normal file
22
comms/asterisk18/patches/patch-bb
Normal file
|
@ -0,0 +1,22 @@
|
|||
$NetBSD: patch-bb,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- main/utils.c.orig 2010-08-06 18:57:10.000000000 +0000
|
||||
+++ main/utils.c
|
||||
@@ -1353,13 +1353,13 @@ int ast_false(const char *s)
|
||||
static struct timeval tvfix(struct timeval a)
|
||||
{
|
||||
if (a.tv_usec >= ONE_MILLION) {
|
||||
- ast_log(LOG_WARNING, "warning too large timestamp %ld.%ld\n",
|
||||
- (long)a.tv_sec, (long int) a.tv_usec);
|
||||
+ ast_log(LOG_WARNING, "warning too large timestamp %jd.%ld\n",
|
||||
+ (intmax_t)a.tv_sec, (long int) a.tv_usec);
|
||||
a.tv_sec += a.tv_usec / ONE_MILLION;
|
||||
a.tv_usec %= ONE_MILLION;
|
||||
} else if (a.tv_usec < 0) {
|
||||
- ast_log(LOG_WARNING, "warning negative timestamp %ld.%ld\n",
|
||||
- (long)a.tv_sec, (long int) a.tv_usec);
|
||||
+ ast_log(LOG_WARNING, "warning negative timestamp %jd.%ld\n",
|
||||
+ (intmax_t)a.tv_sec, (long int) a.tv_usec);
|
||||
a.tv_usec = 0;
|
||||
}
|
||||
return a;
|
181
comms/asterisk18/patches/patch-bc
Normal file
181
comms/asterisk18/patches/patch-bc
Normal file
|
@ -0,0 +1,181 @@
|
|||
$NetBSD: patch-bc,v 1.1.1.1 2010/12/15 03:22:45 jnemeth Exp $
|
||||
|
||||
--- contrib/scripts/vmail.cgi.orig 2008-09-20 00:55:01.000000000 +0000
|
||||
+++ contrib/scripts/vmail.cgi
|
||||
@@ -145,7 +145,7 @@ sub check_login($$)
|
||||
$context = "default";
|
||||
}
|
||||
if (!$filename) {
|
||||
- $filename = "/etc/asterisk/voicemail.conf";
|
||||
+ $filename = "@ASTETCDIR@/voicemail.conf";
|
||||
}
|
||||
# print header;
|
||||
# print "Including <h2>$filename</h2> while in <h2>$category</h2>...\n";
|
||||
@@ -153,7 +153,7 @@ sub check_login($$)
|
||||
while(<VMAIL>) {
|
||||
chomp;
|
||||
if (/include\s\"([^\"]+)\"$/) {
|
||||
- ($tmp, $category) = &check_login("/etc/asterisk/$1", $category);
|
||||
+ ($tmp, $category) = &check_login("@ASTETCDIR@/$1", $category);
|
||||
if (length($tmp)) {
|
||||
# print "Got '$tmp'\n";
|
||||
return ($tmp, $category);
|
||||
@@ -200,7 +200,7 @@ sub check_login_users {
|
||||
my ($mbox, $context) = split(/\@/, param('mailbox'));
|
||||
my $pass = param('password');
|
||||
my ($found, $fullname) = (0, "");
|
||||
- open VMAIL, "</etc/asterisk/users.conf";
|
||||
+ open VMAIL, "<@ASTETCDIR@/users.conf";
|
||||
while (<VMAIL>) {
|
||||
chomp;
|
||||
if (m/\[(.*)\]/) {
|
||||
@@ -242,7 +242,7 @@ sub validmailbox($$$$)
|
||||
$context = "default";
|
||||
}
|
||||
if (!$filename) {
|
||||
- $filename = "/etc/asterisk/voicemail.conf";
|
||||
+ $filename = "@ASTETCDIR@/voicemail.conf";
|
||||
}
|
||||
if (!$category) {
|
||||
$category = "general";
|
||||
@@ -251,7 +251,7 @@ sub validmailbox($$$$)
|
||||
while (<VMAIL>) {
|
||||
chomp;
|
||||
if (/include\s\"([^\"]+)\"$/) {
|
||||
- ($tmp, $category) = &validmailbox($mbox, $context, "/etc/asterisk/$1");
|
||||
+ ($tmp, $category) = &validmailbox($mbox, $context, "@ASTETCDIR@/$1");
|
||||
if ($tmp) {
|
||||
return ($tmp, $category);
|
||||
}
|
||||
@@ -298,7 +298,7 @@ sub mailbox_options()
|
||||
local $tmp2;
|
||||
local $tmp;
|
||||
if (!$filename) {
|
||||
- $filename = "/etc/asterisk/voicemail.conf";
|
||||
+ $filename = "@ASTETCDIR@/voicemail.conf";
|
||||
}
|
||||
if (!$category) {
|
||||
$category = "general";
|
||||
@@ -386,7 +386,7 @@ sub mailbox_list()
|
||||
sub msgcount()
|
||||
{
|
||||
my ($context, $mailbox, $folder) = @_;
|
||||
- my $path = "/var/spool/asterisk/voicemail/$context/$mailbox/$folder";
|
||||
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$mailbox/$folder";
|
||||
if (opendir(DIR, $path)) {
|
||||
my @msgs = grep(/^msg....\.txt$/, readdir(DIR));
|
||||
closedir(DIR);
|
||||
@@ -410,7 +410,7 @@ sub msgcountstr()
|
||||
sub messages()
|
||||
{
|
||||
my ($context, $mailbox, $folder) = @_;
|
||||
- my $path = "/var/spool/asterisk/voicemail/$context/$mailbox/$folder";
|
||||
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$mailbox/$folder";
|
||||
if (opendir(DIR, $path)) {
|
||||
my @msgs = sort grep(/^msg....\.txt$/, readdir(DIR));
|
||||
closedir(DIR);
|
||||
@@ -435,7 +435,7 @@ sub getfields()
|
||||
{
|
||||
my ($context, $mailbox, $folder, $msg) = @_;
|
||||
my $fields;
|
||||
- if (open(MSG, "</var/spool/asterisk/voicemail/$context/$mailbox/$folder/msg${msg}.txt")) {
|
||||
+ if (open(MSG, "<@ASTSPOOLDIR@/voicemail/$context/$mailbox/$folder/msg${msg}.txt")) {
|
||||
while(<MSG>) {
|
||||
s/\#.*$//g;
|
||||
if (/^(\w+)\s*\=\s*(.*)$/) {
|
||||
@@ -560,7 +560,7 @@ _EOH
|
||||
<input name="action" type=submit value="download">
|
||||
</td></tr>
|
||||
<tr><td colspan=2 align=center>
|
||||
-<embed width=400 height=40 src="vmail.cgi?action=audio&folder=$folder&mailbox=$mbox&context=$context&password=$passwd&msgid=$msgid&format=$format&dontcasheme=$$.$format" autostart=yes loop=false></embed>
|
||||
+<embed width=400 height=40 src="vmail?action=audio&folder=$folder&mailbox=$mbox&context=$context&password=$passwd&msgid=$msgid&format=$format&dontcasheme=$$.$format" autostart=yes loop=false></embed>
|
||||
</td></tr></table>
|
||||
</td></tr>
|
||||
</table>
|
||||
@@ -588,7 +588,7 @@ sub message_audio()
|
||||
}
|
||||
&untaint($format);
|
||||
|
||||
- my $path = "/var/spool/asterisk/voicemail/$context/$mailbox/$folder/msg${msgid}.$format";
|
||||
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$mailbox/$folder/msg${msgid}.$format";
|
||||
|
||||
$msgid =~ /^\d\d\d\d$/ || die("Msgid Liar ($msgid)!");
|
||||
grep(/^${format}$/, keys %formats) || die("Format Liar ($format)!");
|
||||
@@ -809,11 +809,11 @@ sub message_rename()
|
||||
die("Invalid old Message<BR>\n");
|
||||
}
|
||||
|
||||
- my $path = "/var/spool/asterisk/voicemail/$context/$mbox/$newfolder";
|
||||
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$mbox/$newfolder";
|
||||
$path =~ /^(.*)$/;
|
||||
$path = $1;
|
||||
mkdir $path, 0770;
|
||||
- $path = "/var/spool/asterisk/voicemail/$context/$mbox/$oldfolder";
|
||||
+ $path = "@ASTSPOOLDIR@/voicemail/$context/$mbox/$oldfolder";
|
||||
opendir(DIR, $path) || die("Unable to open directory\n");
|
||||
my @files = grep /^msg${old}\.\w+$/, readdir(DIR);
|
||||
closedir(DIR);
|
||||
@@ -823,7 +823,7 @@ sub message_rename()
|
||||
$tmp = $1;
|
||||
$oldfile = $path . "/$tmp";
|
||||
$tmp =~ s/msg${old}/msg${new}/;
|
||||
- $newfile = "/var/spool/asterisk/voicemail/$context/$mbox/$newfolder/$tmp";
|
||||
+ $newfile = "@ASTSPOOLDIR@/voicemail/$context/$mbox/$newfolder/$tmp";
|
||||
# print "Renaming $oldfile to $newfile<BR>\n";
|
||||
rename($oldfile, $newfile);
|
||||
}
|
||||
@@ -884,15 +884,15 @@ sub message_copy()
|
||||
die("Invalid old Message<BR>\n");
|
||||
}
|
||||
|
||||
- my $path = "/var/spool/asterisk/voicemail/$context/$newmbox";
|
||||
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$newmbox";
|
||||
$path =~ /^(.*)$/;
|
||||
$path = $1;
|
||||
mkdir $path, 0770;
|
||||
- $path = "/var/spool/asterisk/voicemail/$context/$newmbox/INBOX";
|
||||
+ $path = "@ASTSPOOLDIR@/voicemail/$context/$newmbox/INBOX";
|
||||
$path =~ /^(.*)$/;
|
||||
$path = $1;
|
||||
mkdir $path, 0770;
|
||||
- $path = "/var/spool/asterisk/voicemail/$context/$mbox/$oldfolder";
|
||||
+ $path = "@ASTSPOOLDIR@/voicemail/$context/$mbox/$oldfolder";
|
||||
opendir(DIR, $path) || die("Unable to open directory\n");
|
||||
my @files = grep /^msg${old}\.\w+$/, readdir(DIR);
|
||||
closedir(DIR);
|
||||
@@ -902,7 +902,7 @@ sub message_copy()
|
||||
$tmp = $1;
|
||||
$oldfile = $path . "/$tmp";
|
||||
$tmp =~ s/msg${old}/msg${new}/;
|
||||
- $newfile = "/var/spool/asterisk/voicemail/$context/$newmbox/INBOX/$tmp";
|
||||
+ $newfile = "@ASTSPOOLDIR@/voicemail/$context/$newmbox/INBOX/$tmp";
|
||||
# print "Copying $oldfile to $newfile<BR>\n";
|
||||
&file_copy($oldfile, $newfile);
|
||||
}
|
||||
@@ -932,7 +932,7 @@ sub message_delete()
|
||||
} else {
|
||||
die("Invalid Message<BR>\n");
|
||||
}
|
||||
- my $path = "/var/spool/asterisk/voicemail/$context/$mbox/$folder";
|
||||
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$mbox/$folder";
|
||||
opendir(DIR, $path) || die("Unable to open directory\n");
|
||||
my @files = grep /^msg${msg}\.\w+$/, readdir(DIR);
|
||||
closedir(DIR);
|
||||
@@ -968,7 +968,7 @@ sub message_forward()
|
||||
my $txt;
|
||||
$context = &untaint($context);
|
||||
$newmbox = &untaint($newmbox);
|
||||
- my $path = "/var/spool/asterisk/voicemail/$context/$newmbox/INBOX";
|
||||
+ my $path = "@ASTSPOOLDIR@/voicemail/$context/$newmbox/INBOX";
|
||||
if ($msgs[0]) {
|
||||
if (&lock_path($path) == 0) {
|
||||
$msgcount = &msgcount($context, $newmbox, "INBOX");
|
||||
@@ -1018,7 +1018,7 @@ sub message_delete_or_move()
|
||||
$context = &untaint($context);
|
||||
$mbox = &untaint($mbox);
|
||||
$folder = &untaint($folder);
|
||||
- $path = "/var/spool/asterisk/voicemail/$context/$mbox/$folder";
|
||||
+ $path = "@ASTSPOOLDIR@/voicemail/$context/$mbox/$folder";
|
||||
if ($msgs[0]) {
|
||||
if (&lock_path($path) == 0) {
|
||||
my $msgcount = &msgcount($context, $mbox, $folder);
|
Loading…
Reference in a new issue