8

I lost hours of searching and reading. I didnt really understand how to work with PJSIP.

I have some questions about it:

  1. Can you explain how actually this library is used when developing for Android?
  2. When I build the library do I use only Java code or defintely I'll have to write in C++?
  3. My goal is encrypted VOIP Application for Android.
  4. Is there a good documentation with description of all methods, fields and constructors?
  5. Do you have any references to some tutorials or samples?
jww
  • 97,681
  • 90
  • 411
  • 885
dephinera
  • 3,703
  • 11
  • 41
  • 75
  • I am in progress to create android studio project from ppjsip-apps/src/swig . I am not sure but it is not based on `gradle` but i hope it's NDK supported now. – Nikola Lukic Feb 25 '20 at 12:49

2 Answers2

10

Useful Links:

This thread is pretty old but I've recently used PJSIP with android. If you can get pjsip to build correctly, which a major feat considering the numerous issues when trying to build for android and openssl(if you want encryption), it's a good library to work with on android.

The PJSUA2 api is what you'll use to work with PJSIP on android. The entire library is written in java and fairly easy to learn and work with. The PJSUA2 documentation will help with most issues, but if you run into errors you'll have to google it until you figure it out.

I found that the CSipSimple project does not provide a good reference for people who are completely new to PJSIP. However, this is just my opinion.

On Android, once you get it all set up, it's as simple as just following the instructions on the PJSUA2 documentation to get calls working. Video takes a bit more effort, but is still achievable.

Also at the time of posting you still have to use Eclipse ADT to work with PJSIP for android; android studio still does not support the NDK.

Marc Schmitt
  • 101
  • 1
  • 3
9

I am assuming that you are familiar with PjSIP and have some experience using some of the APIs, at least from the top level layer, viz. Pjsua.

If that's true, you can go ahead and take a look into the CSipSimple project. Its an open source Android project based on PjSIP.

You can try out the app from the Google Play store and see if it fits your needs before you start modifying the source.

EDIT: Since you say, you are new to PjSIP, I suggest you get familiar with it on desktop platform first.

First of all you will need to build all the PjSIP libraries for your target platform. Then include those libraries in your application and start using the APIs. To begin with you can achieve almost all the SIP features you require using the PJSUA API - High Level Softphone API. PjSUA stands for PjSIP User Agent and its actually a command line softphone in itself. The APIs in PjSUA-lib are categorized based on their functionality like transport creation, account registration, call handling, media handling etc. and you can find links to each category in the previous link. That will give you a good documentation with description of all methods, fields and constructors.

I suggest you go through the sample application Simple PjSUA which will get you familiar with the way of initializing PjSIP, account registration, how to handle incoming INVITE in the case of an incoming call, how to make an outbound call and how to handle the call media.

Coming to Android you can either go ahead and use the CSipSimple which uses a modified version of pjsip-jni. Else you can build pjsip for Android following the intructions here.

Hope this helps.

Nithish
  • 1,580
  • 12
  • 21
  • 1
    I overlooked the part where you said that you didn't understand how to work with PjSIP. But I provided a link which answers all your other questions. If you would have opened the link to the CSipSimple project, you would have known that. Anyways let me edit my answer. – Nithish Oct 26 '14 at 02:53