How To Enable Push Notification Support

Enabling your Asterisk phone server to allow your mobile device to receive notifications of new voicemails is a fairly simple process. Follow these steps below and you will begin receiving notifications whenever you receive a new voicemail on your phone server.

On your iPhone, iPod Touch, iPad, or Android enabled device

  1. Edit the account that you would like to enable notifcations for
    • Scroll down to the bottom of the page and press Register Notifications
    • Press Yes on the confirmation message that pops up

On your Asterisk based phone server

  1. Create a new file on your server called newMessage.sh
    • It doesn’t necessarily matter where you place this file, but for this tutorial I created it in /usr/bin
      # nano /usr/bin/newMessage.sh

    • Insert the following two lines of text (Note: On the first line, enter in whatever address you have entered into the address field on the account page of AsteriskVM):
      server=www.your-server-goes-here.com
      wget -q --spider "http://www.waterclosetgames.com/a?server=$server&extension=$2"

    • Save and exit the editor you are using
    • Modify the permissions so the file is executable
      # chmod a+x /usr/bin/newMessage.sh

  2. Modify the voicemail.conf file on your server
    • On my server it is located in the directory /etc/asterisk
      # nano /etc/asterisk/voicemail.conf

    • Add the following line somewhere under the [general] section externnotify=/usr/bin/newMessage.sh
      File: voicemail.conf

      [general]
      #include vm_general.inc
      #include vm_email.inc

      externnotify=/usr/bin/newMessage.sh <-Insert this line

      [default]

      100 => 100,Adam,,,attach=no|saycid=no|envelope=no|delete=no

    • Save and exit the editor you are using

  3. The last thing you need to do is reload the config files
    • At a command prompt enter the command asterisk -rx reload
      # asterisk -rx reload

That's it! You should now receive a notification whenever you receive a new voicemail.