Android SIP with CSipSimple and pjsip
Asked Answered
A

3

7

I am writing a custom Android application that allows the user to make VOIP calls using SIP. When the user presses a button, a voice call is initiated with another SIP user. 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.

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. 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).

I started searching for another SIP stack with an easy to use API and came across 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. I was so excited... until I looked at the source code for 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.

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? 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?

Thanks for any input, I know quite a few people have gotten stuck at this same stage.

Aragats answered 4/4, 2013 at 19:56 Comment(3)
I've worked with CSipSimple in library mode, it's actually much easier than deconstructing the whole package. It's probably much too late for the OP, but any others looking for some pointers can ping me here.Aholla
@Aholla I am looking into CSipSimple (or any other library) that will allow me to make voice/video calls and IMs. :)Subjoin
Well, you should have a look on the SampleCSipSimpleApp on Github, it's a starting point for using CsipSimple in library mode. API is documented here: r3gis3r.github.io/SampleCSipSimpleApp/javadoc. Also, keep in mind the licensing model. Unless you have bought a PJSIP license, you would have to provide the source-code for the app you're developing, as far as I know.Aholla
H
2

Instead of going for the more complicated CSipSimple, you should maybe attack the most basic apjsua, which runs the same pjsip stack, so it should hopefully fit your requirements too: http://trac.pjsip.org/repos/wiki/Getting-Started/Android.

Heartwhole answered 9/4, 2013 at 17:33 Comment(0)
C
1

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.

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?

And of course you'll have to watch the tutorial for android in the pjsip website.

Hope this helps.

Cantonese answered 11/4, 2013 at 16:32 Comment(0)
S
1

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.

Register broadcastrecievers and intent filters for get call back from csipsimple. Analyse Incall activity in csipsimple for more details.

Serbocroatian answered 3/10, 2014 at 6:34 Comment(1)
Hi Nidhin, can you please explain it briefly?Barrault

© 2022 - 2024 — McMap. All rights reserved.