Earlier this year, I had posted a hack for making free phone calls with Google Voice, Gizmo, and Asterisk. Since then, Google closed the door on inbound SIP calls and thus the hack no longer works. Fortunately a new possibility has emerged that makes it possible once again.
Nerd Vittles has put together another great hack for making free calls with Google Voice and Asterisk: Orgasmatron V, Google Voice Edition. It makes use of an Asterisk Linux distribution called PBX in a Flash. After installing PBX in a Flash, you download and run the Orgasmatron V script, and you have a fully-functional Asterisk system ready to make free calls with Google Voice.
In his instructions, NerdUno recommends using IPkall or SIPgate for a ringback number that is necessary for Orgasmatron V to work. It is actually possible and relatively easy to also use Gizmo as the ringback number, which I will explain in this post. His directions for setting up Orgasmatron V are very detailed and relatively easy to follow, so I won’t repost them here. Just follow his directions up until the part for configuring Google Voice.
Setting Up Gizmo
First, you will want to create a Gizmo account. Once you create your Gizmo account, go to https://my.gizmo5.com and log in. Bring up the Call Forwarding tab in your account settings. Click on the Forwarding All Calls radio button under Status and click on the SIP radio button under Forward to. Set it up to forward to [email protected] where x.x.x.x is the IP address of your Asterisk server.
Setting Up Google Voice
The next step, is to log into your Google Voice account. Log in and go to the Settings screen and click on Add another phone. Call it whatever you want, and enter in the 10 digit number. Be sure to select Gizmo as the phone type.
When You click Save, you will be prompted to verify the phone. Download and install the Gizmo client and log into your account with the Gizmo client. Click the Connect button on Google Voice to verify the Gizmo phone. When the Gizmo phone rings, answer and dial the two digit code.
Setting Up Asterisk
Once you’ve installed PBX in a Flash, installed Orgasmatron V, set up Gizmo, set up Google Voice, you’re ready to download and run the Google Voice configuration script for Orgasmatron. Just log into your Asterisk box as root, and run the following commands at the command line:
cd /root wget http://pbxinaflash.net/orgasmatron/configure-gv chmod +x configure-gv ./configure-gv
Just follow the prompts and enter your Google Voice number (without the 1), your Google Account login credentials, and use your Gizmo number as the ringback number (be sure to include the 1 at the beginning).
Making Free Phone Calls
Once everything is all set up with Google Voice, Gizmo, and Asterisk, you’re ready to log into an extension with a soft phone and make free calls. I highly recommend downloading X-Lite, it is probably one of the best free softphones out there. Ekiga is another pretty decent soft phone you can use, if you don’t like X-Lite.
To make and receive calls, log into extension 701 with your softphone. Use 701 as the account username and the proper password (this would be the secret for extension 701 you selected when securing Orgasmatron as suggested on Nerd Vittles). The SIP server is of course the Asterisk box. Try making an outbound phone call. You should hear a lady say she is connecting your call, then some catchy music, and eventually a ringtone.
Some Additional Setup Tips
If you are unable to make or receive calls after you’ve set everything up, it may be that your server is sitting behind a router/firewall. For it to work properly, you will need to forward port 5060 to your Asterisk box. You may have to refer to the instructions for your particular router on how to do this.
You may also run into issues if your Asterisk box does not have a static IP address. If your IP address ever changes, you will need to update the new forwarding address within Gizmo. To avoid such problems, you may want to set up an account on DynDNS.
You can download a DynDNS update client that will automatically update your IP address with DynDNS. You could download inadyn for Linux and install it on your Asterisk box. Be sure to check out the inadyn instructions to set up. If you have a Windows or Mac box on the same network as your Asterisk machine, you could always download and install your client for that computer instead of the Asterisk box. Alternatively, you could just manually update your IP address on the DynDNS website.
Once you have DynDNS set up, go back to the Call Forwarding tab in your Gizmo settings and change the SIP call foward to gv-ringback@your_dyndns_account.dyndns.org (replacing your_dyndns_account.dyndns.org with the proper domain for your machine).
How Does it All Work?
Behind the scenes, the calls are made with a Python script for making Google Voice calls. Orgasmatron V does the magic of receiving the inbound call from Google voice into a call group and automatically connecting that call to your extension. This makes it all quite seamless to the end-user making the calls.
Stay Tuned
In an effort to further reduce the complexity of this solution, I’ve put together a VirtualBox appliance for Orgasmatron V. Although Orgasmatron V is by far the easiest solution for hooking up Google Voice to Asterisk, packaging it all together as a virtual appliance makes it a little bit easier and a lot quicker. I’ll be posting about that soon, so stay tuned!
Great tutorial/summary. However, despite having followed it I am still not able to get any incoming or outgoing calls. Calls from one computer to another (using X-Lite) within my network are fine, and the PBX seems to be running fine. Google Voice calls to the gizmo5 client also work fine. However, it seems like the gizmo5 forwarding to SIP isn't working.
I have a static IP, so didn't have to mess with dynamic DNS stuff. I forwarded port 5060 for TCP and UDP on my router… what's the best way to test whether that is working? Know of any other tricks to troubleshoot this problem?
I know you're not customer support for any of these programs or anything, but I figure it wouldn't hurt to ask.
I would check the Asterisk call logs to see if the calls are coming in at
all. Just click on the Reports tab at the top of the FreePBX administration
window. If Gizmo5 is forwarding properly, you should see entries being
added to the call log. If not, then the problem is either with the router
port forwarding or with the Gizmo5 forwarding.
I've messed it up a few times on the Gizmo5 forwarding, because I would
click the SIP radio button but forgot to click on the Forwarding All Calls
radio button.
Thanks… I assume you mean the call logs I can access on /admin/reports.php via the web interface? I just tried two calls (one incoming, one outgoing) and they both show up as “Answered” on that log. However, the incoming call rang for awhile then went to my GV voicemail and the outgoing call just gave me the hold music for 50 seconds then said “Goodbye.”
Something else you can try, is to go into the General Settings screen and
setting Allow Anonymous Inbound SIP Calls? to yes. This could potentially
have security implications (for example, if you have an IVR). I'm somewhat
of an Asterisk noobie myself, so use this feature with caution.
It may be a good way to test things out to see if the box is indeed
receiving the calls. Ultimately, I think you want to get things set up
properly with the trunks, routes, and extensions so that you are able to
properly receive calls without having to set that option. I'm still a bit
fuzzy on setting these things up the right way, which is why I turned to
Orgasmatron since he already had all the trunks, routes, and extensions all
set up.
I'm still puzzled as to why it isn't working for you though. Everything
should be all set w/ the trunks, routes, and extensions so it shouldn't be
necessary to open up the system to anonymous inbound SIP calls.
Alright, thanks for the help — I think I'm going to try out the PIAF forums, perhaps one of their gurus will know what I've done wrong. I'm sure I just messed up a single keystroke somewhere along the way.
Yeah, the PBX in a Flash forum may be of better help than I have been.
Sorry I wasn't able to help you out. If you do finally find a fix in the
PIAF forums, please feel free to post the solution here. Best of luck!
I am looking forward to the virtual appliance!
I got my IPKall DID after only waiting about 14 hours (I'd heard sometimes it takes days or weeks), so I just switched to that. Now it works fine. Have no clue what was wrong with Gizmo5!
Very odd… Yeah, the IPkall wait period was why I went about using Gizmo.
Well, I'm glad you got it working!
Alright, thanks for the help — I think I'm going to try out the PIAF forums, perhaps one of their gurus will know what I've done wrong.
What is the difference between this method and the one using googlevoice, gizmo and linksys PAPA2T ATA device. Is the outbount call time unlimited on this method?
I read about this on http://googlevoiceandgizmo.blogspot.com/
Yes. There's no limitation to the amount of time that can be spent on the
outbound call.
If you are running on mac or linux (or windows) you could also download the free zoiper softphone
Thanks a bunch! This was an awesome tutorial. I can now dial out perfectly..though for some reason incoming calls end up not ringing and go to voicemail after 5 seconds. I'm not sure what's going on but I figured maybe someone else has this problem or knows how to work around it?
Be sure you log into an extension that is in the ring group connected to the
inbound route set up to ring w/ the GV inbound.
gv-incoming is set to ring to RingAll <700>
gv-ringback is set to Custom GV-Park
I have a copy of X-Lite connected to extension 701 and Fring on my iPhone connected to 705
My Gizmo5 account is set to forward all calls to [email protected] and my router is forwarding ports 10000-20000 and 5002-5080 to my asterisk server running on a bridged VMWare copy of PBX in flash (so it has its own ip address on the network.) Calls to my google phone # go to voicemail after ringing for about 10 seconds now and neither ext 701 or 705 ring…
Do you have extensions 701 and 705 in the RingAll group? Sounds like
everything is set up correctly.
Yeah RingAll has all 16 preconfigured extensions listed
I guess I don't see how gv-incoming even gets triggered with this setup – calls to my google voice will ring on my gizmo ringback number which forwards to gv-ringback which goes to the google voice callpark. How does gv-incoming even play in this scenario?
I'm confused… do you set the Gizmo forwarding to “gv-incoming” or “gv-ringback”?
Set the Gizmo forward to gv-incoming
I'm confused… do you set the Gizmo forwarding to “gv-incoming” or “gv-ringback”?
Set the Gizmo forward to gv-incoming