简体   繁体   English

带有CSipSimple和pjsip的Android SIP

[英]Android SIP with CSipSimple and pjsip

I am writing a custom Android application that allows the user to make VOIP calls using SIP. 我正在编写一个自定义Android应用程序,允许用户使用SIP进行VOIP调用。 When the user presses a button, a voice call is initiated with another SIP user. 当用户按下按钮时,与另一个SIP用户发起语音呼叫。 That's it. 而已。 The only other requirements are that it has to work on 2.3+ Android devices and must not be limited to wifi only. 唯一的其他要求是它必须在2.3+ Android设备上工作,并且不能仅限于wifi。

Android already includes a SIP stack (as of 2.3) and I was able to modify the Walkie-Talkie sample project to work exactly how I wanted it to. Android已经包含一个SIP堆栈(从2.3开始),我能够修改Walkie-Talkie示例项目,使其完全符合我的要求。 Unfortunately I was not able to use this app with certain devices (Casio Commando being one of them), and worse, the application only works over wifi (as I mentioned, unacceptable for my project). 不幸的是我无法将这个应用程序与某些设备一起使用(卡西欧突击队是其中之一),更糟糕的是,该应用程序仅适用于wifi(正如我所提到的,对我的项目来说是不可接受的)。

I started searching for another SIP stack with an easy to use API and came across CSimpleSip. 我开始使用易于使用的API搜索另一个SIP堆栈,并遇到了CSimpleSip。 I compiled it and ran their demo project (SipHome) and it worked perfectly on my unsupported phones (including the Commando) and it also worked over wifi, satisfying my requirements. 我编译并运行他们的演示项目(SipHome),它在我不支持的手机(包括Commando)上工作得很好,它也可以在wifi上工作,满足我的要求。 I was so excited... until I looked at the source code for CSipSimple. 我很兴奋......直到我查看了CSipSimple的源代码。 I have no idea how to begin extracting out the actual calls to the underlying pjsip API, nor was I able to get the pjsip demo application working after 10+ hours. 我不知道如何开始提取对底层pjsip API的实际调用,也不能让我的pjsip演示应用程序在10个多小时后才能运行。

Has anyone deconstructed CSipSimple and separated out the SIP parts from their incredibly complicated UI, or does anyone know of a simpler to use SIP library? 有没有人解构过CSipSimple并将SIP部分从其极其复杂的用户界面中分离出来,或者有人知道更简单的SIP库吗? With the native SIP API I was able to make a 200 line Android activity that made the call perfectly... how can I accomplish this with a third party SIP stack that supports non-wifi? 使用本机SIP API,我能够进行200行Android活动,使得呼叫完美无缺......如何通过支持非wifi的第三方SIP堆栈来实现这一目标?

Thanks for any input, I know quite a few people have gotten stuck at this same stage. 感谢您提供的任何意见,我知道很多人已经陷入了同一个阶段。

你应该攻击最基本的apjsua,而不是去更复杂的CSipSimple,它运行相同的pjsip堆栈,因此它也应该符合你的要求: http//trac.pjsip.org/repos/wiki/Getting-开始/ Android

I totally agree with Balint, apjsua is the app which helps you for a better understanding, however it may be not obvious to start with it when you're not familiar with C (like I was) but it's much more efficient this way. 我完全赞同Balint,apjsua是一个可以帮助你更好理解的应用程序,但是当你不熟悉C(就像我一样)时,开始使用它可能并不明显,但这种方式效率更高。

You can take a look to www.pjsip.org , take just care about the package you'll download because the tutorial isn't so clear: for instance they talk you a lot about apjsua (the android implementation of pjsua) and this app is not included in the download link they provide, you can see my question here about that: where's apjsua? 您可以查看www.pjsip.org ,关注您将要下载的软件包,因为教程不是那么清楚:例如,他们会谈论很多关于apjsua(pjsua的android实现)和这个应用程序它们提供的下载链接中没有包含,你可以在这里看到我的问题: 哪里是apjsua?

And of course you'll have to watch the tutorial for android in the pjsip website. 当然,你必须在pjsip网站上观看android的教程。

Hope this helps. 希望这可以帮助。

Use csipsimple as a library project.There is a api in csipsimple project for using it as library.You can bind to csipsimple service and make calls. 使用csipsimple作为库项目。在csipsimple项目中有一个api用于将其用作库。您可以绑定到csipsimple服务并进行调用。

Register broadcastrecievers and intent filters for get call back from csipsimple. 注册广播解析器和意图过滤器以从csipsimple获取回调。 Analyse Incall activity in csipsimple for more details. 在csipsimple中分析Incall活动以获取更多详细信息。

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

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