Showing results for 
Search instead for 
Did you mean: 

Welcome to the Cisco Small Business Community

Have a question? Click on a topic board below to get started in the community.
Get the latest news in this issue of the Cisco Small Business Monthly Newsletter

Visual Voicemail Updated (and in English)


Visual Voicemail Updated (and in English)

This is an update to Alberto Montilla's visual voicemail php script ( that adds the ability to delete voicemails and has the option listen to voicemails without having the phone ring (FreePBX is required). This script has a couple graphical changes and has been set up to use English and the U.S. time and date conventions.


Unfortunately when I run this updated script from my 9971 phone it returns an HTTP Error [500]!

I've also run the orginal script from Alberto Montilla and that only runs OK when there are actually no voicemails waiting in the Inbox (shows the "Seleccione el mensaje" prompt) - otherwise if there is a VM waiting then it shows an XML parse error....what gives??

Any ideas where to start looking?

I am running this with FreePBX 2.9 running Asterisk



Thought I should just reply in that your script works fine - I was simply missing a curly bracket at the end of the file which was casing it to fail. Doh.

In any case, I modified your version to utilise a second dedicated "Intercom" line appearance on my 9971 phones (offset in my case is $USER +1, set to variable $ICOM) which I have set to auto-answer.

I have also set the delete function to remove .gsm and .h264 files which my system records.

There may be some further tuning we can do with the script as it appears to not refresh the list of VM once a message has been is necessary to manually back out 2 or 3 steps before the 'deleted' message is removed from the listing.

I've also noted my MWI lamp and envelope remains lit after the voicemail message is deleted by the script. When the VM message is deleted by dialing into voicemail, the MWI lamp goes off as expected.

To get mwi to update from visual voicemail you need to go to freebpx and go to the tools tab, then go to "asterisk sip settings", then go to "other sip settings" and add "pollmailboxes=yes" (you can manunully add this in the \etc\asterisk\voicemail.conf file). I also have an updated version of the scipt that updates the screen after a message is deleted(along with a couple of other tweaks). I will post this script later in the day as i need to edit it for general use.


Cheers Adam. Looking forward to seeing your updated version.

I updated the pollmailboxes setting from the FreePBX GUI in v2.9 using Setup -> Voicemail Admin -> Settings. There is a setting about halfway down for pollmailboxes and just above it for pollfreq to set the polling frequency. This now clears the MWI nicely when deleting VM's using the script.

Good to know. I updated the script so that when it deletes and plays it displays a new page (fixing the problem you mentioned before, and getting rid of  the "Request Failed" that is displayed on some phones). I also added the CID name to the voicemail info which is helpful if you get CID names from your provider or use CIDSuperfecta.

I edited out some custom code i had from a version of the script I am using in produciton enviorment, and I have not tested it so if there are any problems let me know and i will try to see what the problem is.


Thanks Adam. That's looking really good now. There is just a very minor omission on line 4, the close quote " char is missing at the end of the $URLXML setting. I missed that initially when I updated the url and caused php to trip up. I've now addded back my other minor customisations and its all playing nicely.

I've now got one final thing to figure out and that is how to get the script to play video voicemails where a .h264 file has been recorded along with the usual .wav and .gsm files. The voicemail application plays back the .h264 file (where one has been recorded) but the script only plays back the audio files.


Top work here by Adam, enhancing Alberto's original script and making this is an extremely useful script. Many thanks

Community Member


I have used your config examples from a post on the Fonality forums (here). Your detail and documentation has been great. With that in mind, my setup is also using the intercom lines and I am interested in using your modified visual voicemail script as it will have additional customizations that fit your samples better, could you share that?

Thanks, great work to both of you.


PM sent Chris ;-)