Thursday, January 13, 2011

HOWTO: Free VOIP On An Android Phone

THERE IS A NEWER/BETTER WAY TO DO THIS DOCUMENTED HERE. It does reference some of the material below though since some steps are unchanged.  


Recently I wanted to replace my work cell phone with a good voice over IP (VOIP) solution that would work on my regular personal cell phone.  I work from home, so I have plenty of bandwidth through my wireless router (though it can work fine on 3G or better), and I don't like having to juggle multiple cell phones.

The solution I will provide you takes some fairly involved setup, but the end result is totally free incoming and outgoing calls which work fairly seamlessly on your Android smart phone.  This solution will let you talk up to 2000 minutes per month for no charge.

Required Tools:
Google Voice Account Account
ipkall Account
SIPDroid Android App
Google Voice Callback Android App

1.Set up PBXes
Sign up for an account.  Then go to add extension and click SIP.  Pick any extension number you desire.  You can come back later to set up voicemail how you want.

Next, go to ring groups and create one for your extension (the number you used in the last step).

The final step in PBX setup is to configure the inbound route.  The trunk is your pbx account username and extension number separated by a hyphen.

I chopped out some unnecessary stuff here.

Note that PBXes free accounts are limited to 2000 minutes per month.

2. IPKALL setup
Ipkall provides a real telephone number where people can reach you.  This is free for you because IPKALL makes money off termination charges from incoming calls.  The numbers are based in various Washington state area codes.  Use the password from the pbxes sip extension information.

Make sure you enter the same info you used as the trunk name in the inbound route screen.  Pick any area code you like.  After you submit and they approve it, you will get your new phone number via e-mail.

3.Set Up SIPDroid
SIPDroid is free and works great with pbxes.  I am sure there are other SIP clients for Android which are quite good as well.

Menu -> Settings -> SIP Account:
username: username-200    
password:  password
server or proxy:
Note the username and password are the same as those used for ipkall.  Other settings can be left at default.

You will also want to set the preferred call type to "Phone" in Menu -> Settings -> Call Options -> Preferred Call Type.  Otherwise your phone will try to use the SIP account to whenever you dial any number which won't work.

You may want to examine other settings to control how SIPDroid works depending on your data connection (wifi vs 3G), which audio codecs to use, etc.  If everything is working, SIPDroid will show a green dot in your status bar.

Now you are all set up to receive incoming calls, and you could stop here if that was all you wanted to do.  However, I assume most of you will want to call out.  If so, read on.

4.Configure Google Voice

Google voice is needed for outbound calling.  You have set up everything for inbound calling from that IPKALL number, but you have no way to place calls.  Google voice can do a web dial where it calls your ipkall number and then connects to the party you are trying to reach.  This sounds like a PITA, but it is quite transparent once set up. 

Sign up for google voice, and get a google voice phone number.  Then go to settings -> voice settings -> add a new phone.  Now enter your ipkall number (instead of 555-5555).

When you click save, a box will pop up for verifying your phone number.  It will contain a two digit code in a text box which you have to enter when google voice calls you.  If you are lucky, you won't have trouble using the dialer on SIPDroid to enter the code.  I was not so lucky, but I have had problems even on a real cell phone when trying to verify google voice.  The workaround is to put the phone on speakerphone mode and hold the mic up to your computer speaker where you play the appropriate tones.  You can go to this site to generate the tones into a sound file to play back, and this worked for me.  If you have no luck, cancel out of the verification pop up and then try saving again with another code.   Some people had luck holding a house phone up to the mic to generate the tones.  In any event, once it is done the number will be saved.

Now you can test everything out by clicking call and initiating a phone call on the google voice web interface (from a computer).  Obviously this isn't very practical since you can only initiate calls from the site.  If you aren't using the google voice app, don't bother installing it just for dialing.  It can initiate a web dial (like we just did), but it is only set up to work for incoming calls on your normal cell line and will fail if you are connecting with SIPDroid.  Luckily, an independent developer has made a very nice app that does just what we need called Google Voice Callback.

5.Google Voice Callback (please get the paid version if you like it)

After you get this Android app, it is pretty easy to set up.
1.Enter your google voice login information (or the app can obtain it from your google account info entered in the phone already).
2.Choose your ipkall number as your callback number.
3.This app will allow you to customize which calls should initiate a GV web dial to your SIP client instead of a normal call.  You can set all, none, or custom filter rules.

For me, I only wanted numbers starting with a certain area code to be dialed through SIPDroid.   So under the custom filter rules, I set a default action of "Do not use GV" and added a rule called "555" with action include and pattern 555*.  When I call out using the normal phone dialer, it will call normally or trigger a VOIP call when I call a 555 number.  This is all fairly seamless, and the only difference you will notice from a regular call is a little pop up while this app logs into google voice and initiates the call for a few seconds.  After that, your sip client will ring and you can enjoy your free SIP calls.

You can also set all US numbers, specific phone numbers, or ask on certain numbers.  Have fun.


bucklesmd said...
This comment has been removed by the author.
bucklesmd said...

page was a ton of help but wanted to mention ipkall numbers are now so used up many/most won't register with google voice leaving you with an incoming phone only. For 3.99 localphone gave me a DID that's free for incoming calls. It registered with Google voice perfectly and forwards calls to sipdroid as well. everything else was spot on. thanx!

HeadSheez said...

Thanks for the info bucklesmd. I hadn't heard of localphone. Also, I need to redo this post since there is a much easier method available now using ekiga and csipsmple.

Joe said...

Great post, I was looking for an alternative to sipgate since they are no longer giving out numbers. I would love to hear what you have learned since you posted this? ekiga and csipsmple? Also interested in knowing if the locaphone DID is more reliable that the IPKALL number because the langest call I've been able to get with the IPKALL number is 11min, and I'm on a reliable fast univserity wifi connection.

Hari said...

This is THE best and most relevant guide that is out there. Most guides make use of services (such as sipgate) that are no longer accepting new registrations, and besides have unnecessary steps that didn't make any sense to me. I had IPKall routed through, which was straight-forward, but somehow was very unreliable, so was looking for a simple guide to go through, and your guide was spot on.

BTW, I had my sipdroid set to be used for all calls under "Call Options", not sure how that is the default, but it made it impossible to make a normal calls (non google voice callback), as sipdroid would pick up the call and disconnect, since I had no outgoing line in pbxes. It took me some time to understand this, so just a heads up, for anyone who might see the same issue.

HeadSheez said...

I haven't messed around with localphone, but I have posted an updated guide with the simpler ekiga+csipsimple setup (eliminating pbxes). This method provides more reliable call initiation for me (no more missed calls), but I am not sure about sustained call reliability.

I am glad this was helpful. I synthesized this guide from what I found out on the net. You make a good point about outgoing calls. Only the google voice callback can be used for initiating outgoing voip calls with this method since, as you know, your free pbxes account (which sipdroid-initiated calls use) doesn't allow for outgoing connections. The google voice dial method really just gets around this limitation by calling you back to connect you to the other party, and the app makes it work smoothly.