FONmail for Asterisk
Email Delivery of Messages Dictated Using Any Asterisk Phone
Nerd Vittles' FONmail for Asterisk is a unified messaging application that lets you dictate a message using any phone connected to your Asterisk system and deliver it by email to any recipient in your AsteriDex database. Just pick up a phone and dial M-A-I-L, record your message, and then enter the phone number or first three letters of the name of anyone in your AsteriDex database. The recorded message in your own voice is delivered almost instantaneously by email. Installation is a one-minute operation using a Nerd Vittles script which is downloaded onto your PBX in a Flash system.
Prerequisites
FONmail for Asterisk needs a LAMPS-based platform (Linux, Apache, MySQL, PHP, and SendMail or equivalent SMTP server) to work. We recommend PBX in a Flash, but other systems such as trixbox 2.x should suffice as well. Before installing FONmail for Asterisk, you first need to install AsteriDex4. And your server must already be capable of sending outbound email reliably. See our tutorial for tips. Because all of the voice prompts for the system use text-to-speech (TTS) technology, you also will need a functioning text-to-speech engine. Both Flite and Cepstral are supported in Asterisk 1.4 or Asterisk 1.6 versions of PBX in a Flash.
How It Works
FONmail for Asterisk is simple to use. Dial extension M-A-I-L (6245) from any phone connected to your Asterisk system. You'll be prompted to record a message for delivery via email. When you finish recording, press the pound (#) key on your phone. You'll be prompted to enter the phone number of the recipient, or you can press pound to enter the first three letters of the recipient's name in your AsteriDex database. Once your entry is complete, FONmail for Asterisk will search AsteriDex for a matching entry, obtain the corresponding email address for the recipient, and email the dictated message to your chosen recipient. The whole process is completed in seconds making it the perfect companion for Road Warriors.
Installing FONmail for Asterisk
FONmail for Asterisk Install Script (4KB)
Installation takes less than a minute. Log into your PBX in a Flash server as root and execute the following commands:
cd /root mkdir FONmail cd FONmail wget http://bestof.nerdvittles.com/applications/FONmail/FONmail.pbx chmod +x FONmail.pbx ./FONmail.pbx
Dialplan Setup
Most of the installation process for FONmail for Asterisk system is handled by a bash script which adds some AGI scripts and makes a few simple additions to the Asterisk dialplan. With PBX in a Flash systems, these additions are made to the extensions_custom.conf file in /etc/asterisk as part of the install. On other systems, you may need to manually edit the install script and change the destination of [from-internal-custom] to match your distribution's setup.
Setting Your Return Email Address
When messages are delivered, the subject will look like this: "FONmail Message from yourname@yourdomain". You can set the proper email address by editing the $email entry at the top of nv-mailit.php. The file is stored in /var/lib/asterisk/agi-bin.
FreePBX Setup
After the installation script is finished, log into FreePBX on your PBX in a Flash server using a web browser. For version 2.4 and above of FreePBX, click on the Tools tab and then Custom Destinations. Add a new destination for FONmail with the following Custom Destination: custom-mailit,s,1. Save your entry. Then click on the Setup tab and choose Misc Application. Add a new application for FONmail with a Feature Code of 6245 and a Destination of Custom Applications: FONmail.
Add Misc Destination | |
Description: | |
Feature Code: | |
Feature Status: | |
Custom Applications: |
Save your entry and reload your Asterisk dialplan when prompted to do so.
Configuring AsteriDex for FONmail
There are two steps to getting AsteriDex reconfigured to use the FONmail for Asterisk application. First, you need to add email addresses for your contacts. This field was added to AsteriDex as part of the install so all you need to do is use the Admin tab in AsteriDex to modify existing entries in your database to include email addresses.
The other new piece in FONmail is the CallWho interface. This lets you enter the first three letters of any entry in your AsteriDex database, and FONmail will read you back up to nine matching entries allowing you to choose the one desired. There's also a new CallWho application (just dial 4-1-2) which will let you look up AsteriDex entries from a phone and place calls. For both FONmail and CallWho to work, you first need to populate the DialCode field in AsteriDex with these three digit codes for each record. To do this, just use the following link with a browser whenever you add or modify entries in your AsteriDex database: http:/yourServerIPaddress/asteridex4/dialcode.php. If you've moved your AsteriDex application to a different directory, make the necessary adjustment in this link.
Nerd Vittles Original Article (9/22/2008): The Dawn of Unified Messaging: Introducing FONmail for Asterisk |