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.
Apps
Sipdroid
https://play.google.com/store/apps/details?id=org.sipdroid.sipua
Google Voice
https://play.google.com/store/apps/details?id=com.google.android.apps.googlevoice
Y5 - Battery Saver
https://play.google.com/store/apps/details?id=pl.polidea.y5
Plane Mode Tweaker
https://play.google.com/store/apps/details?id=com.wordpress.chislonchow.airplanemodetweak
AutoAir
https://play.google.com/store/apps/details?id=Com.YangSoft.AutoAir
GV SMS Integration Free
https://play.google.com/store/apps/details?id=com.mdrtools.apps.gvintegration.free
Guide
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/prepaid-phone/T-Mobile-Prepaid-SIM-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.
GV SMS Integration Free
While not related to VoIP, a lot of users would prefer the native SMS client over the GV app for text messages. Google Voice can forward texts, but it will obviously be encapsulated in a forwarded message from a shortcode instead of the actual sender's number. Not exactly clean by any means, but it is the only solution when in an area without data (i.e. roaming). Otherwise, this app will work alongside the GV app to offer seamless integration with the native SMS app (or GoSMS). You must enter your credentials in the app again for it to be able to send messages. Upon enabling integration, the phone will reboot. There looks to be three types of integration: standard, root user, and airplane mode. I've only used root user, which seems to work just fine in airplane mode.
Since I never use my cell number for texting, I have it set to send all text messages via Google Voice account. It does have the option to allow replying to texts from the number it was received from, which can be useful. There's some warning about hiding the notification bar, but I haven't had any issues yet.
Going after strictly GV SMS integration, and nothing else, I've disabled the send/receive text signatures, turning the screen on when there's a new notification, and showing popups when there's a new text.
Be sure to disable text notifications in the Google Voice app.
Do note the warning when you first enable integration-- if you decide to uninstall the app, DISABLE INTEGRATION FIRST.
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 (and GV SMS Integration). 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/details?id=com.j4n87.smartsyncdisabler.
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.
How overall is the voice quality?
It's fine for the most part. Speex has good provisions to handle mild packet loss and jitter. Over wireless, you should have no issues. I make a decent amount of calls over T-Mobile's HSPA as well, and I've found that as long as you aren't moving too quickly (in a car for example), call clarify / delay is completely fine.
Just tried setting it up. Everytime I try to dial from sipdroid, I get "unfortunately sipdroid has stopped" message. Any suggestions?
What phone are you using? Have you tried using the native dialer? I only use Sipdroid itself to make SIP calls.
Just wanted to chime in and say thank you! I followed the instructions as they pertain to my situation (SGS3, Sprint, unlimited data plan) and I've tested VOIP calling and it works great. Called my brother, and we were both immediately shocked by how good the call quality was. Only thing I did different was not install Y5 battery saver. The SGS3 (or maybe all Sprint smartphones?) has a built in function (Settings--under Wireless and networks, More Settings -- Mobile Networks -- Automatic Connections -- enable Sprint automatic connection) that seems to serve this feature.
Anyway, thanks!
Anyone else have trouble sliding up the box to answer an incoming call? Sometimes I slide it up, but it doesn't stay up, it slides back down so I can't answer. Or it has trouble sliding to begin with.
Awesome guide by the way! Thanks for sharing.
EDIT: Happens on Galaxy Nexus GSM running AOKP JELLY BEAN BUILD 5 and Galaxy S I9000 running Slim Bean 2.9
sk8erfrombham said:
Anyone else have trouble sliding up the box to answer an incoming call? Sometimes I slide it up, but it doesn't stay up, it slides back down so I can't answer. Or it has trouble sliding to begin with.
Awesome guide by the way! Thanks for sharing.
EDIT: Happens on Galaxy Nexus GSM running AOKP JELLY BEAN BUILD 5 and Galaxy S I9000 running Slim Bean 2.9
Click to expand...
Click to collapse
Yeah, I've had this problem in the past. Not sure exactly what the deal was with it. I haven't really had that problem too much lately though, and don't think it's caused me to miss a call. I think I've been giving it an extra second before I swipe it up and it seems to be fine.
I might explore other SIP apps again. Everyone likes csipsimple, but it seems to go into a loop when dialing out if used with the Google Voice app. I believe it does support speex and ilbc though, which would be nice.
Sipdroid supposedly has some proprietary support with pbxes in that it can initialize a redundant stream for purposes of mitigating packet loss / jitter.
Hey ziddey, I've heard that Google has removed the ability for third party apps to toggle airplane mode in Jelly Bean 4.2. Will this cause double ringing if AutoAir won't work? Do you know of any workarounds?
Thanks for posting this incredibly helpful tutorial. I've been using tmo's $30 plan with a GNex for awhile now. First I used GrooveIP, then pbxes+sipdroid. But, I never played around with the codecs, and speex is so much better than the default. I'm having a much better calling experience now. Thank you very much for sharing.
sk8erfrombham said:
Hey ziddey, I've heard that Google has removed the ability for third party apps to toggle airplane mode in Jelly Bean 4.2. Will this cause double ringing if AutoAir won't work? Do you know of any workarounds?
Click to expand...
Click to collapse
If Airplane mode can't be triggered, then double ringing will occur . I've stalled out on my project to make an AIO app a while ago, and am not sure what's possible now-- if there's something that can toggle the radio itself instead of triggering airplane mode.
Back in the day, I emailed Talkatone requesting that they add automatic toggling of the cell number on Google Voice when connected to Talkatone's server. In response, they added the feature, but made it available only for the premium subscription tier. But it does work. My research into GV hasn't gotten me far enough to see if there's an API I can call, or if they're manipulating the website/URL directly (imagine it's the former..). Once Talkatone sees that the client has disconnected / timed out, it will again re-enable forwarding to the cell number.
quarksurfer said:
Thanks for posting this incredibly helpful tutorial. I've been using tmo's $30 plan with a GNex for awhile now. First I used GrooveIP, then pbxes+sipdroid. But, I never played around with the codecs, and speex is so much better than the default. I'm having a much better calling experience now. Thank you very much for sharing.
Click to expand...
Click to collapse
You are very welcome! I hope it works out for you. I've been logging a lot of pbxes minutes recently and have found call quality to be inconsistent. Of course, a lot of that may have to do with wireless signal issues on my end. I would be running my own pbx server full time for personal use, but given the costs of electricity in my area, I don't have a 24/7 box anymore Maybe a Raspberry Pi is in my future.. I need something with low power consumption.
If you are ever looking to experiment, there are other sip clients available, and ilbc is another good codec to try. I believe pbxes.com supports it as well.
Does anyone know the phone number you can call to test echo? I think it plays your voice back on a delay or something...
I've seen it in the forums here but I can't find it after searching for a while.
Google for sip echo test
Use sipdroid or whatever sip client you're using to dial it.
[email protected] should work.
Trying this
I'll be trying this configuration out in the next week. I'm very curious to hear from others about how well it does for them. I'm new to the android platform, but have wanted to save the minutes and use voip as much as possible. It took a lot of searching to find this thread, and then a couple of days getting used to my new phone to have it set up.
I did note a strange loop (flashing screen) because in seeking out this guide I had had csipsimple installed (and grooveip) and Voice+ (Google Voice callback) and that caused trouble with outgoing calls. I've got it sorted out now, and it looks like it's all working.
Thanks for the well written guide!
---------- Post added at 03:51 AM ---------- Previous post was at 03:23 AM ----------
It does look like this guide might not work completely well with the airplane mode API change in 4.2. There's another thread that suggests the secure settings plugin for Tasker (paid) or running Llama - Location Profiles on a rooted phone.
Tomcat23 said:
It does look like this guide might not work completely well with the airplane mode API change in 4.2. There's another thread that suggests the secure settings plugin for Tasker (paid) or running Llama - Location Profiles on a rooted phone.
Click to expand...
Click to collapse
Bummmmmer. I'll be on the N4 boat soon enough and depend on this solution to keep under 100 minutes of actual airtime a month.
I'm switching nexus phones from the galaxy nexus to the nexus 4. Sipdroid is working great on the galaxy nexus thanks in part to this tutorial. When I boot up the N4 I sign into google voice, then I open sipdroid and put in my username and password, but I get a red dot and a "registration failed (401 Unauthorized)" error. I'm still able to open sipdroid on the gNex and it works fine.
I'm thinking of deleting my pbxes account, and then uninstalling/reinstalling sipdroid on the N4 and just setting up a brand new account.
Anyone have any thoughts? Thanks for any ideas,
k
---------- Post added at 07:54 PM ---------- Previous post was at 07:17 PM ----------
Dang. So I deleted my pbxes account, but when I try to create a new account with sipdroid, it says 'myname' trunk is already in use. I guess I should have deleted that trunk, then deleted my account. But, I can't log in to pbxes.org anymore. So, I feel stuck.
to answer my own question, in case anyone searches. You just have to wait a few hours (3-4) for me, and then you can create a new account because that old trunk gets deleted.
GV SMS Integration Free
https://play.google.com/store/apps/details?id=com.mdrtools.apps.gvintegration.free
GV SMS Integration Free
While not related to VoIP, a lot of users would prefer the native SMS client over the GV app for text messages. Google Voice can forward texts, but it will obviously be encapsulated in a forwarded message from a shortcode instead of the actual sender's number. Not exactly clean by any means, but it is the only solution when in an area without data (i.e. roaming). Otherwise, this app will work alongside the GV app to offer seamless integration with the native SMS app (or GoSMS). You must enter your credentials in the app again for it to be able to send messages. Upon enabling integration, the phone will reboot. There looks to be three types of integration: standard, root user, and airplane mode. I've only used root user, which seems to work just fine in airplane mode.
Since I never use my cell number for texting, I have it set to send all text messages via Google Voice account. It does have the option to allow replying to texts from the number it was received from, which can be useful. There's some warning about hiding the notification bar, but I haven't had any issues yet.
Going after strictly GV SMS integration, and nothing else, I've disabled the send/receive text signatures, turning the screen on when there's a new notification, and showing popups when there's a new text.
Be sure to disable text notifications in the Google Voice app.
Do note the warning when you first enable integration-- if you decide to uninstall the app, DISABLE INTEGRATION FIRST.
ziddey said:
GV SMS Integration Free
Going after strictly GV SMS integration, and nothing else, I've disabled the send/receive text signatures, turning the screen on when there's a new notification, and showing popups when there's a new text.
Be sure to disable text notifications in the Google Voice app.
Click to expand...
Click to collapse
ok
errorcod3 said:
I'm using the same exact setup as you -- I don't even know my phone number with my carrier... But, I am having a problem with GV SMS Integration. I'm a recent iPhone transplant and I switched to a Google Nexus 4 running 4.2.1.
Again, my setup is exactly the same, but I'm not getting notified for new text messages. When I open the native text message app I have new messages, I'm just not getting notified. I have turn screen on and show popups -- and I get nothing. I also have text notifications disabled in the GV app. Any ideas?
Click to expand...
Click to collapse
Do you get notified of new messages that are sent to your cell number?
Since GV SMS Integration essentially backdoors the native app, it sounds like something changed in the code with JB. Seeing how the app hasn't been updated in a while and the website is non-existent, let's hope for an update soon.
In the meantime, I'm imagining that it might work fine with GoSMS on JB if that app is okay by your standards..
Have you found an automated airplane mode toggler that works with JB? I understand AutoAir is not compatible.