Hi Guys,
Well i thought that i would write this blog post on something that i played about with recently. As some of you know i’m a little bit of an Asterisk junkie, and love playing with it. I have to be honest as a geek its a pretty awesome tool to have.
If your unsure what Asterisk is, basically put its a telephone systems that you may have seen in your work place, its able to handle internal calls like extension to extension, and external calls. It uses SIP (VoIP) to handle incoming and outgoing calls. The really awesome thing is lots of companies will give you local land-line numbers for free, that regular telephones on PSTN (Public Switched Telephone Network) can call.
Now this post isn’t about installing and setting up Asterisk , they are plenty of resources on the Internet for that. However what i do want to talk about is Google Voice and Asterisk. Now if you are in the states the first part of this is useless to you, however getting it integrated into Asterisk maybe still something of interest. Now really i want this to be just a collection of resources i found and my thoughts on them.
Google Voice is a nice service really, it gives you free calls in the US and Canada and a Universal number that you can assign to any of your phones. There is a web interface for it. So basically you can give this one number out and then you can decide which one of your phones it rings (Mobile Phone, House Phone, Work Phone, your mum and dad’s house that your visiting for the week). It enables you to send SMS’s and it will take voice-mails and send them to you email inbox. I probably not doing Google Voice much justice, but you get the idea.
You maybe wondering why a dude from the UK would want this, the short answer is; why not. The long answer is, i have some friends and contacts in the states. I have interviewed a few people from the states for podcasts and now i have a US number that rings to UK phones (doesn’t cost me a penny/cent either).
There is an important thing to point out here, that the service is only available to those in the states. You need a US number to register for Google Voice and you need an invitation to the service as well. Now at this point you start to worry that all of this sounds like a little bit of a pain in the arse, and having a US friend to register your number is the best you could hope for. Wrong. In fact i actually have the feeling that you maybe able to get this to work without using an Asterisk server, however i haven’t tried it so i’m hoping someone who reads this can confirm it. I’ll make special note of the idea in this post
Firstly i’m going to list some resources and then i’m going to talk about them in stages.
tortunnel – One hop proxy for Tor by Moxie Marlinspike
FoxyProxy – Firefox add on for using proxies
IPKall/Sipgate – Free SIP providers that give you numbers, such as a free Seattle number.
PBXinAFlash – A CentOS distro designed to be a full Asterisk/FreePBX
Okay, so you have your Google Voice invite, your not in the states and every time you click the link Google tells you the service is not available in your country. Which is an obvious problem and the beginning part of our problems. I mentioned tortunnel by Moxie Marlinspike.
The answer to this problem is that we need to have a US IP address, now they are lots of proxy services on the web you could use and i would suggest that you go for that. Personally i like tortunnel but that’s as a security bod i like that. Tor is known for being slow, but its very good for getting out of your network segment. Moxie wrote a program that instead of using the three hops Tor uses to make it hard for you to be tracked, it just uses one. We choose the exit node that tortunnel uses. So lets say that Boston University has a Tor exit node, and we use it for tortunnel, we go and check our IP on the one of those numerous sites and hey presto where in Boston. So we go to our Google Voice invite and accept all the terms and conditions
The next problem is we need to have a US number to register for Google Voice, i know it sounds a little crazy at first, you need a US number to register for a US number however this is really the key concept behind Google Voice, it points to a number rather than being a ringing number.
So as i have an Asterisk install, i have what is termed as SIP Proxy which is an electronic address that VoIP clients can call, its basically an email address for VoIP. so you could have fin...@voip.finux.co.uk and the lines would ring (however the new version of FreePBX there is an option when setting up a extension to give it URI). Now a company called IPKall in the states will give you a free Washington state number and forward it to a SIP URI, i already had these setup in the past.
Now i know that Sipgate, who i have a few UK numbers with (www.sipgate.co.uk) also offer US numbers. Now as i have said i haven’t tried this but my idea to do this without Asterisk and still have a ringing phone (well client or VoIP hardware phone) is to register a US number with Sipgate, you should be able to find on their site or with a little Google kung-fu how to configure that service for a SIP client like Ekiga or if your lucky enough to have a VoIP hardware phone then setup the details for Sipgate in that.
Once you have your US number its time to pop back to Google Voice and give it the US number you got from either IPKall or Sipgate, it will give you an Authorization code which you input. Hey presto you have registered for Google Voice and you have your Google Voice number that should ring your IPKall/Sipgate US number.
Its also worth noting that once you have registered with Google Voice and the phone number has been activated you no longer need tortunnel or you American proxy to go to the web interface.
Now as an Asterisk user i want to be able to pick up the phone dial a special outward call code which will use the Google Voice line and make the US call for free. Thankfully the leg work on this is done, thanks to the legend at Nerd Vittles (Very handy site, here is the specific guide http://nerdvittles.com/?p=635). Now if you don’t use FreePBX then it shouldn’t be too difficult to reverse engineer what he is doing.
So in summary, if your outside the US then your going to need to get a US IP address, if you fancy the challenge then try and compile and install tortunnel (might be a bit much if your a windows user i’m not sure if it has been ported, i also found the apt-file command available on Debian Linux distro’s very useful, and have used it a lot since. Its basically a tool, that you can query the apt source list for a specific dependency). I managed to get it installed on Ubuntu 9.04 and 9.10, a little Google kung-fu and you should be able to find some how-to guides.
As i said this is more a collection of ideas about ways that you can get Google Voice outside the US and the process for getting it integrated into a Asterisk server. Like i say if anyone tries the Sipgate process let me know, be pretty awesome if people could use Ekiga on their computers and make and receive Free US calls.