Which SIP library should we look at to solve our audio delay/latency issue for Android phones running OSes 4.0 and above?
Our experiments suggest the delay is a SIP library issue. If not a library issue, what else could it be?
We built a simple VOIP app for both Android and iPhone. You simply dial the caller id of another user, press call, and start talking to them. The iPhone version works great, and we used a commercial API for the SIP functionality. But the Android version doesn't work so well because of audio delay issues which seems to depend on which Android phone you have. We used the following Android SIP library.
When we are making calls between one android phone to another android phone, there is too much delay in the audio. One person will say something, and it could take up to a full 1-2 seconds before the other person hears it. At the moment, this problem appears to be particular to Samsung devices, as opposed to other hardwares (although our tests have been limited). So for example, a Galaxy Note 1 calling a GS3 experiences more delay than a Galaxy Note 1 calling Nexus 7 tablet (Asus) and Galaxy Note 1 calling a Xiaomi MI-2 phone.
We're pretty sure we've eliminated our Asterisk server as the probable cause of delay, since iphone to iphone calls are great, and iphone to android calls are reasonable.
Here is a list of device speed tests, listed in ascending order of delay
Right now, my team is is leaning towards the idea that the Android SIP library we are using is not good enough. We are interested in using another SIP library to do the call.
We have noticed that other Android SIP phones like CSipSimple also experiences this problem.
Does anyone have ideas on how we can solve our audio delay/latency issues?
We noticed there wasn't any audio delay when using Skype on Galaxy Note 1 to Skype on Galaxy S3. So that's why we were thinking there's probably a solution to this problem via our choice of SIP library, or codec or something...
We know we're using the G.711 Codec
, incase that makes any difference.
Upgrade, or replace slow networking equipment and devices. Prioritize your network traffic based on the applications that are most important. Prioritize voice or video traffic for instance. Consider investing in a VoIP-priority router, as downloading large files on a call impacts quality.
Ping/Latency: Less than 10 ms High latency causes delays or echos, causing confusion and annoyance for callers. For VoIP, you want your latency to be around 20 ms or less. The highest you can have with latency being mostly unnoticeable is 150 ms.
A packet-based network experiences delay for other reasons. Two of these are the time necessary to move the actual packet to the output queue (packet switching) and queuing delay. When packets are held in a queue because of congestion on an outbound interface, the result is queuing delay.
While some latency is normal for any VoIP system, persistent latency can slow down phone conversations and frustrate business leaders. Issues like voice echoing and the “talk over” effect can impact the quality of phone calls and over time, impact businesses negatively.
We fixed the voip latency issue by using the linphone sip library. Now there's hardly any notice-able delay when two people are talking to each other.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With