login | register
Sat 17 of May, 2008 [00:55 UTC]

voip-info.org

Search with Google
Search this site with Google. Results may not include recent changes.
 
Google Ads
Shoutbox
  • Juan Ortega, Thu 15 of May, 2008 [10:33 UTC]: Hi everybody, I'm Juan, an ITCom student, and I need to know what basic elements I need to create a VoIP network. Can anybody helpme, please?,Thank you very much
  • gineta, Wed 14 of May, 2008 [03:58 UTC]: any here not fine the configuration of firewall juniper -screem for VOIP asterisk????
  • Anoop Prabhakaran, Tue 13 of May, 2008 [12:16 UTC]: I am developing Asterisk IVR, Whenever i make a internation call to the IVR system, the DTMF is not getting detected properly, this happens only for the first time, second call onwards system works fine. why this is happening
  • joe, Mon 12 of May, 2008 [04:27 UTC]: Is there an opensource browser based softphone, or a system like Busta where everything is not manages through their website?
  • Nick Barnes, Fri 09 of May, 2008 [11:36 UTC]: Christopher - yesterday I tried an Asterisk install on a CentOS 5.1 box with stock GUI and it all worked fine. Sorry I can't help.
  • aero, Fri 09 of May, 2008 [08:20 UTC]: can someone help me out on this, i tried to play some sound files on my asterisk box and this is the error message i got. WARNING[4429]: format_wav.c:169 check_header: Unexpected freqency 22050 May 8 11:17:39 WARNING[4433]: codec_gsm.c:194 gsmtolin_fra
  • Christopher Faust, Thu 08 of May, 2008 [14:15 UTC]: I beleive that I may have to change something in the xserver configuration. Please advise
  • Christopher Faust, Thu 08 of May, 2008 [14:14 UTC]: Everything was perfect. In the bios I have increased the memory allocated Still receive input not supported on my display.
  • Christopher Faust, Thu 08 of May, 2008 [14:13 UTC]: This would not be my main box. I am doing some testing to see if I can install zaptel and asterisk 1.4 on a full centos 5.1 box with development software Its bizzare, because before I went through the asterisk and zaptel installation everything was perfe
  • Nick Barnes, Thu 08 of May, 2008 [13:44 UTC]: Christopher - I can't see any way in which an Asterisk installation would muck your GUI, but remember that it is advised not to use a GUI on an Asterisk box anyway.
Server Stats
  • Execution time: 0.46s
  • Memory usage: 2.23MB
  • Database queries: 30
  • GZIP: Disabled
  • Server load: 0.72

Asterisk gui vmail.cgi

Web interface to Voicemail

There is a perl script included in the source distribution, vmail.cgi, located in

 /usr/src/asterisk/contrib/scripts/vmail.cgi

Note that 'make install' doesn't install this interface, instead you must run 'make webvmail' separatly.
The vmail.cgi script requires that perl and perl-suidperl packages be installed and of course a web server.

 rpm -q perl perl-suidperl httpd

This script may require some editing to get it working on your installation.
/usr/src/asterisk/images/*.gif copied to /_asterisk in the html tree
(or edit $astpath)

Also the CGI script needs to be made executable:

 chmod +x vmail.cgi

On RedHat, perl-suidperl doesn't exist. Instead /var/spool/asterisk/voicemail/ files need to be made world-readable (or group-readable & group set to whatever httpd runs at - e.g. 'apache'). Apparently a patch exists to fix permissions as files are created:
http://lists.digium.com/pipermail/asterisk-users/2003-May/011845.html
http://lists.digium.com/pipermail/asterisk-dev/2003-June/000953.html

On Fedora Core 3 you may need to disable SELinux to allow vmail.cgi access to your /var/spool/asterisk directory

An updated version of this script and PHP versions are forthcoming.

On Gentoo you will most probably have to take these additional steps in order to get a fully working vmail.cgi:
  • perl -MCPAN -e 'install Bundle::DBI'
  • perl -MCPAN -e 'install DBD::mysql'
Note thet DBD::mysql can be nasty to install since it wants to run all kind of weird tests on a mysql database called 'test' requiring an empty root password...! You can circumenvent this issue by manually downloading DBD::mysql as tar.gz file from www.cpan.org, then running 'Makefile.PL' followed by 'make' and 'make install'.

Nov 10, 2004: Asterisk-Users mailing list


"Attached is a patch I made to app_voicemail.c that will set the owner, group and perms of all files and directories that are created so that vmail.cgi can run as user/group apache without setuid on vmail.cgi. The owner/group/perms are configurable in some static variables at the top so if you need them to change, you only need to change them there. Hope this helps.

Adam Fineberg"


Link to patch

I was getting a broken pipe error when leaving a voicemail with this patch. My problem was that there was no apache group on the box I was saving voicemail to, so I changed the group to root and gave read/write to all by changing the following lines:

static char *gname = "root";
static mode_t dirMode = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH;
static mode_t filMode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;

Adding the bold parts. A more secure way is to actually add the apache group (manually or by installing apache). Hope this helps anyone who spent weeks trying to figure out the broken pipe error. - flobi


Nov 21, 2005: The above patch by Adam Fineberg is not working any more on current CVS, so i manually patched app_voicemail.c. The hints of flobi still apply. - bladerunner


Patch against CVS Nov 21, 2005


Using webvmail on debian 3.1 (sarge)

See also this posting and that posting on asterisk-users.

You need to have the following debian packages installed
  • apache (the following does not apply to apache2!)
  • perl
  • perl-suid

The default apache /etc/apache/httpd.conf that the debian apache package installs needs to be changed as follows:

at line 556 change
<IfModule mod_alias.c>
   ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

to
<IfModule mod_alias.c>
   ScriptAlias /cgi-bin/ /var/www/cgi-bin/


at line 562 change
<Directory /usr/lib/cgi-bin/>

to
<Directory /var/www/cgi-bin/>


now restart apache
/etc/init.d/apache restart

in /var/www make sure you have a cgi-bin folder and a html folder in /var/www. If not
cd /var/www mkdir cgi-bin html

now in your asterisk source directory (/usr/src/asterisk) type
make webvmail

now edit the cgi file /var/www/cgi-bin/vmail.cgi with your favorite text editor
edit line 18 "$context=""; # Define here your by default context (so you dont need to put voicemail@context in the login" as needed and save.

go to http://your.ip.address/cgi-bin/vmail.cgi and login (:wink:)

The externnotify approach

In order for a user to have access to their voicemail, something must be done to the files in /var/spool/asterisk/voicemail/. I added the command "chmod -R a+rw /var/spool/asterisk/voicemail/default/" in a script that is called whenever a voicemail is left. That script is referenced in voicemail.conf as "externnotify=". This will allow anyone to read/write the voicemail files. No one has a login to my asterisk server so I don't care. You might want to set up a group or something.

See also

  • Asterisk voicemail: Overview
  • Asterisk gui tycho: "Tycho" Ecllipse based Voicemail Client and Dial-Assistant
  • ARI: Asterisk Recording Interface (for Monitor() and Voicemail)
  • Asterisk Realtime Voicemail: Store voicemail in a database (Asterisk 1.2)
  • Asterisk GUI: Graphical user interfaces to Asterisk, especially look at ARI there
  • voicemail-20050331.patch
  • bug/patch 6334: Solving the access right problem for voicemail files, included in Asterisk 1.4.0
  • bug/patch 5929: Modifies group permissions for voicemail files, included in Asterisk 1.2.5

Created by oej, Last modification by JustRumours on Wed 18 of Apr, 2007 [15:02 UTC]

Comments Filter

Possible multi externnotify scripts?

by Jakub on Friday 27 of January, 2006 [15:58:30 UTC]
Is it possible to have multiple 'externotify' scripts/apps being run? i.e. one after another? I currently have a .pl script run to organize the 'new' vmails in our mysql db. I want to have it chmod the dir right after a message is left. Anyone?

Would I use something like:
externnotify=/usr/bin/index-mysql.pl, /usr/bin/chmod-vmail.sh


A better solution?

by jlewis on Friday 06 of May, 2005 [14:04:27 UTC]
If you setup * to run as non-root (search the wiki for non-root), then you can run vmail.cgi as that uid rather than as root. You just have to make it suid and sgid to the appropriate user/group...at least I do since voicemail.conf is root:asterisk 640. This can be done either via suidperl or suexec if you run vmail.cgi from a user directory or in a vhost (the only places apache will do suexec).

Edit

permissions permissions...

by Anonymous on Thursday 10 of February, 2005 [07:01:47 UTC]
I ran
chown root:apache /var/spool/asterisk/voicemail/YOUR_CONTEXT/YOUR_MAILBOX
chmod 775 /var/spool/asterisk/voicemail/YOUR_CONTEXT/YOUR_MAILBOX

and have the following set in /etc/asterisk/voicemail.conf
externnotify=/usr/bin/voicemailapp.sh

and /usr/bin/voicemailapp.sh looks like:
#!/bin/sh
chmod 777 ` find /var/spool/asterisk/voicemail/ -name "*.txt" -o -name "*.wav"`

chmod 755 vmail.cgi (no need to suid). Delete and voicemail works for me. in the above chown command, make sure "apache" is replaced with the user that your web server runs with.

check this by putting $ then less than (stupid post wont use <) at the end of the copywrite (or a noticable chunk of text" and matching that user up with your distro's user file gentoo uses "apache"

SELinux

by alX on Wednesday 09 of February, 2005 [21:56:50 UTC]
In Fedora Core 3 I had to disable SELinux - run system-config-securitylevel in X, uncheck 'enable' on the SELinux tab and reboot.

cron job for message permissions

by hbarnard on Thursday 13 of January, 2005 [14:01:37 UTC]
I've made a cron job to modify the ownership of the voice mail files I want to access from apache. Currently, also, I've just added a directory definition to httpd.conf so that I can have a page of messages and click on them.

This, of course, is pretty crude and will only suit home use (my current setup).
Edit

Premature end of script headers

by Anonymous on Tuesday 21 of December, 2004 [16:10:39 UTC]
You will get the Error "Premature end of script headers" when trying to execute the cgi script if you do not have mysql installed on the machine. I believe the script expects certain database drivers in place before execution, specifically DBI.pm
Add mysql to the list or prerequisites on this page.
Edit

Modify Asterisk Source

by Anonymous on Wednesday 14 of July, 2004 [23:03:01 UTC]
To make this work well, you should modify file.c and app_voicemail.c to write out the files with the same owner and group ID as the directories they are in.

You can do that after figuring out what the owner and group of the directory is or just chown the files to root:apache and chmod 660.

It can be a pain setting this up so it doesn't get screwed up. You have to make sure that the directories created for new mailboxes are 770 as well as 660 for any files, modifying the copy and file writing files in file.c and where they are called(the mode parameter) in app_voicemail.c.

Too bad the Asterisk devs don't have this built in or a configure option when compiling. Checking your voicemail from the web is very convenient.
Edit

TheCara

by Anonymous on Thursday 01 of July, 2004 [13:47:03 UTC]
(:confused:)As always, a better explanation and didatical text would be a piece of heaen on our lives

Please update this page with new information, just login and click on the "Edit" or "Add Comment" button above. Get a free login here: Register Thanks! - support@voip-info.org

Page Changes | Comments

Sponsored by:

Terms of Service Privacy Policy
© 2003-2008 VOIP-Info.org LLC

Powered by bitweaver