简体   繁体   English

如何在android studio上实现VoIP sip客户端

[英]How to implement VoIP sip client on android studio

I'm working on a project which is to implement a VoIP client for android which uses SIP. 我正在开发一个项目,用于为使用SIP的Android实现VoIP客户端。 My target is an application which allows users to register on a server and to make call with other registered users only. 我的目标是一个应用程序,它允许用户在服务器上注册并仅与其他注册用户进行通话。 Its my first time to use Android Studio and also to deal with Java. 这是我第一次使用Android Studio并处理Java。 I concluded from searching that there are SIP libraries that i could use as PJSIP which i have some questions about 我从搜索结果得出结论,我可以使用SIP库作为PJSIP,我有一些问题

1- I read that i should build the PJSIP library following the steps in the following link https://trac.pjsip.org/repos/wiki/Getting-Started im working on a windows based laptop, i've never built a source code before, so i just chose to build the PJSIP for android, should i do this using a virtual machine with linux ? 1-我读到我应该按照以下链接中的步骤构建PJSIP库https://trac.pjsip.org/repos/wiki/Getting-Started我在基于Windows的笔记本电脑上工作,我从来没有构建过源代码代码之前,所以我只是选择构建Android的PJSIP,我应该使用Linux的虚拟机吗? is there any other way to get an already built pjsip library to work with? 有没有其他方法可以使已经构建的pjsip库使用? or any other easier library? 还是其他更容易的图书馆?

2- how do i know the functions that are in the PJSIP library and the files that i'll need to import, should these links help? 2-如果这些链接有帮助,我如何知道PJSIP库中的函数以及我需要导入的文件? whats PJSUA2? 什么是PJSUA2? http://www.pjsip.org/pjsip/docs/html/group__PJSUA__LIB.htm http://www.pjsip.org/docs/book-latest/html/ http://www.pjsip.org/pjsip/docs/html/group__PJSUA__LIB.htm http://www.pjsip.org/docs/book-latest/html/

3-I also checked the Csipsimple application, its code is very complicated for me to understand, are there any easier open source apps that i can check? 3-I还检查了Csipsimple应用程序,它的代码非常复杂,让我理解,有没有更容易的开源应用程序,我可以检查?

1- Yes, you should build PJSIP from the link you provided and follow the process step by step carefully. 1-是的,您应该从您提供的链接构建PJSIP,并仔细按照流程进行操作。 It's the best way because of official documentation. 这是官方文档的最佳方式。 You have to build PJSIP library on a linux machine to make it work properly. 您必须在Linux机器上构建PJSIP库才能使其正常工作。 If you need an already build library for Android, you can follow this link . 如果您需要Android的已构建库,可以点击此链接 Note that it's a PJSUA2 which is a best practice for the Android applications. 请注意,这是一个PJSUA2,这是Android应用程序的最佳实践。

2- PJSUA2 is a high level API and is kind of translation from C++ language to object-oriented Java. 2- PJSUA2是一个高级API,是从C ++语言到面向对象Java的翻译。 It should simplify for you to implement library and use it in Android, because of same programming language and good library packaging. 由于相同的编程语言和良好的库包装,它应该简化您在Android中实现库并使用它。

3- There are not a lot of open source VoIP clients based on PJSIP which are easy to understand. 3-没有很多基于PJSIP的开源VoIP客户端易于理解。 If you are new in business, I should strongly recommend to build first of all sample application which is provided by PJSIP official web site . 如果您是新手,我强烈建议首先构建PJSIP官方网站提供的示例应用程序。 Then you have take a look at PJSUA2 documentation to understand where to begin, for example register sip account, receive and make a new call etc. 然后,您可以查看PJSUA2文档以了解从哪里开始,例如注册SIP帐户,接收和拨打新电话等。

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

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