Using Android with FreePBX – a SIP extension for free

FreePBX is an opensource VOIP PBX system that is built on top of Asterisk and therefore can use SIP to communicate with extensions. This means that we can use any of this SIP clients that are available for Android.

3CXPhoneOne such SIP compliant softphone is called 3CXPhone. This is a simple client that will work over both WiFI and 3G.

Bandwidth!! – One thing to consider when using a softphone on your Android handset is bandwidth. This might be a problem if you have a cap on your WiFi, but is much more likely to be an issue if you use 3G to make VOIP calls. Here are some quick facts and number to help you decide which codec to use –

G711 – good audio quality – uses around 72MB per hour    * also referred to as ulaw and alaw.

GSM – ok call quality – uses around 25MB per hour

G729 – ok call quality – uses around 21MB per hour    * not included with Asterisk or 3CXPhone

So above are 3 common codec choices with Asterisk. G711 has good quality audio but the trade-off is the amount of bandwidth it uses. If you have a small 3G cap you could quite quickly burn through it. The audio quality with GSM and G729 is OK. It’s perfectly understandable, and whether it’s acceptable or not will depend on the person making/receiving the call and their expectations.

G729 has the lowest bandwidth requirements of the 3 but it is not included with Asterisk by default (and is not available for 3CXPhone at all) as there are license costs to run it. You can add G729 to Asterisk but there is a license cost from Digium (there is an opensource version of G729 for Asterisk but you should be aware of any license restrictions – http://asterisk.hosting.lv/). You will also find that there is a higher cost for Android softphones that can run G729.

I would also recommend something like 3G Watchdog if you need to keep track of how much bandwidth you are using – https://play.google.com/store/apps/details?id=net.rgruet.android.g3watchdog&hl=en

Setup – Installation was straight forward. Just create an extension in FreePBX and then you just need the server IP (or name), extension number and extension secret in 3CXPhone. One thing I did notice was that disabling codecs in 3CXPhone did not seem to work for me. I disabled G711 in 3CXPhone and had G711 and GSM enabled in FreePBX for the extension. The call was still make using G711 and I don’t think that should be the case. If you want to use GSM I would just have GSM enabled for that extension in FreePBX. It would also be worth double checking what codec is used by checking a call in progress!

Making calls – 3CXPhone integrates with your Android contact list so it’s pretty easy to make calls. Just select the contact from the list, or dial the number. One thing to bear in mind is that the format the Asterisk system expects the phone number in may not be the same as your mobile operator. The interface is pretty simple with the ability to put a call on hold or transfer a call. One omission is that there is no call timer shown when a call is in progress. This would have been very useful if you’re trying to monitor bandwidth usage.  (in fact a SIP client with a built in bandwidth monitor would be a great idea …)

Making a call with 3CXPhoneReceiving calls – Receiving calls worked OK. Just dial the extension number from another extension, or set the extension as a destination for an Inbound Route in FreePBX. One thing to bear in mind is that with power saving potentially turning off the WiFi or patchy 3G coverage when moving around is that receiving calls using any Android client will likely be a hit and miss affair.

Trouble with SIP – The ability to make inexpensive calls from a mobile phone over 3G has not been lost on the mobile phone carriers! Some actively block SIP connections so you may find that you’re not able to use it. Also, your terms of service may restrict your ability to make VOIP calls. It’s worth checking this before you find that your mobile phone carrier has cut you off!

Final thoughts – Using an Android SIP softphone is a great solution for some uses. If you’re by permanent WiFi that has a good signal and little interference then call quality can be great. If you’re using 3G then quality is certainly going to be hit and miss, probably unusable in a poor 3G signal area, or when being handed off between cell towers. Being able to use the internet to make inexpensive international calls is great. I’ve made calls from New Zealand to the UK using a SIP softphone over 3G and the call quality has been fantastic. It’s not always going to work that way, but when it does it’s amazing!

Another possibility  – If you make regular international calls to the same number then another option is to get a local DDI number and then forward that in FreePBX to the international number. For example I have a UK phone number that forwards to a land line in New Zealand. This way I can call a local UK number (included in my mobile plan minutes) that forwards to regular phone in New Zealand. International phone calls from your cell phone to the other side of the world for 1p per minute!  (plus the cost of the DDI number and any mobile phone plan minutes)

2 thoughts on “Using Android with FreePBX – a SIP extension for free

Comments are closed.