简体   繁体   中英

How to reduce VoIP/SIP latency on Android devices?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM