VoiDroid (VoIP client for Android)

Important notice

This project is dead and has been for a while. The code has not been ported to (and will not work on) newer Android firmware (Cupcake/Donut), and much more usable alternatives (such as Sipdroid) have appeared in the meantime. That leaves pretty much no reason why you would want to use it.

What is it

This is a little toy/educational project I've worked on recently, to see how hard would it be to add VoIP functionality to Android phones. It is based on the PJSIP SIP stack and provides a very simple JNI layer implementing barely enough functions to do something useful with it from Java (I'm aware of the pjsip-jni project, but it seemed like an overkill for my purposes).

As a follow-up to this project, I wrote up a JNI Examples for Android document, which contains detailed explanations and an example of building a native library for Android, and calling it from Java.

Sample VoiDroid application

The result of the project is a sample VoiDroid application [screenshot], which you can install either using adb from Android SDK, or by pointing your phone's browser to this file, after verifying PGP signature. Necessary patches and build instructions for it are provided below. Note that it is more a proof-of-concept implementation than something usable, meaning that it is a bug-ridden, often-crashing, pre-alpha-quality application, so if you decide to install and use it, you are doing so completely at your own risk.

It supports registration with the SIP provider and can optionally use an outbound proxy, enabling you to place calls from behind a fully-symmetric NAT (by virtue of magic provided by PSJIP). From testing on my local wireless network I've learned that Android G1 provides fairly decent sound quality (both recording and playback) with SPEEX codec at 8kHz sampling rate and one audio channel (these settings are currently hardcoded in the JNI library), however I had to turn off echo cancelling completely, as it eats too much CPU (for same reason the device cannot do any kind of on-the-fly resampling). When calling remote sites the sound quality deteriorates somewhat, but I haven't tested the effect of different codecs and various knobs PJSIP offers, so it might be that it still can be improved. In the currently released version of Android software interaction with the audio layer is only possible by passing buffers corresponding to roughly 150ms of sound around, and this contributes to overall latency. Things are likely to improve in the upcoming Cupcake release, but it will require some minor porting, and I did not investigate it in much detail.


All source files distributed from this site (if they are not auto-generated and include enough of non-trivial content) are licenced under MIT licence and include relevant copyright and licence notices near the top.

How to build

Support and contact

As I mentioned above, this was something of an educational project, and it was fun while it lasted. I'm not really interested in working on it anymore, but hope that it might be useful for someone who wants to build VoIP applications for Android. If you are such person, feel free to take the code and run with it (and I would appreciate information about your project), that's what open source is all about, after all. Personally, I'm not willing to fix bugs, add new features or provide any other kind of support. If you still think that you have something to tell me, feel free to email me at jurij at wooyd dot org, but please don't be disappointed if you don't receive any reply.
September 27, 2009