How to use PJSIP on Android?

I have lost hours of searching and reading. I really did not understand how to work with PJSIP .

I have some questions about this:

  • Can you explain how this library is actually used when developing for Android?
  • When I create a library, I use only Java code or defintely, will I have to write in C ++?
  • My goal is an encrypted VOIP application for Android.
  • Is there any good documentation describing all the methods, fields, and constructors?
  • Do you have any links to some tutorials or samples?
+6
source share
2 answers

I assume that you are familiar with PjSIP and have some experience using some APIs, at least from the top level, namely: Pjsua.

If this is true, you can go ahead and take a look at the CSipSimple project. His open source Android project is based on PjSIP.

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

EDIT: Since you are saying that you are new to PjSIP, I suggest you first familiarize yourself with it on the desktop platform.

First of all, you will need to compile all the PjSIP libraries for your target platform. Then include these libraries in your application and start using the API. To get started, you can get almost all the SIP functions you need using Simple PjSUA , in which you will learn how to initialize PjSIP, an account, how to handle an incoming INVITE in case of an incoming call, how to make an outgoing call and how to process the call carrier.

Coming to Android, you can go and use CSipSimple, which uses a modified version of pjsip-jni. Alternatively, you can build pjsip for Android by following the instructions here .

Hope this helps.

+7
source

Useful links:

This thread is pretty old, but I recently used PJSIP with Android. If you can get pjsip for proper build, which is a big feat, given the many problems when trying to create for android and openssl (if you want to encrypt), this is a good library for working with android.

PJSUA2 api is what you will use to work with PJSIP on Android. The entire library is written in java and is quite easy to learn and work. The PJSUA2 documentation will help with most problems, but if you run into errors, you will have to do this until you find out.

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

On Android, once you configure it, it is simple as soon as following the instructions in the PJSUA2 documentation to make calls work. Video requires a little more effort, but still possible.

Also, at the time of publication, you still have to use Eclipse ADT to work with PJSIP for android; Android Studio still does not support NDK.

+6
source

Source: https://habr.com/ru/post/977195/


All Articles