VoIP: Voicemail Notification


TheShniz's picture

By TheShniz - Posted on 04 February 2009

Wouldn't it be wonderful if everyone had a smart phone?  I'm sure the manufacturers would anyways, but reality rears its head and we find the cost is simply too high.  Sure, unified messaging is a great thing, so long as you're in front of a computer (usually sitting right next to your telephone)... now enter in with voicemail notification (the stop gap to world-wide, smart phone domination).  When you receive a voicemail, the telephone system will literally call you (e.g. on your cell phone), ask you to log into voicemail, and immediately play your new message right over the phone, that's it!

It's been quite difficult to provide this functionality in an Asterisk-based telephone system, until today...

The voicemail notification script (originally written by BobH for Asterisk 1.2) has been upgraded & modified by several people over the years, but one problem remains... it is still difficult to 1.) install the script, and 2.) update the script when changes to the voicemail application occur.

 

Installation

You may now add this functionality to any asterisk-based telephone system, by entering these three commands:

wget http://www.edgeproductions.com/sites/default/files/TheShniz/voip/install-vm_notify
chmod +x ./install-vm_notify
./install-vm_notify

 

Special Note

As it currently stands, you still need to specify what trunk you'd like to use for voicemail notifications.  All you need to do is edit vm_notify_custom.conf, and modify line ~83 where it says channel.

e.g.) For analog lines, input 'zap/g0/'... for SIP providers (such as Teliax), input 'SIP/Teliax/'.

 

Usage Instructions

To use, simply dial *26 from any extension and follow the prompts, that's it!
Now, if you want to understand the underpinnings, then read on...

 

Underpinnings

This install script will download the vm_notify.tgz package, which contains these files:

vm_notify_check.sh
This is where all the heavy lifting is... this script checks the voicemail application [macro-vm] for changes, sets permissions, updates the script when needed, and restarts asterisk upon confirmation.  You can safely schedule this with cron, but you'll undoubtedly either want to a.) schedule the script for off hours, so it may safely 'amportal restart' (without confirmation), or b.) change the 'amportal restart' to an email notification so may do so manually at a later time.

vm_notify_header.dat & vm_notify_footer.dat
Used to compartmentalize the script for easy rebuilding and for adding future updates.

vm_notify_install.sh
Will insert the necessary includes into extensions_custom.conf and initiates check script.

vm_notify_uninstall.sh
Removes the includes from extensions_custom.conf, deletes script files, and deletes the log.

All files are heavily commented, contain validation, and log activity to /var/log/asterisk/vm_notify.log

0
Your rating: None