Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reduce VoIP/SIP latency on Android devices?

Tags:

android

voip

sip

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.

Our Experiments and Findings

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

  • iphone to iphone (fastest, no noticeable delay)
  • android (Samsung) to iphone (a little delay, but still acceptable)
  • android (samsung) to android (xiaomi MI-2) (a little delay, but still acceptable)
  • android (samsung) to android (asus) (too much delay, unacceptable)
  • android (samsung) to android (samsung) (really slow, unacceptable)

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?

Additional Notes

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.

like image 519
John Avatar asked Jul 14 '13 12:07

John


People also ask

How do I reduce latency on VoIP?

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.

What latency is good for VoIP?

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.

What causes delay in VoIP calls?

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.

What happens if there is too much latency in a VoIP call?

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.


1 Answers

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.

like image 130
John Avatar answered Oct 19 '22 11:10

John