[HOWTO] Comprehensive Automated Free VoIP with Google Voice
Preface
This guide only deals with VoIP calling over wifi. You can experiment with calling over a data connection as well; just make sure to use only the speex or GSM codecs. I have had pretty good success with VoHSPA calls with T-Mobile. However, this would require manually switching call forwarding to the cell number on and off. I am looking into creating an app to automate this (as well as combine features of all the accessory apps used in this guide). However, I have limited programming experience and no Android experience yet, so it's a long term project.
Free VoIP is a great addition to plans with low airtime minutes, such as T-Mobile's contract-free $30 100 minute, 5GB 4G plan. An activation kit can be purchased for $0.99 shipped from http://prepaid-phones.t-mobile.com/p...Activation-Kit.
This guide assumes that your primary number is with Google Voice, http://www.google.com/voice. You can port your number from one of the major carriers (Verizon, AT&T, T-Mobile, Sprint) to Google Voice for $20. Do note that porting your number will terminate service with your provider, and you will be responsible for any ETF. If your number is currently with an MVNO or other carrier, you should be able to use a prepaid T-Mobile account as the middleman. Simply pick up an extra kit (if you will be using the T-Mobile $30 plan) to use for the number porting. Kits come with an initial value of $3.34, more than enough for the process.
If you are not attached to your current number enough to spend the $20 port fee, you can pick a new number when signing up for Google Voice. You can specify desired characters or numbers, and it will attempt to find a match.
Once you have created an account, add your cell number and enable call forwarding from your Google Voice number. Most prepaid accounts, including the $30 T-Mobile one, do not allow call forwarding, so you will not be able to "Activate Google voicemail on this phone." However, this shouldn't be an issue since people shouldn't be calling your cell number directly anyway.
Also enable call forwarding to Google chat. This is critical for receiving VoIP calls. It may be necessary to first place a call within GMail to ensure that Google chat calling works as it should.
Now it's time to download and setup the apps listed above.
Sipdroid
When first starting Sipdroid, you will find a button on the bottom of the screen to create a new account with PBXes.com linked to your Google Voice account. Use the same password as used with your Google Voice account. After signing up with Sipdroid, you have a week or so to login to the pbxes.com website and fill out some personal information. This must be completed, or your account will be deleted.
As far as configuring Sipdroid itself, you may want to go into Audio/Video and adjust Earpiece Gain to Highest. Adjust as necessary if echo is a problem.
Under Audio Codecs, set G722, PCMA, PCMU, GSM, and BV16 to Never. Speex is the only codec we want to use due to its ability to compensate for packet loss and jitter and its low bandwidth consumption. However, it can be quite CPU intensive, and if you have a slower phone, GSM may be a better option. Experiment with the two and find what works best for you. Snapdragon and faster CPUs will have no problems with speex.
Under Wireless, you can experiment with the Control Wi-Fi Power option. It may save you some battery life, but disable it if it cause otherwise slow wifi or disconnects. If not using this setting, you will need to set Android to keep the wireless connection on all the time. You can access this from Android's Wi-Fi settings page, where it lists the wireless connections. Hit the menu button and choose Advanced. Change Keep Wi-Fi on during sleep to Always.
Enable Bluetooh (experimental) if you will be using a bluetooth headset to make VoIP calls.
Finally, in PBXes Features, enable Improve Audio. In the event packet loss / jitter is detected, all data will be transmitted/received twice, effectively decreasing packet loss considerably (ideally).
Google Voice
Setup should be fairly straight forward. You may run into issues setting up call forwarding for voicemail, but this shouldn't be an issue. Set it to Use Google Voice to make all calls. This way, all non-VoIP outgoing calls will still have your Google Voice caller id.
This will also be the app you use for text messaging. Unfortunately, Google Voice is still working on implementing MMS. As of now, receiving MMS messages from certain providers is functional, although they will be sent to your email.
Y5 - Battery Saver
This app remembers wifi APs that you have associated with and switches wifi on when you are in the area. When out of area, it will be disable wifi. It requires both the cell radio and wireless to be connected to determine location. Therefore, airplane mode must not be enabled during this step.
The only setup required is to enable the app. It will then run in the background automatically.
Plane Mode Tweaker
Enabling airplane mode on most phones will disable the cell radio, wifi, and bluetooth. While in Airplane Mode, wifi is allowed to be re-enabled, while bluetooth usually is not. Make the appropriate changes with this app to prevent wifi/bt from turning off when entering airplane mode, and to allow wifi/bt.
AutoAir
AutoAir polls the wireless state in the background. When connected, it enables airplane mode; when the connection is lost, it disables airplane mode. Hit the power button in the app to enable initially. Set it to Start Service on system up and Start Service on application start up. To disable the icon in the notification bar, uncheck Show message on status bar. This serves to save battery by disabling the cell radio and to prevent double ringing, since Google Voice is forwarding to both your cell number and Sipdroid.
That should be it! When you are home, the phone should automatically switch wifi on, connect to Google Voice (PBXes to be accurate), and enable airplane mode to disable the cell radio. Incoming calls should ring through Sipdroid. Outgoing calls are made through the native dialer as usual, and will be intercepted by Sipdroid.
When you leave home and lose wifi, airplane mode will be disabled, re-enabling the cell radio, and wifi should be disabled (saving battery by not constantly searching for APs). Inbound calls will be forward to your cell number, ringing through the native dialer. Calls made with the native dialer will dial through Google Voice (still uses airtime) and allow your Google Voice caller id to be shown.
Messaging is not a problem in airplane mode since you will be using the Google Voice app. The only downside is that a data connection is required for messaging while on the go. You can enable forwarding messages to your cell number if this is an issue.
Notes
It would have been nice to use the native SIP client, but it simply lacks too many features. Even over a strong wifi connection, a high(er) bandwidth codec like PCMA/PCMU may not be feasible, because of the lack of packet loss/jitter compensation. Many people prefer CSIPSimple over Sipdroid, but it does not play nicely with the Google Voice app, and does not support PBXes' proprietary features.
The main advantage of using the Sipdroid/PBXes combo over GrooVeIP is the ability to use speex/GSM codecs. GrooVeIP connects directly to Google Voice, which only supports PCMA/PCMU.
If you want to experiment with other SIP clients, do make sure to connect using TCP. UDP is a battery pig.
I've experimented with a few Android phones and have to say that some of the lower end ones are simply plagued with call quality issues, especially with regards to echo. Other issues may involve wifi quality with the screen off, so play with those settings as necessary.
Some phones have issues maintaining a wifi connection. Check for any ROMs that may address this issue. The plus side is that AutoAir will disable airplane mode if the wifi connection is lost, so there shouldn't be any missed calls. Specific to HTC Sense, there is a bug (feature) that causes the wifi connection to be dropped between midnight and 7am. The app SmartSync Disabler attempts to address this issue: https://play.google.com/store/apps/d...rtsyncdisabler.
I am using this setup with good success on an HTC Sensation running ICS. I'm at the end of my current billing period and haven't even used half of my allotted minutes. In comparison, I've clocked over 500 minutes over VoIP.
I hope this guide saves you some minutes and battery life.
Nice! AutoAir sounds like it could be very handy. However, there's one VERY important issue to keep in mind.
Google Voice doesn't support e911. If you use AutoAir, your cell radio might be off in the middle of an emergency. If so, you will need to disable WiFi before calling 911. In an emergency situation, some people might not think to do that.
Uh, wow. That's a relief to know, but I wasn't expecting anyone to actually try dialing 911. I hope your dialing that doesn't interfere with any real emergencies, and I hope you don't get in trouble for false alarm calling with good intentions for the HoFo community.
Had the idea to fact check occurred to me, I would have instead done a Google search for: 911 "airplane mode". Oh well, too late for that now.
Uh oh. I just did the Google search I mentioned in my last post and found a thread on a cop forum where someone said it depends on the phone. People should probably ask their manufacturer to be sure.
In the case of custom ROMs (I use Cyanogenmod 7.2), it probably depends on the ROM.
Good point. I started a thread in HoFo's Android forum and in the official Cyanogenmod forum, and also emailed HTC support and my city's non-emergency hotline. For something this important, I'd like to be as certain as possible. I'll let you know what I find out.
Tip: An additional app to use is WiFi Web Login, whether it's the one by SysLynx or the one by Ryan DH New. Those apps automate the process of logging into a WiFi hotspot that requires web browser login (coffee shops, hotels, universities, etc). Login manually one time and those apps record what you do so that they can automate it the next time you're in range of that network. I found out about those apps thanks to Sance's thread.
This is a very informative post ziddey. I would recommend it for a sticky. The only issue I ran across is WIFI is turning off when I am at a known location. I think Y5 is the culprit. I've randomly unlocked my phone throughout the day to see that I was back on cell, but as soon as the phone is unlocked I see WIFI turn back on and then cell get disabled again. This is happening on two different phones, to possibilities I am thinking is because I haven't left this location yet or that Y5 hasn't been updated since 8/20/10.
I meant to make a note about that. Is wifi actually disabled and being re-enabled when you turn the screen on? Or is it always enabled, just not connected until the screen comes on? I was having the same issue with a bunch of roms. I sent the author of y5 an email but got no response.
Right now, it doesn't seem to be an issue at all. I'm using Virtuous Inquisition on my Sensation, and have had 0 wifi issues since, even with y5 enabled.
Also, I need to update the main post soon to include Clocksync. I've found that some phones (or some kernels) have an inability to maintain the proper time. It's usually not an issue if connected to a tower since it'll keep sync. But in airplane mode, I've seen some awful drift, with the worst losing over 3 minutes in an hour. Since I use my phone as an alarm, this has caused me to wake up over 20 minutes late a few times. I have Clocksync sync with an NTP server every hour. The only problem with this that worries me is that if it happens to adjust the clock past when I have an alarm set, it may not go off. This has led me to set two alarms a few minutes apart, just in case. Luckily, I haven't seen this happen yet.
When I turn on the screen, WIFI is disabled and reenables as soon as I unlock it. It's not surprising you didn't get a response from the author, the last update for the app was almost two years ago.
That's strange. I assume this is on the G2x? Maybe it's not remembering a cell as being associated with the wireless? I get this occasionally and have to manually enable wifi for it to bind the cell tower it's connected to. This happens every so often, especially when my phone connects to a GSM cell instead of WCDMA. Right now, I have it associated with 4 cells, even though I know there's at least 5 cells it can connect to in my home. So there'll be one more instance where it won't know to automatically associate.
Maybe Y5 is better left unused. It wasn't part of my original battery of apps to use, but it seems to be working well enough. Maybe it's best to remove it.
Yea, with my G2x, also a Samsung Vibrant is doing the same thing. Might mess around with Llama, except you have to setup each area that you use wireless with rather just looking if you are using wireless.
I don't see anything here about data-only plans like the ones for AT&T's tablet plans. Has anyone had success with these? I only make ~10 minutes of calls per month, and the rest is data. I currently have a phone that I've got set up working on WiFi only so far, but it would be nice to have a pure data plan that can supplement the times I'm away from WiFi networks. Unfortunately it doesn't have TMOUS bands, or I'd just do the $30 100 min/5gb data plan. I figure I'll move over to it after I can afford to get a different device, I'd just like something in the interim while I'm looking for work right now.
Sipdroid has "experimental" Bluetooth support. I've found calls over HSPA to work well while relatively stationary so long as you use the speex (probably GSM as well) codec.
Bookmarks