简体   繁体   English

如何减少Android设备上的VoIP / SIP延迟?

[英]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? 我们应该看哪个SIP库来解决运行OS 4.0及更高版本的Android手机的音频延迟/延迟问题?

Our experiments suggest the delay is a SIP library issue. 我们的实验表明,延迟是SIP库的问题。 If not a library issue, what else could it be? 如果不是图书馆问题,那还能是什么?

We built a simple VOIP app for both Android and iPhone. 我们为Android和iPhone构建了一个简单的VOIP应用程序。 You simply dial the caller id of another user, press call, and start talking to them. 您只需拨打另一个用户的呼叫者ID,按呼叫,然后开始与他们通话。 The iPhone version works great, and we used a commercial API for the SIP functionality. iPhone版本的效果很好,我们使用了用于SIP功能的商业API。 But the Android version doesn't work so well because of audio delay issues which seems to depend on which Android phone you have. 但由于音频延迟问题(似乎取决于您拥有的Android手机),因此Android版本无法很好地工作。 We used the following Android SIP library . 我们使用了以下Android SIP库

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. 当我们在一部Android手机与另一部Android手机之间拨打电话时,音频中的延迟过多。 One person will say something, and it could take up to a full 1-2 seconds before the other person hears it. 一个人会说出一句话,这可能要花整整1-2秒的时间,其他人才能听到。 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. 因此,例如,调用GS3的Galaxy Note 1比调用Nexus 7平板电脑(Asus)的Galaxy Note 1和调用Xiaomi MI-2手机的Galaxy Note 1经历更多的延迟。

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. 我们很确定我们已经淘汰了Asterisk服务器,这可能是造成延迟的原因,因为iphone到iphone的通话很好,iphone到android的通话也很合理。

Here is a list of device speed tests, listed in ascending order of delay 这是设备速度测试的列表,按延迟的升序列出

  • iphone to iphone (fastest, no noticeable delay) iPhone到iPhone(最快,没有明显的延迟)
  • android (Samsung) to iphone (a little delay, but still acceptable) android(三星)到iphone(有点延迟,但仍然可以接受)
  • android (samsung) to android (xiaomi MI-2) (a little delay, but still acceptable) android(samsung)到android(xiaomi MI-2)(稍有延迟,但仍然可以接受)
  • android (samsung) to android (asus) (too much delay, unacceptable) android(samsung)到android(asus)(延迟太多,无法接受)
  • android (samsung) to android (samsung) (really slow, unacceptable) android(三星)到android(三星)(真的很慢,无法接受)

Right now, my team is is leaning towards the idea that the Android SIP library we are using is not good enough. 目前,我的团队正在倾向于我们正在使用的Android SIP库不够好的想法。 We are interested in using another SIP library to do the call. 我们有兴趣使用另一个SIP库进行呼叫。

We have noticed that other Android SIP phones like CSipSimple also experiences this problem. 我们已经注意到,其他Android SIP手机(如CSipSimple)也遇到此问题。

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. 我们注意到,在Galaxy Note 1上使用Skype到Galaxy S3上的Skype时,没有任何音频延迟。 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... 这就是为什么我们认为可以通过选择SIP库或编解码器之类来解决此问题的原因...

We know we're using the G.711 Codec , incase that makes any difference. 我们知道我们正在使用G.711 Codec ,以防万一。

We fixed the voip latency issue by using the linphone sip library . 我们使用linphone sip库修复了voip延迟问题。 Now there's hardly any notice-able delay when two people are talking to each other. 现在,当两个人互相交谈时,几乎没有明显的延迟。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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