Home » Technology » Paradise Lost… and Found Again: Incredible PBX Returns

The Most Versatile VoIP Provider: FREE PORTING

Paradise Lost… and Found Again: Incredible PBX Returns

For the tenth time in as many months, Google is up to its old tricks again with Google Voice access. Beginning December 1, Gtalk outbound calling requires a web connection with all the cookie mess that’s made Python a household word. And we’re back to the 2-call mumbo jumbo that we started with in the original Incredible PBX. There’s some good news though. First, the return call can use Gtalk as the transport mechanism rather than having to acquire yet another phone number from yet another provider. So the return call connection is virtually instantaneous. Our special thanks to Lost Trunk on the PIAF Forums for his discovery and the pioneering work he did to get everything working again. And second, Asterisk® 1.8 now provides transparent call bridging so the days of jumping in and out of the Asterisk Parking Lot to complete an outbound call are over. For the non-techies, it just works! So just follow the installation procedure in the original article and you’ll be good to go. No need to keep reading unless you enjoy getting down in the weeds.

We’re getting smarter with every Google Voice iteration. In fact, we kinda saw this one coming before Incredible PBX 1.8 was released. All of the Python plumbing already was built into Incredible PBX 1.8 just in case we needed to return to the old fashioned way of doing things. So it was a relatively easy fix to adjust the Asterisk dialplan and FreePBX® contexts to support the new requirements.

There are a few more Christmas bonuses today as well. First, you now can add as many Google Voice accounts to your server as you’d like. So Tom, Dick, and Mary can all have their own Google Voice number if desired. Second, for those that like to experiment and aren’t comfortable with Python scripts, there now are bash and AGI scripts to make Google Voice calls as well. We haven’t played with these, but here are links to the gvout bash script docs and AGI script documentation (such as they are) if you’d like to experiment. Just don’t ask us any questions. But, by all means, share your discoveries!

Can An Existing System Be Upgraded? Let’s begin with the question you’re all wondering about. If you have an existing Incredible PBX 1.8 system, can it be retrofitted so that outbound calling once again works? And the answer is YES! Here’s how. You’ll need to make some changes both in your dialplan and using the FreePBX GUI. Just follow along below. It’s not hard.

Dialplan Adjustments. For the dialplan modifications, we’ve written a script which makes it easy. Log into your server and enter the following commands. When prompted, enter the Google Voice email address and password that you already are using with Incredible PBX 1.8. Then enter the Google Voice email address for call notifications, and you’re all set. If you’ve forgotten which Google Voice email address and password you’re using, then issue the following command: cat /etc/asterisk/jabber.conf.

NOTE: This script assumes you have made no additions to the end of extensions_custom.conf. If you have made changes, then you’ll need to put your changes back into extensions_custom.conf once it has been updated. The original version of the file has been renamed to extensions_custom.conf.last.

cd /root
wget http://incrediblepbx.com/fixit.sh
chmod +x fixit.sh
./fixit.sh

If you happen to screw up and enter your credentials wrong, it won’t hurt to run the script again. Just save a copy of extensions_custom.conf.last with a different file name so you don’t lose the contents of your original file in the event you made changes to it.

FreePBX Changes. Now for the manual stuff. Using your browser, log into FreePBX at http://ipaddress/admin using maint as the username and the password you set up with passwd-master. It’s easier to explain the process using an example so let’s assume the Google Voice account you’re using with Incredible PBX is johndoe@gmail.com. We’ll refer to this as your Google Voice Email. We’ll also be using your Google Voice Name which would be johndoe without the @gmail.com. Finally, you’ll need your 10-digit Google Voice DID (aka phone number) with a +1 prefix: +18431234567. You’re not going to need your Google Voice notification email address. We’ve already taken care of that in the extensions_custom.conf dialplan code.

Step #1: Make yourself a Cheat Sheet with these 3 pieces of information for your actual account:

Google Voice Email: johndoe@gmail.com
Google Voice Name: johndoe
Google Voice DID: +18431234567

Step #2: Create a new Custom Trunk in FreePBX: Setup, Trunks, Add Custom Trunk:

Trunk Name: gvoice-johndoe
Custom Dial String: local/$OUTNUM$@gvoice-johndoe

NOTE: If we don’t show an entry on the FreePBX form, leave the default. After each step, save your entries and reload your dialplan when prompted.

Be very careful with these entries. A single typo means nothing will work. Don’t post a comment saying nothing works, or you’ll get a cryptic response that says, "Check for typos!" 🙄

Step #3: Create a new Custom Destination in FreePBX: Tools, Custom Destinations, Add Custom Destination:

Custom Destination: googlein,johndoe@gmail.com,1
Description: GV In – johndoe

Step #4: Create a new Inbound Route in FreePBX: Setup, Inbound Routes, Add Incoming Route:

DID Number: gvoice-johndoe
CallerID Number: +18431234567
CID Lookup Source: Caller ID Superfecta
Custom Destination: GV In – johndoe

Step #5: Modify the Default Outbound Route in FreePBX: Setup, Outbound Routes, Default. Delete the ENUM Trunk Sequence by clicking on the Trashcan icon beside it. Then change the remaining Trunk Sequence entry to the following: gvoice-johndoe.

Step #6: Modify the GoogleVoice Outbound Route in FreePBX: Setup, Outbound Routes, GoogleVoice. Change the existing Trunk Sequence entry to: gvoice-johndoe.

Step #7: Modify the TollFree Outbound Route in FreePBX: Setup, Outbound Routes, TollFree. Change the existing gvoice Trunk Sequence entry to: gvoice-johndoe.

Step #8: Reboot your server for good measure.

UPDATE: If you still have trouble completing outbound calls, here’s a temporary fix to address what appears to be a bug in Asterisk 1.8.0. Log into your server as root and issue the following commands once or twice. Then all will be well… at least until you reboot. 😉

amportal restart
/root/jab

UPDATE #2: Kudos to Doktur on the PIAF Forums for actually finding a permanent outbound calling solution. It turns out that, unlike Asterisk 1.6, Asterisk 1.8 now requires that the Python gvoice script be run with root privileges. This now has been fixed in the base install so you won’t have to worry about it. However, to update an existing system, here’s a link to the commands to fix it once and for all.

Adding Multiple Google Voice Accounts. Once you’re sure everything is back to normal, and you can successfully make outbound calls and receive inbound calls from your Google Voice number, then you’re ready to add support for additional Google Voice accounts. Set up your Google Voice second account using the steps outlined in the Incredible PBX 1.8 article. Then do the following:

Step #1: Repeat the first seven FreePBX steps shown above using the Google Voice credentials for your second account instead of your first. In steps 4, 5, and 6, simply add your second account as an additional Trunk Sequence. This will provide a second outbound call path when the first one is busy.

Step #2: Log into your server as root and edit /etc/asterisk/jabber.conf. Copy the entire [asterisk] context and name it [asterisk2]. Then replace the username and secret in [asterisk2] with your new Google Voice name and password for your second account.

Step #3: Edit /etc/asterisk/extensions_custom.conf. Find the [googlein] context and make a duplicate copy of the top section of code which includes all lines beginning with exten => johndoe@gmail.com. In the duplicate section, replace johndoe@gmail.com with your second account Google Voice Email, replace both gv_dialout_johndoe entries using your second account Google Voice Name, and change the ALERTNAME email address in the second line, if desired.

Step #4: While still in extensions_custom.conf, make a duplicate of the [gvoice-johndoe] context which should be at the end of the file. Copy the duplicate just below it and name it using your second account Google Voice Name, e.g. [gvoice-marydoe]. Enter your Google Voice credentials for the second account in the first and eighth lines of the new context. Remember to modify the email address twice in the first line! In the third, fifth, and seventh lines, change gv_dialout_johndoe to reflect your second account Google Voice Name. Save your changes.

Step #5: Reboot your server. Enjoy!



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


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


 

Special Thanks to Our Generous Sponsors


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

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

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

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

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


Some Recent Nerd Vittles Articles of Interest…


23 Comments

  1. I did LostTrunk’s fix over the weekend. Is this functionally any different? The one thing I noticed with my fix is that it now only allows 1 outbound GV call at a time on my 1 GV number. The prior Gtalk of incredible18 allowed multiple ones. Does your update only allow 1 outbound call on GV at a time or does it allow multiple per GV number?

    [WM: Same fix adapted for Incredible PBX. Haven’t tried multiple outbound calls using the same trunk. But, if I were in Google’s shoes, it would make some sense to limit it.]

  2. After failing to fix the existing system, I tried a new fresh install but outbound call still does not work. After "Please wait connect call msg", it waits for a while and hangs up. Same issue as the existing system being fixed. Incoming still works really well.

    I have noticed that several guys have had the same symptom. Now sure why. My gmail email has this pattern: abc.def@gmail.com. Does "." make any difference? System with the same email worked flawlessly previously.

    I am running PIAF on a VMWare, btw.

    Thank you very much for your hardwork for the calling freedom. I have learnt alot. Should have known this before we purchased Fonality system. Now we are stuck with Fonality with thousands of biz cards printed with their numbers. FML.

  3. Seems to be a minor glitch with Asterisk 1.8 on some systems. If you can’t get outbound calls to complete, log in as root and issue the following two commands once or twice. That seems to clear up the problem… at least until you reboot. 🙂

    amportal restart
    /root/jab

    I’ve tried embedding it in the startup script, and that doesn’t suffice.

    If you still have problems, try issuing the following command with your credentials and then repeat the two commands above:

    gvoice -e username@gmail.com -p gvpasswordhere call 8431234567 username@gmail.com 9

  4. TonyN;

    It doesn’t make any difference on Google whether you use abc.def or abcdef. Google accepts both as the same valid user. Try yourself logging in as abcdef.

    Best regards.

  5. Per recommendation from one forum member, I issued the command:
    gvoice -e xxxxxxxxxx@gmail.com -p xxxxxxxxxxxxx call XXXXXXXXXX xxxxxxxxxx@gmail.com 9

    After it said "Logging out of voice", outbound call went thru.

    However, before that amportal restart & /root/jab seemed not to help. And now after each reboot, the combo amportal restart & /root/jab seems to work nicely. Thanks.

    Btw, how to put this combo into startup script?

    [WM: Adding to startup script doesn’t work unfortunately.]

  6. Thanks for all the help! Unfortunately, I’m still having the issue, even after running the amportal restart and /root/jab commands. Additionally, I restarted my server a couple times after having the changes go into effect. I turned of IPtables and verified the port 5222 connection is established just to be sure.

    There must be something really obvious that I’m missing.. in the fixit.sh script, is it OK that my Gmail call notification address is the same as my dedicated GV email? Or does that need to be different?

  7. Ahhh nevermind. Stupid me. I tried shutting down X-lite and starting it back up, and also re-ran the two recommended commands a couple more times… it works now! Kinda stinks cause I’m testing this all remotely. When I get home, I’ll need to make sure the analog phones are working. But it looks like I’m good.

    Thanks again for all the help!

  8. For the early adopters today, be aware that you also need to change the TollFree outbound route. Just replace gvoice entry with gvoice-johndoe. The article has been updated to reflect this change.

  9. Ok so adding multiple accounts. Steps 1 said to repeat steps above, but step 5 and 6 would mean to change to the other account ? Confused, here ? I was using custom contex before to isolate the extensions is this the way to do it here as well ?

    [WM: Everywhere you see johndoe, replace it with your second Google Voice credentials, not your first set of credentials. When we said repeat the steps, we meant with your second account’s credentials. These are what should have been entered on your second Cheat Sheet.]

  10. What I mean is this steps,
    Step #5: Modify the Default Outbound Route in FreePBX: Setup, Outbound Routes, Default. Delete the ENUM Trunk Sequence by clicking on the Trashcan icon beside it. Then change the remaining Trunk Sequence entry to the following: gvoice-johndoe.

    Step #6: Modify the GoogleVoice Outbound Route in FreePBX: Setup, Outbound Routes, GoogleVoice. Change the existing Trunk Sequence entry to: gvoice-johndoe.

    If now I change to the second account, I will always dial out with the second account not first. Incoming works fine.

    [WM: Sorry. I’m the dense one. Add another Trunk Sequence below gvoice-johndoe for gvoice-marydoe. Then, the first call will go out through the first Google Voice trunk. And, when that trunk is busy, the next call will be routed out through the second Google Voice trunk. You also can tie trunks to specific extensions for outbound calls using Custom Contexts. Visit the PIAF Forums for details on this approach.]

  11. After applying the fix and getting outbound calls to work again, I noticed that every outbound call is prefaced with the old "Please wait while I connect your call…*BEEP*" message before the phone starts ringing. I had disabled this in the IVR and Day/Night Controls previously but I guess something else must have changed. Is there a way to get this back to how I had it (sans the voice prompt)?

    [WM: Sure. Edit the [gvoice-johndoe] context at the bottom of extensions_custom.conf and comment out the second line (pls-wait-connect-call) by inserting a semicolon at the beginning of the line. Then reload the dialplan. Incidentally, unlike the previous version to which you alluded, this prompt in the current release plays in the background so it doesn’t delay the connection at all. We thought that was preferable to 4 seconds of silence which might confuse some users.]

  12. The riddle with outbound calls failing with Asterisk 1.8 has been solved. It turns out that Asterisk 1.8 now requires the Python gvoice script to be run as root. To permanently fix existing systems, see this thread.

  13. Ward, the sudo fix in the thread apply only after the fix in the above article or apply to any installation before Google changes on 12/1?

    [WM: Apply the fixit.sh script first and then the new commands to address the outbound calling issue.]

  14. Ward,

    I just want to report that when I issued 3 new commands to permanently fix the outbound calling issue, the problem still persisted but a little bit different. After few seconds of silence, it says "Number is not answering and hangup".

    Issued amportal retart & /root/jab then it worked again. PIAF in VMWare Workstation.

  15. I was originally told on the forums not to take the "Purple Plunge" yet. Do the new updates change things, and make this a more reliable option? My Asterisk 1.4 based system has been having a bunch of issues with GV callbacks and other things, and I’m planning on re-setting up the system anyway, just trying to decide which version to use… Thanks!

    [WM: Asterisk 1.8 looks pretty solid to me. Go for it unless it’s in a business environment where every minute (and dollar) counts. This is not a warranty obviously. 🙂 ]

  16. Hi!
    Are you guys going to write an article to include all the fixes. Or you are going to have us going from one to the other and back. Thank you!

    [WM: If you’re just getting started, simply follow the steps in the original article. All of the downloads are current. I thought we made that clear in the first paragraph. 🙄 ]

  17. Hi there!

    Is there any way to add gvout to * 1.6? Or am I stuck getting a 1.8?

    Also, I’m wondering why not integrate everything into one iso?

    It’s pain to sit and wait for all those extra multi-hundred MB downloads on a slow connection after I got PIAF iso and was hoping it’s going to be a quick install.

    [WM: Asterisk 1.6 will be obsolete in 3 months when IPv4 is no longer an option, so we don’t plan to spend much effort enhancing it. As for speed, PIAF builds your system from source so that it can easily be enhanced/expanded to meet your future needs. If you prefer a quick install without this flexibility, then there are other Asterisk aggregations out there that might better meet your requirements. As most women would tell you, quick is almost never better. 😉 ]

  18. I applied the edits, and it works great. However, the next morning, it was not working. I even rebooted the system. After reinstalling fixit.sh, it started working again.

    I am wondering that if Google wants to kill Asterisk systems from attaching, then it would be easy for them to parse the status messages like:

    "I am an Asterisk PBX", "Incredible PBX", etc.

    Instead, I modified jabber.conf in /etc/asterisk to say:

    statusmessage="Away";

    and restarted the box.

    Wouldn’t this help? Just my 2 cents on this.

  19. If you’re a pioneer, the latest build of Incredible PBX incorporates all of the patches, fixes, mods, and updates covered in this article. Just follow the installation instructions here.

  20. This issue has been fixed: check the Asterisk Issue Tracker for the patch…

    [WM: Yes, indeed. In fact, we’ll have a new version of PBX in a Flash out later today that incorporates the patch for Asterisk 1.8.1. And the patch already is included as part of any new Incredible PBX 1.8 install.]

Comments are closed.