If you’ve been enjoying this summer’s wild roller coaster ride on the Google Voice train, then your worst nightmare is almost over… until the next time. What we all hopefully learned from Google’s cavalier sledgehammer-approach to telephony is DON’T DEPEND ON GOOGLE. Enjoy the free ride once again but make some alternative arrangements for the next time Google gets a harebrained idea as stupid as this one. Google’s idea of an "open platform" is proprietary everything even down to the names of the domains now being used to host the new Google platform. That should tell you everything you need to know. One cannot help wondering what financial arrangement exists between Google and Obihai. And now we have Obihai’s two new landlords in the mix with the Polycom and Plantronics acquisitions. In short, the entire migration from XMPP and Google Chat to GVSIP is a textbook example of what is charitably described in the military as one giant Charlie Foxtrot.

What we want to do today is clear up the confusion as to how one goes about implementing Google Voice GVSIP using Asterisk®, FreePBX®, Incredible PBX®, or even 3CX®. As the article’s title suggests, we would divide the approaches into three separate camps: (1) platforms with native GVSIP functionality, (2) platforms with the ability to add GVSIP functionality by running a simple upgrade script, and (3) platforms that require a separate GVSIP hosting platform in order to again take advantage of Google Voice for free calling in the U.S. and Canada. To those of you who already have deployed GVSIP on your servers, we’ll also show you how to upgrade your systems using the very latest GVSIP components.




 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

How Do I Know If My Server Has GVSIP?

Let’s start with the basics. New versions of Incredible PBX have been released over the past six weeks. And upgraded versions of these new turnkey GVSIP platforms have been released regularly. To determine whether you already have a PBX with GVSIP components, the easiest way is to log into your server as root and examine whether there in a gvsip-naf folder in the /root directory. If there is, you’ve got at least some version of GVSIP running on your server. For those that have rolled your own GVSIP platform, we’re assuming you’re smart enough to know what you’ve done.

How Do I Get the Latest Version of GVSIP?

October 14 UPDATE: Once again Google has "improved" things and changed the FQDN for GVSIP logins. The latest download (below) includes the fix. If you already have installed GVSIP and your trunks no longer register, here’s the fix:

sed -i 's|obihai.telephony.goog|voice.telephony.goog|' /etc/asterisk/pjsip_custom.conf
sed -i 's|obihai.telephony.goog|voice.telephony.goog|' /root/gvsip-naf/install-gvsip
amportal restart

We can’t speak to the upgrade procedure if you rolled your own GVSIP platform, but we can show you the easy way to upgrade any existing Incredible PBX platform that already includes the gvsip-naf folder. This upgrade procedure also will preserve any existing Google Voice trunks that you already have deployed. Unless you have deployed a new GVSIP platform in the last couple days or if your server platform is a Raspberry Pi or VMware image even in the last couple days, we strongly recommend that you upgrade your server at your earliest convenience. There have been many enhancements that directly affect the stability of your PBX and your phone calls. The upgrade procedure takes about 20-40 minutes depending upon your hardware. Here’s how:

mv /etc/asterisk/pjsip_custom.conf /etc/asterisk/pjsip_custom.tmp
touch /etc/asterisk/pjsip_custom.conf
cd /root
rm -f gvsip-naf-gui.tar.gz
wget http://incrediblepbx.com/gvsip-naf-gui.tar.gz
tar zxvf gvsip-naf-gui.tar.gz
rm -f gvsip-naf-gui.tar.gz
cd gvsip-naf
./install-gvsip
mv /etc/asterisk/pjsip_custom.tmp /etc/asterisk/pjsip_custom.conf
amportal restart

Deploying Incredible PBX with Native GVSIP

Of all the Asterisk aggregations, only Incredible PBX platforms currently include native GVSIP functionality. If we’ve missed something, by all means leave a comment and we’ll update things at our end. You currently have a choice of Incredible PBX with CentOS 6.10, the Incredible PBX ISO with Scientific Linux 6.9, Incredible PBX with Ubuntu 18.04, Incredible PBX for the Raspberry Pi with Raspbian 8, and two virtual machine images for VirtualBox and VMware. All of the original articles for these platforms have been updated and should be followed to install Incredible PBX with GVSIP. In addition to these platforms, there is a turnkey, cloud-based $1/month Incredible PBX 13-13 platform at HiFormance that takes less than a minute to install.

Most of the Incredible PBX installers include the very latest version of GVSIP; however, we’re still playing catchup on the Raspberry Pi and VMware images. For those two platforms, you’ll need to also perform the upgrade procedure documented in the previous section once your server is on line. On the HiFormance VPS platform only, you will need to load the GVSIP upgrade once your server has been deployed. Here’s how:

cd /root
wget http://incrediblepbx.com/gvsip-naf-gui.tar.gz
tar zxvf gvsip-naf-gui.tar.gz
rm -f gvsip-naf-gui.tar.gz
cd gvsip-naf
./install-gvsip
amportal restart

Deploying GVSIP on Existing Servers

You can only add GVSIP to Asterisk-based servers that include Asterisk installed from source code. Platforms with pre-packaged versions of Asterisk do not support the addition of GVSIP directly. Skip to the next section if this applies to your platform, e.g. VitalPBX, Issabel, Elastix, RASPBX, Wazo, AsteriskNOW, and FreePBX Distro. For those with Incredible PBX servers running Asterisk 13 that are more than a month old whether cloud-based, on-premise hardware, or virtual machine, you have a platform that included Google Voice Motif. You added Google Voice trunks using the FreePBX GUI. Google no longer supports this version of Google Voice so your first step must be to remove any existing Google Voice trunks from your server using the FreePBX GUI: Connectivity->Google Voice (Motif)->Delete Trunk. Then restart Asterisk after logging into your server as root: amportal restart

Once you have a Google Voice-free server and once you have shut down the Google Voice trunks you plan to use with GVSIP on your existing PBX, you’re ready to add native GVSIP functionality to your server:

cd /root
wget http://incrediblepbx.com/gvsip-naf-gui.tar.gz
tar zxvf gvsip-naf-gui.tar.gz
rm -f gvsip-naf-gui.tar.gz
cd gvsip-naf
./install-gvsip
amportal restart

Aggregations Needing GVSIP Hosting Platform

If you’re currently running a PBX with VitalPBX, Issabel, Elastix, RASPBX, Wazo, AsteriskNOW, FreePBX Distro, or 3CX, you still can take advantage of GVSIP for free Google Voice calling in the U.S. and Canada. All that’s required is a $1 per month Incredible PBX server in the cloud with native GVSIP functionality. Then it’s a simple matter to interconnect as many other servers as you like to that platform using traditional SIP trunks. Once interconnected, it’s just as if you had GVSIP running natively on your PBX. We’ve documented the entire procedure in a separate article that will walk you through Setting Up a Google Voice GVSIP Hosting Platform in the Cloud. It’s easy. It’s quick. And it’s reliable.

October 1 UPDATE: There now is another GVSIP solution for the platforms mentioned above that don’t include a way to recompile Asterisk. Follow this link for the new tutorial.

Adding GVSIP Trunks to Incredible PBX

Now that you have your GVSIP platform in place, it’s time to set up your GVSIP trunks. The trunks themselves are added by logging into your server with SSH/Putty as root and issuing the command: /root/gvsip-naf/install-gvsip. To add a trunk, you’ll need a Google Voice refresh_token and your Google Voice 10-digit phone number. This tutorial will walk you through obtaining those from Google. Once you have added one or more GVSIP trunks, you’ll need to use the FreePBX GUI to tell your PBX how to route Inbound and Outbound Calls to and from your GVSIP trunks.

Configuring a GVSIP Inbound Route

By default, incoming calls to GVSIP trunks on Incredible PBX servers will be sent to the Default Inbound Route configured on your PBX. As initially installed on Enchilada platforms, that Default route points to Allison’s Demo IVR. This can be changed easily in the FreePBX GUI by modifying the Destination for the Default inbound route in Connectivity:Inbound Routes.

On other server platforms, you may not have a Default inbound route configured so you will need to create an inbound route to handle calls from each GVSIP trunk. Regardless of your server platform, we strongly recommend adding an Inbound Route for every GVSIP trunk using the 10-digit GVSIP phone number as the DID for the inbound route. Here’s an example of an Inbound Route created in Connectivity:Inbound Routes:Add Inbound Route:

If you have installed the Incredible Fax add-on, you can enable Fax Detection under the Fax tab. And, if you’d like CallerID Name lookups using CallerID Superfecta, you can enable it under the Other tab before saving your setup and reloading your dialplan.

Configuring a GVSIP Outbound Route

By default, you cannot place outbound calls using your new GVSIP trunks. For each trunk, you first will need to create an Outbound Route specifying a Dial Pattern to use with each GVSIP trunk in Connectivity:Outbound Routes:Add Outbound Route. If you only have a single Google Voice trunk on your PBX and no other trunks, then you would probably want to specify that outbound calls be routed out the GVSIP1 trunk with a Dial Pattern of NXXNXXXXXX with 1 as the Prepend. This tells FreePBX to dial 18005551212 using the GVSIP1 trunk when a PBX user dials 8005551212. Google only accepts calls that include a country code (1=US/CAN).

HINT: If you ever forget which GVSIP trunks are associated with which phone numbers, simply run /root/gvsip-naf/del-trunk for a list of your trunks. Just press ENTER to exit without deleting any of your trunks.

There are a million ways to design outbound calling schemes on PBXs with multiple trunks. One of the simplest ways is to use no dial prefix for the primary trunk and then use dialing prefixes for the remaining trunks. As part of the install, the dialing prefixes of *41 through *49 were reserved for GVSIP trunks if you would like to use them. That’s totally up to you. Here’s what an Outbound Route would look like using this scheme for the GVSIP2 trunk:




Another outbound calling scheme would be to assign specific DIDs to individual extensions on your PBX. Here you could use NXXNXXXXXX with the 1 Prepend as the Dial Pattern with every Outbound Route and change the Extension Number in the CallerID field of the Dial Pattern. With this setup, you’d need a separate Outbound Route for each group of extensions using a specific trunk on your PBX. Additional dial patterns can be added for each extension designated for a particular trunk. A lower priority Outbound Route then could be added without a CallerID entry to cover extensions that weren’t restricted or specified.

HINT: Keep in mind that Outbound Routes are processed by FreePBX in top-down order. The first route with a matching dial pattern is the trunk that is selected to place the outbound call. No other outbound routes are ever used even if the call fails or the trunk is unavailable. To avoid failed calls, consider adding additional trunks to the Trunk Sequence in every outbound route. In summary, if you have multiple routes with the exact same dial pattern, then the match nearest to the top of the Outbound Route list wins. You can rearrange the order of the outbound routes by dragging them into any sequence desired.

Originally published: Monday, August 6, 2018


Support Issues. With any application as sophisticated as this one, you’re bound to have questions. Blog comments are a difficult place to address 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 Forum. It’s the best Asterisk tech support site in the business, and it’s all free! Please have a look and post your support questions there. Unlike some forums, the PIAF Forum is extremely friendly and is supported by literally hundreds of Asterisk gurus and thousands of users just like you. You won’t have to wait long for an answer to your question.



Need help with Asterisk? Join our new MeWe Support Site.


 

Special Thanks to Our Generous Sponsors

FULL DISCLOSURE: RentPBX, Amazon, Skyetel, Vitelity, DigitalOcean, Vultr, Digium, Sangoma, 3CX, TelecomsXchange and others have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. 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.

Skyetel $50 Free Trial: Enjoy state-of-the-art VoIP service with a $50 free trial and free number porting when you sign up for a Skyetel account. No restrictions on number of simultaneous calls, and triple data center redundancy assures that you never experience a failed call. Tutorial and sign up details available here.

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.
 


RentPBX, a long-time partner and supporter of PIAF project, is offering generous discounts for Nerd Vittles readers. For all of your Incredible PBX hosting needs, sign up at www.RentPBX.com and use code NOGOTCHAS to get the special pricing. The code will lower the price to $14.99/month, originally $24.99/month. It’s less than 50¢/day.


Print Friendly, PDF & Email

Be Sociable, Share!

This article has 10 comments

  1. I updated my hiformance install with the ‘how to get latest version’ instructions above.
    1) Since I already had gvsip trunks setup, I did not add it via the script, which aborted when I said no. I’m assuming that was the correct thing to do, correct?
    2) The trunks I had prior to this gvsip_naf update aren’t showing in freepbx. Is there a way to get them to?

    [WM: Did you forget to run the last two commands?]

    mv /etc/asterisk/pjsip_custom.tmp /etc/asterisk/pjsip_custom.conf
    amportal restart

  2. I don’t see a way to reply…

    No, I did not forget those two commands.

    The trunks work, just as they did before. They just aren’t showing up in freepbx as they did when I installed IPBX from scratch on raspi, a couple of weeks ago.

    [WM: The Google Voice GVSIP trunks will not register correctly in the current FreePBX Dashboard. Google blocked the mechanism that FreePBX was using to determine whether trunks were on line. This does not affect actual use of the GVSIP trunks for calling.]

  3. You mention Incredible PBX 13-13 on CentOS 6.10, but the tutorial you link to indicates that it can be installed on CentOS 6 or 7. Will this work under CentOS 7, or only 6?

    [WM: We still are adjusting some of our tutorials. There are serious issues with CentOS 7 using Google Voice GVSIP.]

  4. Will this setup work with multiple GV numbers? Is it simply a matter of repeating the "Adding GVSIP Trunks…" step?

    [WM: That’s correct. Unlimited trunks if you and your associates have the GV credentials.]

  5. I was using FreePBX on RaspeberryPi 3 until Google removed XMPP. I now installed the new version of Incredible FreePBX for Raspberry.

    Everything works fine, except that when I call Skype Numbers to Go there is no sound when it is called. Only the voice of the person is heard when answers; there is no way to know if the number sounds busy.

    Any idea how I can fix this? Thank you for your help.

    [WM: Currently a limitation of the new Google Voice implementation, but you can’t beat the price. 🙂 ]

  6. Ward,
    I installed the GVSIP1 trunk on my RPi-3 using your latest setup and it was working just fine both in and out bound.

    From pbxstatus:
    Incredible PBX 13-13.7 for Raspberry Pi 3B
    Asterisk 13.22.0 + GUI ver 13.0.120.10

    I then rebooted the RPi:
    Now the GVSIP1 show Unregistered when I do: show-trunks
    Inbound call goes to Google message

    It was working just fine until I did the reboot
    Should I do del-trunk and install-gvsip again?

    [WM: Worth a try, but I doubt it will help. Have you tried going through the GVSIP upgrade procedure??]

  7. After I reboot RPi-3, I just do del-trunk and then install-gvsip and it immediately registers GVSIP1 verified by calling in and out and checking – show-trunk

    I don’t understand what is going on, but I do not have to rebuild the image again

    Please keep an eye out to see if anyone using the RPi image is experiencing a similar problem

    [WM: Try this experiment. Instead of deleting and reinstalling the GVSIP trunk, try running this command: asterisk -rx "core reload". If that works, you could add this to /etc/init.d/rc.local.]

  8. Ward,
    I tried ‘core reload’ – still Unregistered
    I tried ‘amportal restart’ – still Unregistered
    I then tried ‘fwconsole restart’ – never used it before always used ‘amportal restart’ in the past.
    It immediately Registers the GVSIP1 trunk.
    Thanks, I’ll add it to the /etc/init.d/rc.local and see how it works.
    Thanks for you patience!

  9. Ward,

    I thought I might have a race condition – fwconsole being done before it was time for my machine as I have some simple bash scripts running on the RPi-3 from the ‘root’ crontab.

    SOLUTION: In /etc/rc.local I increased the ‘sleep 5’ just before the ‘fwconsole restart’ from 5 to 20 seconds.
    I tried 10 seconds but it did not work for me.
    I have rebooted the RPi-3 multiple times and the GVSIP1 trunk has Registered every time.
    Thanks for all you do and for your assistance!

    [WM: No. Thank you. We will modify the new image being released this weekend.]

  10. When I make an outbound call, there is a delay in the audio returned to me when the call is connected. The other party states there is about 1-2 seconds of silence before they hear me speak and vice versa.

    [WM: Google calls it a "feature."]