I am having a problem with the Vmail Web app and was hoping someone has some advice. I have been able to install vmail.cgi. I am able to bring up the vmail web page and login with out problems. However, I never see any vmails listed even when there are vmails present in the directory [root@linux-home INBOX]# ls -l total 40 -rwxrwxrwx 1 root root 255 Dec 2 14:45 msg0000.txt -rwxrwxrwx 1 root root 19300 Dec 2 14:45 msg0000.WAV -rwxrwxrwx 1 root root 254 Dec 2 14:47 msg0001.txt -rwxrwxrwx 1 root root 11630 Dec 2 14:47 msg0001.WAV [root@linux-home INBOX]# pwd /var/spool/asterisk/voicemail/default/5001/INBOX I have seen from previous posts that there were problems with Redhat 9 (which I am running) and file permissions. I have set all files in the INBOX (including the INBOX directory itself) to +777 and still the files don't appear on the webpage. I also checked that my voicemail context is set correctly. Does anyone have an idea as to why this might be happening? I am running the 11/24/04 CVS. Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20041202/672d7386/attachment.htm
Ok, I think that I have isolated the source of the problem but am unsure as
to how to fix it as I am a novice when it comes to PERL.
I redirected STDERR to STDIO so that I could see any errors kicked out by
the script right on the web page itself. Here is what it is telling me:
[Thu Dec 2 15:13:45 2004] vmail.cgi: Use of uninitialized value in
substitution (s///) at /var/www/cgi-bin/vmail.cgi line 959.
[Thu Dec 2 15:13:45 2004] vmail.cgi: Use of uninitialized value in
substitution (s///) at /var/www/cgi-bin/vmail.cgi line 962. Set-Cookie:
format=WAV; path=/; expires=Fri, 02-Dec-2005 20:13:45 GMT Date: Thu, 02 Dec
2004 20:13:45 GMT Content-Type: text/html; charset=ISO-8859-1
Line 959 is "$changefolder =~ s/(\w+)\s+.*$/$1/;"
In the following snippet:
if (param()) {
my $folder = param('folder');
my $changefolder = param('changefolder');
$changefolder =~ s/(\w+)\s+.*$/$1/;
Anyone have an idea what variable isn't initialized??
_____
From: Keith O'Brien [mailto:keitheobrien@yahoo.com]
Sent: Thursday, December 02, 2004 3:06 PM
To: 'asterisk-users@lists.digium.com'
Subject: No Files Seen via vmail.cgi
I am having a problem with the Vmail Web app and was hoping someone has some
advice. I have been able to install vmail.cgi. I am able to bring up the
vmail web page and login with out problems. However, I never see any
vmails listed even when there are vmails present in the directory
[root@linux-home INBOX]# ls -l
total 40
-rwxrwxrwx 1 root root 255 Dec 2 14:45 msg0000.txt
-rwxrwxrwx 1 root root 19300 Dec 2 14:45 msg0000.WAV
-rwxrwxrwx 1 root root 254 Dec 2 14:47 msg0001.txt
-rwxrwxrwx 1 root root 11630 Dec 2 14:47 msg0001.WAV
[root@linux-home INBOX]# pwd
/var/spool/asterisk/voicemail/default/5001/INBOX
I have seen from previous posts that there were problems with Redhat 9
(which I am running) and file permissions. I have set all files in the
INBOX (including the INBOX directory itself) to +777 and still the files
don't appear on the webpage. I also checked that my voicemail context is
set correctly.
Does anyone have an idea as to why this might be happening? I am running
the 11/24/04 CVS.
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20041202/617ffd9b/attachment.htm
I am actually able to see the drop down list without a problem. BTW,
vmail.cgi is:
http://www.voip-info.org/wiki-Asterisk+gui+vmail.cgi
Should I submit a bug request??
Keith
Message: 10
Date: Thu, 02 Dec 2004 16:08:30 -0500
From: Sean Cook <scook@kinex.net>
Subject: Re: [Asterisk-Users] RE: No Files Seen via vmail.cgi
To: Asterisk Users Mailing List - Non-Commercial Discussion
<asterisk-users@lists.digium.com>
Message-ID: <1102021710.4776.20.camel@sean.benchmark-systems.com>
Content-Type: text/plain; charset=utf-8
Looks like the script is building a select box (drop down menu)... That
value is the one that is not being set... should build a list like:
"INBOX", "Old", "Work", "Family",
"Friends", "Cust1", "Cust2", "Cust3",
"Cust4", "Cust5"
This for some reason in your setup is not getting passed to the script
in the specific state that you are in....
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20041202/35be56f7/attachment.htm
I get the following. Thanks for your help.
SCRIPT_NAME = /cgi-bin/vmail.cgi
SERVER_NAME = 10.1.1.9
HTTP_REFERER = http://10.1.1.9/cgi-bin/vmail.cgi
SERVER_ADMIN = root@localhost
HTTP_ACCEPT_ENCODING = gzip, deflate
HTTP_CONNECTION = Keep-Alive
REQUEST_METHOD = POST
CONTENT_LENGTH = 57
HTTP_ACCEPT = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */*
SCRIPT_FILENAME = /var/www/cgi-bin/vmail.cgi
SERVER_SOFTWARE = Apache/2.0.40 (Red Hat Linux)
QUERY_STRING =
REMOTE_PORT = 4126
HTTP_USER_AGENT = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
.NET CLR 1.1.4322; .NET CLR 1.0.3705)
SERVER_PORT = 80
SERVER_SIGNATURE =
Apache/2.0.40 Server at 10.1.1.9 Port 80
HTTP_CACHE_CONTROL = no-cache
HTTP_ACCEPT_LANGUAGE = en-us
HTTP_COOKIE = format=WAV
REMOTE_ADDR = 10.1.1.74
CONTENT_TYPE = application/x-www-form-urlencoded
SERVER_PROTOCOL = HTTP/1.1
PATH = /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
REQUEST_URI = /cgi-bin/vmail.cgi
GATEWAY_INTERFACE = CGI/1.1
SERVER_ADDR = 10.1.1.9
DOCUMENT_ROOT = /var/www/html
HTTP_HOST = 10.1.1.9
UNIQUE_ID = F1Jvon8AAAEAABEqB5sAAAAG
Message: 3
Date: Thu, 02 Dec 2004 16:32:14 -0500
From: Sean Cook <scook@kinex.net>
Subject: Re: [Asterisk-Users] RE: No Files Seen via vmail.cgi
To: Asterisk Users Mailing List - Non-Commercial Discussion
<asterisk-users@lists.digium.com>
Message-ID: <1102023134.4776.25.camel@sean.benchmark-systems.com>
Content-Type: text/plain
Actually, put this at the end of the file...
foreach $key (keys %ENV){
print qq{$key = $ENV{$key}<br>\n};
}
this is dumping the environment variable from the cgi environment. You
should see 'changefolder' with some value set (look at the
QUERY_STRING).
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20041202/d6c4b8c8/attachment.htm