A working Mobile VoIP solution for the iPhone – Acrobits Groundwire and Flowroute
A few weeks ago, as I was reaching the end of my two year ATT contract, I started wondering whether I should buy a new smartphone and sign for two more years of big carrier abuse, or explore alternatives. I considered MVNOs, tested IP messaging solutions such as Viber or Skype, and finally decided to go one step further and build my own mobile voice over IP (VoIP) solution.
A mobile VoiP solution requires three components: a mobile carrier providing the 3G data service, a Voice over IP service provider playing the role of a gateway between the public telephony network and the world of IP communications, and an application (“a client”) on the iPhone. At first glance, a VoIP app looks like the iPhone “Phone” app, but is using the SIP protocol to manage the connection to the VoIP provider (that’s why we will call the application a “SIP client”, and why VoIP service providers are often called “SIP Poviders”).
After testing various VoIP service providers and iPhone SIP clients, I’ve finally identified the combination that works best for me. It does not mean it would work for everybody, though, or that I would trust it if my life (or a job, or anything important) depended on it. I still have my reservations about the practicality and the reliability of the solution. But it brings the flexibility of VoIP to mobile phones at a very low cost, in particular when calling or traveling abroad.
The cost of a mobile VoIP solution
A consequence of the increased use of Text Messages and IP messaging applications, conventional voice traffic is reported to have decreased, and mobile carriers now have excess capacity on their conventional (GSM or CDMA) voice networks. That’s why they’re now proposing unlimited voice plans. On the other hand, data bandwidth is still a “hot” commodity, and they’re trying to sell it at a premium. So, does it make sense to switch to VoIP?
As discussed earlier, there are 3 components in a mobile VoIP solution:
– the Data Plan (such as ATT’s for the iPad): 3GB/Month: $30.00. VoIP does not need much bandwidth: with a G729 Codec, approx. 70 MB per hour. And the data plan will only be used when a WiFi connection is not available.
– a Voice over IP service from a provider such as Flowroute.com: $0.012 /min or $6.95 /month (unlimited) to receive calls, approx $0.01 /min for outbound calls in the US. Minutes to foreign countries are more expensive, but still 10 to 50 times cheaper than with a conventional voice plan. Add $1.39 /month for a DID number.
– a SIP client (a one time cost) : Acrobits Groundwire application: $9.99 on the Apple App Store; G729A CODEC available as an in-app purchase ($9.99)
If you consider that you will need a data plan in any case, the real cost of the VoIP solution is the cost of the minutes. 900 minutes of voice (to or from the US) will cost approximately $10. Plus the DID number. Total: $12 per month.
The nitty-gritty details
For the software engineers working on SIP clients, smartphones present a few extra difficulties: in order to preserve the battery, the SIP application has to be placed in a dormant state when no phone conversation is going on, leaving the responsibility of staying in touch with the VoIP service provider to a keep-alive mechanism managed by the operating system.
Because of the way Apple has implemented multitasking in iOS, only TCP keep-alives can be managed transparently by the operating system, and only TCP flows can wake up an application in a dormant state. Unfortunately, most VoIP providers only work with UDP.
It leaves the software engineers with 3 options:
1 – use UDP, prevent the application from hibernating, and manage the keep-alive in the app itself – which impacts battery life and is not endorsed by Apple,
2 – implement a proxy server somewhere in the cloud, which receives the call in UDP, connects to Apple’s notification system to wake up the phone, and finally converts the UDP flow into a TCP flow that can be forwarded to the iPhone. The whole process is convoluted, and raises all sorts of concerns regarding reliability and security.
3 – or ask the end user to find a VoIP provider using TCP.
I tested the 3 options, and came to the conclusion that configuring the SIP client to receive TCP calls directly from the VoIP Service provider yielded the best results.
Acrobits and Flowroute over TCP
When receiving a call, the iPhone is waken up almost instantaneously, and the Acrobits Groundwire app is promoted to the foreground in a few seconds. The reactivity of the direct TCP connection – while not as good as what you would experience with a conventional voice call – is much higher than what proxy based solutions deliver, and does not require a total reeducation of the end users – at both ends of the line. And the impact on the battery life remains limited, at least with WiFi connections.
Flowroute, the service provider I selected, supports VoIP over TCP. It also has the advantage of supporting G729 (the efficient voice compression mechanism used in the GSM standard). Groundwire, the SIP client from Acrobits, proved very configurable, reliable, and easy to use at the same time.
In my opinion, the G729 Codec is a must: VoIP does not need a lot of bandwidth, but it needs it consistently. We’re using public networks (WiFi hot spots, the Internet) which do not “protect” the VoIP traffic. The smaller the bandwidth required (G729 only requires 10 kbps), the better the chances for the call to go through with an acceptable quality.
I did not notice that enabling VoiP had any visible impact on my data usage, but the autonomy of the phone suffered. Even with the optimized TCP solution. The impact on battery life remains very acceptable as long as the phone can connect to the Internet over WiFi, but if you are on the move with only 3G data available, the autonomy shrinks dramatically (down to a few hours).
Before I settled on Flowroute and Acrobits, I used Bria, from Counterpath, with Callcentric, a provider delivering the calls on UDP. Because iOS does not permit a UDP flow to wake up a dormant application, Bria had to stay awake in the background, which impacted the battery life significantly. It worked until I upgraded my phone to iOS 6. iOS 6 seems to manage UDP flows differently, breaking Bria’s ability to reliably receive calls over UDP. On their support forum, Counterpath blame a bug in iOS 6, and promise a work around on their next release.
Even if the SIP client application is well designed, it can not totally hide that the iPhone was not designed for VoIP. Its firmware and its OS expect voice conversations to use the GSM network: accepting a VoIP call requires at least one more step (unlock the home screen) than accepting a GSM call, and if you receive a conventional phone call over GSM while already engaged in a VoIP conversation, GSM will take precedence and will terminate the VoIP conversation.
A conclusionMobile VoiP? If you stay in your home country and never travel abroad or place call to family or friends overseas, I’m not sure it makes economical sense. VoIP minutes are cheap, but the cost of conventional voice minutes is going down rapidly (with an MVNO, you can get unlimited voice and text for $40.00 /month). If you travel to foreign countries, or place long calls overseas, VoIP is much more interesting. The minutes stay at the same price no matter where you are. But you have to live with the hassle of buying local 3G SIM cards and fiddling with APN settings.
I have my reservations regarding the reliability of the whole solution. Ultimately VoIP is dependent on the availability of 3G data networks (which are less prevalent than GSM or CDMA networks), and can be complex to set up (configuring a new 3G data carrier requires a change of the APN parameters in the “settings” application of the iPhone).
On a smartphone, a SIP client is just a third party app like any other third party app, which creates all sorts of issues (did you relaunch the app after you restarted the phone, has the application frozen in the background?).
Until a manufacturer decides to bring Mobile VoIp to the mainstream and designs an IP-only smartphone specifically for VoIP applications, it will remain a complex solution that can be broken by an operating system upgrade.