【问题标题】:Is there any way to make Android native sip stack to support voip on all android devices?有没有办法让 Android 原生 sip 堆栈支持所有 android 设备上的 voip?
【发布时间】:2019-11-27 01:45:49
【问题描述】:

我花了一些时间使用 android 原生 sip API 构建一个简单的 VOIP 呼叫。但后来才知道它并不支持所有Android设备上的voip通话。有人提到它依赖于 Jain sip 堆栈。那么有什么方法可以让它支持所有使用本机 sip 堆栈的 Android 设备(从 Android 4 开始)。任何关于使用 pjsip 实现 sip 的简单演示源代码也将受到高度赞赏。

【问题讨论】:

  • 试试这个链接来构建示例 android 应用程序:trac.pjsip.org/repos/wiki/Getting-Started/Android#Requirements
  • 我需要构建一个简单的预定义 sip 呼叫按钮来使用 pjsip 进行呼叫。到目前为止,我一直在 Windows 中的 Android Studio 上工作。你能建议我如何开始研究 pjsip 吗?你有这么简单的裸骨一个简单的例子
  • 尝试扔掉这个链接。我已经使用该链接及其工作构建了 pjsip 库,并且我正在使用 mac OS 构建 pjsip 演示项目
  • 谢谢兄弟,我可以知道你的电子邮件地址吗,看起来我们都在做同一个项目。
  • 是的,你可以查看我的个人资料。谢谢,编码愉快...

标签: android pjsip jain-sip sip-stack


【解决方案1】:
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、密码和 server-id 将用户与您的免费切换用户连接起来。并拨打第一个 VoIP 电话。

谢谢,编码愉快...

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-06-23
    • 2014-10-24
    • 1970-01-01
    • 1970-01-01
    • 2020-04-26
    • 2012-07-07
    • 2023-03-06
    相关资源
    最近更新 更多