Add a webvmail option which installs the vmail.cgi script accessing
voicemail using a browser.
This commit is contained in:
parent
f6e9e68d7c
commit
7c2a4bf424
6 changed files with 228 additions and 18 deletions
|
@ -1,8 +1,9 @@
|
|||
# $NetBSD: Makefile,v 1.13 2010/03/01 07:06:48 jnemeth Exp $
|
||||
# $NetBSD: Makefile,v 1.14 2010/05/06 20:10:17 jnemeth Exp $
|
||||
#
|
||||
|
||||
DISTNAME= asterisk-1.6.1.17
|
||||
DIST_SUBDIR= ${PKGNAME_NOREV}
|
||||
PKGREVISION= 1
|
||||
EXTRACT_ONLY= ${DISTNAME}.tar.gz
|
||||
CATEGORIES= comms net audio
|
||||
MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/ \
|
||||
|
@ -22,6 +23,7 @@ USE_LANGUAGES= c c++
|
|||
REPLACE_BASH= build_tools/mkpkgconfig
|
||||
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
|
||||
|
||||
PKGCONFIG_OVERRIDE+= menuselect/mxml/mxml.pc.in
|
||||
|
||||
|
@ -31,7 +33,7 @@ CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
|
|||
CONFIGURE_ARGS+= --without-gtk2
|
||||
|
||||
INSTALL_TARGET= install samples
|
||||
INSTALLATION_DIRS= lib/pkgconfig
|
||||
INSTALLATION_DIRS+= lib/pkgconfig
|
||||
INSTALLATION_DIRS+= share/examples/asterisk share/examples/rc.d
|
||||
|
||||
BUILD_DEFS+= VARBASE
|
||||
|
@ -80,6 +82,8 @@ 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"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@comment $NetBSD: PLIST,v 1.9 2010/03/01 07:06:48 jnemeth Exp $
|
||||
@comment $NetBSD: PLIST,v 1.10 2010/05/06 20:10:17 jnemeth Exp $
|
||||
include/asterisk.h
|
||||
include/asterisk/_private.h
|
||||
include/asterisk/abstract_jb.h
|
||||
|
@ -1028,6 +1028,7 @@ libexec/agi-bin/agi-test.agi
|
|||
libexec/agi-bin/eagi-sphinx-test
|
||||
libexec/agi-bin/eagi-test
|
||||
libexec/agi-bin/jukebox.agi
|
||||
${PLIST.webvmail}libexec/cgi-bin/vmail
|
||||
man/man8/asterisk.8
|
||||
man/man8/astgenkey.8
|
||||
man/man8/autosupport.8
|
||||
|
@ -1123,6 +1124,8 @@ share/examples/asterisk/users.conf
|
|||
share/examples/asterisk/voicemail.conf
|
||||
share/examples/asterisk/vpb.conf
|
||||
share/examples/rc.d/asterisk
|
||||
${PLIST.webvmail}share/httpd/htdocs/_asterisk/animlogo.gif
|
||||
${PLIST.webvmail}share/httpd/htdocs/_asterisk/play.gif
|
||||
@pkgdir libdata/asterisk/sounds/fr
|
||||
@pkgdir libdata/asterisk/sounds/es
|
||||
@pkgdir libdata/asterisk/firmware/iax
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.10 2010/03/01 07:06:48 jnemeth Exp $
|
||||
$NetBSD: distinfo,v 1.11 2010/05/06 20:10:17 jnemeth Exp $
|
||||
|
||||
SHA1 (asterisk-1.6.1.17/asterisk-1.6.1.17.tar.gz) = 7af18a384f7832d8818e0548263681b3e839447f
|
||||
RMD160 (asterisk-1.6.1.17/asterisk-1.6.1.17.tar.gz) = 86c54a56b9d5c7565c9d3d54c0d6cd043e9decd3
|
||||
|
@ -9,7 +9,7 @@ Size (asterisk-1.6.1.17/extract-cfile.awk) = 667 bytes
|
|||
SHA1 (asterisk-1.6.1.17/rfc3951.txt) = 1a6c769be750fb02456d60db2470909254496017
|
||||
RMD160 (asterisk-1.6.1.17/rfc3951.txt) = 15f7ec61653ec9953172f8f2150e7d8f6f620926
|
||||
Size (asterisk-1.6.1.17/rfc3951.txt) = 373442 bytes
|
||||
SHA1 (patch-aa) = 71e819ec12324c6f4bb7de7142bdaac33958ab84
|
||||
SHA1 (patch-aa) = a9925349ba9b08c350d86d9d88e02185083c133b
|
||||
SHA1 (patch-af) = 09860d714281cb4c65d1a087cf5b16647a16e2fa
|
||||
SHA1 (patch-ag) = c71c61350cefbbe53eefa99245ca7712753f22d5
|
||||
SHA1 (patch-ai) = e92edab5c1ff323478f41d0b0783102ed527fe39
|
||||
|
@ -31,3 +31,4 @@ SHA1 (patch-ay) = 39a2ae198ff2989c501dd4374e1ea57a3d52dda9
|
|||
SHA1 (patch-az) = 917cc8868708ce9c022a0268debd90f51f88bdad
|
||||
SHA1 (patch-ba) = 2ea96529e0187a23d0b640c7cae69904d587c269
|
||||
SHA1 (patch-bb) = 3b78ed3c8233e2db38d09ca81f1768d018ffd2e2
|
||||
SHA1 (patch-bc) = 0efc99595d1ef82a879361e8bf3b2ef7fd84af62
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
# $NetBSD: options.mk,v 1.4 2010/03/01 07:06:48 jnemeth Exp $
|
||||
# $NetBSD: options.mk,v 1.5 2010/05/06 20:10:17 jnemeth Exp $
|
||||
|
||||
PKG_OPTIONS_VAR= PKG_OPTIONS.asterisk
|
||||
PKG_SUPPORTED_OPTIONS= zaptel x11 unixodbc ilbc
|
||||
PKG_SUPPORTED_OPTIONS= zaptel x11 unixodbc ilbc webvmail
|
||||
PKG_OPTIONS_LEGACY_OPTS+= gtk:x11
|
||||
|
||||
.include "../../mk/bsd.options.mk"
|
||||
|
||||
PLIST_VARS+= zaptel x11 unixodbc ilbc
|
||||
PLIST_VARS+= zaptel x11 unixodbc ilbc webvmail
|
||||
|
||||
# Asterisk now uses DAHDI, not zaptel; not implemented yet...
|
||||
#.if !empty(PKG_OPTIONS:Mzaptel)
|
||||
|
@ -75,3 +75,15 @@ post-extract:
|
|||
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)
|
||||
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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
$NetBSD: patch-aa,v 1.4 2009/12/30 04:11:02 jnemeth Exp $
|
||||
$NetBSD: patch-aa,v 1.5 2010/05/06 20:10:17 jnemeth Exp $
|
||||
|
||||
--- Makefile.orig 2009-11-03 20:01:04.000000000 +0000
|
||||
--- Makefile.orig 2009-12-10 21:03:40.000000000 +0000
|
||||
+++ Makefile
|
||||
@@ -123,20 +123,6 @@ DEBUG=-g3
|
||||
|
||||
|
@ -55,7 +55,7 @@ $NetBSD: patch-aa,v 1.4 2009/12/30 04:11:02 jnemeth Exp $
|
|||
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)
|
||||
@@ -463,9 +438,7 @@ distclean: $(SUBDIRS_DIST_CLEAN) _clean
|
||||
@@ -464,9 +439,7 @@ distclean: $(SUBDIRS_DIST_CLEAN) _clean
|
||||
rm -f build_tools/menuselect-deps
|
||||
|
||||
datafiles: _all
|
||||
|
@ -66,7 +66,7 @@ $NetBSD: patch-aa,v 1.4 2009/12/30 04:11:02 jnemeth Exp $
|
|||
# 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
|
||||
# improved a lot. I'll put it here for now.
|
||||
@@ -507,9 +480,10 @@ NEWHEADERS=$(notdir $(wildcard include/a
|
||||
@@ -508,9 +481,10 @@ NEWHEADERS=$(notdir $(wildcard include/a
|
||||
OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h)))
|
||||
|
||||
installdirs:
|
||||
|
@ -78,7 +78,7 @@ $NetBSD: patch-aa,v 1.4 2009/12/30 04:11:02 jnemeth Exp $
|
|||
mkdir -p $(DESTDIR)$(ASTBINDIR)
|
||||
mkdir -p $(DESTDIR)$(ASTVARRUNDIR)
|
||||
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail
|
||||
@@ -518,6 +492,7 @@ installdirs:
|
||||
@@ -519,6 +493,7 @@ installdirs:
|
||||
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/tmp
|
||||
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/meetme
|
||||
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/monitor
|
||||
|
@ -86,7 +86,7 @@ $NetBSD: patch-aa,v 1.4 2009/12/30 04:11:02 jnemeth Exp $
|
|||
|
||||
bininstall: _all installdirs $(SUBDIRS_INSTALL)
|
||||
$(INSTALL) -m 755 main/asterisk $(DESTDIR)$(ASTSBINDIR)/
|
||||
@@ -613,22 +588,22 @@ upgrade: bininstall
|
||||
@@ -614,22 +589,22 @@ upgrade: bininstall
|
||||
# XXX why *.adsi is installed first ?
|
||||
adsi:
|
||||
@echo Installing adsi config files...
|
||||
|
@ -114,7 +114,7 @@ $NetBSD: patch-aa,v 1.4 2009/12/30 04:11:02 jnemeth Exp $
|
|||
if [ -f $${dst} ]; then \
|
||||
if [ "$(OVERWRITE)" = "y" ]; then \
|
||||
if cmp -s $${dst} $$x ; then \
|
||||
@@ -644,10 +619,10 @@ samples: adsi
|
||||
@@ -645,10 +620,10 @@ samples: adsi
|
||||
echo "Installing file $$x"; \
|
||||
$(INSTALL) -m 644 $$x $${dst} ;\
|
||||
done
|
||||
|
@ -127,7 +127,7 @@ $NetBSD: patch-aa,v 1.4 2009/12/30 04:11:02 jnemeth Exp $
|
|||
echo "astetcdir => $(ASTETCDIR)" ; \
|
||||
echo "astmoddir => $(MODULES_DIR)" ; \
|
||||
echo "astvarlibdir => $(ASTVARLIBDIR)" ; \
|
||||
@@ -700,7 +675,7 @@ samples: adsi
|
||||
@@ -701,7 +676,7 @@ samples: adsi
|
||||
echo "pbx_realtime=1.6" ; \
|
||||
echo "res_agi=1.6" ; \
|
||||
echo "app_set=1.6" ; \
|
||||
|
@ -136,7 +136,16 @@ $NetBSD: patch-aa,v 1.4 2009/12/30 04:11:02 jnemeth Exp $
|
|||
else \
|
||||
echo "Skipping asterisk.conf creation"; \
|
||||
fi
|
||||
@@ -834,7 +809,7 @@ uninstall-all: _uninstall
|
||||
@@ -729,7 +704,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 -o root -g root contrib/scripts/vmail.cgi $(DESTDIR)$(HTTP_CGIDIR)/vmail.cgi
|
||||
+ $(INSTALL) contrib/scripts/vmail.cgi $(DESTDIR)$(HTTP_CGIDIR)/vmail
|
||||
mkdir -p $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk
|
||||
for x in images/*.gif; do \
|
||||
$(INSTALL) -m 644 $$x $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk/; \
|
||||
@@ -835,7 +810,7 @@ uninstall-all: _uninstall
|
||||
rm -rf $(DESTDIR)$(ASTVARLIBDIR)
|
||||
rm -rf $(DESTDIR)$(ASTDATADIR)
|
||||
rm -rf $(DESTDIR)$(ASTSPOOLDIR)
|
||||
|
@ -145,7 +154,7 @@ $NetBSD: patch-aa,v 1.4 2009/12/30 04:11:02 jnemeth Exp $
|
|||
rm -rf $(DESTDIR)$(ASTLOGDIR)
|
||||
|
||||
menuconfig: menuselect
|
||||
@@ -905,6 +880,7 @@ asterisk.pdf:
|
||||
@@ -906,6 +881,7 @@ asterisk.pdf:
|
||||
$(MAKE) -C doc/tex asterisk.pdf
|
||||
|
||||
.PHONY: menuselect
|
||||
|
|
181
comms/asterisk16/patches/patch-bc
Normal file
181
comms/asterisk16/patches/patch-bc
Normal file
|
@ -0,0 +1,181 @@
|
|||
$NetBSD: patch-bc,v 1.1 2010/05/06 20:10:17 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