Home » Posts tagged 'piaf' (Page 13)
Tag Archives: piaf
Meet the OBi110: A Permanent Google Voice Fix for Asterisk
We’re going to take a little time off for Spring Break and leave you with a terrific new tutorial from our good friend, Tom King. But first, despite pitching Google Voice as one of Asterisk’s Top 10 Tricks as recently as last October, Digium® apparently has had a change of heart. Our frustration with Asterisk® and Digium over the tepid support for Google Voice™ continues to build with the discovery that the latest (several) releases of Asterisk 10 break Google Voice connectivity entirely. The default Asterisk 10 install in PBX in a Flash™ continues to work just fine. The Digium response can be summed up in two words: "Oh Well." They’re apparently too busy doing Amazing New Things™ to worry about keeping your one-month-old PBX functioning reliably. So… we’ve pretty much given up on Digium’s attitude toward Google Voice ever changing. It’s simply not a priority for them which, of course, is their prerogative. But it also means everyone needs to start considering other alternatives if Google Voice reliability matters to you.
So today we start down a new path for our users and readers as well as the rest of the VoIP community. We hope to have a FreeSwitch® announcement soon to reliably handle Google Voice and Skype for Asterisk-based servers. These two functions have worked flawlessly with FreeSwitch since Anthony Minessale and Brian West first released them a couple years ago. In the meantime, reliability of Google Voice in Asterisk continues its downward spiral with almost monthly nightmares. The latest debacle is a month old today. Happy Birthday! 🙄
There’s another alternative as well. Sherman Scholten at OBiHai tells us they are poised to release the OBi202 with all the usual OBi110 goodies plus T.38 real-time faxing over IP plus support for PPPOE, VLANs, and up to 4 SIP or Google Voice trunks. Add a firewall with DRDOS attack protection and VPN pass-through plus some amazing PBX-like functionality for management of collaborative calling, and you really couldn’t ask for much more in a product which will retail for under $100. OBiHai has been kind enough to send us a complimentary unit, and we’ll have a full review for you soon.
In the meantime, we have a short term answer for anyone that depends upon Google Voice to perform tasks (such as making phone calls) where reliability matters. It’s the under $50 OBi110. You’ll find a link to buy one while supporting Nerd Vittles in the right column. And today we’ll show you how to set it up to use with Asterisk and PBX in a Flash™ so that Google Voice calls flow into and out of your server reliably and transparently without worrying about who may have "improved" things while you were sleeping.
PIAF2 Preliminaries. If you’re currently using PBX in a Flash 2 for your Google Voice needs, then the first thing you need to do is remove any Google Voice trunks you’ve activated using the Google Voice module in FreePBX. Once you’ve done that, you’ll also want to disable the jabber and gtalk modules in Asterisk. This has no impact upon the separate gvoice command line utility which will continue to work fine with the speech-to-text apps that we’ve released over the last month. The Google Voice for Python project is well supported and (fortunately) is separate and apart from the Asterisk project. We’ve also documented on the PIAF Forums how to keep gvoice running reliably on your server.
To disable Google Voice in Asterisk, log into your server as root and edit modules.conf in /etc/asterisk. Change the two lines in the [modules] context for these two modules by changing the word load to noload. Then save your changes and restart Asterisk: amportal restart.
noload => res_jabber.so
noload => chan_gtalk.so
Step2. Once you have your OBi110 in hand, the rest of the process to get it handling inbound and outbound Google Voice calls for Asterisk is simple as long as you don’t skip any steps. Just download Tom King’s new tutorial and follow along. You’ll be up and running in under 15 minutes with a reliable, independent alternative for Google Voice calling with Asterisk. Enjoy!
Originally published: Friday, March 16, 2012
Well, we’re just a few folks shy of 5,000 followers on Google+. See the right column for today’s tally under Google Goodies. That’s less than 10% of our weekly Nerd Vittles fan club. So what are you waiting for? We can’t promise you one of these but, if you become #5000 to put us in your Google+ circles, we do want to hear from you! Please include your mailing address. 😉
Need help with Asterisk? Visit the NEW 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…
SMS Dictator: Send SMS Messages Using Any Asterisk Phone
Here's another Google™ speech-to-text application for your Asterisk® goody bag. Today's installment lets you pick up any phone on your Asterisk system, dictate a brief message, have it transcribed by Google, and then delivered as an SMS text message to any 10-digit number of your choosing. The installation process on PBX in a Flash™ systems takes only a minute. And you'll find Asterisk SMS Messaging to be a welcome addition to your VoIP Swiss Army Knife.
Prerequisites. For the installer to work seamlessly, you'll need a PBX in a Flash 2 server with the PERL gvoice CLI tool. You can test whether this is working by logging into your server as root and issuing the command: gvoice. When prompted for your Google Voice account name, enter it and include @gmail.com. Then enter your password. If you get a gvoice prompt, all is well. Type quit to exit. If you get errors or the gvoice app doesn't exist, click on the gvoice link in this paragraph to get things squared away.
You'll also need a Google Voice™ account that can be used to send the SMS messages. Today's SMS installer will prompt you for your Google Voice account name in the format: myname@gmail.com. Then you'll be prompted for your Google Voice password. Once you've entered your credentials, the rest is automagic. With a little manual tweaking of the installation script, you can get this working on any Asterisk-based server running under Linux.
As configured, SMS Dictator™ uses extension 767 (S-M-S) to generate SMS messages. If this conflicts with an extension on your server, you can edit the extensions_custom.conf dialplan in /etc/asterisk.
Legal Disclaimer. What we're demonstrating today is how to use a publicly accessible web resource to respond to dictation requests generated by a phone connected to your Asterisk server. We're assuming that Google has its legal bases covered and has a right to provide the public service they are offering. We are not vouching for Google or the services being offered in any way. By using our tutorial, YOU AGREE TO ASSUME ALL RISKS, LEGAL AND OTHERWISE, ASSOCIATED WITH USE OF THIS FREELY ACCESSIBLE WEB TOOL. NO WARRANTY EXPRESS OR IMPLIED IS BEING PROVIDED BY US INCLUDING ANY IMPLIED WARRANTY OF FITNESS FOR USE OR MERCHANTABILITY. You, of course, have an absolute right not to read our articles or implement our code if you have reservations of any kind or are unwilling to assume all risks associated with such use. Sorry for legalese, but it's the time in which we live I'm afraid. Plain English: "Don't Shoot the Messenger!"
Installation. To install SMS Dictator, log into your PBX in a Flash server as root and issue the following commands:
cd /root
wget http://nerdvittles.com/sms-dictator.sh
chmod +x sms-dictator.sh
./sms-dictator.sh
Accept the license agreement and fill in your Google Voice credentials when prompted. In under a minute, you'll be ready to test things out.
Taking SMS Dictator for a Spin. Now you're ready to try it. Pick up any phone connected to your Asterisk server. Dial S-M-S (767). When prompted, dictate a brief message and press #. If the transcription played back is correct, press 1. Or you can press 2 to try again. When prompted, enter the 10-digit number of the SMS recipient. If the number read back to you is correct, press 1 to send the SMS message or press 2 to enter a new 10-digit number. It's as simple as that.
AsteriDex Integration. If you're using AsteriDex for your contacts, then it's pretty simple to look up SMS contact numbers from there instead of having to remember them and manually key them in. Log into your server as root and replace the 767 dialplan code in /etc/asterisk/extensions_custom.conf with the following. Be sure to insert your credentials in the gvoice line (3d from the bottom), save your changes, and reload your Asterisk dialplan by entering this command: asterisk -rx "dialplan reload"
; SMS Dictator for AsteriDex
exten => 767,1,Answer
exten => 767,n,Wait(1)
exten => 767,n(record),Flite("After the beep. I will reecord your S.M.S message. When you're finished. press the pound key.")
exten => 767,n,agi(speech-recog.agi,en-US)
exten => 767,n,Noop(= Script returned: ${status} , ${id} , ${confidence} , ${utterance} =)
exten => 767,n,Flite("I think you said: ${utterance}")
exten => 767,n,Flite("If this is correct. press 1.")
exten => 767,n,Flite("To start over. press 2.")
exten => 767,n,Flite("To cancel and hang up. press 3.")
exten => 767,n,Read(MYCHOICE,beep,1)
exten => 767,n,GotoIf($["foo${MYCHOICE}" = "foo1"]?continue)
exten => 767,n,GotoIf($["foo${MYCHOICE}" = "foo2"]?record)
exten => 767,n,Playback(goodbye)
exten => 767,n,Hangup
exten => 767,n(continue),Set(SMSMSG=${utterance})
exten => 767,n(pickcontact),Flite("At the beep say the name of the person or company you wish to contact. Then press the pound key.")
exten => 767,n,agi(speech-recog.agi,en-US)
exten => 767,n,Noop(= Script returned: ${status} , ${id} , ${confidence} , ${utterance} =)
exten => 767,n,AGI(nv-callwho.php,${utterance})
exten => 767,n,NoOp(Number to call: ${NUM2CALL})
exten => 767,n,GotoIf($["foo${NUM2CALL}" = "foo0"]?pickcontact)
exten => 767,n,Flite("Sending S.M.S message. One moment please.")
exten => 767,n,System(gvoice -e GVname@gmail.com -p GVpassword send_sms ${NUM2CALL} "${SMSMSG}")
exten => 767,n,Flite("S.M.S message has been sent. Good bye.")
exten => 767,n,Hangup
Next Steps. The SMS messaging possibilities, of course, are endless. A lively discussion is underway in the PIAF Forums about SMS message blasting using Asterisk. This could include notifications to Little League teams about schedule changes, or alerts from a school about emergencies, or community alerts about tornados. You can probably think up a dozen more on your own. Come join the discussion, and we'll we'll address adjusting today's application to handle SMS message lists for roboSMSing and more in the coming weeks. Enjoy!
3/2/2017 Update: A patched version of pygooglevoice to support SMS messaging is now available here.
Originally published: Monday, March 12, 2012
Need help with Asterisk? Visit the NEW 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...
PBX in a Flash 2: One Incredible VoIP Platform
We’ve got lots of great news for you this week. So it’s hard to know where to start. Let’s begin on the hardware front. For frequent readers of Nerd Vittles, you know that we’ve been a fan of the Acer Aspire Revo since it was released almost two years ago. At that time, the market price was about $200. Today, NewEgg sells one for $350. What’s changed besides the price almost doubling? Well, not much if you’re looking for a home or SOHO VoIP server to handle your communications needs. You get a better version of Windows for the garbage can and a dual-core Atom processor. Neither one is really necessary for our purposes.
We try to stay away from do-it-yourself hardware projects, but this one was just too good to pass up. NewEgg has been featuring a couple of Foxconn barebones kits in the $100 range that require zero talent to build. Basically, you add a stick of RAM and a hard disk and Voilà, you’re done. We’ve been late to the solid-state drive (SSD) party so here was a golden opportunity to experiment. For about $100, you can purchase a 60 to 128 GB Type III SSD depending on the sale of the week. SSDs (not to be confused with STDs) provide an incredibly fast storage device. No moving parts, little heat, no noise. In short, a perfect VoIP platform for those needing a PBX with less than 50 extensions. Add $20 for a 4GB stick of notebook RAM, and you’ve got yourself an awesome little VoIP server with the footprint of about 3 packs of cigarettes (if you remember what those are). Buy a second one if you want redundancy. And, yes, a PIAF2™ app is coming soon to keep the units in sync. For now, check out this thread on the PIAF Forums for ordering details. You’ll also find detailed tips for getting WiFi functioning AND secure on the third page of the thread.
PIAF2: One Incredible Platform. So now that you’ve got VoIP hardware, what’s next? Here’s how we build up our systems today. Start by downloading the 32-bit PIAF2 ISO. Then make yourself a bootable thumb drive using a 1GB or larger flash drive. Our tutorial will show you how. Boot up your new server with the thumb and install PIAF2 with Asterisk® 1.8 and FreePBX® 2.9. Once you answer a few prompts, head out to lunch. Your server will be ready when you get back. Log into your server as root and install Incredible PBX™: install-incredpbx3. Want a fax server, too? Just run: install-incredfax2. And, if this is for personal use, then there’s now an easy option to add Skype as well: install-skype2. Want backups to a thumb drive? It’s finally ready!
Sounds simple? It is. But what about documentation? Well, we’ve got you covered there, too. For PBX in a Flash™ installation, it’s here. For Incredible PBX and Incredible Fax™, it’s here. For Skype, it’s here. And, for Incredible Backup™ and Restore (30-day beta), it’s here.
There are lots of choices in the VoIP space today. But Nobody Beats FREE.™ And the ease with which you can add every VoIP bell and whistle on the planet leaves PIAF2 with no rivals, period. The thanks, of course, goes to our compatriot, Tom King, who has worked tirelessly to make this simple enough for any Fifth Grader. Why not make a little contribution to the project once you’re up and running. You’ll be rewarded tenfold. 😉
Originally published: Monday, March 5, 2012
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…
The Perfect Threesome: iNum + VoIP.ms + Google Voice
We’ve got a terrific new VoIP development for you today especially for those who travel internationally. For several years, a VoIP company called VoxBone has been pushing hard to establish an International Number™ (iNum™) for every phone on the planet so that every telephone could call every other telephone at little or no cost. They’re not quite there, but two recent events will certainly hasten the implementation. The first was an announcement from VoIP.ms that they would provide a free iNum DID and free iNum calling to every one of their customers with a credit balance in their account. The second was last week’s announcement from Google that they, too, would support free iNum calling worldwide using any Google Voice account. Today, we’ll show you how to take advantage of these two developments to begin making free calls worldwide using your PBX in a Flash™ server, a WiFi-enabled smartphone, and an available WiFi connection. Basically, the plan is to use free iNum calling to get back to your PBX for dial tone and then use DISA for free Google Voice calling in the U.S. and Canada.
Until everyone has an iNum or Google opens up Google Voice outside North America, the hidden beauty of iNum for those of us who have both is the cost savings that can be achieved by phoning home with iNum from anywhere in the world for free. And, once the call hits your Asterisk® PBX, it’s incredibly simple to route the call to DISA, prompt for a password, and then place a call to anywhere in the U.S. or Canada at no cost with PIAF2™ and Google Voice.
This can be accomplished in several ways. First, you can download a SIP phone and use it in conjunction with your VoIP.ms account and a smartphone to make free iNum calls from any WiFi hotspot in the world. Bria is our favorite on both the iPhone/iPad and Android platforms. If $10 is too rich for your blood, there are some free alternatives: CSipSimple for Android and 3CXPhone for Android or iPhone. A second alternative is to use Google Voice or Gtalk to connect back to your PIAF2 server via iNum and then use DISA and your local trunks to place outbound calls. A final alternative is to take advantage of the numerous local numbers now available in many countries to phone home using iNum. The only cost of these calls is the cost associated with calling the local number. You’ll find a list of the local phone numbers to make these calls on the iNum web site or in the footnote to this article.1 So today we’ll show you how to set up your PIAF2 server to support free iNum calling. It’s a 15-minute project.
VoIP.ms Setup. To get started, if you’re not already a customer, register for a voip.ms account by filling out their registration form.
Once you submit the form, you’ll have to confirm your registration by clicking on the link that is emailed to you. Then you’re ready to login with your email address and the password you set up when you created your account. That’ll bring you to the Main Portal Page for your new voip.ms account.
You’ll need a positive balance in your VoIP.ms account in order to create your free iNum account so deposit some money using PayPal or a credit card by clicking Finances, Add Funds. The minimum deposit is $25 which can be used to make penny a minute calls in the U.S. and Canada or equally reasonable calls to any phone number in the world. We won’t be doing any of that today. For today, all of our calls will be free thanks to iNum and the generous support of VoIP.ms. But the nest egg will be there as a backup to your other PIAF2 VoIP providers which is an excellent idea anyway.
Like Vitelity, VoIP.ms lets you create subaccounts to compartmentalize your VoIP services. This makes it easy to use VoIP.ms on multiple PIAF2 servers or even standalone SIP telephones. It also provides added security by separating out account names and passwords for VoIP services from your main VoIP.ms portal account that let’s you manage your settings and VoIP funding, a very good idea. So let’s first set up an account to use with Asterisk just to show you how easy it is.
From the Main Portal Menu, click on Subaccounts, Create Subaccount. The Subaccount creation form will display. Fill it out so it looks something like this. Just click on the form below to enlarge it if you want a better view.
Once you’ve clicked the button to create the subaccount, it takes about a minute for voip.ms to activate it. Then click Main Menu, Portal Home. The bottom of the portal page will now show your subaccount.
Let’s create one more subaccount. We’ll use this one so that we can access VoIP.ms from a standard SIP app running on our iPhone or Android device. We can use the subaccount either to make outbound calls directly from VoIP.ms on a pay per minute basis, or we can use it to make free iNum calls. To create the subaccount, repeat the process above and fill in the blanks using your own credentials and a very secure password. Be sure to choose ATA device, IP Phone or Softphone for the Device Type. We always leave International Calls Disabled unless we really plan to make international calls. This will not affect your ability to make iNum calls, and it reduces your financial exposure in the event your subaccount is compromised. Never, ever use auto-replenishment from your credit card on a VoIP provider account from any provider.
Before we get too far along, let’s activate your new iNum DID. Click on DID Numbers, Order DID. When the DID Order Form displays, click on the iNum link to order your free iNum DID.
When the iNum DID order form displays, fill out the form by clicking on the POP location nearest to your server. Then, in the SIP/IAX Routing column, be sure to select the Subaccount we created previously rather than the default Main Account. Finally click the Click Here to Order button.
You’ll get a Confirmation display that shows your new iNum DID. Write it down! We’ve already set up the proper routing for your new iNum DID in the previous step so you can ignore the Managing Your DID message.
That completes the setup of your VoIP.ms account with your free iNum DID. Now let’s configure your PBX in a Flash server to support VoIP.ms and iNum. We’re assuming you already have a PBX in a Flash server configured with at least one Google Voice account activated. If not, stop here and complete that step using the PIAF2 tutorial and optionally the Incredible PBX 3 and Incredible Fax 2 tutorial.
Smartphone SIP Client Setup. We used the free cSipSimple Android app to set up a connection with our second subaccount at VoIP.ms using cSipSimple’s Basic Setup Wizard. Here are the entries required to gain connectivity:
Once your SIP client is connected to VoIP.ms through your smartphone, you can make free iNum calls using this dial syntax: 0118835100xxxxxxxx where xxxxxxxx is the last 8 digits of your iNum beginning with 0. As noted previously, you do NOT have to enable international calls on your VoIP.ms subaccount for these calls to go through.
PBX in a Flash iNum Setup. We’ll be using the FreePBX GUI to configure PBX in a Flash to support iNum. Using your browser, log into the IP address of your server: http://ipaddress/admin. When prompted for your username and password, use maint and whatever FreePBX password you assigned when your server was set up.
To simplify things, we’re going to set up 2 trunks: one for your VoIP.ms subaccount and another for iNum. Begin by choosing Trunks, Add SIP Trunk in the FreePBX GUI. For Trunk Name, use voipms. For Maximum Channels, choose 2. For the Dial Pattern, enter 1 | NXXNXXXXXX and, in Outgoing Settings for the PEER Details, enter the following using your subaccount name and password as well as the POP you chose for your subaccount:
canreinvite=yes
nat=yes
context=from-trunk
host=atlanta.voip.ms
secret=subacctpw
type=peer
username=137786_myinum
disallow=all
allow=ulaw
fromuser=137786_myinum
trustrpid=yes
sendrpid=yes
insecure=invite
qualify=yes
Leave all the fields for Incoming Settings blank. For the Registration String, the syntax is subacctname:subacctpw@atlanta.voip.ms:5060/8835100xxxxxxxx. Using our example and assuming you’re using the Atlanta POP, the entry would look like this where xxxxxxxx is your own 8-digit iNum beginning with 0:
137786_myinum:secretPassword21@atlanta.voip.ms:5060/8835100xxxxxxxx
Verify that your server got a successful registration with your VoIP.ms subaccount by clicking Tools, Asterisk Info, SIP Info.
Now click Setup, Trunks, Add Custom Trunk. For Trunk Name, use iNum. For Maximum Channels, choose 5. For Dial Pattern, use 0XXXXXX. including the period! For Custom Dial String, use SIP/0118835100$OUTNUM$@voipms.
Next, we need to create an Inbound Route. Use your full iNum DID number in the DID Number field, e.g. 8835100xxxxxxxx where xxxxxxxx is your personal iNum beginning with a 0. Activate CallerID Superfecta for the CID Lookup Source. And choose a Destination for the incoming iNum calls. This could be an extension, an IVR, or whatever else you’ve set up on your server. For now, route it to a working extension on your PBX so we can test it below. Then you can edit the inbound route and change it to any destination.
Finally, create an Outbound Route. Name the route OutiNum. For the Dial Pattern, use 0XXXXXX. with the trailing period. For the Trunk Sequence for Matched Routes, choose inum. After you save the trunk settings, move it to the top of your trunk listing in the right column of FreePBX. What this route does is allow you to call other iNum numbers (including your own) by simply dialing the last 8-digits of any iNum that begins with 8835100 or 0118835100. These 8 digits will ALWAYS begin with a 0.
Now let’s modify at least one of your existing Google Voice Outbound Routes so that you also can make iNUM calls with Google Voice by dialing from any extension using the full 8835100xxxxxxxx international number. Go to Outbound Routes and click on the name of one of your Google Voice trunks. Add the following new Dial Pattern and click Submit Changes: 8835100XXXXXXXX
Taking iNum for a Spin. To test things out, use a phone connected to an extension other than the one you chose to route incoming iNum calls to above. Dial the last 8 digits of your own iNum DID, and that extension should begin ringing. Answer the other extension and make sure you have audio in both directions. Next, dial your complete iNum DID beginning with 8835100. This should also cause the other extension to ring even though the call was initiated through your Google Voice trunk. If you’d like to get a Weather Report by Zip Code, we’ve set up an iNum for you to try. Just dial 09901997.
Enjoy!
Originally published: Monday, February 27, 2012
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…
- Local iNum Access Numbers include the following: [↩]
Thumbs Up: A New Flash Drive Installer for PIAF2 + CentOS6
With the advent of netbooks and the gradual disappearance of optical drives, it’s just a matter of time until USB thumb drives will be the only remaining physical installation method still available for most software. Look no further than Apple’s Lion OS if you don’t believe it. Of course, if Microsoft has its way, no installation of Linux will be available with some Windows 8 hardware… for your own safety, of course. We’ll leave that for the courts to sort out.
Since inception, one of the key goals of the PBX in a Flash™ project has been to provide an install option that works reliably with USB thumb drives. Thanks to the great work of bmore on the PIAF Forums, a USB Flash Drive installer was developed for PBX in a Flash 1.7.5.6.2. And today, we’re pleased to deliver a more flexible thumb drive installation method for 32-bit PIAF2™ installs running under CentOS™ 6.2. With this new thumb drive installer comes support for every current version of Asterisk® and FreePBX®.
With PIAF2, you get your choice of Asterisk 1.8.8.0 or 10.0.0 as well as FreePBX 2.8, 2.9, or 2.10. And, with the standard PIAF2 ISO installer, you also have the option of exiting to the Linux command prompt to compile a network driver or to select from a broad selection of newer Asterisk releases. If you choose this option, you’ll be prompted to log into your server as root with the root password you chose initially. Once logged in, you can execute any series of Linux commands or issue one of the following commands to choose a specific release of Asterisk:
- piafdl -p beta_1881_purple (loads Asterisk 1.8.8.1)
- piafdl -p beta_1882_purple (loads Asterisk 1.8.8.2)
- piafdl -p beta_1890_purple (loads Asterisk 1.8.9.0)
- piafdl -p beta_1891_purple (loads Asterisk 1.8.9.1)
- piafdl -p beta_1892_purple (loads Asterisk 1.8.9.2)
- piafdl -p beta_1893_purple (loads Asterisk 1.8.9.3)
- piafdl -p beta_1001_red (loads Asterisk 10.0.1)
- piafdl -p beta_1010_red (loads Asterisk 10.1.0)
- piafdl -p beta_1011_red (loads Asterisk 10.1.1)
- piafdl -p beta_1012_red (loads Asterisk 10.1.2)
- piafdl -p beta_1013_red (loads Asterisk 10.1.3)
WARNING: Asterisk 10.1.x releases reportedly break Google Voice! The good news is that the new PIAF deployment policy for Asterisk releases is working. We no longer incorporate the latest Asterisk releases as the default PIAF install before independent testing. You, of course, are free to load and test any of the releases you wish using the commands outlined above.
If you compiled a network driver and wish to resume the installation process, just reboot the server. If you chose a specific flavor of Asterisk, simply accept the license agreement and the customized PIAF2 install will continue. Here’s a quick overview of what happens next.
The PIAF2 installer then syncs the time on your server to NTP, installs the latest yum updates for CentOS 6.2, installs the versions of Asterisk and FreePBX you selected (HINT: Incredible PBX requires FreePBX 2.9) and some other utilities including WebMin, Festival and Flite text-to-speech support for Asterisk, and, of course, the Google Voice GUI which lets you configure PIAF2 to make free calls in the U.S. and Canada in a matter of seconds. Finally the PIAF2 installer patches your system to activate the IPtables firewall for both IPv4 and IPv6 as well as adding Fail2Ban monitoring for Asterisk, SSH, and your Apache web server.
As part of the install procedure, you also will be prompted to choose a version and master password for FreePBX and the other VoIP web utilities. Once your server reboots, you can log into the Linux CLI using your root password to obtain the IP address of your server. Then you can access the PIAF2 web GUI with a browser pointed to the same IP address. To access the FreePBX GUI, choose that icon from the Admin menu. Just click on the User button to get there. When prompted for your username and password, the username is maint. The password will be the FreePBX master password you chose during the PIAF2 install. We’ll walk you through the install steps once we get your USB thumb drive set up.
Here’s the 5-minute drill to get a USB thumb drive loaded with the latest and greatest 32-bit PIAF2 ISO. Once you get that far, follow the PIAF2 install steps outlined below to get your system up and running. In less than an hour, you’ll have a fully functioning, rock-solid reliable PBX that can meet all of your telephony requirements. And, remember, it’s free and always will be™.
Prerequisites. To get everything installed on your USB Flash Drive, you’ll obviously need at least a 1GB Flash Drive. HINT: 2GB flash drives may be cheaper! Next, you’ll need a Windows XP/Vista/7 computer on which to set up the thumb drive. On the Windows PC, you’ll need to download and install the latest, greatest version of ISO2USB from SourceForge. We recommend you also download and install the HP Formatting Utility for flash drives. Finally, you’ll need to download the 32-bit PIAF 2.0.6.2.1 ISO from SourceForge.
Creating USB Flash Drive. Step #1 is to partition and format your USB flash drive as a FAT32 device. Some flash drives are temperamental about the formatting step. We can’t recommend strongly enough using the HP Formatting Utility to make certain you get a reliable, properly formatted thumb drive! Also be careful that you are, in fact, formatting your thumb drive and not your Windows hard disk!
Step #2, once the device is properly formatted, run ISO2USB. You’ll get a screen that looks like what is shown above. Click on the … button to the right of DiskImage ISO and choose the PIAF2 ISO that you downloaded to your Desktop. Make certain that the destination device shown on the bottom line of the display is your USB flash drive. You do not want to accidentally trash your primary drive!
Here’s the tricky part to this. You need to know the drive names of the devices on the target machine where you ultimately will be using this thumb drive. Try these commands on your target machine using a Linux LIVE CD if you’re unsure: dmesg | grep logical AND dmesg | grep sectors. For most modern machines with IDE drives, the names will be sda, sdb, etc. For older machines, they may be hda, hdb. You’ll know if it doesn’t work. 🙂
The gotcha with CentOS 6.x is that, whenever you boot a machine using a USB flash drive with CentOS 6.x, the device names get switched for that boot only. The USB boot device becomes sda even if your hard disk on the system shows up as sda when it is running without a thumb drive. So… in the ISO2USB setup, change the Hard Disk Name to sdb, and change the USB Device Name to sda. For Foxconn hardware and AMD BIOS machines, use sdc instead of sdb. A few other systems use sdd. In all cases, use sda for the USB Device Name. And, as we noted, you’ll know quickly if you made the wrong choice. Just recreate the thumb drive using the next letter in the alphabet. 😉
Once you’ve double-checked your USB destination drive (HINT: the drive size is quite different), choose OK to begin. When the ISO install completes, don’t forget to Eject your USB flash drive before removing it from the Windows PC!
Using the USB Flash Installer. When using the new flash installer, remember that we need to boot your new machine from the thumb drive. On most newer Atom-based computers, you accomplish this by inserting the USB device, turning the machine on, and then pressing F12 during the boot sequence to choose the boot device. You’ll just have to watch the screen of your new computer to see if some other key is used to pull up the boot selection screen. If all else fails, you can adjust the boot sequence in the BIOS settings to boot first from the USB device. If you change your BIOS boot sequence, just remember to remove the device when the initial install of CentOS completes and the PIAF2 reboot sequence begins. If instead you again see the initial PIAF2 install screen warning you that your disk is about to be erased, then remove the thumb drive and reboot the machine once again.
PIAF Installation. Once you’ve booted with your PIAF2 thumb drive, you’ll be prompted to choose an installation method. For most users, simply pressing the Enter key will get things started. Choose a time zone when prompted and then enter a very secure root password for your new server. The installer then will load CentOS 6.2 onto your server. When complete, your server will reboot. Remove the thumb drive at this point, and you’ll be prompted to choose the version of Asterisk to install. See the discussion above for making a selection. If you see a Linux login prompt instead, it means sdb was the wrong device name for your server’s hard disk. Log in as root using the password you set up previously and issue the following commands to decipher the correct device name. Then rebuild your thumb drive using the correct device name and start again.
ls /dev/sd*
ls /dev/dd*
If all went well, after choosing the version of Asterisk to install, you’ll be prompted for a version of FreePBX and a master password for FreePBX. Make it very secure! We recommend FreePBX 2.9 if you plan to use Incredible PBX. Once you’ve made your choices, the PIAF2 installer will load Asterisk, FreePBX, and all the other PBX in a Flash components including Google Voice.
Once your server reboots, log into the Linux CLI using your root password and write down the IP address of your server from the status display.
Security Warning: Always, always, always run PBX in a Flash behind a secure, hardware-based firewall with no PBX in a Flash ports exposed to the Internet! After all, it’s your phone bill.
FreePBX Setup. Most of your life with PBX in a Flash will be spent using the FreePBX web GUI and your favorite browser. Just click on the image below to enlarge. To access the FreePBX GUI, point your browser at the IP address you wrote down. Read the RSS Feed in the PIAF GUI for late-breaking security alerts. Then click on the Users button which will toggle to the Admin menu. Click the FreePBX icon. When prompted for your username and password, the username is maint. The password will be the FreePBX master password you chose in completing the PIAF2 install.
To get a minimal system functioning, here’s the 5-minute drill. You’ll need to set up at least one extension with voicemail, configure a free Google Voice account for free calls in the U.S. and Canada, configure inbound and outbound routes to manage incoming and outgoing calls, and plug your maint password into CallerID Superfecta so that names arrive with your incoming calls. Once you add a phone with your extension credentials, you’re done.
Extension Setup. Now let’s set up an extension to get you started. A good rule of thumb for systems with less than 50 extensions is to reserve the IP addresses from 192.x.x.201 to 192.x.x.250 for your phones. Then you can create extension numbers in FreePBX to match those IP addresses. This makes it easy to identify which phone on your system goes with which IP address and makes it easy for end-users to access the phone’s GUI to add bells and whistles. To create extension 201 (don’t start with 200), click Setup, Extensions, Generic SIP Device, Submit. Then fill in the following blanks USING VERY SECURE PASSWORDS and leaving the defaults in the other fields for the time being.
User Extension … 201
Display Name … Home
Outbound CID … [your 10-digit phone number if you have one; otherwise, leave blank]
Emergency CID … [your 10-digit phone number for 911 ID if you have one; otherwise, leave blank]Device Options
secret … 1299864Xyz [make this unique AND secure!]
dtmfmode … rfc2833
Voicemail & Directory … Enabled
voicemail password … 14332 [make this unique AND secure!]
email address … yourname@yourdomain.com [if you want voicemail messages emailed to you]
pager email address … yourname@yourdomain.com [if you want to be paged when voicemail messages arrive]
email attachment … yes [if you want the voicemail message included in the email message]
play CID … yes [if you want the CallerID played when you retrieve a message]
play envelope … yes [if you want the date/time of the message played before the message is read to you]
delete Vmail … yes [if you want the voicemail message deleted after it’s emailed to you]
vm options … callback=from-internal [to enable automatic callbacks by pressing 3,2 after playing a voicemail message]
vm context … default
Write down the passwords. You’ll need them to configure your SIP phone.
Extension Security. We cannot overstress the need to make your extension passwords secure. All the firewalls in the world won’t protect you from malicious phone calls on your nickel if you use your extension number or something like 1234 for your extension password if your SIP or IAX ports happen to be exposed to the Internet. Incredible PBX automatically randomizes all of the extension passwords for you.
In addition to making up secure passwords, the latest versions of FreePBX also let you define the IP address or subnet that can access each of your extensions. Use it!!! Once the extensions are created, edit each one and modify the permit field to specify the actual IP address or subnet of each phone on your system. A specific IP address entry should look like this: 192.168.1.142/255.255.255.255. If most of your phones are on a private LAN, you may prefer to use a subnet entry in the permit field like this: 192.168.1.0/255.255.255.0 using your actual subnet.
Adding a Google Voice Trunk. There are lots of trunk providers, and one of the real beauties of having your own PBX is that you don’t have to put all of your eggs in the same basket… unlike the AT&T days. We would encourage you to take advantage of this flexibility. With most providers, you don’t pay anything except when you actually use their service so you have nothing to lose.
For today, we’re going to take advantage of Google’s current offer of free calling in the U.S. and Canada through the end of this year. You also get a free phone number in your choice of area codes. PBX in a Flash now installs a Google Voice module for FreePBX that lets you set up your Google Voice account with PBX in a Flash in just a few seconds once you have your credentials.
Signing Up for Google Voice. You’ll need a dedicated Google Voice account to support PBX in a Flash. 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 rather than creating a separate account. Take our word for it. 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… set up a dedicated Gmail and Google Voice account, and use it exclusively with PBX in a Flash. Google Voice no longer is by invitation only. If you’re in the U.S. or have a friend that is, head over to the Google Voice site and register. If you’re living on another continent, see MisterQ’s posting for some tips on getting set up.
You must choose a telephone number (aka DID) for your new account, or Google Voice calling will not work… in either direction. 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 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 PBX in a Flash to function with Google Voice! Otherwise, inbound and/or 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 and enable it. Be sure to try one call each way from Google Chat in Gmail. Then disable Google Chat in GMail for this account. Otherwise, it won’t work with PIAF.
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 on your PBX.
Configuring Google Voice Trunk in FreePBX. All trunk configurations now are managed within FreePBX, including Google Voice. This makes it easy to customize PBX in a Flash to meet your specific needs. Click the Setup tab and choose Google Voice in the Third Party Addons. To Add a new Google Voice account, just fill out the form:
Phone number is your 10-digit Google Voice number. Username is your Google Voice account name without @gmail.com. NOTE: You must use a Gmail.com address in the current version of this module! Password is your Google Voice password. NOTE: Don’t use 2-stage password protection in this Google Voice account! Be sure to check all three boxes: Add trunk, Add routes, and Agree to TOS. Then click Submit Changes and reload FreePBX. Down the road, you can add additional Google Voice numbers by clicking Add GoogleVoice Account option in the right margin and repeating the drill. For Google Apps support, see this post on the PIAF Forum.
Outbound Routes. The idea behind multiple outbound routes is to save money. Some providers are cheaper to some places than others. It also provides redundancy which costs you nothing if you don’t use the backup providers. The Google Voice module actually configures an Outbound Route for 10-digit Google Voice calling as part of the automatic setup. If this meets your requirements, then you can skip this step for today.
Inbound Routes. An Inbound Route tells PBX in a Flash how to route incoming calls. The idea here is that you can have multiple DIDs (phone numbers) that get routed to different extensions or ring groups or departments. For today, we’ll build a simple route that directs your Google Voice calls to extension 201. Choose Inbound Routes, leave all of the settings at their default values except enter your 10-digit Google Voice number in the DID Number field. Enable CallerID lookups by choosing CallerID Superfecta in the CID Lookup Source pulldown. Then move to the Set Destination section and choose Extensions in the left pull-down and 201 in the extension pull-down. Now click Submit and save your changes. That will assure that incoming Google Voice calls are routed to extension 201.
IMPORTANT: Before Google Voice calling will actually work, you must restart Asterisk from the Linux command line interface. Log into your server as root and issue this command: amportal restart.
CallerID Superfecta Setup. CallerID Superfecta needs to know your maint password in order to access the necessary modules to retrieve CallerID information for inbound calls. Just click Setup, CID Superfecta, and click on Default in the Scheme listings in the right column. Scroll down to the General Options section and insert your maint password in the Password field. You may also want to enable some of the other providers and adjust the order of the lookups to meet your local needs. Click Agree and Save once you have the settings adjusted.
General Settings. Last, but not least, we need to enter an email address for you so that you are notified when new FreePBX updates are released. Scroll to the bottom of the General Settings screen after selecting it from the left panel. Plug in your email address, click Submit, and save your changes. Done!
Adding Plain Old Phones. Before your new PBX will be of much use, you’re going to need something to make and receive calls, i.e. a telephone. For today, you’ve got several choices: a POTS phone, a softphone, or a SIP phone. Option #1 and the best home solution is to use a Plain Old Telephone or your favorite cordless phone set (with 8-10 extensions) if you purchase a little device known as a Sipura SPA-3102. It’s under $70. Be sure you specify that you want an unlocked device, meaning it doesn’t force you to use a particular service provider. This device also supports connection of your PBX to a standard office or home phone line as well as a telephone.
Configuring a SIP Phone. There are hundreds of terrific SIP telephones and softphones for Asterisk-based systems. Once you get things humming along, you’ll want a real SIP telephone such as the $50 Nortel color videophone we’ve recommended previously. You’ll also find lots of additional recommendations on Nerd Vittles and in the PBX in a Flash Forum. If you’re like us, we want to make damn sure this stuff works before you shell out any money. So, for today, let’s download a terrific (free) softphone to get you started. We recommend X-Lite because there are versions for Windows, Mac, and Linux. So download your favorite from this link. Install and run X-Lite on your Desktop. At the top of the phone, click on the Down Arrow and choose SIP Account Settings, Add. Enter the following information using 201 for your extension and your actual password for extension 201. Then plug in the actual IP address of your PBX in a Flash server instead of 192.168.0.251. Click OK when finished. Your softphone should now show: Available.
Enabling Google Voicemail. Some have requested a way to retain Google’s voicemail system for unanswered calls in lieu of using Asterisk voicemail. The advantage is that Google offers a free transcription service for voicemail messages. To activate this, you’ll need to edit the [googlein] context in extensions_custom.conf in /etc/asterisk. Just modify the last four lines in the context so that they look like this and then restart Asterisk: amportal restart
;exten => s,n(regcall),Answer
;exten => s,n,SendDTMF(1)
exten => s,n(regcall),Set(DIAL_OPTIONS=${DIAL_OPTIONS}aD(:1))
exten => s,n,Goto(from-trunk,gv-incoming,1)
But I Don’t Want to Use Google Voice. If you’d prefer not to use Google Voice at all with PBX in a Flash, that’s okay, too. Here’s how to disable it and avoid the chatter in the Asterisk CLI. Log into your server as root and edit /etc/asterisk/modules.conf. Change the first three lines in the [modules] context so that they look like this. Then restart Asterisk: amportal restart.
autoload=yes
noload => res_jabber.so
noload => chan_gtalk.so
There’s now a patch that automatically adjusts Asterisk to accommodate Google Voice whenever you have added Google Voice extensions to your system. To download and install the patch, visit the PIAF Forum.
Where To Go From Here. We’ve barely scratched the surface of what you can do with your new PBX in a Flash system. If you’re new to all of this, then your next step probably should be the Nerd Vittles’ Incredible PBX 3.0 and Incredible Fax 2.0 tutorial. It’s a 5-minute addition. And, of course, all 50 Asterisk applications in Incredible PBX are free and always will be. Enjoy!
Getting Your Own PIAF Thumb Drive. Some of you have asked about how to obtain your very own PIAF thumb drive. Well, it’s easy. Just make a contribution of $50 or more to the Nerd Vittles and PBX in a Flash projects by clicking the PayPal Donate button at the top of this page, and we’ll get one off to you pronto. And, thanks in advance for your support of freeware and open source projects!
Originally published: Monday, February 20, 2012
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…
Virtual Utopia: 1-Minute Asterisk Installs with PIAF2-OpenVZ
Thanks to the terrific work of Darrell Dillman, today we have a new OpenVZ template for PBX in a Flash 2™ to introduce. It features the very latest 64-bit CentOS™ 6.2 with Asterisk® 1.8 and FreePBX® 2.9. Using the new OpenVZ template, you can create unlimited virtual machines in about one minute per server! And you can boot your new virtual machines in about the same time. This new PIAF2-OpenVZ template includes the usual PIAF2™ Feature Set including Google Voice for free calling in the U.S. and Canada. Once installed, you can add Incredible PBX 3™ and Incredible Fax 2™ in a few clicks.
One of the real beauties of hosting your own Proxmox server is the flexibility it gives you to create and load a wide variety of virtual machines that each appear to users to be dedicated servers. This could include a dozen Asterisk servers, or it might be a mix of a dedicated Apache server, a Windows Server, an Asterisk server or two, as well as Joomla, Drupal, Zimbra, and many others from this list. The other obvious advantage is cost. Individual Asterisk servers can be had for $300 or less to host a small branch office. But a Proxmox server such as Dell's current offering can host a dozen dedicated systems for about $50 per server.
If you haven't heard of OpenVZ templates before, you've missed one of the real technological breakthroughs of the last decade. Rather than wading through the usual 30-60 minute ISO installation drill, with an OpenVZ template, all of the work is done for you. And it's quick. You can build a dozen PIAF2-Purple systems using an OpenVZ template in the time it takes to bake a pan of slice-and-bake cookies. And it's incredibly easy to then tie all of these systems together using either SIP or IAX trunks. Just follow our previous tutorial. For developers that want to try various Asterisk configurations before implementation and for trainers and others that want to host dedicated Asterisk systems for students, the OpenVZ platform is a perfect fit.
We'll start with the bad news before we get to the really exciting new Asterisk platform we're introducing today. All of the current Proxmox server software that supports OpenVZ virtual machines has a serious security flaw. For that reason, you would only want to run Proxmox behind a hardware-based firewall with no Internet port exposure. If you fail to heed this warning, you run the very real risk of having not only your Promox server compromised but also all of the virtual machines running on it. The good news is that this security flaw does not appear to affect the PBX in a Flash virtual machines which we are introducing today. Since no direct Internet access is required to have a perfectly functioning PIAF2 server, we still strongly recommend never exposing any server to direct Internet access. MORAL: No Internet port exposure for any of your servers means you can sleep like a baby. We recommend Proxmox 1.8 which is a free download from the Proxmox VE web site. To get optimum use from Proxmox, you'll also want a processor in your server that supports Kernel-based Virtual Machines (KVMs). This full virtualization solution requires an x86 processor containing virtualization extensions (Intel VT1 or AMD-V CPU2 is needed). HINT: Most of Dell's servers are not a problem. Regardless of the server you choose, make certain that you check the CPU specs before you buy. Also be aware that, in addition to Proxmox, there are many other OpenVZ platforms from which to choose.
Installing Proxmox. If you go the Dell route, you'll need an external USB CD or DVD drive to install Proxmox. Dell's optical drives aren't supported in the Proxmox boot image. So begin by downloading the Proxmox VE 1.8 ISO image and create your CD. Then boot your new server from the CD (by pressing F11 for the boot selection screen and choosing your USB external drive on Dell servers). Press Return to begin the install, agree to the license agreement, and click Next on the installer screen to begin. Choose your country, time zone, and keyboard layout. Next choose a secure password and provide a valid email address which is used to send you critical alerts from your Proxmox server. Finally, choose a hostname, specify a fixed IP address, netmask, gateway, and DNS servers and then press Next. Three minutes later, you'll have a new Proxmox server. Log in to your server as root and create a directory for your backups: mkdir /backup.
Enabling IPtables Firewall. IPtables works a little differently in the OpenVZ environment. It actually runs on the Proxmox host. There are just two steps to get it working. First, shut down every running VM on your Proxmox server using the web interface. When you're sure they're all stopped and while logged into your Proxmox server as root carefully enter the following two commands. Note that, because of the length, the sed command stretches to several lines which should be unraveled into a single line for the command to execute properly! Using a block-copy from a desktop machine to your SSH session is the safest method.
sed -i 's|ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length|ipt_REJECT ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp|' /etc/vz/vz.conf
/etc/init.d/vz restart
Don't forget to set the system time on your server: dpkg-reconfigure tzdata
You're finished with the CLI at this point. Now you'll be able to configure IPtables within each of your OpenVZ virtual machines as explained below.
OpenVZ vs. ISO Images. One of the beauties of Proxmox is that it supports two different types of images to create virtual machines. An OpenVZ template is akin to a snapshot of an existing system while an ISO image is identical to the installer you normally would burn onto a CD in order to install a software application on your server. In short, you still have to go through the installation scenario when you create a virtual machine (KVM) from an ISO image. A virtual machine created from an OpenVZ image is ready for use the moment it is created. If you remember when instant-on televisions first were introduced, you'll also appreciate the difference in boot times between OpenVZ and KVM machines which boot an application installed from an ISO in much the same manner as you would experience on a standalone machine.
As with life, there's a dark cloud lurking behind every silver lining, and this is especially true in the Asterisk environment. OpenVZ containers rely upon a shared kernel, the one that actually boots the Proxmox server. KVM containers created from ISO images are self-contained with their own complete operating system and kernel. Thus, zaptel or dahdi cannot be loaded directly from an OpenVZ container. Instead one must rely upon a shared version of zaptel or dahdi loaded on the Proxmox server itself. As it turns out, this is no small feat and certainly not a task for mere mortals. Bottom Line: If you need conferencing or otherwise need a timing source for your Asterisk deployment, you will not want to use the OpenVZ approach at least for now. If you want to try it later, here is the message thread on the PBX in a Flash Forum. On the other hand, if you have more traditional VoIP requirements for your PBX, then the ease of installation and use of the OpenVZ image makes perfect sense. So let's start there assuming you understand the limitations.
Installing PIAF-OpenVZ Template. Using a web browser, download the new PIAF2-OpenVZ image to your Desktop. Once you have the OpenVZ image in hand, point your web browser to your Proxmox server: https://ipaddress. Accept the default certificate and login as root. You'll get a Welcome screen that looks something like what's shown above. Click on the Appliance Template option. In the Upload File section, choose the PIAF2-OpenVZ image on your Desktop and click Upload. Be patient. It's a big file. So go have a cup of coffee. You'll get a prompt when it's completed. You can also do this directly within the Proxmox server by logging in as root and issuing these commands to install the latest PIAF2-OpenVZ template:
cd /var/lib/vz/template/cache/
wget http://nerd.bz/zwU8zb
mv zwU8zb centos-6.2-purple1.8.8-piaf_2.0.6.2-5_amd64.tar.gz
Creating OpenVZ Virtual Machines. Once installed, you can build Asterisk 1.8.8.0 virtual machines to your heart's content... in about a minute apiece. Just choose Virtual Machine, Create to create a new virtual machine using the OpenVZ template you just uploaded. In the Configuration section, choose OpenVZ for the Type and pick your new OpenVZ template from the pulldown list. Fill in a Host Name, Disk Space maximum (in GB), Memory Allocation (1024 recommended), and a very secure (root) Password. The other defaults should be fine. In the Network section of the form, change to the Bridged Ethernet (veth) option which means the VM will obtain its IP address from your DHCP server. Make sure your DNS settings are correct for your LAN or use Google's DNS servers: 8.8.8.8 and 8.8.4.4. Here's how a typical OpenVZ creation form will look. Just click on the image to enlarge.
Once the image is created, start up the virtual machine, wait at least 60 seconds for the system to load, and then click on Open VNC Console. Asterisk will be loaded and running. Verify this on the status display. You can safely ignore the status messages pertaining to IPtables assuming iptables -nL shows that IPtables is functioning properly. You now have a PIAF-Purple base platform running Asterisk 1.8.8.0 and FreePBX 2.9. REMINDER: Be sure you always run both Proxmox AND your virtual machines behind a hardware-based firewall with no port exposure to the Internet!
Before you do anything else, log into your virtual machine using SSH and run passwd-master to secure the passwords for FreePBX GUI access to your system. Also be sure to set the correct time zone3 on your virtual machine:4
mv /etc/localtime /etc/localtime.bak
ln -s /usr/share/zoneinfo/America/Indianapolis /etc/localtime
date
Once you have secured your passwords, you're ready to set up Asterisk to make and receive calls. For the complete 5-minute tutorial, see this Nerd Vittles article. REMINDER: Once you have set up a Google Voice account, created an extension with a secure password, and created an inbound route for your incoming calls, don't forget to reload Asterisk from the CLI or Google Voice calling will fail: amportal restart.
Installing Incredible PBX and Incredible Fax. An alternative before configuring your system is to first install Incredible PBX and Incredible Fax. We recommend it. This gives you a turnkey, full-featured PBX with almost every Asterisk feature available on the planet. While logged into your server as root, issue this command to install Incredible PBX: install-incredpbx3. When the install completes, issue the following command to install Incredible Fax: install-incredfax2. Restart your virtual machine to complete the install.
Asterisk CLI Change. Finally, just a heads up that (once again) the Asterisk Dev Team appears to have changed the default behavior of the Asterisk CLI. With Asterisk 1.8, if you make outbound calls after loading the CLI, you will notice that call progress no longer appears in the CLI. To restore the standard behavior (since Moses), issue the following command: core set verbose 3. 🙄
Securing IPtables with a WhiteList. If you're running your virtual machines behind a hardware-based firewall with no Internet port exposure AND all of those on your private LAN are trusted, you can quit here. Otherwise, you need to lock down the IPtables firewall on your virtual machines to only permit access from trusted IP addresses. As delivered with Incredible PBX, all private IP addresses are authorized and a number of dangerous Internet services also are accessible. Here's how to fix it. Log into each VM and edit /etc/sysconfig/iptables: nano -w iptables. Change the section of entries that look like the following by inserting a # at the beginning of each entry. Once you've added the # characters, your entries should look like this:
#-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
#-A INPUT -p tcp -m tcp --dport 113 -j ACCEPT
#-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
#-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
#-A INPUT -p tcp -m tcp --dport 21 -j ACCEPT
#-A INPUT -p tcp -m tcp --dport 9001 -j ACCEPT
#-A INPUT -p tcp -m tcp --dport 9080 -j ACCEPT
#-A INPUT -p udp -m udp --dport 4569 -j ACCEPT
#-A INPUT -p udp -m udp --dport 5000:5082 -j ACCEPT
#-A INPUT -p udp -m udp --dport 10000:20000 -j ACCEPT
#-A INPUT -p tcp -m tcp --dport 4445 -j ACCEPT
#-A INPUT -p tcp -m tcp --dport 5038 -j ACCEPT
Now scroll down a bit in the file and find the entries that look like the following. NOTE: If you didn't install Incredible PBX, you'll need to manually add these entries:
-A INPUT -s 192.168.0.0/255.255.0.0 -j ACCEPT
-A INPUT -s 172.16.0.0/255.240.0.0 -j ACCEPT
-A INPUT -s 10.0.0.0/255.0.0.0 -j ACCEPT
-A INPUT -s 127.0.0.0/255.0.0.0 -j ACCEPT
Immediately below these private network entries, add additional entries using the actual IP addresses that are needed to administer your virtual machine. Also include the IP addresses of any remote telephones that are not covered by the private LAN entries above. Each entry should look like the following using the actual IP addresses needed:
-A INPUT -s 111.222.111.222 -j ACCEPT
IMPORTANT: Save your changes after making sure you've included an entry for the IP address from which you currently are accessing your server. Otherwise, you will lock yourself out of your server. Then restart IPtables: service iptables restart. Verify that the entries are the way you expect: iptables -nL. Now, with a browser, attempt to access the IP address of your virtual machine from an untrusted IP address, e.g. your cellphone. Then repeat from a trusted IP address. If all is well, you're done.
Solving One-Way Audio Problems. If you experience one-way audio on some of your phone calls, you may need to adjust the settings in /etc/asterisk/sip_custom.conf. Just uncomment the first two lines by removing the semicolons. Then replace 173.15.238.123 with your public IP address, and replace 192.168.0.0 with the subnet address of your private network. There are similar settings in gtalk.conf that can be activated although we've never had to use them. In fact, we've never had to use any of these settings. After making these changes, save the file(s) and restart Asterisk: amportal restart.
Quirks, Gotchas, and Updates. The only quirk you will notice in the current virtual machines is that IP6tables may not be running. We're working on it. For the latest breaking news and updates about PIAF2-OpenVZ, visit this thread on the PIAF Forum. Don't forget your Valentine tomorrow. Enjoy!
Originally published: Monday, February 13, 2012
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...
- Be very careful choosing Intel processors. Even some high-end processors do not support Intel Virtualization Technology. Here's the official list. [↩]
- And here is a useful reference for AMD-compatible processors. The AMD WIKI provides the following list of AMD-V compatible processors: "AMD's x86 virtualization extension to the 64-bit x86 architecture is named AMD Virtualization, also known by the abbreviation AMD-V, and is sometimes referred to by the code name 'Pacifica'. AMD processors using Socket AM2, Socket S1, and Socket F include AMD Virtualization support. AMD Virtualization is also supported by release two (8200, 2200 and 1200 series) of the Opteron processors. The third generation (8300 and 2300 series of Opteron processors) will see an update in virtualization technology..." [↩]
- Look in /usr/share/zoneinfo for correct time zone name for your closest city. [↩]
- Getting the correct time in your VMs can be problematic with Proxmox. If you continually see the wrong time when you issue the date command after starting up your VMs, try this. Log into the Proxmox host and issue the following commands using the correct container number and your local time zone city for your virtual machine:
vzctl stop 108
vzctl set 108 --capability sys_time:on --save
vzctl start 108
vzctl enter 108
mv /etc/localtime /etc/localtime.old
ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
exit[↩]
Bluetooth Proximity Detection for Automatic Call Forwarding
Time flies. It's been over six years since we introduced Bluetooth Proximity Detection to the Asterisk® community. Suffice it to say, the last tutorial was getting a little long in the tooth. Because we can't seem to get enough programming torture lately, we decided to revisit Follow Me Phoning by taking it to a whole new level with a fresh look at the setup procedure using the latest version of CentOS™ and PBX in a Flash 2™. This entire project takes less than 15 minutes.
If you're new to all of this, what we're talking about is the ability to stroll out of your home or office and have your telephone calls follow you on your cellphone automatically... without touching anything. And, when you return, the home or office phones start ringing again just as if you never left. Won't your boss or spouse be thrilled? What makes all of this possible, of course, is Bluetooth which happens to be running on your PBX in a Flash™ server and on your iPhone®, or Android® phone, or even Windows® Phone 7.
Our plan today is simple enough. We want to design a phone system so that, when you walk into your home or office, the phones ring in the office when there's an incoming call. And, when you walk out of your home or office carrying your WonderPhone with Bluetooth, calls to your home or office extension will start ringing on your cellphone. If you're using one of our turnkey PIAF2™ systems, this project should take you about 15 minutes to complete once you have a compatible USB Bluetooth adapter in hand.
System Requirements. As mentioned, you'll need a Linux-based Asterisk server. We recommend PBX in a Flash 2 which uses the latest and greatest CentOS 6.2™. It makes a virtually flawless communications server and includes all of the Linux utilities you'll need to get this working. Other than your Asterisk server, the only other hardware you'll need is a dLink™ DBT120 Bluetooth Adapter or any Bluetooth 2.0 EDR-compatible USB device will do. DBT120's run $30-$40 from most electronics stores. The clones cost a dollar or two on eBay. The ones with the black, semi-circular tops work fine. You choose. If you're using some other Linux flavor that doesn't include the Bluetooth utilities, consult our original article for installation instructions.
USB Bluetooth Adapter Installation. Boot up your Asterisk server if it is not already running and log in as root. Plug your USB Bluetooth adapter into an available USB slot. Now issue the following command:
/etc/init.d/bluetooth start
If you're alerted that some other application isn't running, we don't care. Now let's be sure the system has found your bluetooth adapter. Issue the following command from the Linux CLI:
hcitool dev
Assuming you get a response telling you the system found device hci0 with the MAC address of the adapter, you have successfully installed your USB Bluetooth adapter. So let's press on.
Configuring Linux Bluetooth Software to Start Automatically. You don't want to have to manually start up your Linux Bluetooth application each time you reboot your server. The easiest way to automatically start it is to issue the following command while still logged into your server as root:
chkconfig --level 345 bluetooth on
Deciphering Your Cellphone's Bluetooth MAC Address. We're going to be communicating with your Wonderphone to determine when you're in and when you're out. In order to do that, we need the MAC address of the phone's Bluetooth Adapter. Here's how to find it. Move your cellphone within 10 feet or so of your Asterisk server. Then put your phone into Bluetooth Discovery Mode by making it Visible for discovery. Every phone does this a little differently but you get the idea. HINT: Be sure Bluetooth is set to ON. Once you've done that, your phone will report that it is Discoverable. Put the cell phone down near your Asterisk server and jump back over to your Asterisk server console. Issue the following command, and you may have to try it several times until you get the MAC address of your cellphone's Bluetooth Adapter:
hcitool scan
Your system will whir away for a few seconds and then will report back the Bluetooth MAC address and name assigned to the adapter. It may be your name, or it may be the name or model of your cellphone. Write both of them down. We'll need the MAC address in a minute.
Proximity Detection Design. Now we've got all the hardware information we need to make proximity detection work. We'll download the Proximity Detection software in a minute. But first, sit down with a pencil and write down the other information you'll need to configure the Proximity Detection software. To make the software as flexibile as possible, we've reworked the code a bit since the original article. With the new code, it's possible to manage multiple extensions of multiple people with multiple cellphones. So what you'll need is the extension numbers of the people that want to use this and the cellphone numbers of those people. For example, you may want to forward extension 200 to 6782345678 and extension 202 to 6783456789. Just make sure that the forwarding numbers are in the correct format for the default outbound dialing rules on your Asterisk server. If your server expects numbers to always begin with a 9 or a 1, be sure to include it in the dial string, or the calls won't be completed when they are forwarded. Obviously, you'll also need the MAC address for each of your cellphone's Bluetooth adapters so just repeat the drill above with each cellphone until you have all of the MAC addresses. Finally, you'll need to assign an 8-character (or less) name to each user. So make yourself a nice little chart:
WARD 00:1D:64:C9:58:BA 200 6782345678
MARY 00:2D:54:C9:59:AB 201 6783456789
Today's installment assumes you are using a single Asterisk server both for your phone system AND proximity detection. The only drawback with the current design is that the cellphones need to be placed close to that server when you arrive at your home or office. You can experiment on the distance the cellphones can be away from the server. Different Bluetooth adapters and cellphones have slightly different ranges. The bottom line is you always want to leave the cellphones close enough to the server with the USB Bluetooth adapter so that the proximity detection works reliably all the time.
Proximity Detection Software Installation. All that remains to be done is to download and configure the proximity detection script and then put it in motion on your Linux machine. Log into your Asterisk server as root and move to the /root directory to download and unzip the script:
cd /root
wget http://nerdvittles.com/trixbox123/proximity.zip
unzip proximity.zip
chmod +x proximity
If you're going to be setting up proximity detection for multiple people, just make copies of the proximity script, e.g. cp proximity proximity1. Then edit each of the scripts and fill in the data from the little chart you made: nano -w proximity
deviceuser=WARD
devicemac=00:4B:63:D5:62:AB
myextension=200
mycellphone=6783456789
Save your changes and exit the editor: Ctrl-X, Y, then Enter.
Setting Up the Crontab Jobs. The last step is to set up a crontab entry for each script so that it gets run once a minute during whatever hours each day you want to monitor your cellphones. While still logged in as root, edit /etc/crontab: nano -w /etc/crontab. Insert a line like the following at the bottom of the existing file. This code would monitor your cellphone from 6 a.m. to 9 p.m. each day. To monitor your phone 24 hours a day, replace 6-21 with an additional asterisk.
* 6-21 * * * root /root/proximity > /dev/null
Repeat the drill for the other phones you want to monitor substituting the correct script names, and you're done. Save your changes and exit the editor: Ctrl-X, Y, then Enter.
Incidentally, if you ever want to disable the Proximity Detection System, just edit the crontab file and comment out the lines you want to disable by inserting # at the beginning of the line(s). Then try a test call. If it happens that your calls are still being forwarded to your cellphone, you can cancel the forwarding from any Asterisk extension by dialing *74.
Alternatives. Since our original articles on proximity detection were released, some alternatives have appeared on the horizon. Perhaps the most important one is Google Voice. Using a free Google Voice account with a phone number in your choice of area codes, it's now possible to designate up to six phone numbers to ring in addition to the phones you have connected to your Google Voice number using either a PIAF2™ server or a $50 OBi device. In some cases, this may alleviate the need for proximity detection because you can simply pick up your office or home phone when it's available and answer your cellphone when you're away since both will be ringing. One advantage of the Google Voice approach is that inbound calls to your cellphone will display the CallerID of the caller rather than the CallerID of the trunk being used to forward calls to your cellphone. Either way works, and it's nice to have alternatives. Enjoy!
Originally published: Monday, February 6, 2012
Support Issues. With any application as sophisticated as Asterisk, you're bound to have questions. Blog comments are a terrible place to handle support issues although we welcome general comments about our articles and software. If you have particular support issues, we encourage you to get actively involved in the PBX in a Flash Forums. It's the best Asterisk tech support site in the business, and it's all free! We maintain a thread with Information, Patches and Bug Fixes for Incredible PBX. Please have a look. Unlike some forums, ours is extremely friendly and is supported by literally hundreds of Asterisk gurus and thousands of ordinary users just like you. You won't have to wait long for an answer to your question.
Special Thanks to Our Generous Sponsors
FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.
BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.
The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.
VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
Speech-to-Text Directory Assistance Comes to Asterisk
Since the invention of the telephone, the most critical component has been the ability to match people's names to their phone numbers. Ma Bell did this with live operators (including my aunt) for many years. Then came automated lookups where you called a number for directory assistance and actually spoke the name of the person you wished to call. A computer then converted your speech to text and looked up the number in a database. Typically, the number was spoken back to the caller who then could place the call. Or "for a few cents more" the lookup service would actually place the call for you. For the learning impaired, this became a godsend when many metropolitan areas switched to 10-digit dialing.
Today, we'll show you how trivial it is to implement this yourself on any Asterisk® server using Google's new (free) speech-to-text web service which we introduced a few weeks ago. It's a 2-minute drill using PBX in a Flash™ with Incredible PBX™ and Google's Speech-to-Text web service. We'll be using a MySQL database to demonstrate the concept today, but it easily could be tweaked for use with any ODBC-compatible database. ODBC demos are included in Incredible PBX by dialing 222 or 223.
Many years ago we demonstrated how to quickly place calls to your friends by dialing the first three letters in their names with any phone connected to your Asterisk server using our freely available AsteriDex™ database. This has been incorporated into Incredible PBX by dialing 412 from phones connected to your PBX in a Flash server. Thanks to Google's new (free) speech-to-text web service, today we'll show you how trivial it is to tweak that application to replace 3-letter calling with spoken names of people to call with Asterisk. When you're finished, you'll be able to pick up any phone on your Asterisk server, dial 4-1-2, speak the name of an individual or company in your AsteriDex database, and have Asterisk automatically place the call for you.
Legal Disclaimer. What we're demonstrating today is how to use a publicly accessible web resource to respond to queries using a phone connected to your Asterisk server. We're assuming that Google has its legal bases covered and has a right to provide the public service they are offering. We are not vouching for Google or the services being offered in any way. By using our tutorial, YOU AGREE TO ASSUME ALL RISKS, LEGAL AND OTHERWISE, ASSOCIATED WITH USE OF THIS FREELY ACCESSIBLE WEB TOOL. NO WARRANTY EXPRESS OR IMPLIED IS BEING PROVIDED BY US INCLUDING ANY IMPLIED WARRANTY OF FITNESS FOR USE OR MERCHANTABILITY. You, of course, have an absolute right not to read our articles or implement our code if you have reservations of any kind or are unwilling to assume all risks associated with such use. Sorry for legalese, but it's the time in which we live I'm afraid. Plain English: "Don't Shoot the Messenger!"
Prerequisites. The easiest setup for this is a new PIAF2™ server. Once you have it running, install Incredible PBX 3 by logging into your server as root and issuing the command: install-incredpbx3. For complete instructions on Incredible PBX 3, here's the link to the Nerd Vittles tutorial. If you'd prefer not to go the Incredible route, then simply install AsteriDex 4 and then add the CallWho extension. Finally, you'll need to run the Wolfram Alpha for Asterisk one-click installer. This gets Google's speech-to-text components installed on your server. Now you're ready to tweak the CallWho app to use speech-to-text lookups through Google instead of 3-letter dialing.
Editing nv-callwho.php. Log in as root and edit nv-callwho.php in /var/lib/asterisk/agi-bin:
cd /var/lib/asterisk/agi-bin
nano -w nv-callwho.php
Press Ctrl-W. Search for where dialcode =. Replace it with where name =.
Now save the file with the change: Ctrl-X, Y, then press Enter.
If you'd prefer to use the latest, greatest (preconfigured) version, ignore the above and issue the following commands instead:
cd /var/lib/asterisk/agi-bin
wget http://nerd.bz/xnyJR3
tar zxvf callwho21.tgz
rm callwho21.tgz
Tweaking Your Custom Dialplan. While still logged in as root, you'll also need to edit extensions_custom.conf in /etc/asterisk:
cd /etc/asterisk
nano -w extensions_custom.conf
Press Ctrl-W. Search for 412. Now scroll down to the following lines:
exten => 412,9,Read(DIALCODE,beep,3)
exten => 412,10,NoOp(Name lookup: ${DIALCODE})
exten => 412,11,AGI(nv-callwho.php,${DIALCODE})
You'll want to replace those lines with the following 3 lines with no word wrap:
exten => 412,9(record),agi(speech-recog.agi,en-US)
exten => 412,10,Noop(= Script returned: ${status} , ${id} , ${confidence} , ${utterance} =)
exten => 412,11,AGI(nv-callwho.php,${utterance})
Finally, you'll want to adjust the spoken prompts in lines 412,6 and 412,8 to say something like this: "At the beep say the name of the person or company you wish to call. Then press the pound key."
Now save the file with your changes: Ctrl-X, Y, then press Enter
Finally, reload your Asterisk dialplan: asterisk -rx "dialplan reload"
Test Drive. To test things out, pick up a phone connected to your Asterisk server and dial 412. When prompted for the person or company to call, say "American Airlines" and then press the pound key.
Tweaking AsteriDex. You may need to make some minor adjustments to entries in your AsteriDex database to accommodate speech-to-text queries. For example, the sample entries include American Airlines and Delta Air Lines. Google translates the spoken words "air lines" as "airlines" so you'll need to modify the Delta entry, or it won't find a match. Similarly, there's a sample entry for "Emery Worldwide" but Google translates the spoken words as "emory worldwide." While capitalization doesn't matter, emory will not match emery. But, with a little tweaking, you'll have a very impressive, homegrown directory assistance service to impress all of your Friends and Family™. Enjoy!
Fuzzy Search Update. After we went to press, one of our favorite pundits on the PIAF Forum suggested that perhaps implementing fuzzy logic searches with MySQL would improve results, particularly with proper names. Great idea! It solved both the Delta Air Lines and Emery Worldwide lookup issues. And it turned out it was incredibly simple to implement. All that was required was replacing the existing $query command in nv-callwho.php (as explained above) with the following. This now has been incorporated into the preconfigured AGI script which is available for download above.
$query = "SELECT * FROM user1 where strcmp(soundex(name), soundex('$dialcode')) = 0";
For additional enhancements, see this thread on the PIAF Forum.
Asterisk TTS Bug. Be advised that certain newer releases of Asterisk have a text-to-speech bug which abnormally terminates TTS messages that have an embedded comma. If you have stored names in AsteriDex using Lastname, Firstname format, this may pose a problem. The simple solution is to either remove the commas or change them to periods. In the alternative, you can add the following line of code immediately below all existing lines of code beginning with $msg in nv-callwho.php. This, too, has been incorporated into the preconfigured AGI script above.
$msg = str_replace( ",", ".", $msg );
Originally published: Monday, January 30, 2012
Support Issues. With any application as sophisticated as Asterisk, you're bound to have questions. Blog comments are a terrible place to handle support issues although we welcome general comments about our articles and software. If you have particular support issues, we encourage you to get actively involved in the PBX in a Flash Forums. It's the best Asterisk tech support site in the business, and it's all free! We maintain a thread with Information, Patches and Bug Fixes for Incredible PBX. Please have a look. Unlike some forums, ours is extremely friendly and is supported by literally hundreds of Asterisk gurus and thousands of ordinary users just like you. You won't have to wait long for an answer to your question.
Special Thanks to Our Generous Sponsors
FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.
BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.
The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.
VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.