Make Free Phone Calls Anywhere in the USA with Google Voice, Gizmo, and Asterisk
Update: The instructions here are no longer valid, because Google has since closed off inbound SIP calls into Google Voice. However, I have posted a new solution for making free phone calls with Google Voice, Gizmo, and Asterisk.
I recently switched my GrandCentral account over to Google Voice. I fooled around with Google Voice quite a bit and was quite impressed by the many features. It took quite a bit of work, but I finally figured out how to set up Asterisk along with Gizmo to use Google Voice to make free telephone calls to anywhere in the USA.
Last month, Nerdvittles wrote up a great tutorial on setting up Asterisk to make calls with Google Voice. Unfortunately, shortly thereafter Google Voice blocked inbound SIP calls except those coming from Gizmo. However, it is still possible to set up Asterisk to dial Google Voice if you set up Gizmo to forward calls to Google Voice.
Forwarding Gizmo Calls to Google Voice
First of all, you will need to create two Gizmo accounts. One will be used to make outbound calls from Asterisk (I will refer to this one as the primary Gizmo account), and the other one will be used to forward calls from Gizmo to Google Voice (I will refer to this one as the forwarding Gizmo account). You do not need to purchase Gizmo outbound minutes to do this since SIP forwarding on Gizmo is free.
When you log into the Gizmo forwarding account, click the Forwarding All Calls radio button. Next, click the SIP radio button. For the sip number, put your Google Voice number @216.239.37.15:5061. Let’s say your Google Voice number is (555) 555-5555. For the SIP forwarding number, you would put 5555555555@216.239.37.15:5061. After you’ve set up the SIP forward, click the Save button.
Don’t forget to enable the forwarding Gizmo account within Google Voice as well. To do this, log into Google Voice, go to Settings, Phones, and click the checkbox for the Gizmo Forwarding account.

If you want a simple, but not so elegant solution for making free telephone calls with Gizmo and Google Voice, this is as far as you really need to go. Just log into your primary Gizmo account and dial the Gizmo number for the forwarding Gizmo account. This will result in a call to your Google Voice account.
When your Google Voice outgoing voicemail message begins to play, press * to access your voicemail and then enter your PIN number. Then press 2 to dial any USA number, followed by the # sign.
Before you read on, let me say that the rest of this tutorial is somewhat advanced and is for geeks only. If you’ve never used Linux before, the rest of this tutorial is not for you. However, you should still be able to use Gizmo to make free calls through Google Voice as I’ve explained so far.
I would say at a minimum, you need some experience with Linux and a basic understanding of IP networking. It also helps if you have used SIP before and have some familiarity with VOIP. If not, you may want do some research on voip-info.org.
If you are experienced with Linux then you are probably geeky enough to set up a new Asterisk system. If you’ve used Asterisk before, then this tutorial is definitely for you.
Download and Install Asterisk and FreePBX
If you already have Asterisk and FreePBX, you can skip this section.
Asterisk is a free and open source software implementation of a PBX phone system. FreePBX provides a simple web-based interface for managing an Asterisk system. If you don’t have a Linux box handy to install Asterisk and FreePBX, here is what I would recommend you do:
- Download VirtualBox
- Install VirtualBox and create a new machine to use as an Asterisk system
- Set up the new box as a RedHat Linux system
- Be sure the virtual hard drive is at least 4GB
- Set up networking to use the host interface
- Download AsteriskNOWAsteriskNOW is a small CentOS Linux distribution that includes a ready-to-go Asterisk system. This really simplifies the process of setting up Asterisk since it is all-inclusive of the operating system and everything.
- Install AsteriskNOW on the virtual machine
- Set up AsteriskNOW NetworkingWhen you first boot up AsteriskNOW, it will be set up to automatically receive an IP address via DHCP. You may want to manually configure networking to use a static IP address. Be sure to take note of the static IP address you use, as you will need to bring up the FreePBX web interface to configure your new Asterisk system.If you set up a static IP, be sure to provide the DNS server as well. When you run the setup tool, the DNS configuration is not in the same section as the machine IP, netmask, and gateway information.
If you do already have a Linux system where you would like Asterisk to reside, download Asterisk and FreePBX and install them.
Configure Asterisk for Gizmo and Google Voice
It took me quite a bit of tinkering to get Asterisk set up just right using FreePBX. Unfortunately, there is not a whole lot of documentation out there for using FreePBX to set up custom extensions. A custom extension is necessary to perform a more advanced dial plan that will send the DTMF tones necessary to instruct Google Voice to dial a phone number.
For the rest of the tutorial, I will assume you are using AsteriskNOW. These instructions would be very much the same for TrixBox, which is another Linux distribution that also uses FreePBX as the management interface. If you already have an Asterisk PBX, you’re probably pretty smart and can figure things out if the details are not quite the same.
Let’s say the IP address of your AsteriskNOW system is 192.168.1.100. Open up your web browser and go to http://192.168.1.100. Click on the link that says FreePBX Administration. The default username/password is admin/admin.
![]()
Set Up a Gizmo Trunk for the Primary Gizmo Account
First, we need to set up a SIP trunk for the primary Gizmo account. Let’s say the SIP number for your primary Gizmo account is 17475550001. To create the new trunk, click the Trunks link and then the Add SIP Trunk link. Use the following settings for the new SIP trunk:
- Dial Rules
1+747NXXXXXX 1+800NXXXXXX 1+866NXXXXXX 1+888NXXXXXX 1747NXXXXXX 1800NXXXXXX 1866NXXXXXX 1888NXXXXXX
- Trunk Name: gizmo
- PEER Details
type=peer disallow=all allow=ulaw&ilbc dtmfmode=rfc2833 host=proxy01.sipphone.com fromdomain=proxy01.sipphone.com insecure=very qualify=yes fromuser=17475550001 authuser=17475550001 username=17475550001 secret=password_for_gizmo_forwarding_account canreinvite=no
- USER Context: 17475550001
- USER Details
type=user disallow=all allow=ulaw&ilbc&gsm dtmfmode=rfc2833 host=proxy01.sipphone.com insecure=very username=17475550001 secret=password_for_gizmo_forwarding_account canreinvite=no context=from-trunk-sip-gizmo
- Register String: 17475550001:password_for_gizmo_forwarding_account@proxy01.sipphone.com
Be sure to replace 17475550001 with your primary Gizmo account number and replace password_for_gizmo_forwarding_account with the password for that account. Click Submit Changes.
Set Up an Outbound Route for Gizmo Calls
I deleted the default route to dial 9 for an outbound line. You may wish to do the same, if you want consistency in the tutorial with the route name for the Gizmo outbound route. To delete this route click on 0 9_outside and then click the link that says Delete Route 9_outside.
To set up the new route, click on Outbound Routes and then Add Route. Use the following settings for the new route:
- Route Name: gizmo-out
- Dial Patterns
1+747NXXXXXX 1+800NXXXXXX 1+866NXXXXXX 1+888NXXXXXX 1747NXXXXXX 1800NXXXXXX 1866NXXXXXX 1888NXXXXXX
- Trunk Sequence: SIP/gizmo
Click Submit Changes. At this point, Asterisk is configured to use Gizmo to make outbound calls to other Gizmo numbers, as well as to toll-free numbers. Next we have to set it up to dial regular telephone numbers through Google Voice.
Set Up the Custom Extension to Dial Google Voice for PSTN Calls
This is where the real magic happens, and it is heavily based on the Nerdvittles article on using Google Voice with Asterisk. Here your are setting up Asterisk to dial your Gizmo forwarding account. Let’s say your Gizmo forwarding number is 17475550002. To set up the custom extension, log into your Asterisk Linux box as root from the console. Edit /etc/asterisk/extensions_custom.conf and add the following lines:
[pstn-via-gv]
exten => 411,1,Dial(local/18004664411@outrt-001-gizmo-out)
exten => 411,n,Hangup
exten => _X.,1,Dial(local/17475550002@outrt-001-gizmo-out,30,rD(wwwwwwwwwwwwww*ww1234ww2${EXTEN}#))
exten => _X.,n,Hangup
Be sure to replace 17475550002 with your Gizmo forwarding account number, and also replace 1234 with your Google Voice voicemail 4-digit PIN number.
If you deleted the default AsteriskNOW route to dial 9 for an outside line, the lines you add should be the same as what I have here. Otherwise, you will have to change the 001 in the outbound route to the proper number, according to what number FreePBX assigned to the gizmo-out route you created earlier.
The 411 entries are to dial 1-800-GOOG-411 directly from the gizmo account. Feel free to omit these lines or change the number to some other toll-free 411 service you would prefer to use.
Register the Custom Extension in FreePBX
After you’ve edited the extensions_custom.conf file, you need to register the newly created extension within FreePBX. Documentation on doing this is very sparse, and it took me the longest time to figure out this step was necessary to get everything to work properly.
Go back to the FreePBX configuration in your browser and click the Tools tab on the left-hand side, then click Custom Extensions. For the new custom extension, use the following settings:
- Custom Extension: pstn-via-gv
- Description: pstn-via-gv-custom
Click Submit Changes.
Set Up a Custom Trunk to Use the Google Voice Extension
Next, you need a custom trunk use the custom extension for making regular telephone calls. Go back to the Setup tab and click Trunks and Add Custom Trunk. Use the following settings:
- Dial Rules
411 1|NXXNXXXXXX NXXNXXXXXX
- Custom Dial String: local/$OUTNUM$@pstn-via-gv
Click Submit Changes.
Create an Outbound Route to Dial the PSTN Through the Google Voice Trunk
Finally, you need an outbound route to use the custom trunk. To create the route, click on Outbound Routes and then Add Route. Use the following settings for the new route:
- Route Name: pstn-out
- Dial Patterns
411 1|NXXNXXXXXX NXXNXXXXXX
- Trunk Sequence: local/$OUTNUM$@pstn-via-gv
Click Submit Changes.
Create an Extension for your SIP Phone
Click Extensions, select Generic SIP Device for the Device, and then click Submit. Use the following settings for the new device:
- User Extension: 200
- Display Name: Gizmo User
- Secret: password
Click Submit. You can actually use whatever you want for these values, just be sure to remember what the User Extension and Secret are, as these will be your username and password for your SIP phone.
Create an Inbound Route for Gizmo
If you want to use the SIP phone for receiving inbound calls as well as making outbound calls, click Inbound Routes. Put your primary Gizmo account number for the DID Number, or leave it blank if you want to receive all inbound SIP calls at the extension. For the Extensions option, be sure to select the new Gizmo User extension you just created. Click Submit.
Be sure to also go into the General Settings, and set Allow Anonymous Inbound SIP Calls? to yes.
Disable Other Google Voice Phones
I had very inconsistent results with other phones connected to the Google Voice account. For the best results, be sure the only account enabled is the forwading Gizmo account. To disable your other phones, log into Google Voice, go to Settings, Phones, and uncheck all of them except the forwading Gizmo account.
If you have two Google Voice accounts, this is ideal. Just use one of the accounts with a single phone (the forwarding Gizmo account), and use it to make outbound calls. If you find out a way to enable other Google phones and use Asterisk for making outbound calls, please provide the instructions in a comment. I will also update the instructions with your findings, and give you props.
Connect Your SIP Phone to Asterisk
Of course, you will need a SIP phone to connect to the extension on the Asterisk server. When you set up the SIP phone, just set it up to the proper IP address of your Asterisk server, use the User Extension as the user, the Secret as the password, and you should be all set!
If you don’t have a SIP phone or VoIP gateway with FXS and FXO to use with your existing phone, you could always download X-Lite to use your computer as a phone.
Related Posts
- 10 Amusing Tweets about Google Wave Invitations
- Greasemonkey Script for Submitting Pages to Ping.fm
- Two Ways to Reclaim Your Feeds from FeedBurner
Related Websites
- Google SEO for WordPress Blogging
- Google to Index Google Voice?
- Google Voice | Lifetime phone number, conference calls, and more
Comments
-
Gry dla Dzieci
-
Setai Miami
-
GeekLad
-
Jared Hobbs
-
GeekLad
-
Jared Hobbs
-
GeekLad
-
Diffident
-
GeekLad
-
Jake
-
GeekLad
-
George
-
Linda
-
GeekLad
-
mshi
-
shey
-
GeekLad
-
srinivasantarvedi
-
TwoHawks
-
GeekLad
-
TwoHawks
-
the west coaster
-
GeekLad

