简体   繁体   English

Android VoIP呼叫实施

[英]Android VoIP call implementation

First of all I'm a newbie in VoIP implementation. 首先,我是VoIP实施的新手。 I need to implement VoIP single and group call in android application. 我需要在android应用程序中实现VoIP 单个群组通话。 Could you tell me, what is actually the best way to achieve this ? 你能告诉我, 实际上最好的方法是什么? I'm looking for Android SIP library (probably open source) which should: 我正在寻找Android SIP库(可能是开源的),该库应该:

  • has good documentation with simple app examples 具有良好的文档和简单的应用示例
  • be ready to use with java 准备与Java一起使用

Maybe just native android SIP api will be the best ? 也许仅仅是原生android SIP api会是最好的? But I heard that it doesn't support group calls. 但是我听说它不支持群组通话。

Most of the voip libraries use C/C++ implementation for various reasons. 出于各种原因,大多数voip库都使用C / C ++实现。 You can use PJSip which is a C voip/sip stack. 您可以使用PJSip ,它是C voip / sip堆栈。 It has a good documentation but you have to build it yourself using android ndk . 它有一个很好的文档,但是您必须使用android ndk自己构建它。 It has good documentation and also contains processes to build it for Android and other platforms. 它具有完善的文档,还包含用于Android和其他平台的构建过程。 But there is no java/android wrapping built in so you should do that yourself. 但是没有内置的Java / android包装,所以您应该自己做。 Another option is Liblinphone which is also based on C stack but provides all of the wrapping and implementations out of the box so you don't have to bother so much on native codes. 另一个选择是Liblinphone ,它也基于C堆栈,但是提供了所有包装和开箱即用的实现,因此您不必在本机代码上花费太多精力。 It also has a sample application which you can try yourself. 它还有一个示例应用程序,您可以自己尝试。 One downside of Liblinphone is that it lacks proper documentation and you have to dig in more. Liblinphone的一个缺点是它缺乏适当的文档,您需要进一步研究。

Regarding the android SIP api, I don't think it is a good option as it has much more limitation and hardly maintained. 关于android SIP api,我认为这不是一个好选择,因为它有更多的限制并且很难维护。 It is based on Jainsip stack which is a 100% java stack but is too verbose. 它基于Jainsip堆栈,它是100%的Java堆栈,但是太冗长了。 I personally would like to recomment Liblinphone as I am currently implementing it and am pretty satisfied with it. 我个人想推荐Liblinphone,因为我目前正在实施它,并且对此感到非常满意。 Best of luck... 祝你好运...

Update Here is the source code of linphone for android if you are interested in it. 更新 这里Linphone会为Android的源代码,如果你对它感兴趣。 You can get pretty much idea of Liblinphone for android from it. 您可以从中获得关于Liblinphone for android的几乎所有想法。 You have to dig much more into the sources though. 不过,您必须深入研究资源。

You can have a look at Restcomm Android SDK: 您可以看一下Restcomm Android SDK:

  1. It's open source, with an active community around it 它是开源的,周围有活跃的社区
  2. It using SIP for signaling and Webrtc for media so should work nicely with NATs, etc 它使用SIP进行信号传输,并使用Webrtc进行媒体传输,因此应与NAT等配合使用。
  3. Comes with 2 sample applications that you can play with and alter their code to experiment 附带2个示例应用程序 ,您可以使用它们并更改其代码以进行实验
  4. Comes with quick start guide , reference doc 随附快速入门指南参考文档
  5. You can check the Olympus sample App right away by installing the .apk from this link 您可以通过安装apk文件检查奥林巴斯示例应用程序的时候了链接

Notice that the SDK doesn't support group calling out of the box, but you could combine it with Restcomm-Connect open source platform to add such functionality very easily. 请注意,SDK不支持开箱即用的群组调用,但是您可以将其与Restcomm-Connect开源平台结合使用,以非常轻松地添加此类功能。 Restcomm-Connect also comes with docker, so you should be able to install it right away. Restcomm-Connect也随Docker一起提供,因此您应该能够立即安装它。

Please let me know if you have any questions 请让我知道,如果你有任何问题

Best regards, Antonis 最好的问候,安东尼

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

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