Giter VIP home page Giter VIP logo

pjsip-android-builder's Introduction

PJSIP Android Builder

Easily build PJSIP with: OpenSSL, OpenH264, Opus and G.729 (without Intel IPP) for Android.

Purpose

I needed an easily replicable build system to build PJSIP http://www.pjsip.org/ native library with NDK for Android. So, I created an Ubuntu docker container (20.04.4 LTS) and wrote some scripts to download, install all the requirements needed to make it a complete build environment and some automated build scripts. If you want to contribute, your help is really appreciated :)

Support - PJSIP 2.9+

Using Android API 21. Default versions included:

  • Android Cmd Tools: 8512546
  • Android NKD: r21e
  • OpenSSL: 1.1.1k (Uses NDK Level 21)
  • OpenH264: 2.1.0 (Uses NDK Level 21)
  • Opus: 1.3.1
  • bcg729: 1.1.1
  • Swig: 4.0.2

Legacy support

Checkout tag 2.2.0 to build older pjsip (or other libs) versions.

Setup

You can install everything on your local machine, or (the way I do) use an Ubuntu Docker container and mount an external volume with this repo. E.g.:

docker run -it --name pjsip-builder -v /path/to/host/repo:/home ubuntu bash

Configuration

  1. Clone this repo on your machine or in the mounted volume inside your container.
  2. Properly configure the config.conf file. It's possible to configure libraries versions and build settings by editing it. The settings in the Support section above have been tested. Please read the comments in the file for more details. Now single libraries can be configured to be compiled with PJSIP without further editing, just enable the switches in the config file.
  3. In the config.conf file there are some toggles to apply patches (fixed_callid). See the respective README for more info.

Prepare Environment

  1. Execute ./prepare-build-system
  2. If everything goes well you should see all the compiled libraries (opus, openh264, openssl, bcg729) in the output folder.

Build PJSIP

After you have successfully set up everything, to build PJSIP execute ./build

The script is going to create a new folder inside the output named pjsip-output-build organized as follows:

pjsip-output-build
 |-- logs/  contains the full build log for each target architecture
 |-- lib/   contains the compiled libraries for each target architecture
 |-- java/   contains PJSUA Java wrapper to work with the library

If something goes wrong during the compilation of a particular target architecture, the main script will be terminated and you can see the full log in ./pjsip-output-build/logs/<arch>.log. So for example if there's an error for x86, you can see the full log in ./pjsip-output-build/logs/x86.log

x86 Relocation

To fix the issue, popping up in recent NDK versions. I've used the fix proposed by @alexmelnikov here, but I have applied it only for x86 arch.

Build Libraries only

This project has separate independent script to build only single libraries:

  • Bcg729
  • OpenSSL
  • OpenH264
  • Opus

If you want to build a single library, or just change it's version, you can disable everything except the library you want to build from the config.conf file and specify the version you want (of course you would also need the NDK). Then execute the prepare-build-system script. If the environment is ready you can also just run the lib dedicated script.

License

Copyright (C) 2015-2022 VoiSmart Srl

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

pjsip-android-builder's People

Contributors

aenongit avatar alexbbb avatar gotev avatar ivbaranov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pjsip-android-builder's Issues

openssl mips64 build

hi
I ran your build script seemed broken on vmware ubuntu 14.4.4 server 64bits .
after downloaded and built openssl on mips64 , it stoped. Here is logs:

Copying prebuilt binaries...
Copying sysroot headers and libraries...
Copying c++ runtime headers and libraries...
Copying files to: /tmp/openssl/android-toolchain-mips64el
Cleaning up...
Done.
Usage: Configure [no- ...] [enable- ...] [experimental- ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]

pick os/compiler from:
BC-32 BS2000-OSD BSD-generic32 BSD-generic64 BSD-ia64 BSD-sparc64 BSD-sparcv8
BSD-x86 BSD-x86-elf BSD-x86_64 Cygwin Cygwin-x86_64 DJGPP MPE/iX-gcc OS2-EMX
OS390-Unix QNX6 QNX6-i386 ReliantUNIX SINIX SINIX-N UWIN VC-CE VC-WIN32
VC-WIN64A VC-WIN64I aix-cc aix-gcc aix3-cc aix64-cc aix64-gcc android
android-armv7 android-mips android-x86 aux3-gcc beos-x86-bone beos-x86-r5
bsdi-elf-gcc cc cray-j90 cray-t3e darwin-i386-cc darwin-ppc-cc darwin64-ppc-cc
darwin64-x86_64-cc dgux-R3-gcc dgux-R4-gcc dgux-R4-x86-gcc dist gcc hpux-cc
hpux-gcc hpux-ia64-cc hpux-ia64-gcc hpux-parisc-cc hpux-parisc-cc-o4
hpux-parisc-gcc hpux-parisc1_1-cc hpux-parisc1_1-gcc hpux-parisc2-cc
hpux-parisc2-gcc hpux64-ia64-cc hpux64-ia64-gcc hpux64-parisc2-cc
hpux64-parisc2-gcc hurd-x86 iphoneos-cross irix-cc irix-gcc irix-mips3-cc
irix-mips3-gcc irix64-mips4-cc irix64-mips4-gcc linux-aarch64
linux-alpha+bwx-ccc linux-alpha+bwx-gcc linux-alpha-ccc linux-alpha-gcc
linux-aout linux-armv4 linux-elf linux-generic32 linux-generic64
linux-ia32-icc linux-ia64 linux-ia64-icc linux-mips32 linux-mips64 linux-ppc
linux-ppc64 linux-ppc64le linux-sparcv8 linux-sparcv9 linux-x32 linux-x86_64
linux-x86_64-clang linux-x86_64-icc linux32-s390x linux64-mips64 linux64-s390x
linux64-sparcv9 mingw mingw64 ncr-scde netware-clib netware-clib-bsdsock
netware-clib-bsdsock-gcc netware-clib-gcc netware-libc netware-libc-bsdsock
netware-libc-bsdsock-gcc netware-libc-gcc newsos4-gcc nextstep nextstep3.3
osf1-alpha-cc osf1-alpha-gcc purify qnx4 rhapsody-ppc-cc sco5-cc sco5-gcc
solaris-sparcv7-cc solaris-sparcv7-gcc solaris-sparcv8-cc solaris-sparcv8-gcc
solaris-sparcv9-cc solaris-sparcv9-gcc solaris-x86-cc solaris-x86-gcc
solaris64-sparcv9-cc solaris64-sparcv9-gcc solaris64-x86_64-cc
solaris64-x86_64-gcc sunos-gcc tandem-c89 tru64-alpha-cc uClinux-dist
uClinux-dist64 ultrix-cc ultrix-gcc unixware-2.0 unixware-2.1 unixware-7
unixware-7-gcc vos-gcc vxworks-mips vxworks-ppc405 vxworks-ppc60x
vxworks-ppc750 vxworks-ppc750-debug vxworks-ppc860 vxworks-ppcgen
vxworks-simlinux debug debug-BSD-x86-elf debug-VC-WIN32 debug-VC-WIN64A
debug-VC-WIN64I debug-ben debug-ben-darwin64 debug-ben-debug
debug-ben-debug-64 debug-ben-debug-64-clang debug-ben-macos
debug-ben-macos-gcc46 debug-ben-no-opt debug-ben-openbsd
debug-ben-openbsd-debug debug-ben-strict debug-bodo debug-darwin-i386-cc
debug-darwin-ppc-cc debug-darwin64-x86_64-cc debug-geoff32 debug-geoff64
debug-levitte-linux-elf debug-levitte-linux-elf-extreme
debug-levitte-linux-noasm debug-levitte-linux-noasm-extreme debug-linux-elf
debug-linux-elf-noefence debug-linux-generic32 debug-linux-generic64
debug-linux-ia32-aes debug-linux-pentium debug-linux-ppro debug-linux-x86_64
debug-linux-x86_64-clang debug-rse debug-solaris-sparcv8-cc
debug-solaris-sparcv8-gcc debug-solaris-sparcv9-cc debug-solaris-sparcv9-gcc
debug-steve-opt debug-steve32 debug-steve64 debug-vos-gcc

NOTE: If in doubt, on Unix-ish systems use './config'.
Configuring for android-mips64

G729 codec is disabled...yes

I followed the instruction and add patch with pjsip project. When i execute the build command i get this message : Checking if g729 codec is disabled...yes.

Please guide me what should i do to integrate G729 codec with my pjsip project.

Thanks in advance

I am not able to start with initial build command ..saying command not found

root@cb3e615c9604:/home/repo/pjsip-android-builder# ./prepare-build-system
./prepare-build-system: line 26: sudo: command not found

line 26 in prepare-build-system correspond to this code :

Setup Java 8

sudo apt-get update

when I try the same code on terminal it .. works ,, any help could be highly appreciated

Openssl x86_64 build error

Hi!

I couldn't build openssl for x86_64 target. I had an error like that

cryptlib.c:1:0: error: CPU you selected does not support x86-64 instruction set

I found out that this is the only target that didn't have ARCH_FLAGS and ARCH_LINK defined. So I added inside this target

export ARCH_FLAGS=
export ARCH_LINK=

and after that build succeeded. Is this a correct solution?

Thanks for this project. I owe you a beer ๐Ÿ˜„ Cheers ๐Ÿบ

libyuv compilation error with Android API 18

Hello,
I'm trying to build pjsip as described in README, but build fails on libyuv library.

vagrant@pjsip-android-builder:/pjsip-android-builder$ ./build
Clear final build folder ...
Creating config site file for Android ...
Compile PJSIP for arch armeabi ...
cp: cannot stat '/pjsip-android-builder/libyuv-android/libs/armeabi/libyuv.so': No such file or directory

vagrant_up_log.zip

BTW, thanks for the work!

bump everything and test

Toolchain: Clang
NDK: r20b
PJSIP: 2.11
SWIG: 4.0.2
OpenSSL: 1.1.1
OpenH264: 2.1.0
Opus: 1.3.1
G729: bcg729

video not working in pjsip 2.6 in android

I used pjsip 2.6,openh264 latest version and openssl-h it got build and gave me all the .so files for armeabi,v7a,64-v8a and intel x86,64. But when i make a call it takes a lot of time for call to get initialize. Voice call is working good but the video is not working.

Before this i tried with older version pjsip 2.4.5,openh264 1.0.0 and openssl-h in this video and voice call is working good but with one way calling issue. In this openh264 1.0.0 give .so files for 32 bit only no support for 64 bit.

Has any one who has faced this issue with latest build of pjsip 2.6,openh264 latest version and openssl-h.
there are no error log while building the .so files and in android project also there is no crash while calling only video is not getting initialize.
Thank You.

Building TARGET_ANDROID_API=14

I cloned this repository and edited config.conf before executing "./prepare-build-system".
And I edited following line:

Target Android API level

TARGET_ANDROID_API=21

to

Target Android API level

TARGET_ANDROID_API=14

When I want to build PJSIP I am getting error...

~/pjsip-android-builder# ./build
Clear final build folder ...
Creating config site file for Android ...
Compile PJSIP for arch armeabi ...
cp: cannot stat โ€˜/root/pjsip-android-builder/libyuv-android/libs/armeabi/libyuv.soโ€™: No such file or directory

Where and What I did wrong? It seems script is not compiling these library (libyuv) at all...

Thanks in advance

[Q] Faltal Exeption: UnsatisfiedLinkError: Native method not found: swig_module_init:()

Hello,

I built successfully PJSIP thanks to you. Now I 'm testing with the sample application pjsua2 and I'm having this problem , you know what could be the solution?

FATAL EXCEPTION: main
java.lang.UnsatisfiedLinkError: Native method not found: io.cloudvoice.pjsiptest.pjsip.pjsua2.pjsua2JNI.swig_module_init:()V
at io.cloudvoice.pjsiptest.pjsip.pjsua2.pjsua2JNI.swig_module_init(Native Method)
at io.cloudvoice.pjsiptest.pjsip.pjsua2.pjsua2JNI.(pjsua2JNI.java:2402)
at io.cloudvoice.pjsiptest.pjsip.pjsua2.Endpoint.(Endpoint.java:68)
at io.cloudvoice.pjsiptest.pjsip.pjsua2.app.MyApp.(MyApp.java:293)
at io.cloudvoice.pjsiptest.pjsip.pjsua2.app.MainActivity.onCreate(MainActivity.java:93)
at android.app.Activity.performCreate(Activity.java:5133)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)

Execute ./prepare-build-system error

Reading package lists... Done
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/jammy/multiverse/binary-i386/Packages 404 Not Found [IP: 185.125.190.39 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/jammy-updates/multiverse/binary-i386/Packages 404 Not Found [IP: 185.125.190.39 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/jammy-backports/universe/binary-i386/Packages 404 Not Found [IP: 185.125.190.39 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/jammy-security/multiverse/binary-i386/Packages 404 Not Found [IP: 185.125.190.39 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

openssl library not found

Hello, I build it as your env, and it goes well if target api is 25,but it doesn't work if I change it to 19, the error is 'openssl library not found',can you tell me what to do if I want build with 19?

OpenSSL - Build .so files instead of .a

Heya!
Cool scripts for building OpenSSL, but there is some issue with build files. Can anyone help with parameters to build openssl .so files instead of .a. I know, that I can convert file .a to .so, but how safety is it?
Cheers!

Opus Codec

Can I use Opus Codecs in this configurations?
let me know ASAP when you around.

Build failed for android-mips64

Build failed for mips64 with error shown below which I believe was caused by the configue parameter ./Configure android-mips64 --openssldir=${OPENSSL_OUTPUT_PATH}

`HOST_OS=darwin
HOST_EXE=
HOST_ARCH=x86_64
HOST_TAG=darwin-x86_64
HOST_NUM_CPUS=4
BUILD_NUM_CPUS=8
Auto-config: --arch=mips64
Copying prebuilt binaries...
Copying sysroot headers and libraries...
Copying c++ runtime headers and libraries...
Copying files to: /tmp/openssl/android-toolchain-mips64el
Cleaning up...
Done.
Configuring for android-mips64
Usage: Configure [no- ...] [enable- ...] [experimental- ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]

pick os/compiler from:
BC-32 BS2000-OSD BSD-generic32 BSD-generic64 BSD-ia64 BSD-sparc64 BSD-sparcv8
BSD-x86 BSD-x86-elf BSD-x86_64 Cygwin Cygwin-x86_64 DJGPP MPE/iX-gcc OS2-EMX
OS390-Unix QNX6 QNX6-i386 ReliantUNIX SINIX SINIX-N UWIN VC-CE VC-WIN32
VC-WIN64A VC-WIN64I aix-cc aix-gcc aix3-cc aix64-cc aix64-gcc android
android-armv7 android-mips android-x86 aux3-gcc beos-x86-bone beos-x86-r5
bsdi-elf-gcc cc cray-j90 cray-t3e darwin-i386-cc darwin-ppc-cc darwin64-ppc-cc
darwin64-x86_64-cc dgux-R3-gcc dgux-R4-gcc dgux-R4-x86-gcc dist gcc hpux-cc
hpux-gcc hpux-ia64-cc hpux-ia64-gcc hpux-parisc-cc hpux-parisc-cc-o4
hpux-parisc-gcc hpux-parisc1_1-cc hpux-parisc1_1-gcc hpux-parisc2-cc
hpux-parisc2-gcc hpux64-ia64-cc hpux64-ia64-gcc hpux64-parisc2-cc
hpux64-parisc2-gcc hurd-x86 iphoneos-cross irix-cc irix-gcc irix-mips3-cc
irix-mips3-gcc irix64-mips4-cc irix64-mips4-gcc linux-aarch64
linux-alpha+bwx-ccc linux-alpha+bwx-gcc linux-alpha-ccc linux-alpha-gcc
linux-aout linux-armv4 linux-elf linux-generic32 linux-generic64
linux-ia32-icc linux-ia64 linux-ia64-icc linux-mips32 linux-mips64 linux-ppc
linux-ppc64 linux-ppc64le linux-sparcv8 linux-sparcv9 linux-x32 linux-x86_64
linux-x86_64-clang linux-x86_64-icc linux32-s390x linux64-mips64 linux64-s390x
linux64-sparcv9 mingw mingw64 ncr-scde netware-clib netware-clib-bsdsock
netware-clib-bsdsock-gcc netware-clib-gcc netware-libc netware-libc-bsdsock
netware-libc-bsdsock-gcc netware-libc-gcc newsos4-gcc nextstep nextstep3.3
osf1-alpha-cc osf1-alpha-gcc purify qnx4 rhapsody-ppc-cc sco5-cc sco5-gcc
solaris-sparcv7-cc solaris-sparcv7-gcc solaris-sparcv8-cc solaris-sparcv8-gcc
solaris-sparcv9-cc solaris-sparcv9-gcc solaris-x86-cc solaris-x86-gcc
solaris64-sparcv9-cc solaris64-sparcv9-gcc solaris64-x86_64-cc
solaris64-x86_64-gcc sunos-gcc tandem-c89 tru64-alpha-cc uClinux-dist
uClinux-dist64 ultrix-cc ultrix-gcc unixware-2.0 unixware-2.1 unixware-7
unixware-7-gcc vos-gcc vxworks-mips vxworks-ppc405 vxworks-ppc60x
vxworks-ppc750 vxworks-ppc750-debug vxworks-ppc860 vxworks-ppcgen
vxworks-simlinux debug debug-BSD-x86-elf debug-VC-WIN32 debug-VC-WIN64A
debug-VC-WIN64I debug-ben debug-ben-darwin64 debug-ben-debug
debug-ben-debug-64 debug-ben-debug-64-clang debug-ben-macos
debug-ben-macos-gcc46 debug-ben-no-opt debug-ben-openbsd
debug-ben-openbsd-debug debug-ben-strict debug-bodo debug-darwin-i386-cc
debug-darwin-ppc-cc debug-darwin64-x86_64-cc debug-geoff32 debug-geoff64
debug-levitte-linux-elf debug-levitte-linux-elf-extreme
debug-levitte-linux-noasm debug-levitte-linux-noasm-extreme debug-linux-elf
debug-linux-elf-noefence debug-linux-generic32 debug-linux-generic64
debug-linux-ia32-aes debug-linux-pentium debug-linux-ppro debug-linux-x86_64
debug-linux-x86_64-clang debug-rse debug-solaris-sparcv8-cc
debug-solaris-sparcv8-gcc debug-solaris-sparcv9-cc debug-solaris-sparcv9-gcc
debug-steve-opt debug-steve32 debug-steve64 debug-vos-gcc

NOTE: If in doubt, on Unix-ish systems use './config'.`

TLS support?

Hello,

I have built pjsip with "./build" and everything is ok... and implemented library into android...

But the problem is when I try to connect to my Kamailio Server using TLS...

java.lang.Exception: Title: pjsua_call_make_call(acc.getId(), &pj_dst_uri, param.p_opt, this, param.p_msg_data, &id)
Code: 171060
W/System.err: Description: Unsupported transport (PJSIP_EUNSUPTRANSPORT)

My question is... if I built PJSIP with "./build" will it build with OpenSSL/TLS/SSL enabled? Or I missed something? Where and What I might did wrong ?

Thanks in advance...

G.729 patch not working with PJSIP v2.9

When I try to use the G.729 patch with PJSIP v2.9 the build doesn't work. After looking through the code, I think the issue is that in install.sh (in the G.729 patch folder) has this code
if [ "$PJSIP_VERSION" == "2.8" ] then cp g729.patch $PJPROJECT_BASE_FOLDER else cp g729_old.patch $PJPROJECT_BASE_FOLDER/g729.patch fi

when it should be
[ "$PJSIP_VERSION" >= "2.8" ]

The code i wrote is psuedocode as I am not sure the exact syntax required to make this change

Missing contact header in sip registration after ip change while in call

There is a length mismatch in register contact header calculation when need_outbound is false (e.g.: while in call) because snprintf is null terminated and when required length == length passed to snprintf the written chars are length -1. This happens only when contact_params and reg_contact_params are empty but reg_contact_uri_params is not empty.

This fixes the bug while pjsip fixes it upstream, will eventually file an issue over the upstream repo

build error openssl-1.1.0e

build openssl-1.0.2k success,but build openssl-1.1.0e error

./openssl-build /home/user/android-ndk-r12b /home/user/and_libs/openssl-1.1.1.0e 14 armeabi-v7a 4.9 /home/user/and_libs/armeabi-v7a

Configuring for android-armv7
Warning! target android-armv7 doesn't exist!
Usage: Configure [no- ...] [enable- ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-egd] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]

NOTE: If in doubt, on Unix-ish systems use './config'.

Integrating libs into android project

Hi,
I've build successfully the libs with your script (thanks) but I'im having problem for integrating them into my android project (Android Studio 2).
FYI, I've copied libs into app/src/main/jniLibs/ .
I added android.useDeprecatedNdk=true in gradle.properties.

When I tried to load the library : System.loadLibrary("pjsua2"); I get the error :

E/dalvikvm: dlopen("/data/app-lib/com.akakpolabs.mypjsiptest-2/libpjsua2.so") failed: Cannot load library: soinfo_link_image(linker.cpp:1636): could not load library "libopenh264.so" needed by "libpjsua2.so"; caused by load_library(linker.cpp:746): library "libopenh264.so" not found

I need help

Can't Compile for "mips" "arm64-v8a" "x86_64" "mips64" archs.

I've followed below instructions but can't get these 4 arch files.

TARGET_ARCHS=("armeabi" "armeabi-v7a" "x86" "mips")
TARGET_ANDROID_API=21
SETUP_PACKAGES=0
DOWNLOAD_NDK=0
DOWNLOAD_SDK=0
DOWNLOAD_ANDROID_APIS=0
DOWNLOAD_PJSIP=1
DOWNLOAD_SWIG=0

after executing ./build , I get this error message cp: cannot stat '/home/android/../../../pjsip-android-builder-master/libyuv-android/libs/mips/libyuv.so': No such file or directory
Even when i executed ./prepare-build-system; command I saw in terminal that only 3 arch files only compiled in libyuv-android Directory.
can you please help me to generate all arch compiled files ASAP.
thanks

Pjsip version 2.9

Hi guys,
is it possible to build pjsip version 2.9 with your builder?
Thanks :)

libpjsua2.so: x86 has text relocations, is has been fix but i got new error when i build openssl with option -no-asm

Hi. i have error with pjisip-android-build on x86 when i build openssl with option -no-asm

Permission:
default

Error debug on Android Studio:

E/AudioRecord: Could not get audio input for session 89, record source 7, sample rate 8000, format 0x1, channel mask 0x10, flags 0 E/AudioRecord-JNI: Error creating AudioRecord instance: initialization check failed with status -22. E/android.media.AudioRecord: Error code -20 when initializing native AudioRecord object. D/PjSipLogWriter: 23:08:09.049 android_jni_de ...Failure in initializing audio record. D/PjSipLogWriter: 23:08:09.049 android_jni_de ...Trying the default audio source. E/AudioRecord: Could not get audio input for session 105, record source 0, sample rate 8000, format 0x1, channel mask 0x10, flags 0 E/AudioRecord-JNI: Error creating AudioRecord instance: initialization check failed with status -22. E/android.media.AudioRecord: Error code -20 when initializing native AudioRecord object. D/PjSipLogWriter: 23:08:09.058 android_jni_de ...Failure in initializing audio record. D/PjSipLogWriter: 23:08:09.058 android_jni_de ...Destroying Android JNI stream... A/art: art/runtime/java_vm_ext.cc:470] JNI DETECTED ERROR IN APPLICATION: expected reference of kind global reference but found local reference: 0x100009 A/art: art/runtime/java_vm_ext.cc:470] in call to DeleteGlobalRef A/art: art/runtime/java_vm_ext.cc:470] from void org.pjsip.pjsua2.pjsua2JNI.Call_makeCall(long, org.pjsip.pjsua2.Call, java.lang.String, long, org.pjsip.pjsua2.CallOpParam)

is very very big log:

`A/art: art/runtime/runtime.cc:427] native: #44 pc 0067c60e /system/lib/libart.so (MterpInvokeStatic+414)
A/art: art/runtime/runtime.cc:427] native: #45 pc 000fb6a1 /system/lib/libart.so (artMterpAsmInstructionStart+14497)
A/art: art/runtime/runtime.cc:427] native: #46 pc 002e5e98 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+488)
A/art: art/runtime/runtime.cc:427] native: #47 pc 002ed5f0 /system/lib/libart.so (_ZN3art11interpreter30EnterInterpreterFromEntryPointEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameE+176)
A/art: art/runtime/runtime.cc:427] native: #48 pc 0066cf79 /system/lib/libart.so (artQuickToInterpreterBridge+1049)
A/art: art/runtime/runtime.cc:427] native: #49 pc 0010f39d /system/lib/libart.so (art_quick_to_interpreter_bridge+77)
A/art: art/runtime/runtime.cc:427] native: #50 pc 00091c42 /system/framework/x86/boot-framework.oat (???)
A/art: art/runtime/runtime.cc:427] at org.pjsip.pjsua2.pjsua2JNI.Call_makeCall(Native method)
A/art: art/runtime/runtime.cc:427] at org.pjsip.pjsua2.Call.makeCall(Call.java:107)
A/art: art/runtime/runtime.cc:427] at com.carusto.ReactNativePjSip.PjSipService.handleCallMake(PjSipService.java:651)
A/art: art/runtime/runtime.cc:427] at com.carusto.ReactNativePjSip.PjSipService.handle(PjSipService.java:342)
A/art: art/runtime/runtime.cc:427] at com.carusto.ReactNativePjSip.PjSipService.access$200(PjSipService.java:56)
A/art: art/runtime/runtime.cc:427] at com.carusto.ReactNativePjSip.PjSipService$3.run(PjSipService.java:241)
A/art: art/runtime/runtime.cc:427] at android.os.Handler.handleCallback(Handler.java:751)
A/art: art/runtime/runtime.cc:427] at android.os.Handler.dispatchMessage(Handler.java:95)
A/art: art/runtime/runtime.cc:427] at android.os.Looper.loop(Looper.java:154)
A/art: art/runtime/runtime.cc:427] at android.os.HandlerThread.run(HandlerThread.java:61)
A/art: art/runtime/runtime.cc:427]
A/art: art/runtime/runtime.cc:427]

   --------- beginning of crash

A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 3569 (PjSipService)

    [ 01-27 23:08:09.252  1244: 1244 W/         ]
    debuggerd: handling request: pid=3541 uid=10076 gid=10076 tid=3569`

config_site.h:
#define PJ_CONFIG_ANDROID 1 #include <pj/config_site_sample.h>

can you tell me what is problem in AudioRecord?

Thank you!

Call getting disconnected immendiately after makeCall is successfull

On calling makeCall() on SipCall, the status shows "callStateCode: PJSIP_INV_STATE_CALLING" but after that within 2 secs, the callStateCode turns to PJSIP_INV_STATE_DISCONNECTED.
My account uri generated is so: sip:<_username>
I also tried to manually generate the uri as: sip<_username>@<server_domain>

What config am I missing? Why is the call getting disconnected immediately?

Add support for OpenH264

Enhance the compilation process by adding OpenH264 for every target arch.
Follow the instructions here: http://trac.pjsip.org/repos/ticket/1758 and then make sure to copy the generated .so files in the final build folder for every arch. Also check if the latest OpenH264 release works. Actually, version 1.4.0 is out, but the ticket on PJSIP trac suggests to use 1.0.0.

Package 'oracle-java8-installer' has no installation candidate

Ubuntu 18.

Got error:
Package 'oracle-java8-installer' has no installation candidate

(The problem with apt-get install oracle-java8-installer)

May be should use this:
can be installed with: sudo apt install default-jre OR sudo apt install openjdk-11-jre-headless OR sudo apt install openjdk-8-jre-headless

Here is stackoverflow answer:
https://askubuntu.com/questions/790671/oracle-java8-installer-no-installation-candidate

For ubuntu 16, 14 and etc...

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

For Debian

su -
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer
exit

After build it Can't detect openssl library,how to fix it?

of@aolphn:~/pjsip-builder$ ./build                                                                                                                          Clear final build folder ...
/home/of/pjsip-builder/output/pjsip-build-output
Creating config site file for Android ...
Compile PJSIP for arch armeabi-v7a ...
Checking sound device backend... OpenSL ES
Checking if OpenGL ES 2 is available... yes
checking for v4l2_open in -lv4l2... no
Using OpenH264 prefix... /home/of/pjsip-builder/output/openh264-build-output/libs/armeabi-v7a
checking OpenH264 usability... ok
Using SSL prefix... /home/of/pjsip-builder/output/openssl-build-output/libs/armeabi-v7a
checking for OpenSSL installations..
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
** OpenSSL libraries not found **
Checking if OpenCORE AMR support is disabled... yes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.