有没有办法使Android本机sip堆栈在所有android设备上支持voip?

时间:2019-07-18 07:24:21

标签: android pjsip jain-sip sip-stack

我花了一些时间使用android native sip API构建一个简单的VOIP调用。但是后来才知道它不支持所有Android设备上的voip呼叫。有人提到,它依赖于in那教徒饮酒者栈。所以有什么办法可以让我使用本机sip堆栈在所有Android设备(从病房中的Android 4)上支持它。任何使用pjsip实现sip的简单演示源代码也将受到高度赞赏。

1 个答案:

答案 0 :(得分:0)

PJSip Android Library Build Up Steps

Requirements: 
- Latest Version on NDK (https://developer.android.com/ndk/downloads)
- PjSip Original Source Code (https://www.pjsip.org/download.htm)

Steps:

1)  Download PjSip source code in a specific location
or
Trunk the URL (http://svn.pjsip.org/repos/pjproject/trunk)
Open Terminal and go to a specific location where you can put trunk folder
How to trunk url:-
Execute in Terminal:- svn co http://svn.pjsip.org/repos/pjproject/trunk

2) Download Latest NDK in a specific location.

3) Open PjSip or Trunk folder and go to pjlib/include/pj/ 

4) Create a config_site.h File and Set Below Value in config_site.h File.

/* Activate Android specific settings in the 'config_site_sample.h' */
#define PJ_CONFIG_ANDROID 1
#include <pj/config_site_sample.h>

5) Just run Following Command to build PjSip Library.

- cd/ path to your Pjsip or Trunk Directory
- export ANDROID_NDK_ROOT=/ set your NDK download Directory
- TARGET_ABI=armeabi-v7a
- ./configure-android
- make dep && make clean && make

完成所有步骤后,转到pjsip-app / src / swig / java / android,您会在JNI文件夹中找到带有.so文件的android源代码。现在只需在android studio中打开一个源,并使用ID,密码和服务器ID将用户与您的自由切换用户连接起来。并拨打第一个VoIP电话。

谢谢,祝您编程愉快...