Home » Posts tagged 'cepstral'

Tag Archives: cepstral

The Most Versatile VoIP Provider: FREE PORTING

Speech-to-Text Directory Assistance Comes to Asterisk

Since the invention of the telephone, the most critical component has been the ability to match people's names to their phone numbers. Ma Bell did this with live operators (including my aunt) for many years. Then came automated lookups where you called a number for directory assistance and actually spoke the name of the person you wished to call. A computer then converted your speech to text and looked up the number in a database. Typically, the number was spoken back to the caller who then could place the call. Or "for a few cents more" the lookup service would actually place the call for you. For the learning impaired, this became a godsend when many metropolitan areas switched to 10-digit dialing.

Today, we'll show you how trivial it is to implement this yourself on any Asterisk® server using Google's new (free) speech-to-text web service which we introduced a few weeks ago. It's a 2-minute drill using PBX in a Flash™ with Incredible PBX™ and Google's Speech-to-Text web service. We'll be using a MySQL database to demonstrate the concept today, but it easily could be tweaked for use with any ODBC-compatible database. ODBC demos are included in Incredible PBX by dialing 222 or 223.

Many years ago we demonstrated how to quickly place calls to your friends by dialing the first three letters in their names with any phone connected to your Asterisk server using our freely available AsteriDex™ database. This has been incorporated into Incredible PBX by dialing 412 from phones connected to your PBX in a Flash server. Thanks to Google's new (free) speech-to-text web service, today we'll show you how trivial it is to tweak that application to replace 3-letter calling with spoken names of people to call with Asterisk. When you're finished, you'll be able to pick up any phone on your Asterisk server, dial 4-1-2, speak the name of an individual or company in your AsteriDex database, and have Asterisk automatically place the call for you.

Legal Disclaimer. What we're demonstrating today is how to use a publicly accessible web resource to respond to queries using a phone connected to your Asterisk server. We're assuming that Google has its legal bases covered and has a right to provide the public service they are offering. We are not vouching for Google or the services being offered in any way. By using our tutorial, YOU AGREE TO ASSUME ALL RISKS, LEGAL AND OTHERWISE, ASSOCIATED WITH USE OF THIS FREELY ACCESSIBLE WEB TOOL. NO WARRANTY EXPRESS OR IMPLIED IS BEING PROVIDED BY US INCLUDING ANY IMPLIED WARRANTY OF FITNESS FOR USE OR MERCHANTABILITY. You, of course, have an absolute right not to read our articles or implement our code if you have reservations of any kind or are unwilling to assume all risks associated with such use. Sorry for legalese, but it's the time in which we live I'm afraid. Plain English: "Don't Shoot the Messenger!"

Prerequisites. The easiest setup for this is a new PIAF2™ server. Once you have it running, install Incredible PBX 3 by logging into your server as root and issuing the command: install-incredpbx3. For complete instructions on Incredible PBX 3, here's the link to the Nerd Vittles tutorial. If you'd prefer not to go the Incredible route, then simply install AsteriDex 4 and then add the CallWho extension. Finally, you'll need to run the Wolfram Alpha for Asterisk one-click installer. This gets Google's speech-to-text components installed on your server. Now you're ready to tweak the CallWho app to use speech-to-text lookups through Google instead of 3-letter dialing.

Editing nv-callwho.php. Log in as root and edit nv-callwho.php in /var/lib/asterisk/agi-bin:

cd /var/lib/asterisk/agi-bin
nano -w nv-callwho.php

Press Ctrl-W. Search for where dialcode =. Replace it with where name =.

Now save the file with the change: Ctrl-X, Y, then press Enter.

If you'd prefer to use the latest, greatest (preconfigured) version, ignore the above and issue the following commands instead:

cd /var/lib/asterisk/agi-bin
wget http://nerd.bz/xnyJR3
tar zxvf callwho21.tgz
rm callwho21.tgz

Tweaking Your Custom Dialplan. While still logged in as root, you'll also need to edit extensions_custom.conf in /etc/asterisk:

cd /etc/asterisk
nano -w extensions_custom.conf

Press Ctrl-W. Search for 412. Now scroll down to the following lines:

exten => 412,9,Read(DIALCODE,beep,3)
exten => 412,10,NoOp(Name lookup: ${DIALCODE})
exten => 412,11,AGI(nv-callwho.php,${DIALCODE})

You'll want to replace those lines with the following 3 lines with no word wrap:

exten => 412,9(record),agi(speech-recog.agi,en-US)
exten => 412,10,Noop(= Script returned: ${status} , ${id} , ${confidence} , ${utterance} =)
exten => 412,11,AGI(nv-callwho.php,${utterance})

Finally, you'll want to adjust the spoken prompts in lines 412,6 and 412,8 to say something like this: "At the beep say the name of the person or company you wish to call. Then press the pound key."

Now save the file with your changes: Ctrl-X, Y, then press Enter

Finally, reload your Asterisk dialplan: asterisk -rx "dialplan reload"

Test Drive. To test things out, pick up a phone connected to your Asterisk server and dial 412. When prompted for the person or company to call, say "American Airlines" and then press the pound key.

Tweaking AsteriDex. You may need to make some minor adjustments to entries in your AsteriDex database to accommodate speech-to-text queries. For example, the sample entries include American Airlines and Delta Air Lines. Google translates the spoken words "air lines" as "airlines" so you'll need to modify the Delta entry, or it won't find a match. Similarly, there's a sample entry for "Emery Worldwide" but Google translates the spoken words as "emory worldwide." While capitalization doesn't matter, emory will not match emery. But, with a little tweaking, you'll have a very impressive, homegrown directory assistance service to impress all of your Friends and Family™. Enjoy!

Fuzzy Search Update. After we went to press, one of our favorite pundits on the PIAF Forum suggested that perhaps implementing fuzzy logic searches with MySQL would improve results, particularly with proper names. Great idea! It solved both the Delta Air Lines and Emery Worldwide lookup issues. And it turned out it was incredibly simple to implement. All that was required was replacing the existing $query command in nv-callwho.php (as explained above) with the following. This now has been incorporated into the preconfigured AGI script which is available for download above.

$query = "SELECT * FROM user1 where strcmp(soundex(name), soundex('$dialcode')) = 0";

For additional enhancements, see this thread on the PIAF Forum.

Asterisk TTS Bug. Be advised that certain newer releases of Asterisk have a text-to-speech bug which abnormally terminates TTS messages that have an embedded comma. If you have stored names in AsteriDex using Lastname, Firstname format, this may pose a problem. The simple solution is to either remove the commas or change them to periods. In the alternative, you can add the following line of code immediately below all existing lines of code beginning with $msg in nv-callwho.php. This, too, has been incorporated into the preconfigured AGI script above.

$msg = str_replace( ",", ".", $msg );

Originally published: Monday, January 30, 2012


Support Issues. With any application as sophisticated as Asterisk, you're bound to have questions. Blog comments are a terrible place to handle support issues although we welcome general comments about our articles and software. If you have particular support issues, we encourage you to get actively involved in the PBX in a Flash Forums. It's the best Asterisk tech support site in the business, and it's all free! We maintain a thread with Information, Patches and Bug Fixes for Incredible PBX. Please have a look. Unlike some forums, ours is extremely friendly and is supported by literally hundreds of Asterisk gurus and thousands of ordinary users just like you. You won't have to wait long for an answer to your question.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 


Siriously: It’s Wolfram Alpha for Asterisk

Ever wished your Asterisk® server could harness the power of a 10,000 CPU Supercomputer to answer virtually any question you can dream up about the world we live in? Well, so long as it's for non-commercial use, today's your lucky day. Apple demonstrated with Siri™ just how amazing this technology can be by coupling Wolfram Alpha® to a speech-to-text engine on the iPhone 4S. And, thanks to Google's new speech transcription engine and Wolfram Alpha's API, you can do much the same thing with any Asterisk server. Today, we'll show you how.1

We had such a good name for this project, Iris, which is Siri spelled backwards. You know the backwards sister and all of that. Unfortunately, the new (similar) product for Android phones was named Iris two months ago. And we didn't want to be like Larry on Newhart with two brothers named Darryl. So... we give you 4747. You can figure it out from there.

When people ask what exactly Wolfram Alpha is, our favorite answer was provided by Ed Borasky.

It's an almanac driven by a supercomputer.

That's an understatement. It's a bit like calling Google Search a topic index. Unlike Google which provides links to web sites that can provide answers to queries, Wolfram Alpha provides specific and detailed answers to almost any question. Here are a few examples (with descriptions of the functionality) to help you wrap your head around the breadth of information. For a complete list of what's available, visit Wolfram Alpha's Examples by Topic. Type a sample query here. Or call our demo line2 (1-904-339-8254 or iNum: 883510009043155) and say:

Weather in Charleston South Carolina
Weather forecast for Washington D.C.
Next solar eclipse
Otis Redding
Define politician
Who won the 1969 Superbowl? (Broadway Joe)
What planes are flying overhead? (flying over your server's location)
Ham and cheese sandwich (nutritional information)
Holidays 2012 (summary of all holidays for 2012 with dates and DOW)
Medical University of South Carolina (history of MUSC)
Star Trek (show history, air dates, number of episodes, and more)
Apollo 11 (everything you ever wanted to know)
Cheapest Toaster (brand and price)
Battle of Gettysburg (sad day 🙂 )
Daylight Savings Time 2012 (date ranges and how to set your clocks)
Tablets by Motorola (pricing, models, and specs from Best Buy)
Doughnut (you don't wanna know)
Snickers bar (ditto)
Weather (local weather at your server's location)

Best Question of the Day Award: "How much wood could a woodchuck chuck if a woodchuck could chuck wood?" And the answer: "A woodchuck would chuck all the wood he could chuck if a woodchuck could chuck wood. According to the tongue twister, although the paper 'The Ability of Woodchucks to Chuck Cellulose Fibers' by P.A. Paskevich and T.B. Shea in Annals of Improbable Research vol. 1, no. 4, pp. 4-9, July/August 1995, concluded that a woodchuck can chuck 361.9237001 cubic centimeters of wood per day."

Implementation Overview. Today what we're going to demonstrate is how to configure your Asterisk server so that you can pick up any phone on your system, dial 4-7-4-7, speak a question, and we'll show you how to send it to Google to convert your spoken words into text. Then we'll pass that text translation to Wolfram Alpha which will provide a plain text answer to your question. Finally, we'll take that plain text and use Flite or Cepstral to deliver the results to you.

For openers, you'll need a free Wolfram Alpha account. We'll be using PBX in a Flash 2.0.6.2.1™ to demonstrate the setup because its reliance on CentOS 6.2 provides the most complete collection of Linux utilities available. And, of course, you get unlimited, free calling within the U.S. and Canada with Google Voice as part of any PBX in a Flash install. It's certainly possible to do what we're demonstrating on other Asterisk server platforms once you get all of the dependencies resolved. But we'll leave that for the pioneers.

Using PIAF2™, you'll need to download a new AGI script to take advantage of Google's speech transcription engine. No registration is (yet) required. Then we'll provide a simple piece of dialplan code to handle the phone conversation. Finally, we'll provide a couple of AGI scripts to tame the Wolfram Alpha interface for you. Plug in your Wolfram Alpha APP-ID, and you'll be off to the races. It's about a 15-minute project using an existing PIAF2 server. So let's get started.

Legal Disclaimer. What we're demonstrating today is how to use two publicly accessible web resources to harness the power of a supercomputer to respond to your queries using a phone connected to an Asterisk server. We're assuming that both Google and Wolfram Alpha have their legal bases covered and have a right to provide the public services they are offering. We are not vouching for them or the services they are offering in any way. By using our scripts, YOU AGREE TO ASSUME ALL RISKS, LEGAL AND OTHERWISE, ASSOCIATED WITH USE OF THESE FREELY ACCESSIBLE WEB TOOLS. NO WARRANTY EXPRESS OR IMPLIED IS BEING PROVIDED BY US INCLUDING ANY IMPLIED WARRANTY OF FITNESS FOR USE OR MERCHANTABILITY. You, of course, have an absolute right not to use our code if you have reservations of any kind or are unwilling to assume all risks associated with such use. Sorry for legalese, but it's the time in which we live I'm afraid. Plain English: "Don't Shoot the Messenger!"

Getting a Wolfram Alpha Account. As you can imagine, there have to be some rules when you're using someone else's supercomputer for free. So here's the deal. It's free for non-commercial, personal use once you sign up for an account. But you're limited to 2,000 queries a month which works out to almost 70 queries a day. Every query requires your personal application ID, and that's how Wolfram Alpha keeps track of your queries. Considering the price, we think you'll find the query limitation pretty generous compared to other web resources.

To get started, sign up for a free Wolfram Alpha API account. Just provide your email address and set up a password. It takes less than a minute. Log into your account and click on Get An App ID. Make up a name for your application and write down (and keep secret) your APP-ID code. That's all there is to getting set up with Wolfram Alpha. If you want to explore costs for commercial use, there are links to let you get more information.

One-Click Installer. If you don't care about how things work, you can skip all of the steps below and use the new one-click installer. Or you can keep reading to see what's going on. Here are the steps to use the one-click installer. Log into your server as root and issue the following commands:

cd /root
wget http://nerd.bz/xhUpJr
chmod +x wolframalpha-oneclick.sh
./wolframalpha-oneclick.sh

You now can skip the next four sections and dial 4-7-4-7 to try things out.

Installing the Google Transcription AGI Script. Log into your PIAF2 server as root and issue the following commands to download and install Lefteris Zaferis' AGI script from GitHub. It's a terrific piece of code!

cd /root
wget --no-check-certificate http://nerd.bz/w8HCDF
tar zxvf asterisk-speech*
cd asterisk-speech-recog-0.4
cp speech-recog.agi /var/lib/asterisk/agi-bin/.

If you prefer living on the Bleeding Edge, you can download Lefteris' very latest (untested by us!) release3:

cd /root
wget --no-check-certificate http://nerd.bz/zA4fCB
tar zxvf asterisk-speech*
cd asterisk-speech-recog-0.5
cp speech-recog.agi /var/lib/asterisk/agi-bin/.

Installing the Wolfram Alpha Scripts. Now log into your PIAF2 server as root using SSH and issue the following commands to install the Wolfram Alpha transportation layer:

cd /
wget http://nerd.bz/A7umMK
tar zxvf 4747.tgz
cd /tmp
cat 4747.txt

Adding the Asterisk Dialplan Module. What is displayed on your screen at the end of the steps above will be the dialplan code that needs to be added to extensions_custom.conf in the /etc/asterisk directory. Just cut-and-paste the code and drop it into the [from-internal-custom] context. If you use nano, be sure to open the file with nano -w extensions_custom.conf to avoid problems with long lines being truncated. You'll notice that there are commented lines 3, 6, 16, and 17 to support Cepstral. If you use this commercial TTS app which now can be installed in PIAF2 with install-cepstral, then you can comment out the Flite entries and uncomment the Swift (Cepstral) entries in the dialplan code. Here's the SED alternative rather than manually updating the file with cut-and-paste:

cd /etc/asterisk
cp /tmp/4747.txt .
sed -i '/\[from-internal-custom\]/r 4747.txt' extensions_custom.conf
asterisk -rx "dialplan reload"

If you manually edit, don't forget: asterisk -rx "dialplan reload".

Adding Wolfram Alpha APP-ID. The final configuration step is adding your Wolfram Alpha APP-ID credentials. Issue the following commands to access the AGI script:

cd /var/lib/asterisk/agi-bin
nano -w 4747

When the file opens, replace yourID between the quotes with the APP-ID that was provided to you on the Wolfram Alpha web site. Then save the file: Ctrl-X, Y, then Enter. You're done!

Tweaking the Abbreviations List. Translating abbreviations into speech is a tricky business, and Flite and Cepstral do a pretty lousy job on some of them. We've started the beginnings of an abbreviation list which you will find in the function section of 4747.php which is stored in /var/lib/asterisk/agi-bin. It's easy to add additional entries. Just clone one of the entries that's already there. For example, here's the line that translates Jr. into Junior. HINT: Be careful to surround most unpunctuated abbreviations with spaces, or you may get unexpected results when a word actually begins or ends with the same letters.

$response = str_replace("Jr.","junior",$response);

Taking Wolfram Alpha for a Spin. Some sample commands have been documented above to get you started. Just pick up a phone on your PIAF2 server and dial 4747. When prompted, say one of the commands and press the pound key. Your command will be sent to Google for translation, and then the text result will be played back using Flite or Cepstral. If it says what you meant to say, press 1 to launch the Wolfram Alpha connection and get the answer to your question. If not, press * and try again.

You also can watch the progress of your calls on the Asterisk CLI. We've found the Google speech-to-text transcription to be extremely accurate in quiet rooms. One of the variables returned in the [4747@from-internal:5] entry on the Asterisk CLI includes a transcription accuracy measurement which is shown as a decimal number less than 1. This gives you an idea of how well Google is understanding your accent. If the number consistently falls below .9, you may want to move out of the Deep South for a bit. 😉

Originally published: Monday, January 16, 2012



Need help with Asterisk? Visit the VoIP-info Forum.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 



  1. We want to extend a special welcome to our Hack A Day and Reddit visitors. We have new tips and tricks on VoIP technology every week. And almost half of our traffic is from returning visitors. We hope you'll join the club. Thanks for visiting. []
  2. Because of a few "special people" we've had to limit calls to one per person. You still can beat the system by calling back from a different phone. 😉 For those that are curious, this demo line is supported by Google Voice so you can check out the call quality for yourself. We alternate hosting the trunk on either an Aspire Revo or one of 10 PBX in a Flash servers running as virtual machines under Proxmox on a $500 Dell PowerEdge T310 server behind a secure, hardware-based firewall with no Internet port exposure and no ports forwarded from the firewall to the server. Dell servers go on sale about once every couple of weeks. []
  3. Version 0.5 also includes some sample Wolfram Alpha perl code that is certainly worth a look. []

5 Steps to Paradise: It’s Incredible PBX for Asterisk 1.8

Hard to believe it's been almost six months since we introduced The Incredible PBX, but that makes today even more special. With the release of Asterisk® 1.8, the PBX in a Flash Development Team headed up by Tom King burned the midnight oil to introduce the latest PBX in a Flash Purple Edition with Asterisk 1.8 in less than 24 hours.

News Flash: Incredible PBX 4.0 is now available with FreePBX 2.10 support!

Coming January 19: Incredible PBX 11 & Incredible Fax for Asterisk 11 and FreePBX 2.11

So we had all the tools necessary to reengineer, design and build the all-new Incredible PBX for Asterisk 1.8. What used to be a somewhat kludgey, dual-call, dual-provider Google Voice implementation to take advantage of Google's free PSTN calling in the U.S. and Canada with Asterisk 1.4 and 1.6 is now a zippy-quick, Gtalk-based calling platform that rivals the best SIP-to-SIP calls on the planet and provides virtually instantaneous PSTN connections to almost anybody, anywhere. Trust us! Except for the price which is now free, you'll never know you weren't connected via Ma Bell's overpriced long-distance lines and neither will the Little Mrs. And, yes, our recommended $50 Nortel SIP videophone is plug-and-play on extensions 701 and 702.

Just download the latest PBX in a Flash ISO, burn to then boot from the PIAF CD, choose the Purple Edition to load Asterisk 1.8 and FreePBX 2.8, and then install the new Incredible PBX for Asterisk 1.8. In about an hour, you'll have a turnkey PBX with a local phone number and free calling in the U.S. and Canada via your own Google Voice account plus dozens and dozens of terrific Asterisk applications to keep your head spinning for months.

Thanks to its Zero Internet Footprint™ design, The Incredible PBX remains the most secure Asterisk-based PBX around. What this means is The Incredible PBX™ has been engineered to sit safely behind a NAT-based, hardware firewall with minimal port exposure to your actual server. And you won't find a more full-featured Personal Branch Exchange™ at any price.

Did we mention that all of this telephone goodness is still absolutely FREE!

The Incredible PBX Inventory. For those that have never heard of The Incredible PBX, here's a feature list of components you get in addition to the base install of PBX in a Flash the latest CentOS 5.x, Asterisk 1.8, FreePBX 2.8, and Apache, SendMail, MySQL, PHP, phpMyAdmin, IPtables Linux firewall, Fail2Ban, and WebMin. Cepstral TTS, Hamachi VPN, and Mondo Backups are just one command away and may be installed using some of the PBX in a Flash-provided scripts.

Prerequisites. Here's what we recommend to get started properly:

Installing The Incredible PBX. The installation process is simple and straight-forward. Here are the 5 Easy Steps to Free Calling, and The Incredible PBX will be ready to receive and make free U.S./Canada calls immediately:

1. Install PBX in a Flash Purple Edition
2. Download & run The Incredible PBX 1.8 installer
3. Run passwd-master on your PIAF server
4. Map UDP 5222 on firewall to PIAF server
5. Configure a softphone or SIP telephone

Installing PBX in a Flash. Here's a quick tutorial to get PBX in a Flash installed. To use Incredible PBX for Asterisk 1.8, you must install the latest 32-bit version of PBX in a Flash.3 Unlike other Asterisk aggregations, PBX in a Flash utilizes a two-step install process. The ISO only installs the CentOS operating system. That hasn't changed. But, once CentOS is installed, the server reboots and downloads a payload file that includes Asterisk, FreePBX, and many other VoIP and Linux utilities including all of the new Google Voice components. Just choose the new Purple Payload to get the latest Asterisk 1.8 release and all of the Google Voice goodies!

You can download the 32-bit PIAF from SourceForge or one of our download mirrors. Burn the ISO to a CD. Then boot from the installation CD and press the Enter key to begin.

WARNING: This install will completely erase, repartition, and reformat EVERY DISK (including USB flash drives) connected to your system so disable any disk you wish to preserve! Press Ctrl-C to cancel the install.

On some systems you may get a notice that CentOS can't find the kickstart file. Just tab to OK and press Enter. Don't change the name or location of the kickstart file! This will get you going. Think of it as a CentOS 'feature'. 🙂 If your system still won't boot, then you have an incompatible drive controller.

At the keyboard prompt, tab to OK and press Enter. At the time zone prompt, tab once, highlight your time zone, tab to OK and press Enter. At the password prompt, make up a VERY secure root password. Type it twice. Tab to OK, press Enter. Get a cup of coffee. Come back in about 5 minutes. When the system has installed CentOS, it will reboot. Remove the CD promptly. After the reboot, choose PIAF-Purple option. Have a 15-minute cup of coffee. After installation is complete, the machine will reboot a second time. You now have a PBX in a Flash base install. On a stand-alone machine, it takes about 30 minutes. On a virtual machine, it takes about half that time. Write down the IP address of your new PIAF server. You'll need it to configure your hardware-based firewall in a minute.

NOTE: For previous users of PBX in a Flash, be aware that this new version automatically runs update-programs and update-fixes for you. You still should set your FreePBX passwords by running passwd-master after The Incredible PBX installer finishes!

Configuring Google Voice. You'll need a dedicated Google Voice account to support The Incredible PBX. The more obscure the username (with some embedded numbers), the better off you will be. This will keep folks from bombarding you with unsolicited Gtalk chat messages, and who knows what nefarious scheme will be discovered using Google messaging six months from now. So why take the chance. Keep this account a secret!

We've tested this extensively using an existing Gmail account, and inbound calling is just not reliable. The reason seems to be that Google always chooses Gmail chat as the inbound call destination if there are multiple registrations from the same IP address. So, be reasonable. Do it our way! Set up a dedicated Gmail and Google Voice account, and use it exclusively with The Incredible PBX. Google Voice no longer is by invitation only so, if you're in the U.S. or have a friend that is, head over to the Google Voice site and register. If you're living on another continent, see MisterQ's posting for some tips on getting set up.

You must choose a telephone number (aka DID) for your new account, or Google Voice calling will not work... in either direction. Google used to permit outbound Gtalk calls using a fake CallerID, but that obviously led to abuse so it's over! You also have to tie your Google Voice account to at least one working phone number as part of the initial setup process. Your cellphone number will work just fine. Don't skip this step either. Just enter the provided 2-digit confirmation code when you tell Google to place the test call to the phone number you entered. Once the number is registered, you can disable it if you'd like in Settings, Voice Setting, Phones. But...

IMPORTANT: Be sure to enable the Google Chat option as one of your phone destinations in Settings, Voice Setting, Phones. That's the destination we need for The Incredible PBX to work its magic! Otherwise, all inbound and outbound calls will fail. If you don't see this option, you may need to call up Gmail and enable Google Chat there first. Then go back to the Google Voice Settings.

While you're still in Google Voice Settings, click on the Calls tab. Make sure your settings match these:

  • Call Screening - OFF
  • Call Presentation - OFF
  • Caller ID (In) - Display Caller's Number
  • Caller ID (Out) - Don't Change Anything
  • Do Not Disturb - OFF

Click Save Changes once you adjust your settings. Under the Voicemail tab, plug in your email address so you get notified of new voicemails. Down the road, receipt of a Google Voice voicemail will be a big hint that something has come unglued on your PBX.

Running The Incredible PBX Installer. Log into your server as root and issue the following commands to download and run The Incredible PBX installer:

cd /root
wget http://incrediblepbx.com/incrediblepbx18.x
chmod +x incrediblepbx18.x
./incrediblepbx18.x
passwd-master

If you've installed the previous version of The Incredible PBX, you'll recall that there was a two-step install process after configuring another trunk with either SIPgate or IPkall. That's now a thing of the past. All you need to do after The Incredible PBX script completes is run passwd-master to set up your master password for FreePBX.

When The Incredible PBX install begins, you'll be prompted for the following:

Google Voice Account Name
Google Voice Password
Gmail Notification Address
FreePBX maint Password

The Google Voice Account Name is the Gmail address for your new dedicated account, e.g. joeschmo@gmail.com. Don't forget @gmail.com! The Google Voice Password is the password for this dedicated account. The Gmail Notification Address is the email address where you wish to receive alerts when incoming and outgoing Google Voice calls are placed using The Incredible PBX. And your FreePBX maint Password is the password you'll use to access FreePBX. You'll actually set it by running passwd-master after The Incredible PBX completes. We need this password to properly configure the CallerID Superfecta for you. By the way, none of this confidential information ever leaves your machine... just in case you were wondering. 🙄

Now have another 15-minute cup of coffee, and consider a modest donation to Nerd Vittles... for all of our hard work. 😉 You'll find a link at the top of the page. While you're waiting (and so you don't forget), go ahead and configure your hardware-based firewall to support Google Voice. See the next section for what's required. Without completing this firewall configuration step, no calls will work! When the installer finishes, READ THE SCREEN just for grins.

Here's a short video demonstration of the original Incredible PBX installer process. It still works just about the same way except there's no longer a second step to get things working.

One final word of caution is in order regardless of your choice of providers: Do NOT use special characters in any provider passwords, or nothing will work!

Firewall Configuration. We hope you've taken our advice and installed a hardware-based firewall in front of The Incredible PBX. It's your phone bill. You'll need to make one adjustment on the firewall. Map UDP 5222 traffic to the internal IP address of The Incredible PBX. This is the port that Google Voice uses for phone calls and Google chat. You can decipher the IP address of your server by logging into the server as root and typing status.

Logging in to FreePBX. Using a web browser, you access the FreePBX GUI by pointing your browser to the IP address of your Incredible PBX. Click on the Admin tab and choose FreePBX. When prompted for a username, it's maint. When prompted for the password, it's whatever you set up as your maint password when you installed Incredible PBX. If you forget it, you can always reset it by logging into your server as root and running passwd-master.

Extension Password Discovery. If you're too lazy to look up your extension 701 password using the FreePBX GUI, you can log into your server as root and issue the following command to obtain the password for extension 701 which we'll need to configure your softphone or color videophone in the next step:

mysql -uroot -ppassw0rd -e"select id,data from asterisk.sip where id='701' and keyword='secret'"

The result will look something like the following where 701 is the extension and 18016 is the randomly-generated extension password exclusively for your Incredible PBX:

+-----+-------+
id         data
+-----+-------+
701      18016
+-----+-------+

Configuring a SIP Phone. There are hundreds of terrific SIP telephones and softphones for Asterisk-based systems. Once you get things humming along, you'll want a real SIP telephone such as the $50 Nortel color videophone we've recommended above. You'll also find lots of additional recommendations on Nerd Vittles and in the PBX in a Flash Forum. If you're like us, we want to make damn sure this stuff works before you shell out any money. So, for today, let's download a terrific (free) softphone to get you started. We recommend X-Lite because there are versions for Windows, Mac, and Linux. So download your favorite from this link. Install and run X-Lite on your Desktop. At the top of the phone, click on the Down Arrow and choose SIP Account Settings, Add. Enter the following information using your actual password for extension 701 and the actual IP address of your Incredible PBX server instead of 192.168.0.251. Click OK when finished. Your softphone should now show: Available.

Incredible PBX Test Flight. The proof is in the pudding as they say. So let's try two simple tests. First, let's place an outbound call. Using the softphone, dial your 10-digit cellphone number. Google Voice should transparently connect you. Answer the call and make sure you can send and receive voice on both phones. Second, from another phone, call the Google Voice number that you've dedicated to The Incredible PBX. Your softphone should begin ringing shortly. Answer the call, press 1 to accept the call, and then make sure you can send and receive voice on both phones. Hang up. If everything is working, congratulations!

Here's a brief video demonstration showing how to set up a softphone to use with your Incredible PBX, and it also walks you through several of the dozens of Asterisk applications included in your system.

Solving One-Way Audio Problems. If you experience one-way audio on some of your phone calls, you may need to adjust the settings in /etc/asterisk/sip_custom.conf. Just uncomment the first two lines by removing the semicolons. Then replace 173.15.238.123 with your public IP address, and replace 192.168.0.0 with the subnet address of your private network. There are similar settings in gtalk.conf that can be activated although we've never had to use them. In fact, we've never had to use any of these settings. After making these changes, save the file(s) and restart Asterisk with the command: amportal restart.

Learn First. Explore Second. Even though the installation process has been completed, we strongly recommend you do some reading before you begin your VoIP adventure. VoIP PBX systems have become a favorite target of the hackers and crackers around the world and, unless you have an unlimited bank account, you need to take some time learning where the minefields are in today's VoIP world. Start by reading our Primer on Asterisk Security. We've secured all of your passwords except your root password and your passwd-master password, and we're assuming you've put very secure passwords on those accounts as if your phone bill depended upon it. It does! Also read our PBX in a Flash and VPN in a Flash knols. If you're still not asleep, there's loads of additional documentation on the PBX in a Flash documentation web site.

Adding Multiple Google Voice Trunks. Thanks to rentpbx on our forums, adding support for multiple Google Voice trunks is now a five-minute operation. Once you have your initial setup running smoothly, hop on over to the forums and check out this Incredible solution.

Choosing a VoIP Provider for Redundancy. Nothing beats free when it comes to long distance calls. But nothing lasts forever. And, in the VoIP World, redundancy is dirt cheap. So we strongly recommend you set up another account with Vitelity using our special link below. This gives your PBX a secondary way to communicate with every telephone in the world, and it also gets you a second real phone number for your new system... so that people can call you. Here's how it works. You pay Vitelity a deposit for phone service. They then will bill you $3.99 a month for your new phone number. This $3.99 also covers the cost of unlimited inbound calls (two at a time) delivered to your PBX for the month. For outbound calls, you pay by the minute and the cost is determined by where you're calling. If you're in the U.S., outbound calls to anywhere in the U.S. are a little over a penny a minute. If you change your mind about Vitelity and want a refund of the balance in your account, all you have to do is ask. The trunks for Vitelity already are preconfigured with The Incredible PBX. Just insert your credentials using FreePBX. Then add the Vitelity trunk as the third destination for your default outbound route. That's it. Congratulations! You now have a totally redundant phone system.

Using ENUMPlus. Another terrific money-saving tool is ENUM. Your system comes with ENUMPlus installed. The advantage of ENUM is that numbers registered with any of the ENUM services such as e164.org can be called via SIP for free. You can read all about it in this Nerd Vittles' article. To activate ENUMPlus, you'll need to register and obtain an API Key at enumplus.org. It's free! Sign up, log in, and click on the Account tab to get your API key. Once you have your key, copy it to your clipboard and open FreePBX with your browser. Then choose SetUp, ENUMPlus and paste in your API Key. Save your entry, and you're all set. After entering your key, all outbound calls will be checked for a free ENUM calling path first before using other outbound trunks.

Stealth AutoAttendant. When incoming calls arrive, the caller is greeted with a welcoming message from Allison which says something like "Thanks for calling. Please hold a moment while I locate someone to take your call." To the caller, it's merely a greeting. To those "in the know," it's actually an autoattendant (aka IVR system) that gives you the opportunity to press a button during the message to trigger the running of some application on your Incredible PBX. As configured, the only option that works is 0 which fires up the Nerd Vittles Apps IVR. It's quite easy to add additional features such as voicemail retrieval or DISA for outbound calling. Just edit the MainIVR option in FreePBX under Setup, IVR. Keep in mind that anyone (anywhere in the world) can choose these options. So be extremely careful not to expose your system to security vulnerabilities by making certain that any options you add have very secure passwords! It's your phone bill. 😉

Configuring Email. You're going to want to be notified when updates are available for FreePBX, and you may also want notifications when new voicemails arrive. Everything already is set up for you except actually entering your email notification address. Using a web browser, open the FreePBX GUI by pointing your browser to the IP address of your Incredible PBX. Then click Administration and choose FreePBX. To set your email address for FreePBX updates, go to Setup, General Settings and scroll to the bottom of the screen. To configure emails to notify you of incoming voicemails, go to Setup, Extensions, 701 and scroll to the bottom of the screen. Then follow your nose. Be sure to reload FreePBX when prompted after saving your changes.

A Word About Security. Security matters to us, and it should matter to you. Not only is the safety of your system at stake but also your wallet and the safety of other folks' systems. Our only means of contacting you with security updates is through the RSS Feed that we maintain for the PBX in a Flash project. This feed is prominently displayed in the web GUI which you can access with any browser pointed to the IP address of your server. Check It Daily! Or add our RSS Feed to your favorite RSS Reader. We also recommend you follow @NerdUno on Twitter. We'll keep you entertained and provide immediate notification of security problems that we hear about. Be safe!

Enabling Google Voicemail. Some have requested a way to retain Google's voicemail system for unanswered calls in lieu of using Asterisk voicemail. The advantage is that Google offers a free transcription service for voicemail messages. To activate this, you'll need to edit the [googlein] context in extensions_custom.conf in /etc/asterisk. Just modify the last four lines in the context so that they look like this and then restart Asterisk: amportal restart

;exten => s,n(regcall),Answer
;exten => s,n,SendDTMF(1)
exten => s,n(regcall),Set(DIAL_OPTIONS=${DIAL_OPTIONS}aD(:1))
exten => s,n,Goto(from-trunk,gv-incoming,1)

Kicking the Tires. OK. That's enough tutorial for today. Let's play. Using your new softphone, begin your adventure by dialing these extensions:

  • D-E-M-O - Incredible PBX Demo (running on your PBX)
  • 1234*1061 - Nerd Vittles Demo via ISN FreeNum connection to NV
  • 17476009082*1089 - Nerd Vittles Demo via ISN to Google/Gizmo5
  • Z-I-P - Enter a five digit zip code for any U.S. weather report
  • 6-1-1 - Enter a 3-character airport code for any U.S. weather report
  • 5-1-1 - Get the latest news and sports headlines from Yahoo News
  • T-I-D-E - Get today's tides and lunar schedule for any U.S. port
  • F-A-X - Send a fax to an email address of your choice
  • 4-1-2 - 3-character phonebook lookup/dialer with AsteriDex
  • M-A-I-L - Record a message and deliver it to any email address
  • C-O-N-F - Set up a MeetMe Conference on the fly
  • 1-2-3 - Schedule regular/recurring reminder (PW: 12345678)
  • 2-2-2 - ODBC/Timeclock Lookup Demo (Empl No: 12345)
  • 2-2-3 - ODBC/AsteriDex Lookup Demo (Code: AME)
  • Dial *68 - Schedule a hotel-style wakeup call from any extension
  • 1061*1061 - PIAF Support Conference Bridge (Conf#: 1061)
  • 882*1061 - VoIP Users Conference every Friday at Noon (EST)

PBX in a Flash SQLite Registry. Last, but not least, we want to introduce you to the new PBX in a Flash Registry which uses SQLite, a zero-configuration SQL-compatible database engine. After logging into your server as root, just type show-registry for a listing of all of the applications, versions, and install dates of everything on your new server. Choosing the A option will generate registry.txt in the /root folder while the other options will let you review the applications by category on the screen. For example, the G option displays all of The Incredible PBX add-ons that have been installed. Here's the complete list of options:

  • A - Write the contents of the registry to registry.txt
  • B - PBX in a Flash install details
  • C - Extra programs install details
  • D - Update-fixes status and details
  • E - RPM install details
  • F - FreePBX modules install details
  • G - Incredible PBX install details
  • Q - Quit this program

And here's a sample from an install we just completed. We'll have more details and additional utilities for your use in coming weeks. Stay tuned!



Click above. Enter your name and phone number. Press Connect to begin the call.


Special Thanks. It's hard to know where to start in expressing our gratitude for all of the participants that made today's incredibly simple-to-use product possible. Please bear with us. To Mark Spencer, Malcolm Davenport, and the rest of the Asterisk development team, thanks for a much improved Asterisk. To Philippe Sultan and his co-developers, thank you for finally making Jabber jabber with Asterisk. To Leif Madsen, our special thanks for your early pioneering work with Gtalk and Jabber which got this ball rolling. To Philippe Lindheimer & Co., thanks for FreePBX 2.8 which really makes Asterisk shine. To Lefteris Zafiris, thank you for making Flite work with Asterisk 1.8 thereby preserving all of the Nerd Vittles text-to-speech applications. To Darren Sessions, thanks for whipping app_swift into shape and restoring Cepstral and commercial TTS applications to the land of the living with Asterisk 1.8. And to our pal, Tom King, we couldn't have done it without you. You rolled up your sleeves and really made Asterisk 1.8.0 sit up and bark. No one will quite understand what an endeavor that was until they try it themselves. You've made it look so easy. And, finally, to our dozens of beta testers, THANK YOU! We've implemented almost all of your suggestions.

Additional Goodies. Be sure to log into your server as root and look through the scripts added in the /root/nv folder. You'll find all sorts of goodies to keep you busy. The 32-bit install-cepstral script does just what it says. With Allison's Cepstral voice, you'll have the best TTS implementation for Asterisk available. ipscan is a little shell script that will tell you every working IP device on your LAN. trunks.sh tells you all of the Asterisk trunks configured on your system. purgeCIDcache.sh will clean out the CallerID cache in the Asterisk database. convert2gsm.sh shows you how to convert a .wav file to .gsm. munin.pbx will install Munin on your system while awstats.pbx installs AWstats. s3cmd.faq tells you how to quickly activate the Amazon S3 Cloud Computing service. All the other scripts and apps in /root/nv already have been installed for you so don't install them again.

If you've heeded our advice and purchased a PogoPlug, you can link to your home-grown cloud as well. Just add your credentials to /root/pogo-start.sh. Then run the script to enable the PogoPlug Cloud on your server. All of your cloud resources are instantly accessible in /mnt/pogoplug. It's perfect for off-site backups and is included as one of the backup options in the PBX in a Flash backup utilities.

Don't forget to List Yourself in Directory Assistance so everyone can find you by dialing 411. And add your new number to the Do Not Call Registry to block telemarketing calls. Or just call 888-382-1222 from your new number. Enjoy!

Originally published: Monday, November 1, 2010


VoIP Virtualization with Incredible PBX: OpenVZ and Cloud Solutions

Safely Interconnecting Asterisk Servers for Free Calling

Adding Skype to The Incredible PBX

Adding Incredible Backup... and Restore to The Incredible PBX

Adding Remotes, Preserving Security with The Incredible PBX

Remote Phone Meets Travelin' Man with The Incredible PBX

Continue reading Part II.

Continue reading Part III.

Continue reading Part IV.


Support Issues. With any application as sophisticated as this one, you're bound to have questions. Blog comments are a terrible place to handle support issues although we welcome general comments about our articles and software. If you have particular support issues, we encourage you to get actively involved in the PBX in a Flash Forums. It's the best Asterisk tech support site in the business, and it's all free! We maintain a thread with the latest Patches and Bug Fixes for Incredible PBX. Please have a look. Unlike some forums, ours is extremely friendly and is supported by literally hundreds of Asterisk gurus and thousands of ordinary users just like you. So you won't have to wait long for an answer to your questions.



Need help with Asterisk? Visit the PBX in a Flash Forum.
Or Try the New, Free PBX in a Flash Conference Bridge.


whos.amung.us If you're wondering what your fellow man is reading on Nerd Vittles these days, wonder no more. Visit our new whos.amung.us statistical web site and check out what's happening. It's a terrific resource both for us and for you.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 


Some Recent Nerd Vittles Articles of Interest...

  1. For 64-bit systems with Asterisk 1.8, use the Cepstral install procedures outlined in this Nerd Vittles article. []
  2. If you use the recommended Acer Aspire Revo, be advised that it does NOT include a CD/DVD drive. You will need an external USB drive to load the software. Some of these work with CentOS, and some don't. Most HP and Sony drives work; however, we strongly recommend you purchase an external DVD drive from a merchant that will accept returns, e.g. Best Buy, WalMart, Office Depot, Office Max, Staples. You also can run The Incredible PBX on a virtual machine such as the free Proxmox server. Another less costly (but untested) option might be this Shuttle from NewEgg: $185 with free shipping. Use Promo Code: EMCYTZT220 []
  3. HINT: Version 1.7.5.6 recommended, but 1.7.5.5.3+ ISOs also work just fine. []

It’s TeleYapper 5.0: The Ultimate RoboDialer for Asterisk

We don't normally take a month off at Nerd Vittles which should tell you something about today's 10/10/10 column. We're pleased to introduce TeleYapper 5.0, a completely rewritten, Asterisk® 1.4 and 1.6.2-compatible version of our telephone broadcasting service.1 Using Cepstral text-to-speech, TeleYapper 5.0 brings individualized, text-based messaging and customized reminders coupled with the ability to capture recorded responses from every call.

WARNING: Because of changes in Cepstral, this application now requires an additional $200 license from Cepstral. We no longer recommend Cepstral for obvious reasons and will have a comparable system using Google's new Speech-to-Text application soon. Our apologies.

As part of the message delivery process, you now can customize and capture any one of four different responses from those that are called. And TeleYapper 5.0 will email you a CSV and/or XML file with the RoboResponse™ results when the calling process is completed including a list of failed calls and calls that were answered by an answering machine. In addition, you can have TeleYapper email certain call results to various individuals as the calls are processed if your requirements demand it.

For those with multiple outbound trunks, TeleYapper 5.0 supports simultaneous calls using multiple trunks. And now there are significant enhancements that detect answering machines and real people. This lets you deliver customized messages depending upon whether an actual human answers the phone.

Version 5 has been tested extensively with the Gold, Silver, and Bronze editions of PBX in a Flash 1.7.5.5, which provides support for the latest and greatest versions of Asterisk 1.4 and 1.6.2. And it should work well with other Asterisk aggregations with MySQL, Cepstral TTS support, and FreePBX 2.5 or later.

Overview. For those that have never used TeleYapper, here's a quick summary of how the new version works. It's an automated message broadcasting service commonly known as a call blasting or phone blasting system. In addition to loads of creepy uses, phone blasting has legitimate purposes as well. TeleYapper is licensed in several different ways for the following purposes: prerecorded phone messages for neighborhood association announcements, medical appointment reminders, school closings, tornado alerts, little league practices, municipal government reminders. It's free to use for non-profit, civic, and non-political purposes provided you don't solicit money or seek to sway someone's opinion or encourage a particular vote on an issue or candidate. All other uses require a commercial license. For commercial, political, and medical applications, please review our licensing terms below.

How it Works. Step #1 is to create a CSV or XML export from your favorite database application with the information that will be used to send the messages or reminders. This could be as simple as a list of phone numbers or as complex as a listing of doctors and patients with the dates, times, and places of their next medical appointments together with special patient instructions for activity preceding their visit, e.g. "Please remember to start flossing a month before your next dental appointment."

Step #2 is to create a config file with the robodial settings as well as the text which will actually be spoken during each customized call. If you remember form letters from your word processing days, TeleYapper's config file offers the same flexibility. A message can be as simple as "Take cover immediately. A tornado has been spotted at the end of your street." Or it could be a medical appointment reminder such as the following:

Hi. This is Allison from Charleston Family Clinic calling to confirm Jan's appointment with Doctor Quack on Tuesday, October 5th, 2010, at 10:30 a.m. in our Charleston office. Please remember not to eat or drink anything after midnight on the night before your scheduled appointment.

To confirm your appointment, press 1. To reschedule your appointment, press 2. To cancel your appointment, press 3. If we have reached you in error or if you do not wish to receive further automated medical appointment reminders, press 4. To hear this message again, please press 5 now.

And you can create a separate message which would be delivered in the event an answering machine takes the call:

Hi. This is Allison from Charleston Family Clinic calling to confirm Jan's appointment with Doctor Quack on Tuesday, October 5th, 2010, at 10:30 a.m. in our Charleston office. Please remember not to eat or drink anything after midnight on the night before your scheduled appointment.

If you need to change or cancel your appointment or if we have reached you in error, please call our office at your earliest convenience. The number is 800-123-4567. Goodbye.

Step #3 is to use your web browser to access a password-protected web page that will let you upload your CSV or XML data and your config file to kick off the dialing spree. Once the files have been uploaded, everything else is automatic.

Step #4 is to sit back and relax while TeleYapper executes your instructions and calling list. When the calling has been completed, the email address in your config file will be sent both CSV and XML reports of the results of all the calls. Either of these reports is suitable for import and manipulation using most spreadsheet applications.

Status Codes. Every call that is processed gets a status code entry whether the call is successful or fails. A status code of 0 means a call failed to both phone numbers provided for a particular callee. The second phone number is entirely optional. A status code of 5 means the call was answered but no response was provided by the called party. This typically would mean the call was picked up by an answering machine although it could mean Granny answered the call using a rotary dial phone. 🙄 Status codes of 1 through 4 have whatever meaning you choose to assign to each option when setting up a configuration for a particular calling campaign.

Legalese. TeleYapper 5.0 is free for use by non-profit, civic, and non-political organizations provided you absolve us from all financial and other responsibility in conjunction with your use of the software. Non-profit use further requires that no financial benefit be derived from the substance of the calls. Simply stated, your Little League team can use the software at no cost to remind kids to attend practice, but it cannot be used to solicit charitable contributions or to sell doughnuts without obtaining a commercial license.

By using this software, you also agree to strictly comply with federal and state regulations including 16 C.F.R. Part 310. In addition, you agree to assume all risks associated with use of the software. NO WARRANTIES EXPRESS OR IMPLIED INCLUDING ITS FITNESS FOR USE OR MERCHANTABILITY ARE PROVIDED WITH THIS SOFTWARE.

WARNING: With certain limited exceptions, most robocalling now requires prior written approval from those being called. See this link for a summary of the federal requirements. Be advised that improper use of this software may subject the user to penalties of up to $16,000 per call plus monetary damages to injured consumers.

Creative Commons LicenseLicensing. You are licensed to use this software under certain conditions. You do not own it. We do, and we also own the copyright. It is licensed for use under the terms of the Creative Commons Attribution Non-Commercial license. A Plain English summary is available here. We've done this primarily to do our part to stamp out the telemarketing creeps of the world. Those wishing to use TeleYapper for commercial or political purposes must first request and then purchase a commercial license after outlining your proposed terms of use. Telemarketers need not apply! For doctors, lawyers, and others falling outside the scope of our free license who wish to obtain a commercial use license, please contact us for pricing and details. Be sure to summarize your intended use in your request together with a sufficient factual summary to demonstrate that your use is in compliance with 16 C.F.R. Part 310. Please also indicate whether you will require assistance with installation and setup.

Prerequisites. As mentioned, you'll need a Linux-based Asterisk aggregation such as PBX in a Flash to use TeleYapper 5.0. This means you need a system with Asterisk 1.4 or 1.6 as well as FreePBX 2.5 or higher. For quality reasons, we strongly recommend you purchase a commercial Cepstral text-to-speech license for your server. While Flite would technically work, most folks don't respond well to calls from Egor so we have customized the code for use solely with Cepstral. You'll find Cepstral installation instructions in this Nerd Vittles article. The TeleYapper 5.0 code also relies heavily on Apache and PHP, both of which are included in every PBX in a Flash system.

Installing Cepstral. Cepstral installation is not the simplest application to get working with Asterisk so here are the commands for those running 32-bit systems with Asterisk 1.4 or 1.6.2. For details on purchasing and registering Cepstral (and a discount) and for 64-bit installs, read our previous article including the comments.

For Asterisk 1.4 systems running under 32-bit CentOS, log into your server as root and issue the following commands accepting the Cepstral defaults. Be sure to create the Cepstral directory when prompted!

cd /root
wget http://nerd.bz/bnTVjX
tar -zxvf Cepstral*
cd Cepstral_Allison-8kHz_i386-linux_5.1.0
./install.sh
echo /opt/swift/lib > /etc/ld.so.conf.d/cepstral.conf
ldconfig
cd /usr/src
wget http://pbxinaflash.net/source/app_swift/app_swift-1.4.2.tar.gz
tar -zxvf app_swift*
cd app_swift-1.4.2
make
make install
ln -s /opt/swift/bin/swift /usr/bin/swift
sed -i 's|David-8kHz|Allison-8kHz|' /etc/asterisk/swift.conf
amportal restart
asterisk -rx "core show application swift"
ls /opt/swift/voices
swift --reg-voice

For Asterisk 1.6.2 systems running under 32-bit CentOS, log into your server as root and issue the following commands accepting the Cepstral defaults. Be sure to create the Cepstral directory when prompted!

cd /root
wget http://nerd.bz/bnTVjX
tar -zxvf Cepstral*
cd Cepstral_Allison-8kHz_i386-linux_5.1.0
./install.sh
echo /opt/swift/lib > /etc/ld.so.conf.d/cepstral.conf
ldconfig
cd /usr/src
wget http://pbxinaflash.net/source/app_swift/app_swift-1.6.2.tar.gz
tar -zxvf app_swift*
cd app_swift-1.6.2
make
make install
ln -s /opt/swift/bin/swift /usr/bin/swift
sed -i 's|David-8kHz|Allison-8kHz|' /etc/asterisk/swift.conf
amportal restart
asterisk -rx "core show application swift"
ls /opt/swift/voices
swift --reg-voice

Installing TeleYapper 5.0 The real beauty of PBX in a Flash as an Asterisk platform is demonstrated by the ease with which you can install new applications such as this one. The drill is very simple. You download an install script, make it executable, and run it. Less than a minute later, the TeleYapper install is done. Here are the commands to execute to install TeleYapper 5.0 after logging into your PBX in a Flash system as root. On other systems, you are well advised to carefully review the install script and tailor it to meet the individual requirements of the platform on which you are installing it.

cd /root
wget http://bestof.nerdvittles.com/applications/teleyapper5/teleyapper5.pbx
chmod +x teleyapper5.pbx
./teleyapper5.pbx

The TeleYapper Database. We use the MySQL database management system to manage the list of callees for TeleYapper to dial. It can handle a database of almost any size and generally stands up well in performance comparisons with Oracle. So you're covered on the database front. For most users, you never should need to access the MySQL database directly. TeleYapper 5.0 handles the importing of CSV or XML files for processing, manages the call queue, and processes and emails CSV and/or XML-formatted reports to you when the calls are completed.

The install script creates the MySQL database to support TeleYapper 5.0. Should you need or want to manage the database directly, the easiest tool to use is phpMyAdmin which is accessible through the Tools tab in FreePBX on PBX in a Flash systems. You'll need to login as maint with your maint password to access phpMyAdmin. After phpMyAdmin loads, click on the reminders database in the left column. Then click the reminders table entry in the left column to open the file. Unless you really, really know what you are doing and appreciate how much coding will be required to support new or different fields in the reminders file, don't improve it.

Here's the layout of the MySQL database table for TeleYapper 5.0:

  • id - System generated record ID
  • acctno - Account Number (12 alphanumeric characters)
  • provider - Provider Name (30 alphanumeric characters)
  • recipient - Recipient Name (30 alphanumeric characters)
  • apptdt - Appointment Date (MM/DD/YY format)
  • appttime - Appointment Time (HHMM format using 24-hr clock)
  • apptplace - Appointment Location (30 alphanumeric characters)
  • instructions - Free-form text (65535 alphanumeric characters)
  • phone1 - Primary Phone (NNN-NNN-NNNN or NNNNNNNNNN)
  • phone2 - Alternate Phone (NNN-NNN-NNNN or NNNNNNNNNN)
  • status - Status: 0=failedcall 5=ansmachine 1,2,3,4=user-defined
  • failedcalls - System Generated Number of Failed Calls

Tweaking PHP for TeleYapper. Depending upon your PHP setup and the number of calls you plan to process, you may need to adjust the default PHP resource settings on your server. The main reason is because TeleYapper generates a custom sound file for every call to be processed before the calling ever starts. If you plan to make thousands of calls, this can take some time. The PHP settings are stored in /etc/php.ini. You must log in as root and restart Apache after making changes to these settings: service httpd restart. The settings that matter are the following:

max_execution_time = 30 (we recommend 900 which is 15 minutes to process)
max_input_time = 60 (we recommend 300 which is 5 minutes to upload a file)
memory_limit = 100M (OK as is)

post_max_size = 8M (we recommend 100 megabytes which should be ample)

file_uploads = On (OK as is on most systems)
upload_max_filesize = 100M (we recommend 100 megabytes which should be ample)

Tweaking Crontab. TeleYapper relies upon a cron job to kick off its calling sprees so you'll need the following entry in your /etc/crontab file unless you used the install script which inserts it automatically:

* * * * * root /var/www/html/appt-reminders/gen-reminders.php > /dev/null 2>&1

Formatting CSV Data For Import. You don't necessarily need an external database in order to use TeleYapper 5.0 although it is designed to support almost any database or spreadsheet application in the marketplace so long as it can export data in CSV or XML format. A CSV (comma-separated values) or XML file is the middleware that makes everything work. Each line in a CSV file represents an entry to be processed by TeleYapper 5.0 when the CSV file is uploaded. Each item in a line is called a field. Every field begins and ends with double-quotes, and fields are separated from each other with commas. Do NOT include any quotation marks in your actual text, or you'll get a disaster. All fields are required, by the way, but only the Phone1 field must have an actual entry. The remaining fields may each consist of nothing more than a pair of double-quotes. Note also that the id, status, and failedcalls fields (shown in red below) must consist of a pair of double-quotes and nothing more. Here's the actual CSV format which must be used, and all of the data must appear on the same line so disregard the WordPress formatting below:

"id","acctno","provider","recipient","apptdt","appttime","apptplace","instructions","phone1","phone2",
"
status","failedcalls"

Here's what the CSV entry used for our sample medical reminder shown near the top of this article would look like. We've excluded the special instructions and Phone2 entries below only to simplify the display because of constraints inherent in our blog formatting:

"","12345","Quack","Jan","10/05/10","1030","Charleston","","4049876543","","",""

The XML Alternative. If you'd prefer to upload XML file templates for your calls instead of CSV data, a sample XML file is included in the distribution to show you the proper formatting. Here's a sample entry that matches the CSV data above:

<!-- Database: reminders -->
<reminders>
   <!-- Table: reminders -->
    <reminders>
       <id></id>
       <acctno>12345</acctno>
       <provider>Quack</provider>
       <recipient>Jan</recipient>
       <apptdt>10/05/10</apptdt>
       <appttime>1030</appttime>
       <apptplace>Charleston</apptplace>
       <instructions></instructions>
       <phone1>4049876543</phone1>
       <phone2></phone2>
       <status></status>
       <failedcalls></failedcalls>
    </reminders>
</reminders>

Direct Uploading with SAMBA. If you've activated SAMBA on your Asterisk server, you can upload TeleYapper files for processing directly. Be sure to name your CSV or XML file as reminders.csv or reminders.xml. And name your config file: config.php. Copy the files to the /var/www/html/appt-reminders/upload directory on your Asterisk server. That's all there is to it. If you need hints on SAMBA installation, see our Best of Nerd Vittles tutorial. Pay particular attention to the sections on Security Considerations and Firewall Settings. Before using the SAMBA, be sure to upload some test CSV/XML files using the web interface. There is no error checking when you use the SAMBA option!

Configuring TeleYapper 5.0 Calling Scripts. Now let's address how we transform a CSV or XML entry such as the ones shown above into a personalized phone call to Jan, the actual patient in our example. Every TeleYapper session can have an individual configuration file associated with it. If none is specified, then a default configuration is used. In this way, you can customize call procedures and calling scripts for different tasks. The easiest approach is to always upload a config file with your CSV or XML data file. Then you won't get unexpected results when the calling begins.

HINT: It's a very good idea to create a sample upload with your own phone number and some sample configuration data to test things out before you start calling thousands of clients.

A default configuration file (config.default.php) as well as sample CSV and XML templates (reminders.csv and reminders.xml) come with TeleYapper 5.0 and can be found on your Asterisk server in the /var/www/html/appt-reminders directory. Make a copy of them, and move the copies to your Mac or PC. Then, using TextEdit or Notepad, open the files and have a look. Before addressing other configuration options in config.php, let's tackle the setup procedure for calling scripts.

The actual boilerplate message to be delivered to the called party is stored in $msg. Notice that you can substitute data out of your database in the boilerplate template by enclosing any desired fields in braces. Just make sure the fieldname exactly matches one of the fields in the reminders database. So our entry for the sample call above would look like this:

$msg="Hi: This is Allison from Charleston Family Clinic calling to confirm an appointment for {recipient}, with Doctor {provider}, on {apptdt}, at {appttime}, in our {apptplace} office. {instructions}";

Just a comment that, for those with large data processing systems, you may find it more convenient to generate the actual text for each reminder on your mega-machine. In this case, all of the data (up to 65,535 characters) could be loaded into the instructions field for each callee. So each upload record might consist of nothing more than phone numbers and instructions. In this scenario, the $msg entry in config.php would look like this: $msg="{instructions}";

The key press choices that are provided to the called party are configured using the $options field which would look like this for our example:

$options = "To confirm your appointment, please press 1. To reschedule your appointment, press 2. To cancel your appointment, press 3. If we have reached you in error or if you do not wish to receive appointment reminders, press 4. To hear this message again, please press 5 now.";

Don't confuse the 5 option which is automatically included in the TeleYapper dialplan code with status code 5 which means an answering machine picked up a call. Status code 5 is system-generated and is not stored based upon a callee choosing to listen to a recorded message more than once. The two 5's are not the same even though options 1-4 are actually used to define what the first four status codes mean on your system.

As we mentioned, the system has the smarts to usually figure out if an answering machine took the call. When it detects this, the $ansmach message is played instead of $options. A sample entry might look like this:

$ansmach = "If you need to cancel or reschedule this appointment, if we reached you in error, or if you do not wish to receive appointment reminders in the future, please call 777-123-4567 at your earliest convenience. Thank you for your assistance. Goodbye.";

Finally, for each of the four choices (1 through 4), there is a response message which is played if the callee chooses that option. Here's a sample template to get you started:

$chose1 = "Thank you for making Charleston Family Clinic your medical home. Your appointment has been confirmed. Goodbye.";
$chose2 = "Thank you. A representative will be calling you to reschedule your appointment. Goodbye.";
$chose3 = "Thank you for making Charleston Family Clinic your medical home. Your appointment has been cancelled. Goodbye.";
$chose4 = "Thank you. We will update our systems and apologize for the call. Goodbye.";

Thus, when a callee responds to the boilerplate call by pressing 1, $chose1 is played in response. If an email address has been entered for $chose1email, then a copy of the log entry for that call is sent to the specified email address using the customized email subjects (shown below) in addition to being placed in the master call log. The same process occurs when the other options are chosen. Particularly with medical appointment cancellations, it may be important to receive immediate notification when an appointment is canceled or a patient requests a change in scheduling. So the software includes the flexibility to generate instant emails to various email addresses depending upon which option is pressed. As noted, the optional instant emails will be generated using the email subjects entered for the following fields in your customized configuration file:

$chose1subj = "APPOINTMENT NOTIFICATION CONFIRMED BY PHONE";
$chose2subj = "APPOINTMENT RESCHEDULING REQUEST BY PHONE";
$chose3subj = "APPOINTMENT CANCELLATION REQUEST BY PHONE";
$chose4subj = "APPOINTMENT SCHEDULING ERROR REPORTED BY PHONE";
$chose5subj = "APPOINTMENT NOTIFICATION LEFT ON ANSWERING MACHINE";

Uploading Data & Config Files to TeleYapper. Simple web pages are used to upload CSV and XML data with config files to TeleYapper 5.0. WARNING: These web pages have NOT been sanitized for use on the Internet. They are designed for use on your local area network behind a secure firewall. On PBX in a Flash systems, the web pages are password-protected and require a valid user account login for access. This will NOT be the case on other Asterisk aggregations without tweaking your Apache configuration. Sample entries can be found in teleyapper.conf in the /var/www/html/appt-reminders directory. On PBX in a Flash systems, you can log in using maint, wwwadmin, or meetme accounts. Or you can create an additional account to use with TeleYapper 5.0:

htpasswd /usr/local/apache/passwd/wwwpasswd teleyapper

There are separate web pages depending upon whether you wish to upload CSV or XML data. For CSV data, the web address is http://ipaddress/appt-reminders/uploadcsv/. For XML data, the web address is http://ipaddress/appt-reminders/uploadxml/. Substitute the private IP address of your Asterisk server for ipaddress. Here's a sample of the CSV web form. You can, of course, substitute your own logo on the right if desired.

CSV Web Form

Other TeleYapper 5.0 Config Options. In addition to the boilerplate text for TeleYapper calls, there are a number of other settings which can be adjusted to meet your individual requirements.

The database settings should never need adjusting so just leave them alone. They look like this:

$db="reminders";
$fi="reminders";
$dbuser="root";
$dbpass="passw0rd";

You can manually set a starting and ending time to begin and end the calling sequence for a particular upload. Never set these in the default configuration! Only set them in a config file to be uploaded. If the entries are blank, calls will commence shortly after the upload completes and will end when all of the entries have been processed. Note that there is no current flexibility to schedule individual calls based upon the time of the appointment. This typically would be handled by selecting particular records for processing in your primary database. For example, for medical appointments, you would select records in which an appointment is scheduled for tomorrow and then upload the list to TeleYapper which would place the calls today. We probably will expand this functionality down the road, but it's not there yet. So it's up to you to upload call lists which basically are ripe for calling now.

If you wish to use the $startcalls and $endcalls features in your custom config files, the syntax should look like this: YYYYMMDD,HHMM where YYYY is a 4-digit year, MM is a 2-digit month, DD is a 2-digit day of the month, HH is the 2-digit hour based upon a 24-hour clock (aka Military Time), and MM is the 2-digit minute. Note that calls will not end precisely at the $endcalls time. Any existing calls already in process will be completed including redials and calls to an alternate $phone2 number. This process can take up to 10 minutes to complete.

CAUTION: Be very careful using the $startcalls option! Nothing precludes your scheduling a thousand reminder calls to kick off at 0200 which is 2 a.m. Not really a good thing if job security matters to you.

To restart the calling process on the following day, log into your server as root and switch to the /var/www/html/appt-reminders directory. Then edit config.php and adjust the $startcalls and $endcalls for the remaining calls. Then run: ./gen-calls.php. Any existing database entry with a status=0 will be called when the calling process resumes. You can monitor the calling process by running: ./showcalls.sh. Press Ctrl-C to terminate the call display. It usually takes a minute or two for the first call to be placed.

$callerid is used to set the CallerID of outbound calls if your telephony provider supports it.

$trunk is used to set the outbound dialing trunk for calls. The default works for most purposes.

$channel is used to set the outbound dialing channel for calls. The default works for most purposes.

$maxcalls and $spacing are used to set the number of simultaneous calls and spacing between calls respectively. Be very careful with these settings. You must have sufficient outbound trunks to handle the number of simultaneous calls you schedule with $maxcalls, or you will get circuit busy conditions which are recorded as calls to busy numbers. Keep in mind that TeleYapper tries every call twice with 2 minutes of separation. So, if you only have two outbound trunks, don't set $maxcalls above 1, or you will get trunk busy conditions whenever original calls to an individual fail, i.e. line busy or no answer situations. In addition, remember that TeleYapper 5.0 supports a second phone number for each called party. These are triggered whenever the original two calls to the primary number fail and must also be considered in setting $maxcalls properly. If your logs show a disproportionate number of failed calls (status=0), this may be a tell-tale sign of trunk busy conditions.

$waittime is the number of seconds a call to any given number will ring. 45 seconds is about 7 rings.

$email is the email address that will be used to send the logs at the completion of the calling process. $chose1email through $chose5email are the optional email addresses if you want instantaneous feedback on certain types of status results. This means you get an immediate email if a certain call results in a certain status code. Leave the ones blank for $status conditions on which you want no immediate feedback and simply wait for the logs to arrive.

$csvreport and $xmlreport are used to set which type of completion report you wish to receive. If you want both of them, set them both to 1. Otherwise, set the one you don't want to 0.

The Old Fashioned Way. For those of you that preferred the older method of entering data directly into MySQL, you still can use phpMyAdmin or some other front-end tool to enter the data directly into the reminders.reminders table. Just leave the id field blank since it automatically gets generated by MySQL. And either leave the status and failedcalls fields blank or set them to 0. They also are system-generated. Once you have your data in place, log into your server as root, and...

cd /var/www/html/appt-reminders
Configure config.php for your calling campaign
Run ./gen-mysql.php to kick off TeleYapper 5.0

In Closing... Finally, let us issue our usual tinkerer's warning. Don't delete anything from the /var/www/html/appt-reminders directory tree. Just because you don't know its function doesn't mean it doesn't have one. Aside from that, the documentation above should get you started today. Be advised that TeleYapper 5.0 still is a work in progress. So check back every week or so for new comments on this article to see what's been changed, added, or fixed since you originally downloaded the application. Enjoy!



Need help with Asterisk? Visit the PBX in a Flash Forum.
Or Try the New, Free PBX in a Flash Conference Bridge.


whos.amung.us If you're wondering what your fellow man is reading on Nerd Vittles these days, wonder no more. Visit our new whos.amung.us statistical web site and check out what's happening. It's a terrific resource both for us and for you.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 


Some Recent Nerd Vittles Articles of Interest...

  1. Special thanks to my dear wife, Mary, who did much of the system design work for this project, and to Community Health Centers of Florida for underwriting some of the design and development costs. []

Asterisk TTS: Introducing Today in History

If you're a history buff and want a convenient way to find out everything that ever happened Today in History, then this week's text to speech (TTS) application for Asterisk® should be just what you need. Pick up any phone connected to your Asterisk system and dial T-O-D-A-Y (86329 for the spelling-impaired). The script will retrieve today's historical events and today's birthdays of interest from Yahoo News and play the results back to you over the phone using either Flite or Cepstral to handle the TTS translation. To speed up the retrieval process, you can also set this up as a cron job to download the latest events each day while you're sleeping. Thereafter, when you dial T-O-D-A-Y, the results are played back for callers instantaneously.

Prerequisites. If you're using PBX in a Flash, then all of the tools you'll need are already in place. And we have a script for you that will install the application in just a few seconds. For other users, you'll need an Asterisk server with PHP5 and either Flite or Cepstral to handle the text-to-speech chores.

Overview. If you've previously installed other Nerd Vittles text to speech applications, then the drill this time around is quite similar. There's a PHP/AGI script which gets stored in /var/lib/asterisk/agi-bin. In this script (nv-today.php), you can change the default Flite TTS engine to Cepstral by changing the $ttspick variable setting from 0 to 1. Then there is a snippet of dialplan code that needs to be added to the [from-internal-custom] context in extensions_custom.conf for FreePBX installations. Once you reload your Asterisk dialplan, you're ready to go.

How It Works. The PHP/AGI script only does real work once a day. It always checks to see if there is an existing /tmp/today.txt file with today's file stamp. If there is, it exits gracefully. If today's file doesn't exist or if the file's time stamp is earlier than midnight, then the script downloads the latest information for today in history and creates a text file of the data. Then either the Flite or Cepstral TTS engine is called to convert the text file into /tmp/today.wav. The dial plan code is used to answer calls to extension 86329. Then it runs the PHP/AGI script, and finally it plays back /tmp/today.wav. Note: The PHP/AGI script, if run as a cron job or from the command prompt, should never be run as the root user, but only as the asterisk user. Otherwise, the today.txt and today.wav files cannot be replaced by the script when it subsequently is run from the dialplan.

Script Installation. If you're using PBX in a Flash, log into your server as root and issue the following commands:

cd /root
wget http://bestof.nerdvittles.com/applications/today/today.pbx
chmod +x today.pbx
./today.pbx

Automatic Updates Using crontab. If you'd like to automatically generate the Today in History files each day, add the following entry to the bottom of /etc/crontab:

01 0 * * * asterisk /var/lib/asterisk/agi-bin/nv-today.php

Manual Installation. For those using a different Asterisk aggregation that includes PHP5, FreePBX, and Flite, add this code to /etc/asterisk/extensions_custom.conf in the [from-internal-custom] context:

exten => 86329,1,Answer
exten => 86329,2,Wait(1)
exten => 86329,3,Set(TIMEOUT(digit)=7)
exten => 86329,4,Set(TIMEOUT(response)=10)
exten => 86329,5,Flite(Please stand bye while we retrieve: Today in History.)
exten => 86329,6,AGI(nv-today.php)
exten => 86329,7,Playback(/tmp/today)
exten => 86329,8,Wait(1)
exten => 86329,9,Hangup

Then issue the following commands from the command prompt after logging in as root:

cd /root
mkdir today
cd today
wget http://bestof.nerdvittles.com/applications/today/today.zip
unzip today.zip
rm -f today.zip
cp nv-today.php /var/lib/asterisk/agi-bin/nv-today.php
chmod 775 /var/lib/asterisk/agi-bin/nv-today.php
chown asterisk:asterisk /var/lib/asterisk/agi-bin/nv-today.php
asterisk -rx "dialplan reload"

Running the Application. Now you're ready for a test run. Pick up any phone connected to your Asterisk system and dial T-O-D-A-Y. After a brief pause to download the data, today's events in history and today's birthdays will be played back over your phone using your favorite text to speech voice. To eliminate the pause the first time the application is run each day, simply add the crontab entry as outlined above. Enjoy!


Free DIDs While They Last. Sipgate is giving away a free U.S. DID with free incoming calls plus 200 free minutes for outbound calls. Better hurry. Here's the trunk setup for FreePBX-based systems:

Trunk name: sipgate

type=peer
username=ACCTNO
fromuser=ACCTNO
secret=ACCTPW
context=from-trunk
host=sipgate.com
fromdomain=sipgate.com
insecure=very
caninvite=no
canreinvite=no
nat=no
disallow=all
allow=ulaw&alaw

Registration Strong: ACCTNO:ACCTPW@sipgate.com/YOUR-DID-NUMBER

ACCTNO is the account number assigned to your sipgate account. ACCTPW is the password for your account. YOUR-DID-NUMBER is your 10-digit DID.

Finally create an inbound route using your actual 10-digit DID and assign a destination for the inbound calls.



Need help with Asterisk? Visit the PBX in a Flash Forum.
Or Try the New, Free PBX in a Flash Conference Bridge.


Twitter Magic. If you haven't noticed the right margin of Nerd Vittles lately, we've added a new link to our Twitter feed. If you explore a little, you'll discover that the user interface now brings you instant access to every Twitter feed from the convenience of the Nerd Vittles desktop. Enjoy!


whos.amung.us If you're wondering what your fellow man is reading on Nerd Vittles these days, wonder no more. Visit our new whos.amung.us statistical web site and check out what's happening. It's a terrific resource both for us and for you.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 


Some Recent Nerd Vittles Articles of Interest...

Asterisk on Steroids: The Orgasmatron Installer, Part II

In our last column, we introduced you to the new Orgasmatron Installer for PBX in a Flash. After a one-week break to prepare for our visit to the Atlanta Asterisk® Users Group 3d Annual InstallFest, we're back in the saddle today to flesh out the new baby.

For those that are new to all of this, let's briefly review what the Orgasmatron Installer has added to your Lean, Mean Asterisk Machine. Faxing and email now work out of the box. More than a dozen extensions and a number of hosting provider trunks are preconfigured as well. Delivery of CallerID names with numbers is now available from a half dozen providers of your choice. And, of course, the Flite text-to-speech engine is preconfigured with Cepstral TTS only a few keystrokes away. Also included are FreePBX 2.5, and Apache, SendMail, MySQL, PHP, phpMyAdmin, IPtables Linux firewall, Fail2Ban, and WebMin. And here's the complete list with all of your new Nerd Vittles applications:

Security First! Because your phone bill matters, today we begin with security. The design of virtually all of the open source Asterisk PBX aggregations is to leave SIP and IAX ports on your new server exposed to the Internet. This is done to facilitate communications with your hosting providers as well as telephone extensions which may be connected to your server from the other side of the globe. The wrinkle with this design is that, if a bad guy can guess an extension number on your system and its password, they get a free ticket to do whatever could be done from that extension on your PBX. In the case of one unlucky company, this resulted in a phone bill of over $100,000. For details, read our Primer on Asterisk Security. So... Security Matters!

Anyone obviously can download PBX in a Flash and the Orgasmatron Installer. Thus, you need to assume that everyone on the planet knows your default passwords. We walked you through changing some of the important ones with the passwd-master script last week. Use it regularly. Now let's turn our attention to your extensions and trunk passwords.

Extension Security. There now are a couple of ways to secure your extensions from the bad guys. First, you need to establish very secure passwords for your extensions and voicemail boxes. Second, you need to specify the IP addresses that are authorized to access every extension on your PBX. And third, remember do repeat this drill every time you add a new extension to your system.

To change an extension password, open FreePBX using a web browser pointed to the IP address of your server: http://ipaddress/admin/. On PBX in a Flash systems, you'll be prompted for a username (maint) and whatever password you set when you ran passwd-master. Now click the Setup tab and then the Extensions option. You'll see the list of configured extensions on your PBX in the right column. Click on each of those extensions, and you'll see a form like this:



The password for this extension is stored in a field called secret. Make up a very secure password for every extension on your PBX. You will embed this password in the telephone connected to this extension. There's no other place you'll need it so a long and complex numeric password is essential.

The authorized IP addresses for this extension are stored in a field called permit. The way this works is that you first specify which IP addresses should be denied access (the deny field), and then you poke a little hole in the dike, if you're smart, to permit only one or a few IP addresses to connect to the extension. Leave the deny entry as it is. The default permit entry 0.0.0.0/0.0.0.0 opens the floodgates. It means any IP address can log into this extension. To restrict extension access to IP addresses on a private LAN of 192.168.1, the entry would look like this: 192.168.1.0/255.255.255.0. To further restrict extension access to a specific IP address (recommended!), the entry would look like this: 192.168.1.44/255.255.255.255. Use a permit entry that makes you sleep well at night. After all, it's your phone bill.

The third entry you'll want to change is further down the same data entry form, and that's the Voicemail Password field. This entry determines who can actually retrieve voicemails left for this extension. Set it accordingly.

Once you've made the three changes above, save your entries by clicking the Submit button at the bottom of the form. Repeat the drill for every extension, and then click the orange Apply Configuration Changes tab at the top of the screen and then Continue with Reload to reload your Asterisk dialplan.

Trunk Security. Securing the trunks on your PBX is equally important to securing extensions. Keep in mind that, with your trunk credentials, anyone can set up your trunk on their PBX to make calls on your nickel! Unlike the extensions, there are no working usernames and passwords in the default trunks with one exception. If you plan to use the providers we've preconfigured, simply insert your own username, fromuser, and secret settings in the fields provided, and you'll be making calls in a matter of seconds. The process is similar to the one we used for extensions. Choose Setup, Trunks and then click on each trunk and make your entries. Submit your entries and then reload the dialplan when you're finished.

In the case of the remote-peer trunk, this trunk is designed to make it extremely easy to interconnect Asterisk servers for interoffice communications. But it also means that a bad guy can easily interconnect with your server and start dialing. If you don't plan to connect to another Asterisk server, delete this trunk! If you do plan to connect to another Asterisk server, change the trunk secret and IP address of the host to which you are connecting. Do NOT leave the default secret in either the outgoing or incoming settings! Also change the password for the outbound route: Remote-Host. You may want to ultimately remove this password if you actually start interconnecting servers. Otherwise, users will have to enter this password whenever they may a call to an extension on the interconnected Asterisk server.

To interconnect your server to another server, you would simply add a new trunk called main-peer on the other server that looks like this (using your new password and correct IP address):


Configuring AsteriDex. AsteriDex is plug-and-play for most users. However, as configured, your AsteriDex web site is reachable from the Internet if you have mapped port 80 on your hardware-based firewall to your PBX in a Flash server or if you don't have a hardware-based firewall and your server is directly exposed to the Internet. If you don't mind people seeing your contact list or making prank calls that ring your extensions, this may be okay. If it's of concern to you, the easiest security precaution is to rename the asteridex4 directory to an obscure name that only you know, e.g. bahbah143. Here are the commands to issue after logging into your server as root. By using all of these commands, AsteriDex still will be accessible through FreePBX and the PBX in a Flash GUI:

cd /var/www/html
mv asteridex4 bahbah143
sed -i 's|asteridex4|bahbah143|' admin/modules/asteridex/page.asteridex.php
sed -i 's|asteridex4|bahbah143|' welcome/.htindex.cfg

The other adjustment you may need to make to AsteriDex is to configure who can access the Admin tab to add, modify, and delete entries in your database. As configured, the Admin tab is available to any computer with an IP address that begins with 192.168. This may not match your private subnet, and not all 192.168 IP address are non-routable. So you may wish to tighten this restriction to match your internal subnet. In the /var/www/html/asteridex4 folder (or whatever name you've chosen above), you'll find a configuration file: config.inc.php. Simply edit this file and change the $local_net entry. You also can set the long distance prefix ($LDprefix), your CallerID number ($CallerID), and the default extension to ring for click-to-dial from the web interface ($INtrunk and $defaultExt). The extension to dial can now be set from the web interface as well. Unless you really know what you're doing, leave everything else the way it is.

CallerID Superfecta. Most hosting providers deliver CallerID numbers as part of your payment for using their DIDs. Almost none deliver CallerID names without an additional charge. CallerID Superfecta is designed to fill that gap... for free. A number of us have worked on this project for years. And it now has been integrated directly into FreePBX. There are two steps to getting everything working properly on your new PBX. First, you need to identify which CallerID lookup sources you wish to use on your system. Then, you need to specify CallerID Superfecta as the lookup source on each Inbound Route where you want CallerID names looked up for incoming calls.

Open FreePBX with your web browser and navigate to Setup, CID Superfecta. You'll get a form that looks like this:


With the exception of AsteriDex and SugarCRM lookups which are almost instantaneous, keep in mind that each lookup takes a little time and slows down receipt of your inbound call. So long as you have a good Internet connection, you shouldn't have a problem using all of the sources. The way the CallerID Superfecta works is that, once it gets a name match in any of the sources beginning with AsteriDex and SugarCRM, it ends the lookups and provides the CallerID name it found to Asterisk for display on the extensions which are ringing in the designated inbound route. Filling out the form is self-explanatory for the most part. Tick off the lookup sources you wish to use. If you plan to use whocalled.us, you'll need to sign up for an account and provide your credentials before the lookup will work. With SugarCRM, fill in the blanks to match your implementation of SugarCRM. Click the SAVE button when you have CallerID Superfecta configured to meet your needs.

The final step in implementing CallerID Superfecta is to designate it as the CallerID Lookup Source for your Inbound Routes. Click on Setup, Inbound Routes and a list of your existing routes will be displayed in the right column. As installed, there will only be one: Any DID / Any CID. Click on this entry to display the form. Scroll down to the CallerID Lookup Source dropdown box and choose CallerID Superfecta. You'd do the same with any other inbound route you create down the road. Click the Submit button and reload your dialplan to enable CallerID Superfecta. Now sit back and wait on your first call.

CallWho for Asterisk. CallWho for Asterisk is a little script we put together to make it easy to look up and dial the numbers of people in your AsteriDex database. When you dial 4-1-2, you'll be prompted to enter the first three letters of the name of the person you wish to call. Once you key in the three letters, CallWho for Asterisk will look up every matching entry in your AsteriDex database and read you the list of matches. For example, if you had Joe Schmo and Joe The Plumber in your database, CallWho would say something like this:

Press 1 for Joe Schmo.
Press 2 for Joe The Plumber.

When you press 2, CallWho will place a call to Joe The Plumber. Not sure why you'd ever want to do that, but now you understand the way it works.

Before CallWho for Asterisk will work at all, you need to run the script which associates three letter codes with every entry in your AsteriDex database. And, whenever you add new entries to your database, you need to run it again. Using a web browser, here's the program to run. Be sure to use the correct IP address for your Asterisk server and your newly designated AsteriDex location instead of asteridex4:

http://192.168.0.44/asteridex4/dialcode.php

Cepstral TTS for Asterisk. PBX in a Flash is delivered with the Flite text-to-speech engine already enabled. But, unless you like the voices of Lurch and Fred Munster, you may wish to cough up a little cash and install Cepstral on your server. Cepstral now has a synthesized voice of Allison which exactly matches all of the other voice prompts in Asterisk. I'm embarrassed to report that we can't seem to get the correct installation script deposited in our Orgasmatron builds... ever! So, if you want to use Cepstral, here are the steps to download the real, working installation script and to install Cepstral:

cd /root/nv
rm install-cepstral
wget http://pbxinaflash.net/source/cepstral/install-cepstral
chmod +x install-cepstral
./install-cepstral

Once the 65MB download completes, you'll be prompted to agree to the license. You do this by pressing the Enter key to scroll down the license agreement. When you reach 100%, type yes to continue with the install. Press Enter to accept /opt/swift as the install directory. Very important: Type y to create the directory. The default is No which will mess up the installation. Now type yes to complete the install. Once the install completes, you can purchase a license for the Allison voice at this link. Under Voices, choose Language: US English, Voice: Allison-8kHz, and Platform: Linux. For non-commercial use, the $30 voice registration is all you need. For commercial use, you also need to acquire Concurrency Licenses which authorize a certain number of simultaneous voice ports on your system for Cepstral voices. These run $50 per port in 2-port multiples and are in addition to the $30 Allison voice license. For Nerd Vittles readers, you can save 15% on your purchase by sending an email to sales at cepstral.com explaining how you plan to use Cepstral and requesting the discount code.

We'll have an in-depth article on Cepstral in coming weeks. For those that want a head start, each of the Nerd Vittles text-to-speech applications typically includes dialplan code and one or more PHP/AGI scripts. The dialplan code can be found in /etc/asterisk/extensions_custom.conf. When you scroll through the dialplan code you will see entries like the following for each of the TTS applications:

exten => 611,5,Flite("Enter a 3 character airport code.")
;exten => 611,5,Swift("Enter a 3 character airport code.")
exten => 611,6,Read(APCODE,beep,3)
exten => 611,7,Flite("Please hold a moment.")
;exten => 611,7,Swift("Please hold a moment.")

The semicolon at the beginning of a line tells Asterisk this is a comment and to ignore it. To change the voice from the Munsters to Allison, just comment out the Flite lines and uncomment the Swift lines by deleting the leading semicolons. When you're finished making the changes, save the file and then reload your dialplan: asterisk -rx "dialplan reload". So, in the example above, the code would now look like this:

;exten => 611,5,Flite("Enter a 3 character airport code.")
exten => 611,5,Swift("Enter a 3 character airport code.")
exten => 611,6,Read(APCODE,beep,3)
;exten => 611,7,Flite("Please hold a moment.")
exten => 611,7,Swift("Please hold a moment.")

You also need to modify the PHP/AGI scripts that go with each application. All of these files are stored in /var/lib/asterisk/agi-bin. Typically the filenames begin with nv- and end in .php:
-rwxrwxr-x 1 asterisk asterisk 6835 Sep 16 2008 nv-callwho.php
-rwxrwxr-x 1 asterisk asterisk 201 Jul 12 2006 nv-config-555.php
-rwxrwxr-x 1 asterisk asterisk 201 Apr 2 13:08 nv-config.php
-rwxrwxr-x 1 asterisk asterisk 14329 Feb 10 2008 nv-mailcall.php
-rwxrwxr-x 1 asterisk asterisk 6072 Sep 24 2008 nv-mailit.php
-rwxrwxr-x 1 asterisk asterisk 10490 Apr 20 10:34 nv-news.php
-rwxrwxr-x 1 asterisk asterisk 6545 Apr 12 15:10 nv-today.php
-rwxrwxr-x 1 asterisk asterisk 21537 Apr 2 13:07 nv-weather.php
-rwxrwxr-x 1 asterisk asterisk 12043 Apr 2 13:07 nv-weather-world.php
-rwxrwxr-x 1 asterisk asterisk 22243 Apr 2 13:07 nv-weather-zip.php

In each of these scripts, you'll find a variable near the top that controls the TTS engine: $ttspick = 0 ;

To use Cepstral as the TTS engine instead of Flite, just change the $ttspick value from 0 to 1 and save the file.

Email That Works With SendMail. It's always been a knuckle drill to get your new server to reliably send outbound emails. Assuming your Internet service provider doesn't block downstream mail servers, the Orgasmatron Installer will get this working reliably. You can test it out by logging into your server as root and issuing the following command using your real email address. If you get the email, you can move on.
echo "test" | mail -s testmessage yourname@gmail.com

If you didn't get the email, you probably have a provider such as Comcast that blocks port 25 in many areas of the country. The easiest way to solve this is to set up a free Gmail account and use Gmail to deliver outbound messages from your server. This message thread on the PBX in a Flash Forum will walk you through the setup process. There's also a Comcast solution if you'd prefer not to use Gmail.

Stay Tuned. Your eyes are probably glazing over about now. I know mine are. So we'll quit here for today. In our next episode, we'll tackle the rest of the goodies that make up the Orgasmatron Installer. Enjoy!

Continue reading Part III.

Continue reading Part IV (Monday, May 25).


Tip of the Week. Ever wanted a 20-seat conference bridge for under $9 a month with a local phone number in any of 2600+ rate centers all over United States? You can add load balancing and automatic failover for an extra $1 per month. After you use the Orgasmatron Installer, just set up a conference extension in FreePBX and then head over to the PBX in a Flash Forum to read all about the latest rage in DID providers.


whos.amung.us If you're wondering what your fellow man is reading on Nerd Vittles these days, wonder no more. Visit our new whos.amung.us statistical web site and check out what's happening. It's a terrific resource both for us and for you.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 


Some Recent Nerd Vittles Articles of Interest...

Introducing Telephone Reminders for Asterisk 1.4 with Phone and Web Scheduling

If you loved your ‘Speak and Spell’ when you were a kid, then prepare for a childhood flashback… except the Nerd Vittles version is more akin to ‘Spell and Speak.’ Today’s edition of Telephone Reminders for Asterisk® 1.4 not only lets you schedule reminders by phone using your own voice, but now you can use a clever (if we do say so) web interface as well. Just fill out a simple web form to set your reminder or recurring reminder in motion, and Telephone Reminders for Asterisk will swing into action with Flite or Cepstral’s Allison to deliver your typed message to the phone of your choice at the appointed time. It’s the perfect tool for bugging the hell out of your friends without ever picking up the phone. Wanna wake your worst enemy in the middle of the night with a nice reading of the Gettysburg Address? No problem. Actually, there is a slight problem. It’s against the law to make irritating phone calls. But it’ll be great for calling all those politicians back to thank them for the hundreds of telephone messages they delivered while you were eating dinner. And, yes, we’ve preserved all of the recurring reminder functionality that you’ve grown to love. So you can schedule one-time reminders, weekday reminders, daily reminders, weekly reminders, monthly reminders, and annual reminders. Wowee! Our special thanks to the PBX in a Flash Pioneers that really shook the bugs out of our beta release, most of which were thanks to the Deprecation Aficionados on the Asterisk Development Team. STOP DEPRECATING COMMANDS! It has no place in the business community. </rant>

To celebrate the FreePBX Training Seminar being held in our Hometown U.S.A. this week, we’ve even added a new FreePBX Interface to Telephone Reminders for those of you that like FreePBX as much as we do.

While the entire application has been designed for 15-second installation on PBX in a Flash systems, it’ll work equally well on any Asterisk 1.4 system with an Apache web server, PHP, FreePBX, and Flite or Cepstral support. But why make things difficult when PBX in a Flash is so easy to install? And, did we mention? It is and always will be free… with no tricks, ever. Visit pbxinaflash.com to download your copy today.

How It Works. The original functionality of the application has been preserved. Dial 1-2-3 on a phone connected to your Asterisk 1.4 system and enter your password. The default is 12345678. Then you can record a reminder message, specify the phone number to which the reminder should be delivered, schedule the date and time for delivery, and decide whether to enable recurring reminders of one of the flavors outlined above. The Web Interface to Telephone Reminders lets you do exactly the same thing using a web browser. The only difference is that, instead of recording your reminder message, you type it and let Flite or Allison record it for you before the telephone reminder message is delivered. The FreePBX Interface to Telephone Reminders provides you the same web interface inside the FreePBX shell by adding a Reminders option under the Third Party Addon section of the Tools tab. As was true in version 3, both the telephone and web interfaces can be customized to meet your needs. See our detailed tutorial for customization tips. You now can also specify whether to use Flite or Allison for your web reminders. So let’s get started.

Installing Cepstral. If you want a perfect text-to-speech system for applications such as this one, then look no further than Cepstral. And we strongly recommend using the Voice of Allison that we’ve all grown up with in the Asterisk community. It’s the best $30 you’ll ever spend. Just follow our Cepstral installation tutorial, and you’ll be up and running in about 10 minutes. If you’ve already installed Cepstral on your system, then log into your server as root and make this one simple addition so that the Web Interface to Telephone Reminders can find the Cepstral application when it’s time to generate your text-to-speech phone reminder.

ln -s /opt/swift/bin/swift /usr/bin/swift

A Hint for the Early Pioneers. For the many pioneers that helped us get the bugs out of the beta release, THANK YOU! The best way to make sure you have a clean install of today’s release of Telephone Reminders with all the bells and whistles is to delete what you’re using now and start over. We will not delete any scheduled reminders, and it’ll only take a few minutes. Here’s how to clean off the old version on your system. Log into your server as root. First, edit crontab: nano -w /etc/crontab. Look for the two lines that look something like what you see below. Delete the two lines using Ctrl-K. Then save your changes: Ctrl-X, Y, then Enter.

0 0 * * * root /var/lib/asterisk/agi-bin/run_recurring > /dev/null
3 0 * * * root /var/lib/asterisk/agi-bin/run_reminders > /dev/null

Second, edit the extensions_custom config file: nano -w /etc/asterisk/extensions_custom.conf. There are two sections of code that need to be removed. The first will be found near the top of the file in the [from-internal-custom] context. Use Ctrl-W to search for 123, and you should see a clump of code that looks like the following. Use Ctrl-K to delete each of the lines.

exten => 123,1,Answer
exten => 123,2,Wait(1)
exten => 123,3,Authenticate(12345678)
exten => 123,4,Goto(reminder,s,1)

The second section of code to be deleted will be near the bottom of the file. Use Ctrl-W to search for reminder. Delete each line of code including the context headings from the following contexts. Hint: It’s a big chunk of code!

[reminder]
[reminder2]
[reminder3]
[reminder4]
[reminder5]
[reminder6]
[reminder7]
[reminder8]
[reminder9]
[reminder9a]
[remindem]

Then save your changes: Ctrl-X, Y, then Enter.

Now let’s delete another group of files, and you’re all set. Just execute the following commands to delete the original files:

cd /var/lib/asterisk/agi-bin
rm checkdate.php
rm checktime.php
rm reminder.php
rm run_recurring
rm run_reminders
rm /var/www/html/reminders/index.php

If You’re Not Using PBX in a Flash. Only read this section if you’re not installing Telephone Reminders for Asterisk 1.4 on a PBX in a Flash system. It’s still possible to use this application without running it on a PBX in a Flash system. The major difference is that it is up to you to assure that the prerequisites are met and properly functioning. For those running trixbox 2.x systems, that is next to impossible until the trixbox developers decide to support Flite… unless you use the commercial Cepstral product. The good news is that Cepstral apparently works. The other good news is that the telephone module of Telephone Reminders does not require either Flite or Cepstral; however, the Web Interface does. As long as you’re willing to live without the Web Interface (i.e. version 3 functionality), keep reading. First, download both the install script and the payload file and manually determine what needs to be placed where. Our recommendation is to build a /root/reminders directory and execute the following commands to get all of the code:

mkdir /root/reminders
cd /root/reminders
wget http://bestof.nerdvittles.com/applications/reminders4/reminders.pbx
wget http://pbxinaflash.net/scripts/reminders.tgz
tar -zxvf reminders.tgz

Unless you’re using PBX in a Flash or trixbox, carefully read the Telephone Reminders 3.0 tutorial on our Best of Nerd Vittles site. Then review the reminders.pbx script and make any necessary placement adjustments. Next, review the directory tree created below /root/reminders and be sure to copy and create the files and directory structure into the appropriate locations on your system. Make certain that you set ownership and file permissions properly for your system. The following assumptions are made in our setup. The root of the web server is located in /var/www/html, and Apache runs as user asterisk. AGI and PHP scripts for Asterisk are stored in /var/lib/asterisk/agi-bin. Logs for this application are written to /var/log/asterisk. Finally, the PHP and Asterisk configuration files are housed in /etc/asterisk. We don’t provide support for any installs other than on PBX in a Flash systems. Life’s too short!


 
Installation on PBX in a Flash Systems. We’ve saved the best for last. The entire install on a PBX in a Flash system takes about as long as it will take you to cut-and-paste the following commands. 15 seconds should do it! The script reportedly works on trixbox ce systems as well although we have not tested it. Log into your server as root and issue the following commands:
 

cd /root
wget http://bestof.nerdvittles.com/applications/reminders4/reminders.pbx
chmod +x reminders.pbx
./reminders.pbx
amportal restart
ln -s /opt/swift/bin/swift /usr/bin/swift

Test Run of Web Interface to Telephone Reminders. Assuming you have Cepstral running on your server, the web interface is ready to go since it comes configured to use Cepstral as the text-to-speech engine. We’ll show you how to change back to Flite in a minute. Using a web browser, go to the following site using the IP address of your Asterisk server: http://192.168.0.178/reminders/. Fill in the blanks including a reminder message. If you enter a date and time in the past, the phone number you enter will start ringing as soon as you hit the Schedule Reminder button. That’s a good way to be sure everything is working without having to sit and wait for a return call.

When Things Go Wrong. Immediately after scheduling a reminder, be sure to check for the pending reminder by clicking Review Existing Reminders. You should see both a .call file and a .gsm with otherwise matching file names. If the .gsm file is missing, one of two things has happened. If you haven’t installed Cepstral and you haven’t changed the default TTS engine, then solve it by doing one or the other. If Cepstral is working on your system (swift "Hello world." at command prompt), then you may be missing the sox application. To install it, log in as root and type: yum install sox.

Test Run of Telephone Reminders for Asterisk. On PBX in a Flash systems, the application will run once you complete the install as outlined above. Dial 1-2-3 from a phone on your system and enter the default password of 12345678 when prompted. Record a message and press #. When prompted for the phone number to which the reminder should be delivered, press # to choose the number you are calling from. When prompted for the date to deliver the message, press # to choose today. When prompted for the time, enter a 4-digit time with a 2-digit hour and 2-digit minute. Military time (24 hour clock) is fine. Make sure the time is at least 5 minutes in the future, and make sure the time on your watch and server match! Accept the settings, hang up, and wait for your reminder call.

Configuring Telephone Reminders for Asterisk. The phone interface to Telephone Reminders and the web interface are two separate applications so you’ll need to configure both of them. Let’s start with the phone interface. At a minimum, you’ll want to change the default password to something more secure. Edit /etc/asterisk/extensions_custom.conf using either nano or the FreePBX Config Edit option in Tools. Search for 123 and change the password in line 3 which looks like this. If you want to change the phone number to dial to enter reminders, simply replace 123 on every line with the number you wish to use.

exten => 123,3,Authenticate(12345678)

Update: A user on the PBX in a Flash Forum has pointed out that you can substitute the line below for the "Authenticate" line above, and the system will accept the existing voicemail password associated with the phone making the call:

exten => 123,3,vmauthenticate(${CALLERID(number)})

In order to take advantage of the new number conflict checking mechanism in FreePBX 2.4, we also recommend you add a Misc Destination for Telephone Reminders under the Setup tab. The entries should look something like the following:

Description Reminders
Dial 123

Once you’ve made the entry, click the Submit button and then reload the Asterisk dialplan when prompted.

The other changes you can make are accomplished by setting variables in the reminders.php application which is stored in /var/lib/asterisk/agi-bin. For a complete list of the variables and what they mean, take a look at the Telephony Configuration section in our Best of Nerd Vittles article.

Configuring the Web Interface to Telephone Reminders. The variable settings for the web interface are identical to those above. In addition, the text-to-speech engine can be set to Flite (instead of Cepstral) by changing the value of $ttspick from 1 to 0. The file to edit is index.php in /var/www/html/reminders. For more details, take a look at the Web Interface Configuration topic in our Best of Nerd Vittles article. Some may also find it desirable to secure the web interface to Telephone Reminders with a password. Here’s how.

Installing the FreePBX Interface to Telephone Reminders. After installing Telephone Reminders, a new Module will be available for installation in FreePBX by accessing Tools->Module Admin. Scroll to the bottom of the listing and click on Reminders and then the Install button. Once the installation completes, reload the Asterisk dialplan when prompted. A new FreePBX interface to Telephone Reminders then will display in the Third Party AddOn listing under the Tools tab in FreePBX.

Special Thanks. We want to extend our special thanks to Sangoma for their generous, unsolicited contribution to the PBX in a Flash project. While everything we produce is freely given for all to use, projects such as Nerd Vittles and PBX in a Flash still require money to fund research and product development. On behalf of the entire PBX in a Flash Development Team, thank you. SANGOMA ROCKS!!

Best of Nerd Vittles Tutorial. For those of you that prefer to read manuals, we also have a new Telephone Reminders 4.0 tutorial on our Best of Nerd Vittles site.

Need More Help? That’s what the PBX in a Flash Forum is for! Even if you don’t need help, stop by and let us know what’s on your Wish List! And remember, the Donate button at the top of Nerd Vittles makes wishes come true. Enjoy!


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 


Some Recent Nerd Vittles Articles of Interest…

Text-to-Speech Bonanza with Cepstral and Asterisk 1.4

There's almost too much to celebrate today. It's Valentine's Day, of course. You didn't forget, did you? And PBX in a Flash turns 3 months old with well over 1,000 downloads a week under our belt. Wow! Who woulda thunk? Thanks, Joe! Thanks, Tom! Get the latest scoop on our forums.

We're pleased to introduce our first hosting service provider, Aretta Communications, for those that would prefer to run PBX in a Flash in a secure, hosted environment with regular backups. Your hosted service in Atlanta will be one millisecond away from the Internet backbone. You can't do any better! And, we're excited to welcome VoipQ as our new European gateway host and contributor for PBX in a Flash. You now can access and download all of our resources through their 100 megabit connection in The Netherlands: pbxinaflash.nl. And there are two new European domains that link back to our main pbxinaflash.com site as well: pbxinaflash.eu and pbxinaflash.be. Our special thanks to Dillard and VoipQ for their support! We're also delighted to announce VoxZone as our new MidWest host for PBX in a Flash downloads. Thanks, Dinesh! And finally, we want to welcome Ad Hoc Electronics as our third West Coast host for PBX in a Flash downloads. Thanks, Jeremy! We hope you'll keep all of these open source supporters in mind when you're shopping for VoIP services and hardware.

To celebrate today's events, we thought it'd be a perfect time to introduce five newly customized Nerd Vittles applications for PBX in a Flash to take advantage of the Cepstral text-to-speech engine with Allison that we introduced last month. So today we bring you Weather by Airport Code, Weather by Zip Code, Worldwide Weather, NewsClips, and MailCall. The weather apps are self-explanatory. NewsClips reads Yahoo news feeds on any of 10 different news topics, and MailCall reads you your email by phone for one or many POP3 or IMAP email accounts. Now these new applications support both Flite and Cepstral. Once you hear Allison reading the news and your email, you'll never go back to Egor. And we're pleased to announce that we'll have a web interface to Telephone Reminders in a few short weeks. With the new Cepstral technology, you'll be able to generate single or recurring text-to-speech reminders from your web browser with delivery at the dates and times you specify... to any phone in the world. Whoa!! As a birthday bonus for Nerd Vittles readers, you can email Cepstral for a whopping, once-in-a-lifetime 15% discount code to use on your next Cepstral download and purchase.

For those using PBX in a Flash (and why wouldn't you!), all of these new applications are a 15-second install away using the downloadable scripts from the Nerd Vittles script repository. And, of course, there are dozens of additional scripts available from our PBX in a Flash Script Site which is run by Tom King.

First Install Procedure. If you've never installed an application that's on the menu today, make certain that you have first installed Cepstral. Our tutorial is here, and it only takes a few minutes. Then the process is painless with PBX in a Flash. Just log into your server as root and type the following commands... depending upon the application you wish to install. Do NOT use this procedure if you have previously installed the application on your PBX in a Flash server. We'll get to that in a minute. As mentioned, each install takes about 15 seconds. Then take a look at the instructions by clicking on the application link on the Best of Nerd Vittles site.

Weather by Airport Code. After logging into your server as root, type the following commands. Documentation is here.

cd /root
wget http://bestof.nerdvittles.com/applications/weather-airport/weather.pbx
chmod +x weather.pbx
./weather.pbx

Weather by Zip Code. After logging into your server as root, type the following commands. Documentation is here.

cd /root
wget http://bestof.nerdvittles.com/applications/weather-zip/weatherzip.pbx
chmod +x weatherzip.pbx
./weatherzip.pbx

Worldwide Weather. After logging into your server as root, type the following commands. Documentation is here.

cd /root
wget http://bestof.nerdvittles.com/applications/weather-world/weatherworld.pbx
chmod +x weatherworld.pbx
./weatherworld.pbx

NewsClips from Yahoo. After logging into your server as root, type the following commands. Documentation is here.

cd /root
wget http://bestof.nerdvittles.com/applications/newsclips/newsclips.pbx
chmod +x newsclips.pbx
./newsclips.pbx

MailCall for Asterisk®. After logging into your server as root, type the following commands. Documentation is here.

cd /root
wget http://bestof.nerdvittles.com/applications/mailcall/mailcall.pbx
chmod +x mailcall.pbx
./mailcall.pbx

Choosing Flite or Cepstral. As installed, the five applications all rely upon Flite as the default text-to-speech (TTS) engine. If you'd like to change it, here's how. There are two places in which text-to-speech is used for these applications. The first is a little code that is inserted in your dialplan in the /etc/asterisk/extensions_custom.conf file. The second is in the PHP code that does the heavy lifting for each application. You can choose Cepstral as the TTS engine in either or both places for each application. We'll walk you through modifying the Weather by Airport Code application to support Cepstral, but the process is identical for the other applications. The two things you'll need to know to make the changes, are the number to dial for the application, e.g. 611 for Weather by Airport Code, and the name of the PHP file, e.g. nv-weather.php. Here's the info for all five apps just so you don't have to do any hunting:

  • Weather by Airport Code... 611, nv-weather.php
  • Weather by Zip Code... 947, nv-weather-zip.php
  • Worldwide Weather... 612, nv-weather-world.php
  • NewsClips from Yahoo... 511*, nv-news.php (No editing of dialplan 511 code is required)
  • MailCall for Asterisk... 555, nv-mailcall.php

Changing DialPlan Code to Cepstral. Log into your server as root and edit the extensions_custom.conf file in /etc/asterisk: nano -w extensions_custom.conf. Now search for the number to dial from the table above. For example, for Weather by Airport Code, you'd press Ctrl-W, then type 611, then press Enter. You'll be positioned on code that looks like the following:1

exten => 611,1,Answer
exten => 611,2,Wait(1)
exten => 611,3,Set(TIMEOUT(digit)=7)
exten => 611,4,Set(TIMEOUT(response)=10)
exten => 611,5,Flite("At the beep enter the three character ↩
airport code for the weather report you wish to retrieve.")
;exten => 611,5,Swift("At the beep enter the three character ↩
airport code for the weather report you wish to retrieve.")
exten => 611,6,Read(APCODE,beep,3)
exten => 611,7,Flite("Please hold a moment while ↩
we contact the National Weather Service for your report.")
;exten => 611,7,Swift("Please hold a moment while ↩
we contact the National Weather Service for your report.")
exten => 611,8,AGI(nv-weather.php|${APCODE})
exten => 611,9,NoOp(Wave file: ${TMPWAVE})
exten => 611,10,Playback(${TMPWAVE})
exten => 611,11,Hangup

Notice the semicolons at the beginning of the two lines of code. Those indicate comments in the PHP world, and those lines are not executed. You'll note that both of the commented lines include the word Swift which, as you learned from the installation tutorial, activates the Cepstral TTS engine. Immediately under each of those lines is an identical line to activate Flite. So, to swap TTS engines, simply comment out the two Flite lines and uncomment the two Swift lines. When you're finished, your code should look like this:

exten => 611,1,Answer
exten => 611,2,Wait(1)
exten => 611,3,Set(TIMEOUT(digit)=7)
exten => 611,4,Set(TIMEOUT(response)=10)
;exten => 611,5,Flite("At the beep enter the three character ↩
airport code for the weather report you wish to retrieve.")
exten => 611,5,Swift("At the beep enter the three character ↩
airport code for the weather report you wish to retrieve.")
exten => 611,6,Read(APCODE,beep,3)
;exten => 611,7,Flite("Please hold a moment while we ↩
contact the National Weather Service for your report.")
exten => 611,7,Swift("Please hold a moment while we ↩
contact the National Weather Service for your report.")
exten => 611,8,AGI(nv-weather.php|${APCODE})
exten => 611,9,NoOp(Wave file: ${TMPWAVE})
exten => 611,10,Playback(${TMPWAVE})
exten => 611,11,Hangup

Don't change anything else. When your code looks like ours, save your changes by pressing Ctrl-X, then Y, then the Enter key. Reload your Asterisk dialplan to make the changes take effect:

asterisk -rx "dialplan reload"

Changing PHP Application Code to Cepstral. Log into your server as root and issue the following commands using the name of the PHP file for the application you want to change:

cd /var/lib/asterisk/agi-bin
nano -w nv-weather.php

At the top of the file, you'll notice several lines with variables that can be changed.

//-------- DON'T CHANGE ANYTHING ABOVE THIS LINE ----------------

$debug = 1;
$newlogeachdebug = 1;
$emaildebuglog = 0;
$email = "yourname@yourdomain" ;
$ttspick = 0 ;

//-------- DON'T CHANGE ANYTHING BELOW THIS LINE ----------------

To activate the Cepstral TTS engine, just change the value for $ttspick from 0 to 1. Then save your changes: Ctrl-X, Y, then Enter. Now try out your fancy new weather application using Cepstral by dialing 611 from any phone on your PBX in a Flash system.

Upgrading from Previous Installs. If you have already installed one or more of these five Nerd Vittles applications, here's a quick tutorial on how to update your code to the latest and greatest with full Cepstral support. We've already preconfigured the code below to use Cepstral. If you want to use Flite for some of the apps, make the changes following the instructions above. Log into your server as root and issue the following commands:

cd /root
mkdir cepstral
cd cepstral
wget http://nerdvittles.com/wp-content/cepstral.zip
unzip cepstral.zip

For each application that you've already installed, copy the PHP file from /root/cepstral to /var/lib/asterisk/agi-bin and then set the proper ownership of the new files:

cd /root/cepstral
cp nv-mailcall.php /var/lib/asterisk/agi-bin/nv-mailcall.php
cp nv-news.php /var/lib/asterisk/agi-bin/nv-news.php
cp nv-weather.php /var/lib/asterisk/agi-bin/nv-weather.php
cp nv-weather-zip.php /var/lib/asterisk/agi-bin/nv-weather-zip.php
cp nv-weather-world.php /var/lib/asterisk/agi-bin/nv-weather-world.php
cd /var/lib/asterisk/agi-bin
chown asterisk:asterisk nv*.php
chmod 775 nv*.php

Now we need to edit /etc/asterisk/extensions_custom.conf and clean out the old dialplan code for these applications and then replace it with the new dialplan code. First, make a duplicate of the file in case something goes wrong:

cp /etc/asterisk/extensions_custom.conf /etc/asterisk/extensions_custom.conf.bak

Then edit the file: nano -w /etc/asterisk extensions_custom.conf and search (Ctrl-W) for the beginning of each chunk of dialplan code using the phone numbers for the various applications that are shown above in the Choosing Flite or Cepstral section, e.g. 611, 947, 612, 511, and 555. Using Ctrl-K, delete each subsequent line of dialplan code that contains the phone number for that application until you've removed the entire section of code for each application. Then search for the next phone number and repeat the process. Once you've deleted all of the existing code for these five applications, cut-and-paste the following code just below [from-internal-custom] at the top of the file. NOTE: Do NOT paste in a section of the code below if you haven't previously installed that particular application!

; -- Begin New Nerd Vittles Code to Support Cepstral TTS

; Worldwide Weather Forecasts
exten => 612,1,Answer
exten => 612,2,Wait(1)
exten => 612,3,Set(TIMEOUT(digit)=7)
exten => 612,4,Set(TIMEOUT(response)=10)
;exten => 612,5,Flite("At the beep enter the code for the weather report you wish to retrieve.")
exten => 612,5,Swift("At the beep enter the code for the weather report you wish to retrieve.")
exten => 612,6,Read(APCODE,beep,1)
;exten => 612,7,Flite("Please hold a moment while we retrieve your report.")
exten => 612,7,Swift("Please hold a moment while we retrieve your report.")
exten => 612,8,AGI(nv-weather-world.php|${APCODE})
exten => 612,9,NoOp(Wave file: ${TMPWAVE})
exten => 612,10,Playback(${TMPWAVE})
exten => 612,11,Hangup

; Weather by Zip Code
exten => 947,1,Answer
exten => 947,2,Wait(1)
exten => 947,3,Set(TIMEOUT(digit)=7)
exten => 947,4,Set(TIMEOUT(response)=10)
;exten => 947,5,Flite("At the beep enter the five digit code for the weather report you wish to retrieve.")
exten => 947,5,Swift("At the beep enter the five digit code for the weather report you wish to retrieve.")
exten => 947,6,Read(ZIPCODE,beep,5)
;exten => 947,7,Flite("Please hold a moment while we contact the National Weather Service for your report.")
exten => 947,7,Swift("Please hold a moment while we contact the National Weather Service for your report.")
exten => 947,8,AGI(nv-weather-zip.php|${ZIPCODE})
exten => 947,9,NoOp(Wave file: ${TMPWAVE})
exten => 947,10,Playback(${TMPWAVE})
exten => 947,11,Hangup

; Weather by Airport Code
exten => 611,1,Answer
exten => 611,2,Wait(1)
exten => 611,3,Set(TIMEOUT(digit)=7)
exten => 611,4,Set(TIMEOUT(response)=10)
;exten => 611,5,Flite("At the beep enter the three character airport code for the weather report you wish to retrieve.")
exten => 611,5,Swift("At the beep enter the three character airport code for the weather report you wish to retrieve.")
exten => 611,6,Read(APCODE,beep,3)
;exten => 611,7,Flite("Please hold a moment while we contact the National Weather Service for your report.")
exten => 611,7,Swift("Please hold a moment while we contact the National Weather Service for your report.")
exten => 611,8,AGI(nv-weather.php|${APCODE})
exten => 611,9,NoOp(Wave file: ${TMPWAVE})
exten => 611,10,Playback(${TMPWAVE})
exten => 611,11,Hangup

; NewsClips from Yahoo
exten => 511,1,Answer
exten => 511,2,Wait(1)
exten => 511,3,Set(TIMEOUT(digit)=7)
exten => 511,4,Set(TIMEOUT(response)=10)
exten => 511,5,AGI(nv-news.php|topstories)
exten => 511,6,NoOp(Wave file: ${TMPWAVE})
exten => 511,7,Playback(${TMPWAVE})
exten => 511,8,Wait(1)
exten => 511,9,Hangup

; MailCall for Asterisk 1.4
exten => 555,1,Answer
exten => 555,2,Wait(1)
exten => 555,3,Set(TIMEOUT(digit)=7)
exten => 555,4,Set(TIMEOUT(response)=10)
;exten => 555,5,Flite("At the beep enter your e-mail password.")
exten => 555,5,Swift("At the beep enter your e-mail password.")
exten => 555,6,Read(PWCODE,beep,4)
;exten => 555,7,Flite("Please hold a moment.")
exten => 555,7,Swift("Please hold a moment.")
exten => 555,8,AGI(nv-mailcall.php|${PWCODE})
;exten => 555,9,Flite("Thank you for calling. Good bye.")
exten => 555,9,Swift("Thank you for calling. Good bye.")
exten => 555,10,Hangup

; -- End New Nerd Vittles Code to Support Cepstral TTS

Once you get all of the code pasted into extensions_custom.conf, save your changes: Ctrl-X, Y, then Enter. Then reload your dialplan and add a symbolic link to Cepstral:

asterisk -rx "dialplan reload"
ln -s /opt/swift/bin/swift /usr/bin/swift

FreePBX Patch. Something about our applications gives FreePBX fits when you attempt to do a subsequent dialplan reload. So here's the patch to fix that. While still logged in as root, issue the following commands:

cd /root
wget http://pbxinaflash.net/scripts/fixconf.zip
unzip fixconf.zip
chmod +x fixconf.sh
./fixconf.sh
chmod 1777 /tmp

Aretta Communications for Hosted PBX in a Flash Service. We've saved the best for last today. Many of you have been asking for recommendations on hosted PBX service. And today we finally have one for you. Aretta Communications is the premier provider of hosted Asterisk solutions worldwide. Based in telecom-savvy Atlanta and pioneering the business VoIP triple play, Aretta is the first provider to combine hosted Asterisk-based servers with an integrated, high voice quality SIP Trunking offering, and pre-configured VoIP handsets that arrive at your door ready to plug in and start making calls. No longer do you have to try and cobble together components from different places for your PBX in a Flash server. It's finally all available from one company that understands Asterisk and has the flexibility and in-house expertise to work with any kind of custom configuration or application. Every hosted PBX in a Flash server sits in secure telco hotels with UPS power and on-net connectivity to the major Tier 1 providers.

Using software virtualization, Aretta is able to dramatically reduce the cost of a hosted PBX in a Flash server. The hosted offerings scale in a virtual environment to up to 32 simultaneous calls per virtual server. Beyond 32 calls, dedicated dual processor PBX in a Flash servers are available that can handle 48 to 96 simultaneous calls. These can be stacked to provide high density systems. For those large hosted TDM deployments, Aretta can handle on-net termination of T1 or T3 voice circuits into dedicated PBX in a Flash servers with TDM cards. Aretta has a standard weekly backup offering for all of its hosted servers and nightly backups can also be accommodated. Backups can even be sent to geographically disperse datacenters for the ultimate in disaster recovery.

Aretta literally is changing the game in the hosted PBX market by pioneering a brand new pricing model. Forget the old per-extension pricing we've all seen where you get nickeled and dimed for every little feature you want to add to your individual lines. Finally, you pay one low monthly price for an entire system with a complete feature set and the ability to add an unlimited number of extensions. Aretta's pricing is customer-friendly, based on the number of active calls going through the system at any given time. This allows you to start small and grow as needed. PBX in a Flash hosted plans start at 2 channels and expansion is easy and automatic to four, eight, sixteen channels and beyond. Every feature within Asterisk is included in the monthly price. The only a-la-carte option is for help configuring your system. This is available as a one-time initial configuration option when you sign up for your hosted PBX in a Flash system or on a per-incident basis once it is installed.

The NetSIP trunking offering from Aretta provides SIP origination and termination in a variety of configurations. You can choose to pay by the minute or reduce your calling rates with bundled packages of minutes. Unlimited flat-rate inbound-only DIDs are available in 46 countries worldwide. DIDs in over 6300 rate centers in the United States are available in either 'Local Inbound' or 'Enhanced Local Service' configurations. Aretta has also developed a streamlined online number porting system to allow for automatic LOA generation making it easy to port numbers from other providers.

Aretta also offers pre-configured Polycom and Linksys handsets through its online store that arrive at your doorstep ready to plug-in and start calling. Priced competitively with the added bonus of coming configured, IP phone configurations are done automatically while the devices are in transit. Through its extensive customer deployments, Aretta has navigated the QoS and NAT related issues that can occur with typical IP-PBX deployments. Aretta builds and sells pre-configured edge routers based on the open source DD-WRT software to provide a low-cost premise edge device to keep local extension calls on the LAN and provide a great solution for voice QoS.

Last, but not least, in addition to hosted PBX in a Flash systems, Aretta has the flexibility and expertise to build and host custom applications using PBX in a Flash as the core underlying technology. Examples include:

  • Hosted VICIDIAL - outbound and predictive dialing based on Asterisk
  • Hosted A2Billing - the leading open source prepaid and calling card platform for Asterisk
  • High Availability Asterisk - two separate geographically disperse Asterisk servers running in a High Availability configuration with failover
  • Custom IVR development
  • IAX Trunking

If you can dream it and run it with PBX in a Flash, Aretta can build and host it for you. So what are you waiting for, visit Aretta Communications today and take advantage of their special offer for new PBX in a Flash customers.

Nerd Vittles Cepstral Showdown with Allison TTS (courtesy of les.net). You now can take today's Nerd Vittles projects for a test drive... by phone! The current demos include all five new applications preconfigured for Cepstral with the Allison TTS voice: (1) MailCall for Asterisk with password 1234 (retrieve POP3 email by phone), (2) NewsClips for Asterisk (latest news headlines in dozens of categories), (3) Weather Forecasts by U.S. Airport Code, (4) Weather Forecasts by U.S. ZIP Code, and (5) Worldwide Weather Forecasts.

Here's where it gets interesting. We decided to let you compare the voice quality of the calls using our Comcast home cable service versus Aretta Communications' Hosted PBX in a Flash service. The same code is running on both systems and both systems are using les.net for origination. The only difference is that our home system is running on a $199 WalMart Green PC. To make things interesting, we're not going to tell you which phone number goes to which location. Clue #1: Neither system is actually in the Nerd Vittles Valley Girl Headquarters in California. Clue #2: One system may or may not be in the same city as its area code. Give us a little credit. We're smart enough to assign DIDs to any PBX we happen to like... especially if it might confuse our readers. So don't just pick a favorite number because you happen to know that Aretta is in Atlanta and so is the 678 area code. We're tempted to actually swap the DIDs around once or twice just to keep everyone on their toes. And, of course, Comcast may have some additional tricks up their sleeve to make this more interesting.

So... let the voting begin. Dial away on the two numbers shown above and report your results in a comment. If you get a message that Allison isn't available or if you just get silence, simply try your call a little later. We weren't smart enough to limit inbound calls to one channel, and FreePBX doesn't seem to be able to do it either. We can't wait to read what our judges have to say. Enjoy!


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 


Some Recent Nerd Vittles Articles of Interest...

  1. Join the following line with the original line whenever you encounter the ↩ character. []