Home » Posts tagged 'tts' (Page 5)
Tag Archives: tts
VoIP Hardware Deal of the Year: Meet the $20 Pogoplug 4 with Incredible PBX
This week’s project is not for mere mortals. It’s for techies that also happen to be cheapskates frugal. You may recall the Pogoplug from yesteryear. Well, the Pogoplug 4 still is around and can be yours for under $20 with free 2-day shipping if you’re an Amazon Prime member. But the clock is ticking on these bad boys. Once they’re gone, they’re gone.1
UPDATE: There’s more good news. Now the cost with the Pogoplug Backup & Sharing model is just $10.95! For our purposes, the main difference is one less USB port, but it still has one which is all you need for wireless networking.
So we took the dare and decided to see whether the Pogoplug 4 could actually run Asterisk 11® and FreePBX® 2.11 and Incredible PBX™. And guess what? It may not be pretty, but it works. If you happen to have a Google Voice number and a kid away at school or a grandma in a distant city with an Internet connection or if you have a vacation home or rental property that needs phone service (but not often), then this $20 project may be for you. Configure the device, add a cheap SIP phone, and presto! You’ve got free calling in the U.S. and Canada with your very own phone number for as long as you have Internet service and Google chooses to keep paying your phone bill. 😉
Don’t take our word for it. Call our Pogoplug for a quick IVR demo compliments of Allison:
- Call by Name (just say "American Airlines" to try it out)
- Conference Call (enter 1234# to join the conference)
- Wolfram Alpha (try this: "What planes are overhead?")
- Lenny (the Telemarketers’ Worst Nightmare)
- Yahoo News Headlines
- Weather Forecasts (say a city and state or country)
- Today in History
- Ring the House Phones (sends you back to Lenny)
Our tip of the hat this week goes to Qui Hong without whom none of this would have been possible. His tutorial on transforming the Pogoplug 4 into a Debian server is a true masterpiece. And his blog is where we begin our adventure once you have the correct Pogoplug 4 in hand: POGO-V4-A3-01. Our link has the correct one, but double-check the Model Number just to be sure.
Converting the Pogoplug 4 into a Debian Platform
Once you have your Pogoplug, you’ll need to scurry over to Qui Hong’s blog and carefully work through his tutorial to convert your Pogoplug into a Debian server. As we’ve said many times before, if you can follow a cookie recipe and end up with edible cookies, then you can do this. Just be very careful of typos. One bad keystroke can turn your Pogoplug into a burnt cookie. Then it becomes a $40 project. 🙂
Installing Incredible PBX 11.12.0 on the Pogoplug 4
Once your Pogoplug has been Debianized, there are five simple steps to get Incredible PBX up and running on your Pogoplug 4:
- Purchase a storage device
- Download Incredible PBX image
- Untar the image on your desktop
- Burn the image to an SD card
- Insert the SD card in the Pogoplug and boot
Choosing a Storage Platform. The first step is to purchase a suitable SD card. We recommend at least a 16GB Class 10 card from Transcend, SanDisk, or Kingston. All of them are about $10 on Amazon and many include free 2-day shipping for Prime customers.
Downloading Incredible PBX for Pogoplug. From your favorite desktop computer, download the latest build of Incredible PBX from SourceForge. Depending upon your network connection and the SourceForge mirror, it can take awhile. It’s a whopping 1.5GB image!
Untarring Incredible PBX for Pogoplug. Depending upon your desktop platform, untarring incrediblepbx.4.pogoplug.D7.latest.tar.gz is as simple as double-clicking on it in the Downloads folder (on a Mac). On the Windows platform, here are 3 utilities that will do the job. On a Linux desktop, open a Terminal window and…
tar zxvf incrediblepbx.4.pogoplug.D7.latest.tar.gz
Burning the Incredible PBX image to SD card. Once you’ve untarred the file, you’ll find two scripts that make burning the image to an SD card simple if you’re on a Mac or Linux desktop. On a Windows machine, it’s a little more complicated. Most SD cards come preformatted with a DOS partition so your Windows machine should recognize the SD card when it’s inserted. If not, format the card using a utility such as SD Card Formatter. Next, you’ll need Win32 Disk Imager to burn pogoplug.img to your card. Once the image has been transferred, gracefully unmount the card from your desktop.
Booting Incredible PBX on the Pogoplug. Insert the SD card (electronics side down) into your Pogoplug 4. Then apply power to the device after connecting an Ethernet cable to a network with Internet connectivity that can also hand out DHCP addresses. Visit your router to decipher the IP address assigned to the Pogoplug and reserve the IP address so that it doesn’t suddenly change down the road. Log into Incredible PBX as root with pogoplug as your password. Your SSH credentials, Asterisk DUNDI secrets, logs, and network connection options will be initialized. When prompted, press Enter to reboot your server. With some SD cards, you may find yourself waiting an eternity for the promised reboot. After seeing the "rebooting" message, count to ten. If your server still hasn’t rebooted, remove and reapply power. This quirk goes away after the first reboot.
After the reboot, log in again as root with password: pogoplug. Your firewall setup will be initialized to lock down your whitelist to your server’s public and private IP addresses AND the IP address of the machine from which you’re logging in. All of your FreePBX passwords will be randomized as well. The whole process only takes a few seconds.
When the second pass configuration is complete, you will be greeted by a welcoming message. STOP and read it. It has loads of important information about your server’s configuration and your next steps. Press ENTER to review status:
The Next 10 Steps. Before you do anything else, complete the following steps. It only takes a minute to secure and properly configure your server:
- Change your root password: passwd
- Change your FreePBX admin password: /root/admin-pw-change
- Set your correct time zone: /root/timezone-setup
- Expand partition to match SD card size: /root/resize-partition
- Add any desired IP addresses to WhiteList: /root/add-ip
- Decipher the randomized password for extension 701. It’s in the data field:
mysql -uroot -ppassw0rd -e "select * from asterisk.sip where id=701 and keyword='secret'"
- Decipher the randomized voicemail password for extension 701. It’s the first entry:
cat /etc/asterisk/voicemail.conf | grep 701 | cut -f 3 -d " "
- Enable Windows Networking, if desired: /root/samba-enable.sh
- Configure PPTP Network, if desired: cat /root/pptp-faq
- Check status to be sure everything is working: status
A Few Important Tips. Every operating system and service provider has their quirks. Ask Bill Gates! Debian and especially Comcast are no different. Fortunately, with Debian, it’s a very short list.
1. Use the following commands (only!) to shutdown and restart your server: halt and reboot. These commands are reworked in Incredible PBX to gracefully shutdown important services so that files don’t get damaged. Please use them!
2. If you ever want to move your server to a different network, complete these steps before you leave your existing network. First, using add-ip or add-fqdn, add the new WhiteList addresses for your new location using Option 0 (all privileges). Otherwise, you won’t be able to access your server once you move. Then issue the commands below. This will trigger a new Phase I update (outlined above) on the default network (eth0) using DHCP the next time you boot your Pogoplug.
touch /etc/update_hostconfig halt
3. You really do need email connectivity to get the most out of Incredible PBX. It’s the way you receive important notifications from FreePBX, and it’s also how voicemail messages are delivered. From the Linux CLI, test your server to be sure you can send emails reliably:
echo "test" | mail -s testmessage yourname@gmail.com
After checking your spam folder, if you really didn’t get the email, it may be that your service provider is blocking downstream SMTP traffic. You can use your provider’s SMTP server as a smarthost to send out mail with Exim4. Just run the following program to reconfigure the Exim mail server: dpkg-reconfigure exim4-config. Choose the SmartHost option and enter your provider’s SMTP address, e.g. smtp.comcast.net or smtp.knology.net. Exim will restart.
4. If you’d like to activate ODBC support for Asterisk including our ODBC sample applications including Speed Dial, here are the steps. Log into your server as root and issue the following commands:
cd /root wget http://incrediblepbx.com/odbc-pogoplug.tar.gz tar zxvf odbc-pogoplug.tar.gz rm odbc-pogoplug.tar.gz ./mysql-sample ./mysql-odbc ./odbc-gen.sh
Now you can try things out by dialing 222 from a phone connected to your server. When prompted for the employee number, enter 12345. Or dial 223 and, when prompted for the AsteriDex Dial Code, enter 263 (the first 3 letters of the American Airlines entry).
5. Want a list of your completed calls without using FreePBX? It’s easy:
mysql -uroot -ppassw0rd -e "SELECT SUBSTRING(calldate,6,11) AS calldate,clid,src,dst,duration from asteriskcdrdb.cdr WHERE disposition='ANSWERED' ORDER BY calldate DESC"
6. There may be situations in which it is desirable to use wireless networking instead of a wired connection with your Pogoplug. For under $10, you now can add WiFi. Here’s our post on the PIAF Forum to show you how.
Managing FreePBX with Incredible Backup and Restore
Unlike other releases of Incredible PBX, the backup and restore tools can be helpful on the Pogoplug platform. Even though Asterisk runs smoothly, calls sound great, and performance is pretty amazing, the FreePBX GUI is usable but a bit sluggish on the Pogoplug platform. If the performance bothers you, there’s a workaround. Create an Incredible Backup image of your Pogoplug, restore that image on a more normal Ubuntu 14 platform with ample RAM, and then make your FreePBX changes there using the FreePBX GUI. When you’re finished, make a backup of the changes, and then restore that backup to your Pogoplug. It sounds more complicated than it actually is. In essence, you’ll be transforming FreePBX into an Asterisk code generator. In fact, once a backup is restored, you can shut down your web server, and almost everything will still work. We were able to perform the entire procedure including updating all of the FreePBX modules and adding a Google Voice trunk in about 15 minutes using a snapshot of an Incredible PBX for Ubuntu 14 droplet we previously had created. Here are the actual steps to perform the first time:
1. Take an image snapshot of your server with Incredible Backup: /root/incrediblebackup
HINT: No need to do it initially. One is included: /backup/DU-2014.09.07.19.46-A11.12.0-F2.11-I11.12.0.tar.gz
2. Create a 512MB Droplet on Digital Ocean using Ubuntu 14 and Incredible PBX for Ubuntu. Follow the Nerd Vittles tutorial which also has a signup link to assist our projects. Coupon code: ALLSSD10 gets you a $10 credit this month. Once you’re up and running, you may want to take a snapshot so that you can quickly recreate droplets while also avoiding hourly charges for the one you’ve previously built (whether running or not!). Digital Ocean 512MB droplets cost less than a penny an hour so this is not a big ticket item. When you finish with the droplet, just destroy it (once you’ve made a snapshot!). Then the money meter stops. First time build takes about 30 minutes.
3. After creating /backup folder on DO droplet, copy your backup image from step #1 to this folder.
4. Restore the image: /root/incrediblerestore /backup/DU-somefilename.tar.gz
5. Open FreePBX on DO with a browser and log in as admin with your admin password.
6. Make all the changes desired using the tutorial below. Reload FreePBX (red bar) when prompted before exiting!
7. Make a DO backup of your new setup: /root/incrediblebackup
8. Copy the DO backup file to /backup on your Pogoplug.
9. Restore the DO backup: /root/incrediblerestore /backup/DU-somefilename.tar.gz
10. Log out and back into your Pogoplug as root.
Getting Started with VoIP and FreePBX
To access FreePBX, just point to the IP address of the server. The main control panel looks like this:
As configured, the default user account for FreePBX administration is admin. The password is whatever you set in the initial setup above. If you ever forget it, you can reset it easily: /root/admin-pw-change.
For those new to Asterisk and FreePBX, here’s a brief primer on what needs to happen before you can make and receive calls. If you have an existing Google Voice account, lucky you. This gets you a phone number for your PBX so people can call you. And it provides a vehicle to place free calls to plain old telephones in the U.S. and Canada so long as Google continues to provide the free service.
If you don’t have a Google Voice account or a shiny new smartphone, then you will need to purchase a SIP trunk from one of the numerous vendors around the world. Our favorite (because they provide terrific service at a modest price AND provide financial support to the Nerd Vittles, PBX in a Flash, and Incredible PBX projects) is Vitelity. Their special rates and a link for a discount are included at the end of today’s article.
Unlike POTS phone service from Ma Bell, the SIP World is a little different. First, you don’t need to put all your eggs in one basket. A trunk that gets you a phone number for incoming calls need not be with the same vendor that provides a trunk to place outbound calls. In fact, you may want multiple trunks for outbound calls just to have some redundancy. A list of our favorites in the U.S. and Canada is available on the PIAF Forum. Of course, there also are providers that offer all-you-can-eat calling plans. Two of our favorites are Vestalink and Future-Nine.
You’ll also need a softphone or SIP phone to actually place and receive calls. YATE makes a free softphone for PCs, Macs, and Linux machines so download your favorite and install it on your desktop.
Phones connect to extensions in FreePBX to work with Incredible PBX. Extensions talk to trunks (like Google Voice) to make and receive calls. FreePBX uses outbound routes to direct outgoing calls from extensions to trunks, and FreePBX uses inbound routes to route incoming calls from trunks to extensions to make your phones ring. In a nutshell, that’s how a PBX works.
There are lots of bells and whistles that you can explore down the road including voicemail, conferencing, IVRs, autoattendants, paging, intercoms, CallerID lookups, announcements, DISA, call parking and pickup, queues, ring groups, and on and on. And then there’s all of the Incredible PBX applications which are covered separately in this Nerd Vittles article. Once you’re comfortable with one server, you or your company will want some more. This Nerd Vittles article will walk you through interconnecting them into a seamless mesh network so that you can call from one office to another transparently. Yes, those articles were written for the Raspberry Pi. But the beauty of Incredible PBX is that it runs (almost) identically on every server platform.
Here’s our 7-Step Checklist to Getting Started with FreePBX:
1. Setting Up Google Voice. If you want free calling in the U.S. and Canada, then you’ll need an existing Google Voice account that includes the Google Chat feature. You’ll need one dedicated to Incredible PBX, or it won’t work. Log out after setting up the new Google Voice account! Also note that Google Voice may cease to function at any time after May 15, 2014. You can read all about it here.
- Log into existing Google Voice account
- Enable Google Chat as Phone Destination
- Configure Google Voice Calls Settings:
- Call Screening – OFF
- Call Presentation – OFF
- Caller ID (In) – Display Caller’s Number
- Caller ID (Out) – Don’t Change Anything
- Do Not Disturb – OFF
- Call Options (Enable Recording) – OFF
- Global Spam Filtering – ON
- Place test call in and out using GMail Call Phone
- Log out of your Google Voice account
If this fails, then Google may have blocked your IP address. Here’s how to unblock it.
2. Activating a Google Voice Trunk. To create a Trunk in FreePBX to handle calls to and from Google Voice, you’ll need three pieces of information from the Google Voice account you set up above: the 10-digit Google Voice phone number, your Google Voice account name, and your Google Voice password. Choose Connectivity -> Google Voice (Motif) from the FreePBX GUI. The following form will appear:
Fill in the blanks with your information and check only the top 2 boxes. If your Google Voice account name ends in @gmail.com, leave that out. Otherwise, include the full email address. Then click Submit Changes and Apply Config.
To activate a Google Voice trunk, you must restart Asterisk on the Pogoplug platform: amportal restart.
3. Setting a Destination for Incoming Calls. Now that you’ve created your Google Voice Trunk, we need to tell FreePBX how to process inbound calls when someone dials your Google Voice number. There are any number of choices. You could simply ring an extension. Or you could ring multiple extensions by first creating a Ring Group which is just a list of extension numbers. Or you could direct incoming calls to an Interactive Voice Response (IVR) system. By default, Incredible PBX is configured to route all incoming calls to extension 701. You can change the setting whenever you like by choosing Connectivity -> Inbound Routes -> Default. In the Set Destination section of the form, change the target destination from the pull-down lists.
Always click Submit and then click Apply Config to save new settings in FreePBX. This is especially important on the Pogoplug platform because you cannot actually do it once you restore the backup image to the Pogoplug.
4. Activating Additional Trunks with FreePBX. As we mentioned, there are lots of SIP providers to choose from. Once you have signed up for service, configuring the trunk is easy. Here is a quick Cheat Sheet courtesy of Kristian Hare, who translated our original setups into a spreadsheet. Just click on the image below to open it in a new window. Then click on the redisplayed image to enlarge it. The left and right cursor keys will move you around in the image. Click on the image again to shrink it.
5. Changing Extension Passwords. From the main FreePBX GUI, choose Applications -> Extensions. Then click on 701 in the Extension List on the right side of your display. You’ll see a form that looks like this:
For now, we only need to make a few changes. First, you need a very secure password for both the extension itself and your voicemail account for this extension. The extension secret needs to be a combination of letters and numbers. The Voicemail Password needs to be all numbers, preferably six or more. Replace the existing password entries with your own (very secure) entries. You also need to lock down this extension so that it is only accessible from devices on your private LAN. You do that with the deny and permit entries which currently are filled with zeroes. Leave the deny entry the way it is which tells Incredible PBX to block everybody except those allowed in the permit entry below. For the permit, we need the first three octets of your private LAN address, e.g. if your LAN is 192.168.0.something then the permit entry will be 192.168.0.0/255.255.255.0.
Finally, you need to plug in your actual email address in the Voicemail section so that voicemails can be delivered to you when someone leaves a message. You can also include a pager email address if you want a text message alert with incoming voicemails. If you want the voicemails to automatically be deleted from the server after they are emailed to you (a good idea considering the disk storage limitations of your microSD card), change the Delete Voicemail option from No to Yes. That’s it. Now save your settings by clicking the Submit button. Then reload the dialplan by clicking on the red prompt when it appears.
In case you’re curious, unless you’ve chosen to automatically delete voicemails after emailing them, you can retrieve your voicemails by dialing *98701 from any extension on your phone system. You’ll be prompted to enter the voicemail password you set up. In addition to managing your voicemails, you’ll also be given the opportunity to either return the call to the number of the person that called or to transfer the voicemail to another extension’s voicemail box. And you can always leave a voicemail for someone by dialing their extension number preceded by an asterisk, e.g. *701 would let someone leave you a voicemail without actually calling you.
6. Eliminating Audio and DTMF Problems. You can avoid one-way audio on calls and touchtones that don’t work with these simple settings in FreePBX: Settings -> Asterisk SIP Settings. Just plug in your public IP address and your private IP subnet. Then set ULAW as the only Audio Codec.
7. Configuring CallerID Superfecta. In order to match names with phone numbers, Incredible PBX includes a FreePBX application named CallerID Superfecta. Out of the box, Incredible PBX will work fine if you remember to activate CallerID Superfecta whenever you create a new Inbound Route. The CNAM entries also will be displayed in your CDR reports. For those not in the United States, you may prefer to use a lookup source for your numbers other than the ones preconfigured in CallerID Superfecta. You will find all of the available modules on the POSSA GitHub site. Just download the ones desired into /var/www/html/admin/superfecta/sources and then activate the desired sources in Admin -> CID Superfecta -> Default. You can test your results and the performance using the Debug facility that’s built into the module.
If you’re using FreePBX on an Ubuntu server in the Cloud, now is the time to drop down to the Linux command prompt, log in as root, and make a backup: /root/incrediblebackup. Copy the backup from /backup to the same folder on your Pogoplug and restore it: /root/incrediblerestore /backup/DU-somefilename.tar.gz. Then restart Asterisk on your Pogoplug: amportal restart. Finally, log out and back into your Pogoplug to assure that FreePBX will function properly on that platform.
Adding Speech Recognition for Incredible PBX Applications
We used to include Google’s Speech-to-Text service in earlier Incredible PBX builds. Unfortunately, Google has changed the rules a bit. Assuming your server still meets the "personal and development" standard, you can obtain an API key from Google and reactivate speech-to-text functionality for many of the Incredible PBX applications including Weather Reports by City (949), AsteriDex Voice Dialing by Name (411), SMS Dictator (767), and Wolfram Alpha for Asterisk (4747). To activate the STT service, just complete the steps in our tutorial. Then sign up for a Wolfram Alpha App ID (tutorial here), and run the following install scripts:
/root/wolfram/wolframalpha-oneclick.sh cp /root/pygooglevoice/bin/gvoice /usr/bin ln -s /usr/bin/gvoice /usr/local/sbin/gvoice cd /root/pygooglevoice python setup.py install /root/smsdictator/sms-dictator.sh
Configuring a YATE Softphone for Pogoplug
As we mentioned, the easiest way to get started with Incredible PBX is to set up a free YATE softphone on your Desktop computer. Versions are available at no cost for Macs, PCs, and Linux machines. Just download the appropriate one and install it from this link. Once installed, it’s a simple matter to plug in your extension 701 credentials and start making calls. Run the application and choose Settings -> Accounts and click the New button. Fill in the blanks using the IP address of Incredible PBX on the Pogoplug, 701 for your account name, and whatever password you’re using for the extension. Click OK.
Once you are registered to extension 701, close the Account window. Then click on YATE’s Telephony Tab and place your first call. It’s that easy!
Introducing Incredible PBX 11.12.0 for the Pogoplug
For those of you that missed last week’s article on the CuBox platform and are new to Asterisk and the world of VoIP telephony, let us take a moment and explain how Incredible PBX fits into the puzzle. For lack of a better term, Incredible PBX is a turnkey aggregation in a bootable image that is based upon a superset of Debian 7 packages plus Asterisk, the FreePBX GUI, and a sizable collection of applications for the Asterisk platform. You download a tarball, decompress it, write the image file to an SD card, insert the card into your Pogoplug 4, and presto! You’ve got a turnkey PBX. Add credentials for a trunk or two to make and receive calls, connect some phones, and your SOHO office or home will come alive with a versatile PBX platform that used to cost organizations hundreds of thousands of dollars. What’s included in Incredible PBX? Glad you asked. Here’s a 3-minute video showcasing a few of our favorite Incredible PBX text-to-speech applications:
The Incredible PBX 11 Inventory. Here’s the current feature set on the Pogoplug platform. In addition to its superset of hundreds of Debian 7 packages, Asterisk 11, and FreePBX 2.11 with the Lighttpd web server, Exim 4 mail server, MySQL, PHP, phpMyAdmin, and the IPtables Linux firewall, check out these additions:
- AsteriDex: The Poor Man’s Rolodex®
- Asterisk Upgrade Utility (/root/upgrade-asterisk-cubox-bt)
- CallerID Superfecta (FreePBX Module adds Names to CID Numbers)
- CallWho for Asterisk (Dial by Voice from AsteriDex: 411)
- Preconfigured Email That Works with Exim 4
- OSS Endpoint Manager (Phone Configuration FreePBX module)
- Extensions (1 preconfigured with voicemail and randomized passwords)
- Google Speech Recognition for Incredible PBX apps (follow setup tutorial)
- Flite TTS for Asterisk (text-to-speech with Igor)
- GoogleTTS for Asterisk (Lefteris Zafiris’ state-of-the-art TTS)
- Google Voice (FreePBX GV/Motif Module for free U.S./Canada calls)
- Hotel-Style Wakeup Calls (FreePBX Module to simulate your favorite Holiday Inn)
- Incredible Backups… and Restores (see /root)
- Automated Incredible PBX Update Utility
- Lenny: The Telemarketer’s Worst Nightmare (dial L-E-N-N-Y)
- ODBC Database Support (Dial 222 with Employee Number 12345 to see what’s possible)
- Parking Lot Attendant (dial ## then 70 to simulate key telephones)
- Partition Resizing Utility for SD card expansion (/root/resize-partition)
- Phone Conference Bridge (Dial C-O-N-F for Private Conferences)
- PPTP Virtual Private Network (interconnect with other computers in minutes)
- Reminders by Phone and Web (supports recurring reminders and TTS delivery)
- SAMBA Windows Networking (Windows Networking Made Easy)
- SMS Dictator with Google Voice (Dial S-M-S to dictate and send an SMS message)
- Speech-to-Text Directory Assistance (Dial 411)
- Speed Dialer with AsteriDex (Dial 223 and enter first 3 letters of AsteriDex entry)
- Stealth AutoAttendant
- TimeZone Setup Utility (see /root)
- Today in History (Dial T-O-D-A-Y for today’s major events)
- Travelin’ Man 3 (IPtables WhiteList for rock-solid network security)
- Voice Dictation by Phone (Dial 5678)
- Weather by ZIP Code (Dial Z-I-P and enter any 5-digit zip code)
- Worldwide Weather by Phone (Dial 949 and say the name of your favorite city)
- Wolfram Alpha by Phone (/root/wolfram to install the world’s best almanac)
- Yahoo News by Phone (Dial 951 for the latest news headlines)
A Few Words About Security. Thanks to its Zero Internet Footprint™ design, Incredible PBX is different. It remains the most secure Asterisk-based PBX around. What this means is Incredible PBX has been engineered to sit anywhere, either behind a NAT-based, hardware firewall or directly on the Internet. No device other than those on your private LAN, a few of the major (trusted) SIP providers around the world, and those that you authorize on your WhiteList can even see your server. Additional IP addresses can be added to the WhiteList by the administrator registering new IP addresses using add-ip or add-fqdn from the Linux CLI. Read about this $100,000 VoIP phone bill, and you’ll better appreciate why WhiteList-based server security has become absolutely essential. WhiteList Security means only those devices with a registered IP address in your WhiteList can get to your server’s resources. To the NSA and everyone else, your server doesn’t even show up on the radar. Their only way to contact you is a POTS telephone using your published phone number. Our complete tutorial on Travelin’ Man 3 is available here. With Incredible PBX for the Pogoplug 4, it’s installed and preconfigured. Enjoy!
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.
Originally published: Monday, September 8, 2014
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! Please have a look and post your support questions there. Our forum is extremely friendly and is supported by literally hundreds of Asterisk gurus. In fact, we already have a thread underway on the Pogoplug adventure.
Need help with Asterisk? Visit the PBX in a Flash 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.
Some Recent Nerd Vittles Articles of Interest…
- Some of our links refer users to Amazon or other service providers when we find their prices are competitive for the recommended products. Nerd Vittles receives a small referral fee from these providers to help cover the costs of our blog. We never recommend particular products solely to generate commissions. However, when pricing is comparable or availability is favorable, we support these providers because they support us. [↩]
Hardware Device of the Year: Meet the CuBox-i with Incredible PBX for Ubuntu
It’s been many years since we’ve written back-to-back articles about the same device. That should tell you how really special the CuBox-i is. After two weeks of 14-hour days developing the new Incredible PBX platform for CuBox, we are thrilled to crown this jewel as Nerd Vittles Hardware Device of the Year. Flawless design, incredible performance, tiny size, feature-rich components, minimal power consumption, and completely silent operation are merely the tip of the iceberg with this 2x2x2 cubic zircon. On the $130 CuBox-i4PRO, there’s a Quad Core processor, 2 gigs of RAM, a 10/100/1000 Ethernet port, a 1080p HDMI port, two powered USB 2 ports, an eSATA II port for an external drive, a realtime clock with backup battery, an Optical S/PDIF Audio Out port, a microSD port, an infrared receiver and transmitter, WiFi 11n, and Bluetooth plus a power adapter to match either American or European power sources. Whew! And here’s the best part. Everything works while squeezed in a tiny case that’s a third the size of Rubic’s Cube.
A SOHO Swiss Army Knife That Fits in Your Cupholder: Voice, Fax, SMS, TTS, Email, PBX, Incredible!
Did we mention it’s a near perfect VoIP platform for any home office or small business? Well, it is. And everything we’ve learned about Asterisk® and FreePBX® and Internet security over the past decade is rolled into today’s release of our crown jewel edition of Incredible PBX™ for the CuBox. First, you’ll need to purchase one and we strongly recommend the CuBox-i4PRO with its Quad Core ARM processor and built-in WiFi and Bluetooth. In the U.S, there’s NewEgg or NewEgg (10% off on i4PRO with promo code SW829NE10 = $117 until 9/4). In the U.K, there’s NewIT. For everyone else, you can buy directly from SolidRun, the creator.
Before we dive into Incredible PBX, we want to express our deepest appreciation to Zhando and Josh North of PIAF Forum fame. Zhando’s pioneering efforts with Ubuntu and Incredible PBX on the CuBox platform and Josh North’s morphing of Incredible Fax for deployment with Ubuntu paved the way for everything you’re about to read. It reinforces the spectacular results which can be achieved in the open source community when a talented group of even a few folks put their heads together. The Ubuntu developers and the tens of thousands of open source contributors from around the world also deserve a well-earned tip of the hat for producing a Linux platform that is rock-solid reliable and incredibly versatile. Nearly 1,000 open source packages are included in the latest Incredible PBX build. Click on the link to view the package list in PDF format and prepare to be amazed. We couldn’t have done it without all of you!
Introducing Incredible PBX 11.12.0 for the CuBox-i4PRO
If you’re new to Asterisk and the world of VoIP telephony, let us take a moment and explain how Incredible PBX fits into the puzzle. For lack of a better term, Incredible PBX on the CuBox platform is a turnkey aggregation in a bootable image that is based upon a superset of Ubuntu 14 packages plus Asterisk, the FreePBX GUI, and a sizable collection of applications for the Asterisk platform. You download a tarball, decompress it, write the image file to a microSD card, insert the card into your CuBox-i, and presto! You’ve got a turnkey PBX. Add credentials for a trunk or two to make and receive calls, connect some phones, and your whole office will come alive with a versatile PBX platform that used to cost organizations hundreds of thousands of dollars. What’s included in Incredible PBX? Glad you asked. Here’s a 3-minute video showcasing a few of our favorite Incredible PBX text-to-speech applications:
The Incredible PBX 11 Inventory. Here’s the current feature set on the CuBox platform. It’s the most robust ever! In addition to its superset of nearly 1,000 Ubuntu 14 packages, Asterisk 11, and FreePBX 2.11 with Apache, SendMail, MySQL, PHP, phpMyAdmin, Fail2Ban, WebMin, and the IPtables Linux firewall, check out these additions:
- AsteriDex: The Poor Man’s Rolodex®
- Asterisk Upgrade Utility (/root/upgrade-asterisk-cubox-bt)
- AvantFax Management Utilities (see /root folder)
- Bluetooth Integration turns your cellphone into an Asterisk Trunk
- CallerID Superfecta (FreePBX Module adds Names to CID Numbers)
- CallWho for Asterisk (Dial by Voice from AsteriDex: 411)
- Preconfigured Email That Works with SendMail and Incredible Fax
- OSS Endpoint Manager (Phone Configuration FreePBX module)
- eSATA External Hard Drive Integration
- Extensions (1 preconfigured with voicemail and randomized passwords)
- Fax to PDF Conversion with EMail Delivery (/root/avantfax-email-dest)
- Google Speech Recognition for Incredible PBX apps (follow setup tutorial)
- Flite TTS for Asterisk (text-to-speech with Igor)
- GoogleTTS for Asterisk (Lefteris Zafiris’ state-of-the-art TTS)
- Google Voice (FreePBX GV/Motif Module for free U.S./Canada calls)
- Hotel-Style Wakeup Calls (FreePBX Module to simulate your favorite Holiday Inn)
- Incredible Backups… and Restores (see /root)
- Incredible Fax 11 with HylaFax/AvantFax
- ODBC Database Support (Dial 222 with Employee Number 12345 to see what’s possible)
- Automated Incredible PBX Update Utility
- Lenny: The Telemarketer’s Worst Nightmare (dial L-E-N-N-Y)
- Network Management Utilities for Wired and Wireless Networking (see /root)
- Parking Lot Attendant (dial ## then 70 to simulate key telephones)
- Partition Resizing Tutorial for eSATA external drives
- Partition Resizing Utility for SD card expansion (/root/resize-partition)
- Phone Conference Bridge (Dial C-O-N-F for Private Conferences)
- PortKnocker for Quick Remote Access (cat /root/knock.FAQ)
- PPTP Virtual Private Network (interconnect with other computers in minutes)
- Reminders by Phone and Web (supports recurring reminders and TTS delivery)
- SAMBA Windows Networking (Windows Networking Made Easy)
- SMS Dictator with Google Voice (Dial S-M-S to dictate and send an SMS message)
- Speech-to-Text Directory Assistance (Dial 411)
- Stealth AutoAttendant
- TimeZone Setup Utility (see /root)
- Today in History (Dial T-O-D-A-Y for today’s major events)
- Travelin’ Man 3 (IPtables WhiteList for rock-solid network security)
- Travelin’ Man 4 (Dialup to WhiteList any IP address: 864)
- Voice Dictation by Phone (Dial 5678)
- Weather by ZIP Code (Dial Z-I-P and enter any 5-digit zip code)
- Worldwide Weather by Phone (Dial 949 and say the name of your favorite city)
- Wolfram Alpha by Phone (/root/wolfram to install the world’s best almanac)
- Yahoo News by Phone (Dial 951 for the latest news headlines)
A Few Words About Security. Thanks to its Zero Internet Footprint™ design, Incredible PBX is different. It remains the most secure Asterisk-based PBX around. What this means is Incredible PBX has been engineered to sit anywhere, either behind a NAT-based, hardware firewall or directly on the Internet. No device other than those on your private LAN, a few of the major (trusted) SIP providers around the world, and those that you authorize on your WhiteList can even see your server. Additional IP addresses can be added to the WhiteList in three ways:
- An administrator registers new IP addresses using add-ip or add-fqdn from the Linux CLI
- A remote user sends the (correct) randomized PortKnock code assigned to your CuBox
- A remote user dials in from a standard telephone to register a new remote IP address
Read about this $100,000 VoIP phone bill, and you’ll better appreciate why WhiteList-based server security has become absolutely essential. WhiteList Security means only those devices with a registered IP address in your WhiteList can get to your server’s resources. To the NSA and everyone else, your server doesn’t even show up on the radar. Their only way to contact you is a POTS telephone using your published phone number. Our complete tutorial on Travelin’ Man 3 is available here. With Incredible PBX for CuBox, it’s installed and preconfigured.
Installing Incredible PBX 11.12.0 on the CuBox-i
There are five simple steps to get Incredible PBX up and running on your CuBox:
- Purchase a storage device
- Download Incredible PBX image
- Untar the image on your desktop
- Burn the image to a microSD card
- Insert microSD card in CuBox and boot
Choosing a Storage Platform. Unless you plan to run your server with an external eSATA hard drive (CuBox-i4PRO tutorial here), the first step is to purchase a suitable microSD card. We recommend at least a 32GB Class 10 card from Transcend, SanDisk, or Kingston. All of them are under $20 on Amazon and most include free 2-day shipping for Prime customers. If using an eSATA drive, you still need a microSD card to boot up, but any 4GB or 8GB card will suffice.1
Downloading Incredible PBX for CuBox. From your favorite desktop computer, download the latest build of Incredible PBX from SourceForge. Depending upon your network connection and the SourceForge mirror, it can take awhile. It’s a whopping 1.3GB!
Untarring Incredible PBX for CuBox. Depending upon your desktop platform, untarring incrediblepbx.4.cubox.U14.latest.tar.gz is as simple as double-clicking on it in the Downloads folder (on a Mac). On the Windows platform, here are 3 utilities that will do the job. On a Linux desktop, open a Terminal window and…
tar zxvf incrediblepbx.4.cubox.U14.latest.tar.gz
Burning the Incredible PBX image to microSD. Once you’ve untarred the file, you’ll find two scripts that make burning the image to a microSD card simple if you’re on a Mac or Linux desktop. On a Windows machine, it’s a little more complicated. Most SD cards come preformatted with a DOS partition so your Windows machine should recognize the microSD card when it’s inserted. If not, format the card using a utility such as SD Card Formatter. Next, you’ll need Win32 Disk Imager to burn cubox.img to your card. Once the image has been transferred, gracefully unmount the card from your desktop, and then remove the card from the SD card adapter.
Booting Incredible PBX on the CuBox. Insert the microSD card (electronics side up) into your CuBox-i. Then apply power to the CuBox after connecting a USB keyboard, HDMI monitor, and Ethernet cable to a network with Internet connectivity that can also hand out DHCP addresses. Log into Incredible PBX as root with cubox as your password. Your SSH credentials, Asterisk DUNDI secrets, logs, and network connection options will be initialized and then your server will reboot. You may need to hit the Enter key once or twice during the SSH credentials initialization to move things along. And, with some SD cards, you may find yourself waiting an eternity for the promised reboot. After seeing the "rebooting" message, count to ten. If your server still hasn’t rebooted, remove and reapply power. This quirk goes away after the first reboot.
After the reboot, log in again as root with password: cubox. Your firewall setup will be initialized to lock down your whitelist to your server’s public and private IP addresses AND the IP address of the machine from which you’re logging in. All of your FreePBX passwords will be randomized and your secret PortKnocker codes will be generated. The whole process only takes a few seconds.
When the second pass configuration is complete, you will be greeted by a welcoming message. STOP and read it. It has loads of important information about your server’s configuration and your next steps. Press ENTER to review status:
The Next 10 Steps. Before you do anything else, complete the following steps. It only takes a minute to secure and properly configure your server:
- Change your root password: passwd
- Change your FreePBX admin password: /root/admin-pw-change
- Set your correct time zone: /root/timezone-setup
- Expand partition to match microSD card size: /root/resize-partition
- Add any desired IP addresses to WhiteList: /root/add-ip
- Put PortKnocker credentials in a safe place: cat /root/knock.FAQ
- Change AvantFax admin password: /root/avantfax-pw-change
- Set Email Address for Incoming Faxes: /root/avantfax-email-dest
- Check status to be sure everything is working: status
- If using an eSATA external drive, do the migration drill (note the free disk space in status above)
A Few Important Tips. Every operating system and service provider has their quirks. Ask Bill Gates! Ubuntu and especially Comcast are no different. Fortunately, with Ubuntu, it’s a very short list.
1. Use the following commands (only!) to shutdown and restart your server: halt and reboot. These commands are reworked in Incredible PBX to gracefully shutdown important services so that files don’t get damaged. Please use them!
2. If you ever want to move your server to a different network, complete these three simple steps before you leave your existing network. This will trigger a new Phase I update (outlined above) and set the default network back to wired eth0 using DHCP the next time you boot your server.
touch /etc/update_hostconfig /root/enable-eth0-only # press Ctrl-C when prompted to reboot. then type: halt
3. You really do need email connectivity to get the most out of Incredible PBX. It’s the way you receive important notifications from FreePBX, and it’s also how faxes and voicemail messages are delivered. From the Linux CLI, test your server to be sure you can send emails reliably:
echo "test" | mail -s testmessage yourname@gmail.com
After checking your spam folder, if you really didn’t get the email, it may be that your service provider is blocking downstream SMTP traffic. You can use your provider’s SMTP server as a smarthost to send out mail with SendMail. Just edit /etc/mail/sendmail.cf, search for DS, and add the provider’s SMTP server address immediately after it (no spaces!), e.g. DSsmtp.comcast.net or DSsmtp.knology.net. Then restart SendMail: service sendmail restart.
Once you’ve logged into FreePBX below, be sure to set your default email address in the right margin of Admin -> Module Admin and save your entry. This will assure receipt of timely notifications of FreePBX updates for your server.
4. If you’re sure you’ll never need remote access in an emergency, you can disable PortKnocker at startup and save about 5% of your processing cycles. Our complete PortKnocker tutorial is available here. To disable startup on boot, issue the following command from the Linux CLI:
update-rc.d -f knockd disable
5. The same applies to WebMin. We actually introduced one of the first tutorials for WebMin… over 9 years ago. A word to the wise: WebMin is a terrific tool for looking at stuff about your system. But be very careful making system changes with WebMin. You usually will break some of the customized settings in Incredible PBX. This is particularly true in the case of the IPtables firewall. To access WebMin, use a browser and the actual IP address of your server to go to: https://12.34.56.78:9001. Log in as root with your root password. To disable automatic startup of WebMin on boot:
update-rc.d -f webmin disable
Setting Up WiFi with the CuBox-i4PRO
This may sound simple now, but two weeks ago it was quite a different story. For those with a CuBox-i4Pro, WiFi is built into the hardware. The trick was getting it to work. Well, with Incredible PBX, it does. In the /root folder, you’ll find several self-explanatory scripts to do the heavy lifting for you. For options 2 and 3, you’ll need the SSID of the WiFi network you’ll be using as well as the SSID password.
- enable-eth0-only (the default setting)
- enable-wifi-eth0 (enables both but eth0 works with Asterisk)
- enable-wifi-only (runs your server purely on WiFi)
Getting Started with VoIP and FreePBX
Up to now, all of your time has been spent using the Linux CLI. That will be a rarity once you get this far. Henceforth, 90% of your time setting up Incredible PBX will be done using the FreePBX GUI and your favorite web browser. To access it, just point to the IP address of your server. status will tell you the address if you’ve forgotten it. The main control panel looks like this:
As configured, the default user account for both FreePBX and AvantFax administration is admin. The passwords are whatever you set in steps #2 and #7 above. As configured, email delivery of faxes with AvantFax is automatic so no further setup is required other than setting a delivery mechanism for faxes within FreePBX.
For those new to Asterisk and FreePBX, here’s a brief primer on what needs to happen before you can make and receive calls. If you have an existing Google Voice account or a smartphone that’s less than 2 years old, lucky you. This gets you a phone number for your PBX so people can call you. And it provides a vehicle to place calls to plain old telephones at little or no cost.
If you don’t have a Google Voice account or a shiny new smartphone, then you will need to purchase a SIP trunk from one of the numerous vendors around the world. Our favorite (because they provide terrific service at a modest price AND provide financial support to the Nerd Vittles, PBX in a Flash, and Incredible PBX projects) is Vitelity. Their special rates and a link for a discount are included at the end of today’s article.
Unlike POTS phone service from Ma Bell, the SIP World is a little different. First, you don’t need to put all your eggs in one basket. A trunk that gets you a phone number for incoming calls need not be with the same vendor that provides a trunk to place outbound calls. In fact, you may want multiple trunks for outbound calls just to have some redundancy. A list of our favorites in the U.S. and Canada is available on the PIAF Forum. Of course, there also are providers that offer all-you-can-eat calling plans. Two of our favorites are Vestalink and Future-Nine.
You’ll also need a softphone or SIP phone to actually place and receive calls. YATE makes a free softphone for PCs, Macs, and Linux machines so download your favorite and install it on your desktop.
Phones connect to extensions in FreePBX to work with Incredible PBX. Extensions talk to trunks (like Google Voice) to make and receive calls. FreePBX uses outbound routes to direct outgoing calls from extensions to trunks, and FreePBX uses inbound routes to route incoming calls from trunks to extensions to make your phones ring. In a nutshell, that’s how a PBX works.
There are lots of bells and whistles that you can explore down the road including voicemail, conferencing, IVRs, autoattendants, paging, intercoms, CallerID lookups, announcements, DISA, call parking and pickup, queues, ring groups, and on and on. And then there’s all of the Incredible PBX applications which are covered separately in this Nerd Vittles article. Once you’re comfortable with one server, you or your company will want some more. This Nerd Vittles article will walk you through interconnecting them into a seamless mesh network so that you can call from one office to another transparently. Yes, those articles were written for the Raspberry Pi. But the beauty of Incredible PBX is that it runs identically on virtually every server platform.
Here’s our 10-Step Checklist to Getting Started with FreePBX:
1. Setting Up Google Voice. If you want free calling in the U.S. and Canada, then you’ll need an existing Google Voice account that includes the Google Chat feature. You’ll need one dedicated to Incredible PBX, or it won’t work. Log out after setting up the new Google Voice account! Also note that Google Voice may cease to function at any time after May 15, 2014. You can read all about it here.
- Log into existing Google Voice account
- Enable Google Chat as Phone Destination
- Configure Google Voice Calls Settings:
- Call Screening – OFF
- Call Presentation – OFF
- Caller ID (In) – Display Caller’s Number
- Caller ID (Out) – Don’t Change Anything
- Do Not Disturb – OFF
- Call Options (Enable Recording) – OFF
- Global Spam Filtering – ON
- Place test call in and out using GMail Call Phone
- Log out of your Google Voice account
2. Activating a Google Voice Trunk. To create a Trunk in FreePBX to handle calls to and from Google Voice, you’ll need three pieces of information from the Google Voice account you set up above: the 10-digit Google Voice phone number, your Google Voice account name, and your Google Voice password. Choose Connectivity -> Google Voice (Motif) from the FreePBX GUI. The following form will appear:
Fill in the blanks with your information and check only the top 2 boxes. If your Google Voice account name ends in @gmail.com, leave that out. Otherwise, include the full email address. Then click Submit Changes and Apply Config.
There’s one more step or your Google Voice account won’t work reliably with Incredible PBX! From the Linux command prompt while logged into your server as root, restart Asterisk: amportal restart
3. Setting a Destination for Incoming Calls and Managing Faxes. Now that you’ve created your Google Voice Trunk, we need to tell FreePBX how to process inbound calls when someone dials your Google Voice number. There are any number of choices. You could simply ring an extension. Or you could ring multiple extensions by first creating a Ring Group which is just a list of extension numbers. Or you could direct incoming calls to an Interactive Voice Response (IVR) system. By default, Incredible PBX is configured to route all incoming calls to extension 701. You can change the setting whenever you like by choosing Connectivity -> Inbound Routes -> Default. In the Set Destination section of the form, change the target destination from the pull-down lists.
If you want your default inbound route to also handle incoming faxes, then go to the Fax Detect section of the Default inbound route. Change Detect Faxes to Yes. Change Fax Detection Type to SIP. Leave the Detection Time setting at 4. And change the Fax Destination to Custom Destinations: Fax (Hylafax). To Send Faxes, open AvantFax in FreePBX’s Other pulldown menu.
Always click Submit and then click Apply Config to save new settings in FreePBX.
4. Activating a Smartphone Trunk Using Bluetooth. One of the more exotic features of Incredible PBX on the CuBox platform is the ability to add your smartphone as an Asterisk trunk using Bluetooth. We’ve written a short recipe to get things working. So have a look at our Bluetooth tutorial and see if you’re up for the challenge. Moral of the story: the newer the cellphone, the better.
The LG G3 is the best of the lot, at least of the numerous cellphones we tested. Even better is an LG G3 paired with StraightTalk’s (AT&T-hosted) unlimited talk, text, and data plan for $45 a month. With Samsung smartphones older than a Galaxy S4, don’t waste your time. Ditto with Apple iPhones other than perhaps the very latest. Our iPhone 4S failed miserably. We gave up on Apple phones after that. Someday I’ll test my daughter’s 5c and report back.
5. Activating Additional Trunks with FreePBX. As we mentioned, there are lots of SIP providers to choose from. Once you have signed up for service, configuring the trunk is easy. Here is a quick Cheat Sheet courtesy of Kristian Hare, who translated our original setups into a spreadsheet. Just click on the image below to open it in a new window. Then click on the redisplayed image to enlarge it. The left and right cursor keys will move you around in the image. Click on the image again to shrink it.
6. Changing Extension Passwords. From the main FreePBX GUI, choose Applications -> Extensions. Then click on 701 in the Extension List on the right side of your display. You’ll see a form that looks like this:
For now, we only need to make a few changes. First, you need a very secure password for both the extension itself and your voicemail account for this extension. The extension secret needs to be a combination of letters and numbers. The Voicemail Password needs to be all numbers, preferably six or more. Replace the existing password entries with your own (very secure) entries. You also need to lock down this extension so that it is only accessible from devices on your private LAN. You do that with the deny and permit entries which currently are filled with zeroes. Leave the deny entry the way it is which tells Incredible PBX to block everybody except those allowed in the permit entry below. For the permit, we need the first three octets of your private LAN address, e.g. if your LAN is 192.168.0.something then the permit entry will be 192.168.0.0/255.255.255.0.
Finally, you need to plug in your actual email address in the Voicemail section so that voicemails can be delivered to you when someone leaves a message. You can also include a pager email address if you want a text message alert with incoming voicemails. If you want the voicemails to automatically be deleted from the server after they are emailed to you (a good idea considering the disk storage limitations of your microSD card), change the Delete Voicemail option from No to Yes. That’s it. Now save your settings by clicking the Submit button. Then reload the dialplan by clicking on the red prompt when it appears.
In case you’re curious, unless you’ve chosen to automatically delete voicemails after emailing them, you can retrieve your voicemails by dialing *98701 from any extension on your phone system. You’ll be prompted to enter the voicemail password you set up. In addition to managing your voicemails, you’ll also be given the opportunity to either return the call to the number of the person that called or to transfer the voicemail to another extension’s voicemail box. And you can always leave a voicemail for someone by dialing their extension number preceded by an asterisk, e.g. *701 would let someone leave you a voicemail without actually calling you.
7. Eliminating Audio and DTMF Problems. You can avoid one-way audio on calls and touchtones that don’t work with these simple settings in FreePBX: Settings -> Asterisk SIP Settings. Just plug in your public IP address and your private IP subnet. Then set ULAW as the only Audio Codec.
8. Configuring Your YATE Softphone. As we mentioned, the easiest way to get started with Incredible PBX is to set up a free YATE softphone on your Desktop computer. Versions are available at no cost for Macs, PCs, and Linux machines. Just download the appropriate one and install it from this link. Once installed, it’s a simple matter to plug in your extension 701 credentials and start making calls. Run the application and choose Settings -> Accounts and click the New button. Fill in the blanks using the IP address of Incredible PBX, 701 for your account name, and whatever password you created for the extension. Click OK.
Once you are registered to extension 701, close the Account window. Then click on YATE’s Telephony Tab and place your first call. It’s that easy!
9. Configuring CallerID Superfecta. In order to match names with phone numbers, Incredible PBX includes a FreePBX application named CallerID Superfecta. Out of the box, Incredible PBX will work fine if you remember to activate CallerID Superfecta whenever you create a new Inbound Route. The CNAM entries also will be displayed in your CDR reports. For those not in the United States, you may prefer to use a lookup source for your numbers other than the ones preconfigured in CallerID Superfecta. You will find all of the available modules on the POSSA GitHub site. Just download the ones desired into /var/www/html/admin/superfecta/sources and then activate the desired sources in Admin -> CID Superfecta -> Default. You can test your results and the performance using the Debug facility that’s built into the module.
10. Adding Speech Recognition for Incredible Applications. We used to include Google’s Speech-to-Text service in Incredible PBX builds. Unfortunately, Google has changed the rules a bit. Assuming your server still meets the "personal and development" standard, you can obtain an API key from Google and reactivate speech-to-text functionality for many of the Incredible PBX applications including Weather Reports by City (949), AsteriDex Voice Dialing by Name (411), SMS Dictator (767), and Wolfram Alpha for Asterisk (4747). To activate the STT service, just complete the steps in our tutorial. Then sign up for a Wolfram Alpha App ID (tutorial here), and run the following install scripts:
/root/wolfram/wolframalpha-oneclick.sh /root/smsdictator/sms-dictator.sh
Enabling SAMBA Windows Networking with Ubuntu
It only takes a minute to enable SAMBA Windows Networking on your CuBox. We’ve reproduced our quick tutorial to show you how. Just follow the steps below to interconnect Incredible PBX with all the other computers on your LAN.
apt-get -y install samba samba-common python-glade2 system-config-samba cd /etc/samba mv smb.conf smb.orig.conf wget http://incrediblepbx.com/samba-ubuntu.tar.gz tar zxvf samba-ubuntu.tar.gz rm *.tar.gz sed -i '/# End of Trusted Provider Section/r '/etc/samba/smb.iptables'' /etc/iptables/rules.v4 iptables-restart service smbd restart service nmbd restart sed -i 's|/usr/local/sbin/amportal restart|service smbd restart\\nservice nmbd restart\\n/usr/local/sbin/amportal restart|' /etc/rc.local # set up root password for SAMBA access with full RW privileges smbpasswd -a root
Incredible Backup and Restore
Once you have everything configured, it’s time to take a snapshot of your system and store it in a safe place. The new Incredible Backup lets you do that. From the Linux CLI, login as root and run: /root/incrediblebackup. The backup image will be saved to the /tmp folder and can be copied to a different server easily. To restore the backup to another system, you simply bring the other system up to the same version of Asterisk (11) and FreePBX (2.11), and then run /root/incrediblerestore with your backed up image. It’s the cheapest insurance you can buy! For detailed instructions on restoring backups, see this thread on the PIAF Forum.
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.
Originally published: Monday, September 1, 2014
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! Please have a look and post your support questions there. Our forum is extremely friendly and is supported by literally hundreds of Asterisk gurus.
Need help with Asterisk? Visit the PBX in a Flash 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.
Some Recent Nerd Vittles Articles of Interest…
- Some of our links refer users to Amazon or other service providers when we find their prices are competitive for the recommended products. Nerd Vittles receives a small referral fee from these providers to help cover the costs of our blog. We never recommend particular products solely to generate commissions. However, when pricing is comparable or availability is favorable, we support these providers because they support us. [↩]
Fall Festivus: Asterisk Text-to-Speech Roundup with a Baker’s Dozen New Voices
[soundcloud url="http://api.soundcloud.com/tracks/110813303″ params="" width=" 100%" height="166″ iframe="true" /]
It’s been a while since we looked at the text-to-speech (TTS) landscape with Asterisk®. So we thought we’d bring you up to date on where we stand with text-to-speech in the free department insofar as Asterisk 11 is concerned. The hands-down winner remains Lefteris Zafiris’ implementation of Google TTS. It rivals any commercial TTS software application and costs you nothing. The good news is, if you’re running Incredible PBX 11, you already have it. For other PBX in a Flash systems, start with our previous Nerd Vittles tutorial to get Google TTS installed. For other systems, start with the Lefteris Zafiris tutorial. Once everything is installed, copy the perl script to /usr/local/sbin and make a temporary directory to hold your Google TTS recordings:
cp /var/lib/asterisk/agi-bin/googletts-cli.pl /usr/local/sbin/googletts-cli.pl
mkdir /tmp/tts
cd /tmp/tts
For each recording you wish to create, use the following syntax where hello.wav is the name for your new file and "Hello world" is the text you wish to convert to a sound file:
googletts-cli.pl -o hello.wav -l en -t "Hello world"
Next, convert the .wav file into a .gsm file that is compatible with Asterisk and move it into place for use with Asterisk:
sox hello.wav -r 8000 -c1 hello.gsm
mv hello.gsm /var/lib/asterisk/sounds/custom
To convert the file into an MP3 for your cellphone or a silly web site like ours, it goes like this:
lame -h -b 64 "hello.wav" "hello.mp3"
Now you can use the recording in your Asterisk dialplan like this:
exten => 1234,n,Playback(custom/hello)
To use the recorded voice prompts in FreePBX®, you first must copy them to your desktop computer. Then, in FreePBX, choose Admin -> System Recordings. Pick the file on your desktop and click Upload. Give the recording a name and then click Save. The recordings then are available for use in your IVRs, Ring Groups, and Announcements.
To create Google TTS prompts on-the-fly in your dialplan, use the following syntax:
exten => 1234,n,agi(googletts.agi,"Hello world.")
If you need help, take a look at PIAF Forum thread covering Google TTS and build some terrific applications for you and your customers. It’s the ultimate freebie!
Today we also want to explore what else is out there besides Flite and Google TTS. Festival and its little brother, Flite, have been staples of the PBX in a Flash and Incredible PBX projects since the outset. The problem has always been the lack of voices. The good news is that now there are at least some choices with Festival. To use these new voices with Asterisk in PBX in a Flash and Incredible PBX, you’ll first need to crank up Festival. From the command prompt, type: festival –server &. If you’d prefer to start up Festival when your server boots, then issue the following command and reboot:
echo "festival --server &" >> /etc/rc.d/rc.local
To download and install the new voices, we’ll need the RPMForge repository. If you’re using a 32-bit system, issue the following commands to activate it:
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm
rpm -Uvh rpmforge*
sed -i 's|enabled = 0|enabled = 1|' /etc/yum.repos.d/rpmforge.repo
If you’re running a 64-bit system, issue the following commands:
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
rpm -Uvh rpmforge*
sed -i 's|enabled = 0|enabled = 1|' /etc/yum.repos.d/rpmforge.repo
Now let’s add some voices to your server. You can find out what’s available by issuing one of the following commands:
yum search festvox
yum search festival
To install some new voices for you to play with, issue the following commands:
yum -y install festvox-rms-arctic-hts.noarch
yum -y install festvox-kal-diphone.noarch
yum -y install festvox-ked-diphone.noarch
yum -y install festvox-jmk-arctic-hts.noarch
yum -y install festvox-clb-arctic-hts.noarch
yum -y install festvox-awb-arctic-hts.noarch
yum -y install festvox-bdl-arctic-hts.noarch
yum -y install hispavoces-pal-diphone.noarch
yum -y install hispavoces-sfl-diphone.noarch
For a list of your installed voices for Festival, issue the following command:
echo "(voice.list)" | festival --interactive
- kal_diphone
- ked_diphone
- nitech_us_clb_arctic_hts
- nitech_us_jmk_arctic_hts
- nitech_us_slt_arctic_hts
- nitech_us_rms_arctic_hts
- nitech_us_bdl_arctic_hts
- nitech_us_awb_arctic_hts
- JuntaDeAndalucia_es_sf_diphone
- JuntaDeAndalucia_es_pa_diphone
To use Festival voices in your dial plan, you’ll need the name of the voice you wish to use with a prefix of voice_. So, for example, the kal_diphone voice would be voice_kal_diphone. You can control the volume of the voice prompts by (gradually) adjusting the scale. Then the dialplan syntax looks like this:
exten => 1234,n,System(echo "Hello." | text2wave -eval "(voice_kal_diphone)" -scale 1.0 -F 8000 -o /tmp/${UNIQUEID}.wav)
exten => 1234,n,Playback(/tmp/${UNIQUEID})
exten => 1234,n,System(rm -f /tmp/${UNIQUEID}.wav)
We have a third option for you today. eSpeak for Asterisk is brought to you by none other than Lefteris Zafiris. If you haven’t already figured it out, Lefteris has single-handedly kept Asterisk text-to-speech humming along for years. We all owe him our deepest appreciation. Thank you, Lefteris!
eSpeak is a terrific TTS platform because it supports literally dozens of foreign languages. It’s still hard for some Americans to grasp the idea that the whole world doesn’t speak English so here’s an app for the Restivus. Lefteris is a Debian devotee so it takes a little elbow grease to get this one going on the CentOS platform with PBX in a Flash or Incredible PBX. If you can cut-and-paste commands, then this shouldn’t be too difficult; however, we don’t recommend this version for production use.1 After logging into your server as root, make certain that you’ve enabled the RPMForge repo as explained above. Then issue the following commands to install eSpeak and eSpeak for Asterisk:
yum -y install portaudio-devel
yum -y install libsndfile-devel
yum -y install libsamplerate-devel
yum -y install espeak
yum -y install espeak-develcd /usr/src
git clone git://github.com/zaf/Asterisk-eSpeak
cd Asterisk-eSpeak
make
make install
make samples
cd /etc/asterisk
mv espeak.conf espeak.conf.orig
wget http://incrediblepbx.com/espeak.conf
chown asterisk:asterisk *.conf
amportal restart
Once eSpeak is loaded, the dialplan syntax for eSpeak TTS looks like this:
exten => 1234,n,Espeak("Welcome to the new world.",any,en-us)
exten => 1234,n,Espeak("Bienvenido al nuevo mundo.",any,es-la)
For the list of eSpeak language abbreviations, issue the following command: espeak --voices
.
So… where do we go from here? Hopefully, MBROLA and Festival MBROLA are next in line. The Debian methodology has already been documented. Who would like to tackle a CentOS tutorial?
Important Final Step. Once you’ve finished installing your new TTS apps and voices, don’t forget to turn off the RPMForge repo. There are many apps in the repo that will do irreparable damage to your PBX in a Flash server if it attempts to update a component from the wrong repository! Just issue the following command to disable the RPMForge repo until you need it again. Enjoy!
sed -i 's|enabled = 1|enabled = 0|' /etc/yum.repos.d/rpmforge.repo
Deals of the Week. There’s still an amazing deal on the street, but you’d better hurry. A new company called Copy.com is offering 20GB of free cloud storage with no restrictions on file size uploads (which are all too common with other free offers). Copy.com has free sync apps for Windows, Macs, and Linux systems. To take advantage of the offer, just click on our referral link here. We get 5GB of extra storage which will help avoid another PIAF Forum disaster.
Originally published: Tuesday, September 17, 2013
Need help with Asterisk? Visit the PBX in a Flash Forum.
We are pleased to once again be able to offer Nerd Vittles’ readers a 20% discount on registration to attend this year’s 10th Anniversary AstriCon in Atlanta. Here’s the Nerd Vittles Discount Code: AC13NERD.
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…
- Recompiling eSpeak from source with this patch will eliminate a reported file descriptor leak that could cause Asterisk to crash. [↩]
R.I.P. Googlicious: Weather, Weather, Everywhere… Except From Google
For at least the last four years, Google has maintained a not-so-secret Weather API that let hobbyists and people like us build weather applications for the rest of the world to use. Google never provided a word of documentation nor even a comment about the Weather API other than obscure mentions by a few Google employees. Google, of course, is not stupid. They know everything there is to know about analytics, and it was no secret that the Weather API had an enormous following worldwide. It was the one and only source of worldwide weather information that didn’t require an API key for access. Most API keys translate into restrictions and monthly fees.
Without a word of warning or comment, Google shut down the Weather API last week. Still no comment a week later despite the howls of righteous indignation from the developer community. Just for the record, this is no way to run a railroad. Of course, Google had no obligation to continue a service that cost them money except for the fact that it earned them enormous goodwill from those around the globe using their service. Earth to Google: these are the same people that have made your company one of the wealthiest in the technology industry! Some have argued that this was a "private service" that was never intended for use by the public. That, of course, is pure horse #2. Google was well aware of the usage by millions of people worldwide. Does anyone think for a moment that Google lacked the necessary skills to secure the Weather API if they had not wanted people to use it? So let’s get real. Like its fruity corporate neighbor, Google loves to introduce "almost secret" technology and rely upon Buzz (remember that one?) to make it a household word. The Weather API was no secret by any stretch.
And there’s another downside, Google. At a time when you’re supposedly encouraging the notion of Cloud Computing, it does the technology little good when you reaffirm how fragile an organization would be if it chose to actually put all its eggs in one basket and rely upon Google infrastructure. What company in its right mind would consider moving to a platform such as Google Apps for Business after observing this sort of corporate behavior? Electing to begin charging for a service is one thing. Phasing out a service after fair notice to those using it was also an option. But blowing a heavily-used service completely out of the water without warning to those relying upon the service is really unacceptable corporate conduct. Makes one wonder what lies just over the horizon with Google Voice, doesn’t it? We’re big fans of Google. But this time around, I’m sorry. Google gets a well-earned D- in our book.
So the question becomes how do we minimize the carnage and put Humpty back together again for those that foolishly relied upon the Nerd Vittles text-to-speech Worldwide Weather app and its underlying Google Weather API. Fortunately for all of us, there are other players in the Weather API marketplace. Here’s a list of 26 of them. One vendor really stands out from the pack. In fact, many believe that Google itself was using its services to power Google’s own weather API. That service is Weather Underground.
What we’ve done is rework the existing Worldwide Weather application in such a way as to minimize the upgrade hassle for those of you already using the broken one. If you’re just getting started, we’ll put all the working pieces in place so there is no patch required. So choose whether to upgrade or install from scratch from the options below, and we’ll have you up and running in a couple minutes.
Regardless of whether you’re just getting started or upgrading, what you will need (that’s new) is a free Weather Underground API key. This lets you issue up to 10 queries a minute and 500 queries a day against Weather Underground’s weather data. Because current conditions and forecasts are separated into separate queries, it means you can actually dial up 5 queries a minute and 250 queries a day without expense. If your needs are more extravagant, Weather Underground has very reasonable rates. Just follow this link to sign up for your Weather Underground API key. Write it down. You’ll need it in a minute.
Upgrading Existing Worldwide Weather App. If you’re currently using Nerd Vittles’ Google News, Weather, Stocks & Dictionary app or Incredible PBX 4, or Incredible Pi, you can upgrade the included Worldwide Weather component by logging into your server as root and issuing the following commands:
cd /var/lib/asterisk/agi-bin
mv nv-weather-google.php nv-weather-google-old.php
wget http://incrediblepbx.com/wunderground.tgz
tar zxvf wunderground.tgz
rm wunderground.tgz
nano -w nv-weather-google.php
nano -w nv-weather-wunderground.php
When the new weather script displays in the nano editor, cursor down to line 21 and replace 12345 with your actual Weather Underground API key. Be sure to preserve the quotes. Then save your change: Ctrl-X, Y, then Enter. That’s it. You’re back in business. Dial 9-4-9 to obtain a spoken weather report for almost any city in the world.
Installing the New Worldwide Weather App. If you’re new to all of this and would like to use either Incredible PBX 4.0 or just the News, Weather, Stocks & Dictionary app, start by reading all about them at the links above. Once you’ve installed either application, log into your server as root and issue the following commands to insert your new API key:
cd /var/lib/asterisk/agi-bin
nano -w nv-weather-google.php
When the new Worldwide Weather script displays in the nano editor, cursor down to line 21 and replace 12345 with your actual Weather Underground API key. Be sure to preserve the quotes. Then save your change: Ctrl-X, Y, then Enter. Now you’re ready to go. Now you can dial 9-4-9 to obtain a spoken weather report for almost any city in the world.
Test Drive. Want to try the new service out for yourself? We’ve set up a Raspberry Pi with Incredible PBX to demonstrate how easy all of this can be with a $35 computer. Just place a call to 1-843-284-6844, choose option 2, and say the name of the city and state or country for an instantaneous Worldwide Weather Report. Enjoy!
Originally published: Tuesday, September 4, 2012
Astricon 2012. Astricon 2012 will be in Atlanta at the Sheraton beginning October 23 through October 25. We hope to see many of you there. We called Atlanta home for over 25 years so we’d love to show you around. Be sure to tug on my sleeve and mention you’d like a free PIAF Thumb Drive. We’ll have a bunch of them to pass out to our loyal supporters. Nerd Vittles readers also can save 20% on your registration by using coupon code: AC12VIT.
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…
Introducing Incredible Pi: $35 for Asterisk, FreePBX & Google Voice Utopia
It’s Back-to-School Time in most of the United States, and the Nerd Vittles crew needed a good fall project to distract us from all of this year’s dreadful politicians. We feel like a kid in a candy store with our new $35 Raspberry Pi® Model B. Imagine squeezing a 700 mHz ARM processor with 256MB of RAM, 2 USB ports, a 10/100 Ethernet port,if an HDMI port, composite video, a separate audio jack, an SDHC card slot, and a micro USB port onto a motherboard the size of a credit card with a total weight of 1.6 ounces and a typical power draw of 3.5 watts. Thanks to Gernot and his Asterisk for Raspberry Pi project, a full LAMP stack with Asterisk® and FreePBX® gave us a head start on turning the Raspberry Pi into yet another Incredible PBX™ platform complete with Google Voice™ for free inbound and outbound calling throughout the United States and Canada.
Trust us when we say the performance of this $35 computer is nothing short of amazing. Can it do everything a $200 dual-core Atom PC can do? No. Can it do 90% of everything for someone whose requirements do not exceed a few simultaneous calls at a time but still wants a full-blown PBX for call routing, voicemail, IVRs, music on hold, and text-to-speech and speech-to-text apps for a home, a SOHO office, a Little League team, or a dorm room? Absolutely.
Call our Raspberry Pi at 1-843-284-6844 and check out the Incredible Pi Smörgåsbord for yourself.
Other Incredible Pi Resources: Quick Start Guide for Incredible Pi 3.1 and 35 Free Incredible Pi Apps Tutorial
Incredible PBX for Raspberry Pi: What’s Included
If you’ve never heard of The Incredible PBX, here’s the Top 20 for the Raspberry Pi platform. In addition to the base install with Debian 6, Asterisk 1.8, FreePBX 2.10, Apache, SendMail, MySQL, PHP, and phpMyAdmin, Incredible Pi offers the following built-in PBX components using a wired or wireless network connection:
- AsteriDex
- CallerID Superfecta (FreePBX Module adds Names to CID Numbers)
- CallWho for Asterisk (Dial 4-1-1)
- CDR CallerID Name Support (Inbound Calls)
- Preconfigured Email That Works with SendMail (Email Delivery of Voicemail)
- Extension 701 (A preconfigured extension for your PBX)
- Flite Text-to-Speech (TTS) for Asterisk
- Google Speech-to-Text (STT) for Asterisk
- Google News by Phone (Dial 951)
- Google Stocks by Phone (Dial 950)
- Google Voice (FreePBX Module)
- Hotel-Style Wakeup Calls (Dial *68)
- IVR Demo with 9 Sample Applications (Dial D-E-M-O)
- PPTP VPN Client (preinstalled in 1.5)
- Reminders by Phone and Web (Dial 1-2-3)
- SMS Dictator with Google Voice (Dial S-M-S)
- SMS Message Blasting with Google Voice
- Speech-to-Text Directory Assistance (Dial 411)
- Stealth AutoAttendant
- Time of Day (Dial *61)
- Travelin’ Man 3 (1.2 release only)
- Weather by Zip Code (Dial 947)
- Worldwide Weather by Yahoo (Dial 948)
- Worldwide Weather by Weather Underground (Dial 949)
Ordering Information: What It Takes to Get Started
A complete Incredible PBX build for the Raspberry Pi (Incredible Pi™) is finally finished, and we wanted to give you a head start on ordering the pieces you’ll need to get things going since there is a three to five week delay on some of the components due to huge demand. Nothing is ever just $35, of course. So here’s what you’ll need. The Raspberry Pi itself can be ordered from Newark or MCM. Delivery times and stock vary so check both sites. At the time we ordered, they were quoting 5 weeks. We actually got one from Newark in one week, and as of now MCM has some in stock for immediate shipping. You also need a power adapter. If you have a micro USB power brick for your cellphone, chances are it will work. As long as it’s at least 1 amp and 5 volts, you’re good to go. The recommended 700 mA adapters have reportedly caused issues for some folks so splurge and order a good one. They’re $10 from Amazon while supporting Nerd Vittles.1 If you plan to add the WiFi adapter covered below, you will need at least 1.2 amps to avoid lockups. Next, you’ll need an SDHC card which serves as your hard disk. Be very careful here. The Type 10 cards which arguably would provide the best performance turn out to be a nightmare. Many of them simply don’t work. For a basic system, we’d recommend you start with either the SanDisk 4GB or 16GB SDHC Type 4 card. The 4GB card is available almost everywhere for under $10, or you can order two from Amazon with free Prime shipping for about the same money. If you already have a USB keyboard and a monitor or TV with an available HDMI port or composite video and audio ports, then you’ve got everything you need to get started. Actually, you can do without the monitor and use SSH if you’re either using Incredible Pi 1.3 or if you can decipher the DHCP address of Incredible Pi by reviewing your firewall log. With version 1.3 and beyond, you can plug in a pair of earbuds, and the server will whisper your IP address in your ear after the boot process completes. By the way, you may also want to put your name in the queue for a Pibow case, completely unnecessary but very cute with a long waiting list. It costs almost as much as the computer.
For down the road, suffice it to say, you’re probably not going to want to run Asterisk, FreePBX, and Google Voice on a disk platform of 4 gigabytes although our demo system does exactly that. Between Debian 6.0, Asterisk 1.8, FreePBX 2.10 plus numerous Incredible PBX utilities, well over half of the available 4GB will be consumed by software. For distribution purposes, we’re providing an image that you can write directly to the SDHC card. Unfortunately, the image size determines the amount of space it will actually use on an SDHC card. We will cover below how you can install the 4GB image onto a 16GB card and then expand the size of the main partition to fill the remaining space on the card. But it wouldn’t make sense to distribute a 16GB image because of bandwidth issues. So we’d recommend you purchase a 16GB SanDisk Type 4 SDHC card for production use. Take our advice. Don’t get creative in choosing your SDHC card. Use the one that we’ve already tested and that we know works. If you want to skip the 4GB card completely, that’s perfectly fine, too. The 16GB Type 4 SanDisk card is under $10 from Amazon with free Prime 2-day shipping, or you can pay double and pick one up at your neighborhood Radio Shack store. We’ll also show you how to back up your SDHC card (any size) with your own settings and restore it onto a 16GB card without missing a beat. Unfortunately, once you migrate and expand the main partition on the 16GB card, you’re stuck with that topology. There’s no going back without starting over, and your backups will consume 16GB of storage rather than 4GB. But it sure is convenient… and easy. By the way, here’s a more reasonably priced case and here’s an awesome clear case if you just want something that’s functional.
Finally, you’re going to need an existing Linux server or Mac on which to create your bootable SDHC cards for use with Raspberry Pi. You’ll also need this server to make backups of your existing setup. DD is a wonderful low-level disk copying utility found in Linux, and we’re going to be using it a lot. PBX in a Flash with or without Incredible PBX makes an ideal platform because all of the necessary SDHC disk management utilities already are installed. If you’re not using our recommended Foxconn server, then you’ll need a server with an SDHC card slot, or you can purchase an inexpensive USB-to-SDHC adapter from Amazon for under $2. Without the case, you can build an awesome Asterisk platform for home or SOHO use for under $50, and it can handle 3 simultaneous SIP calls without noticeable degradation.
Here’s a shot of our favorite Incredible Pi setup. You’ll need the LAN cable for the initial boot so that you can SSH into the device to plug in your WiFi SSID name and password. You’ll need the earbuds for the first and second boot to decipher the IP address of the device on your LAN, wired and wireless. No monitor connection is ever required. Just log in with SSH from your Mac or PC. After the first two boots, you can dispense with the CAT5 cable and the earbuds. All of the components are covered in this article.
Creating a Bootable Incredible Pi SDHC Card
SanDisk SDHC Type 4 cards come pre-formatted so all you need to do is insert the card into the SDHC slot of your Asterisk server and reboot it. If you prefer to use a Mac, go here for the tutorial. Before you insert your SDHC card and reboot, log in as root and run the following command: fdisk -l. This will tell you what the existing disk topology of your server is. Write it down. What you don’t want to do is accidentally choose your main Linux drive as the device to copy the Incredible Pi image to, or you end up with a mess. Now insert your SDHC card and reboot your Asterisk server so your SDHC card will be visible. Then run fdisk -l again to decipher the device node of your card. It should be at the bottom of the list and will be something like /dev/sdb. We don’t use /dev/sdb1 in the dd transfer step below, just the base devnode: /dev/sdb or whatever letter your SDHC drive happens to be.
Next, using a web browser, download the latest Incredible Pi image and transfer it to the /root directory of the Linux computer you’ll be using to copy the image to your SDHC card. As we said, we recommend a PBX in a Flash server because it has all of the SDHC utilities already included. Incredible Pi is a free download from SourceForge. The feature sets are described in the SourceForge readme.txt file. Once you’ve copied the desired tarball to your Linux server, decompress it: tar zxvf incrediblepi-1.x.tgz where x is the version you downloaded. Verify the integrity of the image file using md5sum:
1.7: md5sum debian6-incrediblepi-10-09-2012.img => e601ecd890a400de2e03009c034353c2
2.1: md5sum debian7-incrediblepi-16-09-2012.img => 007efb9d2cdf86f054c5cf26c4f5de9a
Finally, run the Linux install script: ./make-sdhc. It takes about 30-60 minutes to copy the image to your SDHC card. If you have a Mac, copy make-sdhc-mac to your Downloads folder and use it.
While you’re waiting, you can read about all the latest changes and additions to Incredible Pi here.
If you’re using our recommended 16GB SanDisk Type 4 SDHC card, then what you have at this juncture is a 16GB card on which only 4GB is being used. Here’s how to expand the main partition to use the other 12GB of space on the card while logged in as root. First, we need to make sure your card’s geometry matches our card setup. From the command prompt, issue the following commands using the proper device node (/dev/sdb) of your card:
parted /dev/sdb
(parted) unit chs
(parted) print
Here’s what you should see:
If the geometry of your card doesn’t match what’s shown above, do NOT use our commands below to adjust your card. Instead, review the original tutorial explaining what needs to be done.
If your geometry matches our geometry above, issue the following commands while still in parted:
move 3 239943,0,0
[press enter to accept default End]
rm 2
mkpart primary 1232,0,0 239942,3,31
print
After entering the above commands, your new card geometry should look like this:
Now type quit. Then complete the resizing by issuing the following commands using your correct device node:
e2fsck -f /dev/sdb2
resize2fs /dev/sdb2
sync
Remove the card from your Linux machine and insert it into the SDHC card slot on the Raspberry Pi.
We’ve also found one 32GB Type 10 card that’s reliable, the Kingston Ultimate X (SD10G2/32gb) which costs about $40 at Amazon. We’ve included the resizing steps below:
fdisk -l
parted /dev/sdb
unit chs
print
move 3 483887,0,0
[press enter to accept End address]
rm 2
mkpart primary 1232,0,0 483886,3,31
print
quit
e2fsck -f /dev/sdb2
resize2fs /dev/sdb2
sync
Preparing the Raspberry Pi for Blastoff
Once the card is in place, there are a few more preliminary steps before you apply power to the device. Plug in a CAT5 LAN cable that is connected to your firewall-protected private network. Make certain that your router is handing out DHCP addresses properly since the Raspberry Pi can’t boot without a network connection to obtain the correct time from an NTP server on the Internet. It has no onboard time clock! Plug in a USB keyboard to one of the two USB ports on the Raspberry Pi. Connect either an HDMI or composite video cable between the Raspberry Pi and a monitor or TV. Finally, plug in a reliable power adapter and insert its micro USB connector into the slot on the Raspberry Pi. You should immediately see a raspberry on your screen with a scrolling list of commands that are executing while the Raspberry Pi is booting. Watch carefully. If you see a bunch of "waiting for hardware interrupt" notices, then you didn’t heed our advice on the type of SDHC card to use. Your card is not compatible for use on the Raspberry Pi so reformat it and use it with your camera. Then go buy the SanDisk card we recommended. The entire boot process should take about 30 seconds. With an incompatible card, that can stretch out to more than an hour. When the boot process completes, the IP address of your Incredible Pi should be displayed with a Linux login prompt. Write down your IP address. You’ll need it in a minute.
Securing Incredible Pi
Congratulations! You’re now ready to begin the Incredible Pi adventure. But, before we get started, first things first. Let’s secure your server. Log in with the username: pi. The password is raspberry. Now change the password to something really secure by issuing the command: passwd. Now do the same thing for the root password of the device: sudo passwd root.
Next, we need to set the default timezone on your machine for both Linux and PHP5. First, switch to the root user account so we don’t have to type sudo before each command: su root. Enter your new root password when prompted. Then run this command to set the default timezone with Debian: dpkg-reconfigure tzdata. For PHP5, you have to manually enter the timezone in the php.ini file: nano -w /etc/php5/apache2/php.ini. Press Ctrl-W to search for timezone. Be sure the line is uncommented and plug in your correct timezone. If you don’t know the magic words to use for your timezone, here’s the list. Save the file: Ctrl-X, Y, and press Enter. Now restart Apache: service apache2 restart.
First, we need to remove the default DUNDI secrets from Asterisk so fresh ones can be automatically generated when you restart Asterisk.
asterisk -rx "database del dundi secret"
asterisk -rx "database del dundi secretexpiry"
amportal restart
Now we need to do the same thing for your SSH keys:
rm /etc/ssh/ssh_host_* && dpkg-reconfigure openssh-server
Now let’s be sure Asterisk is up and running. Then you can continue your adventure using a web browser and the FreePBX GUI. Before we switch, start up the Asterisk CLI: asterisk -rvvvvvvvvvv. Verify that Flite is functioning for TTS: core show application like flite. And make sure the MySQL components are in place to support CDR reporting: module show like mysql. Finally, let’s verify that Jabber is alive and well even though we haven’t set up any Google Voice accounts yet: jabber show connections.
Finally, a few words of warning about security. Incredible Pi is designed to run behind a hardware-based firewall with no Internet exposure to the server itself. Don’t cheat! Prior to the 1.2 release, there are no security mechanisms in place: no IPtables firewall and no Fail2Ban. Beginning with Incredible Pi 1.2, the Linux firewall (iptables) is included, but our recommendation still stands unless you are using the preinstalled Travelin’ Man 3 to enable access of a remote phone connection to your PBX.
All builds do include Suhosin which has been properly configured to facilitate use of phpMyAdmin with MySQL. Within FreePBX, you can secure extensions with strong passwords and IP address filtering, and you need to do that. Exposing Incredible Pi‘s web server to Internet access would be an open invitation to an expensive phone bill. Don’t do it! You’ve been warned.
Securing Incredible Pi with Travelin’ Man 3
Travelin’ Man 3 is a collection of programs that implement firewall whitelists (safe IP addresses) using the Linux firewall, iptables. Before you ever expose your server to any kind of Internet access, read the Nerd Vittles Travelin’ Man 3 article. As delivered with Incredible Pi 1.2 and later, iptables is configured to block all access to your server except from non-routable IP addresses (typically used on LANs sitting behind hardware-based firewalls). The one exception is SIP and IAX access from VoIP Trusted Providers. This allows you to add trunks to your server from these providers without touching your firewall settings.
There are instances in which you may actually need to connect your server from a public Internet site. For example, if you travel for a living and want to use a softphone connected back to your server from a distant hotel room or customer site, you would need access through both your hardware-based firewall and iptables. If one of your children is away at school and needs a free telephone connection, this might also warrant a change in your firewalls. Because of the low cost of a Raspberry Pi, we still believe AND RECOMMEND that you use separate servers to meet remote requirements.
If you still believe remote access is necessary after reading the Travelin’ Man 3 article, then the tools are available by logging into your Incredible Pi server as root and changing to the /root directory. Here are the four apps:
For whiz kids only, Debian manages iptables quite differently than what you may be accustomed to on the CentOS platform. Debian stores iptables rules in /etc/network/iptables. You can reload the iptables rules like this: iptables-restore /etc/network/iptables. And you can display the rules currently in effect like this: iptables-save. Be careful!
Configuring Incredible Pi with FreePBX
Now we’re ready to configure Incredible Pi so that you can start making and receiving calls. We’ll be using the FreePBX web GUI. To begin, using a browser on your desktop, access Incredible Pi by pointing to the IP address of your server (that you wrote down above). Choose FreePBX Administration at the main menu. When prompted for your username and password, enter admin for both.
If you’re new to Asterisk, here’s the one paragraph primer on what needs to happen before you can make free calls with Google Voice. You’ll obviously need a free Google Voice account. This gets you a phone number for people to call you and a vehicle to place calls to plain old telephones throughout the U.S. and Canada at no cost. You’ll also need a softphone or SIP phone to actually place and receive calls. YATE makes a free softphone for PCs, Macs, and Linux machines so download your favorite and install it on your desktop. Phones connect to extensions in FreePBX to work with Incredible Pi. Extensions talk to trunks (like Google Voice) to make and receive calls. FreePBX uses outbound routes to direct outgoing calls from extensions to trunks, and FreePBX uses inbound routes to route incoming calls from trunks to extensions to make your phones ring. In a nutshell, that’s how a PBX works. There are lots of bells and whistles that we will cover later.
Before you do anything else, change your admin password to access FreePBX. From the main FreePBX GUI, choose Admin => Administrators. Next, set your default email address at the bottom of Settings -> General Settings.
So here’s our 7-Step Checklist to set things up. After you complete these steps, you can start making free calls throughout the U.S. and Canada. And people can call you using your new Google Voice number.
1. Create a free Google Voice account
2. Set up Extension to connect to softphone
3. Create a Google Voice Trunk using GV credentials
4. Create an Inbound Route from Google Voice to Extension
5. Create an Outbound Route from Extension to Google Voice
6. Download and Configure YATE softphone
7. Make Your First Call
Creating a Free Google Voice Account
You’ll need a dedicated Google Voice account to support Incredible Pi. 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 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 Incredible Pi. 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. Don’t use funky characters in your Google password! If you’re living on another continent, see MisterQ’s posting for some setup tips.
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 Incredible Pi 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
- Call Options (Enable Recording) – OFF
- Global Spam Filtering – ON
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 with Incredible Pi.
Configuring an Extension to Use with a SIP Phone
As mentioned, an Extension is the component in FreePBX that actually interfaces with a telephone. Whether to use a hardware-based phone or a softphone is your choice. Without an adapter, POTS phones won’t work with Incredible Pi. You’ll need a SIP phone. We’ll set up a softphone today to get you started, but first we need to configure an extension in FreePBX. We’ve actually made one for you to use, extension 701. So, rather than create a new one, let’s just modify the one that’s already in place. You can add additional extensions later to support additional phones.
From the main FreePBX GUI, choose Applications -> Extensions. Then click on 701 in the Extension List on the right side of your display. You’ll see a form that looks like this:
For now, we only need to make a few changes. First, you need a very secure password for both the extension itself and your voicemail account for this extension. The extension secret needs to be a combination of letters and numbers. The Voicemail Password needs to be all numbers, preferably six or more. Replace the existing 1234secret and 1234 with your own (very secure) entries. You also need to lock down this extension so that it is only accessible from devices on your private LAN. You do that with the deny and permit entries which currently are filled with zeroes. Leave the deny entry the way it is which tells Incredible Pi to block everybody except those allowed in the permit entry below. For the permit, we need the first three octets of your private LAN address, e.g. if your LAN is 192.168.0.something then the permit entry will be 192.168.0.0/255.255.255.0.
Finally, you need to plug in your actual email address in the Voicemail section so that voicemails can be delivered to you when someone leaves a message. You can also include a pager email address if you want a text message alert with incoming voicemails. If you want the voicemails to automatically be deleted from the server after they are emailed to you (a good idea considering the disk storage limitations of an SDHC card), change the Delete Voicemail option from No to Yes. That’s it. Now save your settings by clicking the Submit button. Then reload the dialplan by clicking on the red prompt when it appears.
In case you’re curious, unless you’ve chosen to automatically delete voicemails after emailing them, you can retrieve your voicemails by dialing *98701 from any extension on your phone system. You’ll be prompted to enter the voicemail password you set up. In addition to managing your voicemails, you’ll also be given the opportunity to either return the call to the number of the person that called or to transfer the voicemail to another extension’s voicemail box. And you can always leave a voicemail for someone by dialing their extension number preceded by an asterisk, e.g. *701 would let someone leave you a voicemail without actually calling you.
Activating a Google Voice Trunk in FreePBX
To create a Trunk in FreePBX to handle calls to and from Google Voice, you’ll need three pieces of information for the Google Voice account you set up above: the 10-digit Google Voice phone number, your Google Voice account name, and your Google Voice password. Once you have these in hand, choose Other -> Google Voice from the FreePBX GUI. The following blank form will appear:
Fill in the blanks with your information and check all 3 boxes. If your Google Voice account name ends in @gmail.com, you can leave that out. Otherwise, include the full email address. Then click Submit Changes and reload your dialplan when prompted.
There’s one more step or your Google Voice account won’t work reliably with Incredible Pi! From the Linux command prompt while logged into your server as root, restart Asterisk: amportal restart
Creating an Inbound Route for Your Google Voice Trunk
Now that you’ve created your Google Voice Trunk, we need to tell FreePBX how to process the call when someone dials your Google Voice number. There are any number of choices. You could simply ring an extension. Or you could ring multiple extensions by first creating a Ring Group which is just a list of extension numbers. Or you could direct incoming calls to an Interactive Voice Response (IVR) system (we’ve actually set one up for you to play with). For the time being and since you only have one extension at the moment, let’s just route incoming Google Voice calls to extension 701.
To do this, you create an Inbound Route based upon the DID (phone number) of the Google Voice trunk. In FreePBX, choose Connectivity -> Inbound Routes. Fill in the form so that it looks like the example below using your own 10-digit Google Voice description and number instead of Atlanta GV and 6781234567. Be sure to set the Destination.
Then click Submit. But, before you reload the dialplan, make one change to the form. Click on the CID Lookup Source pull-down menu and choose CallerID Superfecta. This tells FreePBX to actually add names to phone numbers when someone calls. Now click Submit again and reload the dialplan when prompted.
Creating an Outbound Route for Google Voice Calls
FreePBX is actually smart enough to create an outbound route for your new Google Voice trunk so that you can place calls from any extension by dialing either a 10-digit number or 1 plus a 10-digit number to call anyone in the U.S. or Canada. If that’s all you care about, you can skip to the next section. But there’s more.
You can have more than one Google Voice trunk with Incredible Pi, and each one could be in a different area code. For example, you may do business in many different places and would like a local number for folks to call. Or Grandma may live in a distant city, and you’d like her to be able to call you without paying long distance charges. Then there are the kids. If you have three, you might want to give each of them their own Google Voice number which would ring just their phone. And, for outbound calls, you’d like each of them to use their own Google Voice trunk. All of these options are possible with Incredible Pi.
For outbound calls with multiple Google Voice trunks, you need a way to tell the system which trunk to use. We recommend dial prefixes that identify the city of the trunk, e.g. ATL, NYC, MIA. Or, for the kids, a dial prefix made up of initials, e.g. KHM, RWM, JSM. These dial prefixes get stripped off before the call is actually placed so the prefix is only used to determine the trunk used for placing the call.
To implement dial prefixes, you’ll need to adjust the default entries for your Google Voice Outbound Routes by adding the prefix option as an additional Dial Pattern. Here’s an example using an Atlanta Google Voice trunk where we want to allow a prefix of ATL-XXX-XXX-XXXX to force a call to go out on the Atlanta Google Voice trunk:
Another option may be appealing if you happen to make a lot of international calls and don’t want to pay for them. First, you can read all about iNum calling in this Nerd Vittles article. Another hidden feature in Google Voice is the ability to place iNum calls worldwide at no cost. To implement this, you’ll need to add another Dial Pattern to your Google Voice trunk. Prepend: 8835100 with Match Pattern: XXXXXXXX. Now you can dial iNum DIDs by dialing just the last 8 digits using any phone on your server. For example, try out the Nerd Vittles’ Dictionary Demo by calling 09901997. There also are a huge number of iNum Access Numbers that will let you call back to your server or any other iNum DID from almost anywhere in the world at no cost. These are covered in the Nerd Vittles article as well.
Configuring a YATE Softphone
As we mentioned, the easiest way to get started with Incredible Pi is to set up a YATE softphone on your Desktop computer. Versions are available at no cost for Macs, PCs, and Linux machines. Just download the appropriate one and install it from this link. Once installed, it’s a simple matter to plug in your extension 701 credentials and start making calls. Run the application and choose Settings -> Accounts and click the New button. Fill in the blanks using the IP address of Incredible Pi, 701 for your account name, and whatever password you created for the extension. Click OK.
Once you are registered to extension 701, close the Account window. Then click on YATE’s Telephony Tab and place your first call. It’s that easy!
Configuring Email Messaging
Incredible Pi comes preconfigured with SendMail to provide reliable delivery of outbound email messages. You can test it by logging in and issuing the following command using your own email address instead of yourname@gmail.com:
echo "test" | mail -s testmessage yourname@gmail.com
If you don’t receive the message, chances are that your Internet Service Provider blocks downstream mail servers from sending email to reduce spam. To fix it, the simplest way is to configure SendMail to use your ISP as the smart relay host for outbound mail, e.g. with Comcast, it’s smtp.comcast.net. It takes about 10 seconds to configure. After logging in as root, edit /etc/mail/sendmail.cf. Change line 116 from DS to DSsmtp.comcast.net using the SMTP gateway domain of your ISP. Save your change and restart SendMail: service sendmail restart. Then send another test message to make sure it works. If that fails, you can use Gmail as the mail relay. Here’s how. Now voicemail messages delivered directly to any email account by inserting your email address in the Voicemail section of the extension accepting your voicemail messages.
Configuring SMS Messaging
Incredible Pi also allows you to dictate messages and deliver them to any phone which accepts SMS messages. Just dial S-M-S (767) from any extension on your server. In addition, you can use Incredible Pi’s Message Blaster to send SMS messages to a group of individuals, e.g. a Little League team. In order to use SMS messaging, you must have at least one Google Voice account configured on your server. Then it’s a simple matter of inserting your Google Voice account name and password in two files. First, edit extensions_custom.conf in /etc/asterisk. On the second line of the 767 extension, replace acctname with your Google Voice account name (without @gmail.com). On the third line, replace acctpass with your Google Voice password for this account. Reload your dialplan to activate the new settings:
asterisk -rx "dialplan reload"
For the message blasting service, change to the /root directory. Insert the numbers to be dialed in the smslist.txt file following the example in the file. Enter the SMS message to be sent in smsmsg.txt keeping in mind that many phone providers limit SMS messages to 140 characters or less. Finally, insert your Google Voice account name (with @gmail.com) and password in smsblast. To kick off an SMS message blast, just issue the command: ./smsblast.
Configuring SAMBA for Windows Networking Support
Beginning with Incredible Pi 1.4, SAMBA is included in the distribution for transparent access using the Windows Networking Protocol from PCs, Macs, and other Linux machines. As delivered, SAMBA is deactivated. For obvious reasons, we recommend you never activate root login access to SAMBA. If you wish to enable SAMBA on your server, here are the steps while logged in as root:
- 1. Set SAMBA password for user pi: smbpasswd -a pi
- 2. Change Windows workgroup from WORKGROUP, if needed: nano -w /etc/samba/smb.conf
- 3. Manually start SAMBA from command prompt: service samba start
- 4. Set SAMBA to start on boot: rcconf and activate SAMBA option with space bar
- 5. reboot
A Word of Warning: We’ve apparently reached the end of Memory Lane with SAMBA. Only activate it permanently (#4) after thoroughly testing it (#3) in your environment. We have found TTS IVRs in particular to be less than stable with SAMBA running.
Troubleshooting Audio Problems with Phone Calls
For most good routers/firewalls, there should be no problems connecting calls with Google Voice or SIP calls inbound or outbound. If you place a call and the audio is missing in one or both directions or your end of the call continues to ring even after the other person has answered, these are telltale signs of NAT and RTP connection issues. The quick fix is to plug in your public IP address and private LAN information under Settings -> Asterisk SIP Settings -> NAT Settings in FreePBX. If you continue to have connectivity issues, post the symptoms of your problem on the PIAF Forum and one of our helpful gurus will offer additional suggestions. Be sure to include the make and model of your router/firewall.
Using AsteriDex
Incredible Pi includes a robust phonebook application that uses MySQL for storage. You can access it with a browser by pointing to the following link using the IP address of your own server: http://192.168.0.185/asteridex4. Some entries for your favorite airlines are included to get you started. You can add, change, and delete entries under the Admin panel.
By dialing 411 from any phone on your system, you can speak the name of any entry in your AsteriDex database, and Incredible Pi will look up the name and dial the number. Try American Airlines just for fun.
Managing CallerID Superfecta
What began with our first release of CallerID Trifecta many years ago now has grown into one of the best examples of collaborative computing in the open source community. Maintained by the PBX Open Source Software Alliance, CallerID Superfecta now performs a number of functions in addition to matching names against phone numbers. Today you can display incoming call alerts and pop-ups on all sorts of devices in your home or office including XBMC, SqueezeBox, Winunciator, and many more. You can tailor CallerID Superfecta to meet your own local needs by opening the Default Superfecta tab under Other -> CallerID Superfecta in FreePBX. As with all database lookups, they take time. So keep in mind that you are trying to find the best match for inbound calls that takes the least time to retrieve corresponding CNAM information for the caller. To facilitate your search for the perfect combination, CallerID Superfecta includes a testing facility which will report the time required for each lookup. Then you can sort your lookup sources accordingly. To follow the latest developments, visit this thread on the PIAF Forums.
Adding Wireless Network Support
Particularly with a device the size of the Raspberry Pi, you may find it more convenient to place the unit on a bookshelf where a wired network connection is not feasible. This setup already is included in Incredible Pi 1.1 and later. For those using the 1.0 release, here’s how to use your Raspberry Pi wirelessly. First, order a TP-Link TL-WN722N USB 802.11n WiFi Adapter from Amazon for under $20. You won’t need a USB extender cable. This device can easily be plugged into one of the two USB slots without jeopardizing your ability to also connect a USB keyboard. Be sure your 5V power adapter is rated at 1.2 amps or greater to avoid lockups!2
We recommend the 1.3 Incredible Pi release or later if you plan to go the wireless route. All of the wireless networking components already are in place. Log into Incredible Pi as root (or su root for purists) and edit /etc/wpa.conf. Insert the SSID name and password for your wireless access point. Then reboot your server and wireless networking "just works."
Beginning with the 1.3 release, support has been added for the ultra-tiny AirLink 101 Wireless N adapter (AWLL5088). The setup process is identical to the 1.1 setup above. Just edit /etc/wpa.conf and insert the SSID name and password for your wireless access point. We strongly recommend disabling network connections that you aren’t using, e.g. eth0 and wlan0 if you go the AirLink 101 route. Just edit /etc/network/interfaces and comment out the eth0 line as well as the block of commands pertaining to wlan0. Then reboot, a process that now will be much quicker. If you plug in earbuds when you reboot, Incredible Pi 1.3 or later will read you the DHCP-assigned IP address when the boot process finishes so you no longer need a monitor. SSH can be used to connect to your server from any desktop PC or Mac.
Adding a PPTP VPN Client to Incredible Pi
If you’ve followed the Nerd Vittles tutorial and previously set up a PPTP VPN Server for your devices, then it’s pretty simple to add Incredible Pi to the mix by activating a PPTP VPN client. It’s only a few steps. You’ll need the FQDN or public IP address of your VPN server as well as a username and password for VPN access to your VPN server. Once you have those in hand, log into Incredible Pi as root.
Lest we forget to mention, you cannot log into your PPTP server from an IP address on the same private LAN so you’ll need to take your Incredible Pi device to a neighbor’s house to test this.
If you’re using Incredible Pi 1.5 or later, all of the PPTP VPN client software already is in place. Edit the connection template: nano -w /etc/ppp/peers/my-pptp-server. Insert the following text and replace myfqdn.org with the FQDN of your PPTP server, replace myname with your PPTP username, and replace mypassword with your PPTP password. Then save the file: Ctrl-X, Y, then Enter.
Now activate the PPTP VPN client. On your Incredible Pi server, run rcconf. If you’re using a release prior to 1.4, you’ll need to install rcconf first with the command: apt-get install rcconf. Scroll to the bottom of the list until you’ve highlighted pptp. Press the space bar to select it for automatic startup when you boot your server. Then tab to OK and press Enter.
To test it, issue the following command: /etc/init.d/pptp start. When you run ifconfig, you should now see a ppp0 entry:
ppp0 Link encap:Point-to-Point Protocol
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Remember, it won’t show an IP address if the Raspberry Pi and your PPTP VPN Server are on the same subnet (like ours). Once you install your Raspberry Pi in a remote location, you now can access it at the first IP address in your reserved PPTP IP address pool.
Power Adapters: The Hidden Gotcha
We’ve learned a lot about power adapters since acquiring the Raspberry Pi. First, not all adapters are created equal. Second, the type adapter you require depends upon what you’ve plugged into those USB ports. If one of the residents is a WiFi adapter, then the power draw of the WiFi adapter can add an additional wrinkle.
Here’s what we’ve found. If you decide to use the TP-Link TL-WN722N adapter, you’ll need a power adapter rated for at least 5V, 1.2 amps. These are few and far between and many adapters rated at even higher amperages (and not U/L approved) still won’t keep your RasPi from crashing regularly. We have had good results with $9.99 RND Power Solutions 2.1A Dual USB AC Adapter so long as you use the USB port closest to the red light and leave the second USB unoccupied.
If you use the AirLink 101 WiFi adapter or no WiFi adapter, then a less expensive 5V, 1A adapter may suffice. They’re typically about half the price, but some users have reported issues. For testing results and details, see this thread.
We’ve tested these adapters, and they both work. We can also count on both hands the number of adapters we tested that fail to keep the Raspberry Pi functioning. If you have a 1.2+ amp adapter from a reputable tablet computer, that will probably work as well. These replacement adapters tend to cost $25 or more. So the choice is yours. If your Raspberry Pi experiences frequent lockups, then an underperforming power adapter is the likely culprit, not the Raspberry Pi itself.
VoIP Redundancy: Use It to Your Advantage
As much as we love Google Voice, things do go wrong from time to time. The real beauty of VoIP telephony is there’s absolutely no reason to put all of your eggs in one basket. Multiple providers don’t cost you much particularly if you don’t use them regularly. And, when things go wrong, you won’t have to scramble to continue making phone calls. Vitelity has been a generous, long-term supporter of Nerd Vittles and our projects. You’ll find a compelling offer below, and we encourage you to consider them. Here’s the Incredible PBX Top 20 Trunk List with some reasons why these providers made our short list:
- AxVoice ($14.99/mo. Business Plan; $16.58/mo. Unlimited Calls to 45 Countries)
- CallCentric (Good International Calling Rates; Free iNum DID)
- DIDforSale (20 channels per DID; unlimited DID calls for $8.99/mo.)
- ENUM
- FlowRoute (Good International Calling Rates)
- FreeNum
- Future-Nine (Supports CallerID Spoofing)
- Google Voice (Free DIDs and free U.S./Canada calling)
- IPkall (Free SIP/IAX DIDs)
- Les.net (Supports CallerID Spoofing; very low rates)
- LocalPhone (Dirt-cheap DIDs and calling rates worldwide; Free iNum DID)
- Simon Telephonics (Free SIP-to-GoogleVoice Gateway)
- SIPgate (Free residential DIDs sometimes)
- Skype (Free Skype-to-Skype calls worldwide)
- Teliax (Unlimited inbound DID $5/mo.)
- Vitelity (Our supporter and the Best in the Business!)
- VoIPms (CallerID spoofing; Free iNum calling; Very low rates)
- VoIPMyWay (Residential Unlimited: $15.50/mo. Business Unlimited: $40/mo.)
- VoIPStreet (Free DID)
Making Backups of Incredible Pi
Last, but not least, you’ll need to make periodic backups of your Incredible Pi system unless you don’t mind starting over when disaster strikes. It’s easy using almost any Linux server, and it’s especially easy with a PBX in a Flash server.
To begin, shutdown your Incredible Pi server gracefully: sudo shutdown -h now. Once the display shows that the system has halted, unplug it and remove the SDHC card. Then insert the SDHC card into the slot or reader on your PIAF system and reboot the server. Log into your server as root and issue the fdisk -l command to decipher the devname of your SDHC disk, e.g. /dev/sdb. To make a backup of your SDHC card, issue the following commands using today’s date and the proper devname for your SDHC drive:
dd if=/dev/sdb of=/root/incrediblepi-08-20-2012.img
sync
gzip /root/incrediblepi-08-20-2012.img
When the process is finished, you’ll have a compressed image roughly one-third the size of your SDHC card.
Firmware and Kernel Updates
Only after making a backup, you may find it helpful to upgrade your Raspberry Pi firmware and kernel from time to time. Releases of Incredible Pi below 1.4 do not have the firmware updating tool in place. So you’ll first have to install it. Log into your server as root and issue these commands:
wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update
chmod +x /usr/bin/rpi-update
You can decipher the kernel currently running on your Raspberry Pi by issuing the command: uname -a
To determine GPU’s firmware version, issue the command: /opt/vc/bin/vcgencmd version
Once the updater has been installed (and after you’ve made a backup!), you can update your Raspberry Pi’s kernel and firmware to the latest and greatest by issuing the following commands while logged in as root. The latest kernel addresses some issues with the USB ports and is worth installing: raspberrypi 3.2.27+ #66 PREEMPT Fri Aug 24 with GPU firmware version 332937.
rpi-update
reboot
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.
Originally published: Monday, August 20, 2012
Continue Reading… Incredible PBX for Raspberry Pi Turns 21
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! In fact, there is a thread dedicated to support of Incredible Pi. Please have a look and post your support questions there. 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.
Bug Fixes. A few bugs are to be expected. If you’re using Incredible Pi, please review these on the PIAF Forum. A serious problem with IPtables has now been fixed in Incredible Pi 1.5. A patch for previous versions is on the forum.
Astricon 2012. Astricon 2012 will be in Atlanta at the Sheraton beginning October 23 through October 25. We hope to see many of you there. We called Atlanta home for over 25 years so we’d love to show you around. Be sure to tug on my sleeve and mention you’d like a free PIAF Thumb Drive. We’ll have a bunch of them to pass out to our loyal supporters. Nerd Vittles readers also can save 20% on your registration by using coupon code: AC12VIT.
Need help with Asterisk? Visit the PBX in a Flash Forum.
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…
- DISCLOSURE: Most Amazon referral links include a Nerd Vittles referral code so that Amazon can send us a boatload of money each month. It costs you nothing while keeping the Nerd Vittles lights burning brightly. We never recommend Amazon unless their prices or products are the best we could find at the time of publication. [↩]
- The TP-Link adapter is no longer recommended due to it substantial USB power requirements. We recommend the AirLink 101 which can coexist with a 5V, 1A power supply. You must use Incredible Pi 1.3 or later. [↩]
Asterisk TTS: Today in History 2.0 & Yesteryear’s Time of Day
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 upgraded 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 of interest from HistoryOrb.com and play the results back to you over the phone using Google TTS. 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 instantaneously.
As a bonus, there’s TrimLine’s new Time of Day application for your Asterisk server that works just like it did in yesteryear. You can read all about it and install it from this link.
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 Today in History 2.0 in just a few seconds. For other users, you’ll need an Asterisk server with PHP5 and Flite to handle portions of the text-to-speech. No extras are needed for the Time of Day application.
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 dialplan, you’re ready to go. For a quick demo, dial 1-650-308-9946.
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 Google’s TTS engine is used to convert the text file into /tmp/today.wav. The dial plan code 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/today2.pbx
chmod +x today2.pbx
./today2.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 /var/lib/asterisk/agi-bin
wget http://bestof.nerdvittles.com/applications/today/today.tgz
tar zxvf today.tgz
rm -f today.tgz
asterisk -rx "dialplan reload"
Upgrading from Today in History 1.0. If you used this script previously, a couple of ugly things have happened to make it stop working. First, Yahoo dropped support for their Today in History RSS feed. And then Cepstral released an upgrade which no longer lets you create .wav files from a text file without paying an additional $200 license fee. So the new release doesn’t use Cepstral. Everything is handled (and handled well) by the Google TTS engine… which is free to use.
If you have an older version of Cepstral that still permits the creation of .wav files, then you can upgrade just the original AGI script. Log into your server as root and issue the following commands:
cd /var/lib/asterisk/agi-bin
rm nv-today.php
wget http://bestof.nerdvittles.com/applications/today/today.zip
unzip today.zip
chown asterisk:asterisk nv-today.php
chmod +x nv-today.php
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 will be played back over your phone. To eliminate the pause the first time the application is run each day, simply add the crontab entry as outlined above. Enjoy!
Originally published: Monday, August 6, 2012
Astricon 2012. Astricon 2012 will be in Atlanta at the Sheraton beginning October 23 through October 25. We hope to see many of you there. We called Atlanta home for over 25 years so we’d love to show you around. Be sure to tug on my sleeve and mention you’d like a free PIAF Thumb Drive. We’ll have a bunch of them to pass out to our loyal supporters. Nerd Vittles readers also can save 20% on your registration by using coupon code: AC12VIT.
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…
Googlicious: News, Weather, Stocks & Dictionary for Asterisk
Let’s face it. There are certain kinds of information you just don’t want to be without. And now a treasure trove of Google content is as close as your nearest Asterisk® telephone. Thanks to Google and Lefteris Zafiris, open source Asterisk text-to-speech (TTS) and speech-to-text (STT) tools are having a banner year. We wanted to join the party and offer a free collection of new Asterisk apps in conjunction with Lefteris’ new toolkits so you can take advantage of Google’s latest news, weather, and stock feeds as well as Google’s online dictionaries. Read all about the Google XML feeds here. As with most of Google’s experimental projects, there’s no guarantee that these feeds will work next year… or even next week.
With all of these new Nerd Vittles applications, you simply say what you want and leave the driving to us. To speed up the response time, just press # after saying what you’re looking for. For the weather application, get a current weather report and forecast for almost any city in the entire world. Just say the name of the city and the state, province, or country, e.g. Paris, France or Vancouver, British Columbia, or Huntsville, Alabama. You also can say the zip code or postal code for U.S. and Canadian cities if you prefer. And you can predefine 10 zip codes or postal codes for quick searches by just saying: "Number 2." We’ve predefined 0 through 9 for major Canadian cities to give you a head start. These can be changed in any way you like, including U.S. zip codes or even city and state (with no punctuation). And ignore the fact that the data array is named $canada. We were too lazy to change it to something more generic once we broadened the scope of the application. 🙄
But suppose you don’t want to choose a city and state or province. Instead you want to say a thorny Canadian mail code such as B2N 1X6. Well, now there’s a way to tell the software to let you do it phonetically. Just say: "phonetic bravo 2 nancy 1 xray 6" using any words that start with the same letters as the letters in the mail code.
The stock reports work in a similar way. Just say the name of the company’s ticker symbol and press #. Or you can predefine 10 companies to watch. Then quickly access the (almost) current trading price of your ten favorites by saying: "Number 9." We’ve predefined 10 stocks to watch to get you started. Change the entries to meet your needs by editing nv-stocks-google.php in /var/lib/asterisk/agi-bin.
What we’ve learned in building STT applications is that saying individual letters is not Google’s finest hour in speech-to-text transcription. The reason is that Google built their transcription service primarily to support conversational speech and voicemail transcription, and most folks don’t spell out words. They just say them. So… if you have problems getting good results by spelling out I-B-M, try this: "letter i, letter b, letter m." Or, better yet, just use the predefined stock option to set up your 10 favorite stocks. Then say "number 6″ whenever you want to retrieve the current trading price of Microsoft:
With the stock reports, we’ve also added the NATO phonetic alphabet to our bag of tricks. So, for I-B-M, you can simply say "India Bravo Mike" and the words will be converted to "IBM." If it’s been a while since your soldiering days, here’s a cheat sheet for you. Actually, the code is smart enough to understand any words that begin with the same letter as any particular character in the stock symbol so long as Google understands you. For example, saying "monkey smells furry things" would return the Microsoft (MSFT) stock report. Heh.
With the news headlines, you don’t have to do anything but dial the extension number and listen to the news. The number of news stories played can be adjusted by changing the 5 in line 6 of the 951 extension of /etc/asterisk/ extensions_custom.conf.
To access the online dictionaries, you have two choices. Either use Google’s own dictionary or you can open your search up to the entire web and take advantage of a much broader selection of information including Wikipedia, the Urban Dictionary, and the Free Encyclopedia. Just dial 333 and say one of the following: "define nerd" or "web define rocket scientist." You get the idea.
Prerequisites. There’s lots of Linux code necessary to make all of this work. Lucky for you, all of it comes preinstalled in the latest PBX in a Flash releases regardless of the flavor you’re running. You’ll also need activate at least one Google Voice account on your Asterisk server if you plan to use the dictionary application. If you’re using some other distribution, all we can suggest is that you peel our install script apart and attempt to install each piece. Linux is pretty good at telling you which dependencies are missing.
Installation. Installing these STT/TTS applications couldn’t be easier. It takes less than a minute on PBX in a Flash systems. Log into your server as root and issue the following commands:
cd /root
wget http://incrediblepbx.com/google-apps.tgz
tar zxvf google-apps.tgz
./install-google-apps
Using the STT/TTS Apps. From any telephone connected to your Asterisk server, just dial the following numbers to access the three Google STT/TTS applications:
- 333 – Dictionary
- 949 – Weather
- 950 – Stocks
- 951 – News Headlines
To meet your own needs, don’t forget to adjust the quick call entries in the weather and stocks AGI scripts. And remember to use the "letter" and "number" tricks to improve accuracy. There’s also some experimental code that you may wish to read about and take for a test drive.
Nerd’s Nugget: We’ve been wrestling with a new methodology to make it easy for folks to update Nerd Vittles apps by simply running the installer a second or third time. Today marks the beginning of this new approach. If you look at the dialplan code in extensions_custom.conf, you’ll see each TTS extension begins like this: ;# // BEGIN nv-weather-google. And the extension ends with a matching marker: ;# // END nv-weather-google. What this does is make it incredibly easy to remove the code using a single SED command:
sed -i ‘\:// BEGIN nv-weather-google:,\:// END nv-weather-google:d’ /etc/asterisk/extensions_custom.conf
We’ll post changes and additions for today’s scripts on the PIAF Forum. Join by clicking on the link below.
Originally published: Monday, May 14, 2012
Updated: Monday, May 28, 2012
Need help with Asterisk? Visit the PBX in a Flash Forum.
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…
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.
- 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. [↩]
- 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. [↩]
- Version 0.5 also includes some sample Wolfram Alpha perl code that is certainly worth a look. [↩]