pjsippjsua2

PJSIP Build Problem in CentOS 7 using GCC and make


I am trying to install PJSIP from source in CentOS 7 System.

I ran following commands:

cd /usr/local/src
wget https://github.com/pjsip/pjproject/archive/refs/tags/2.13.tar.gz
tar zxvf 2.13.tar.gz 
cd pjproject-2.13/
./configure
make dep
make
make install

When I run following in terminal:

which pjsua

It should show me the path of the binary, but I get following instead:

/usr/bin/which: no pjsua in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/bin)

Also to note that the installation steps don't show any errors. Following is the output of make install command:

mkdir -p /usr/lib/
if [ "x" = "x" ] ; then \
    cp -af /usr/local/src/pjproject-2.13/pjsip/lib/libpjsua2-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjsip/lib/libpjsua-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjsip/lib/libpjsip-ua-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjsip/lib/libpjsip-simple-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjsip/lib/libpjsip-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia-codec-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia-videodev-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia-audiodev-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjnath/lib/libpjnath-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjlib-util/lib/libpjlib-util-x86_64-unknown-linux-gnu.a  /usr/local/src/pjproject-2.13/third_party/lib/libsrtp-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/third_party/lib/libsrtp.so.2 /usr/local/src/pjproject-2.13/third_party/lib/libsrtp.so /usr/local/src/pjproject-2.13/third_party/lib/libresample-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/third_party/lib/libresample.so.2 /usr/local/src/pjproject-2.13/third_party/lib/libresample.so /usr/local/src/pjproject-2.13/third_party/lib/libgsmcodec-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/third_party/lib/libgsmcodec.so.2 /usr/local/src/pjproject-2.13/third_party/lib/libgsmcodec.so /usr/local/src/pjproject-2.13/third_party/lib/libspeex-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/third_party/lib/libspeex.so.2 /usr/local/src/pjproject-2.13/third_party/lib/libspeex.so /usr/local/src/pjproject-2.13/third_party/lib/libilbccodec-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/third_party/lib/libilbccodec.so.2 /usr/local/src/pjproject-2.13/third_party/lib/libilbccodec.so /usr/local/src/pjproject-2.13/third_party/lib/libg7221codec-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/third_party/lib/libg7221codec.so.2 /usr/local/src/pjproject-2.13/third_party/lib/libg7221codec.so /usr/local/src/pjproject-2.13/third_party/lib/libwebrtc-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/third_party/lib/libwebrtc.so.2 /usr/local/src/pjproject-2.13/third_party/lib/libwebrtc.so /usr/local/src/pjproject-2.13/pjlib/lib/libpj-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjsip/lib/libpjsua2.so.2 /usr/local/src/pjproject-2.13/pjsip/lib/libpjsua2.so /usr/local/src/pjproject-2.13/pjsip/lib/libpjsua.so.2 /usr/local/src/pjproject-2.13/pjsip/lib/libpjsua.so /usr/local/src/pjproject-2.13/pjsip/lib/libpjsip-ua.so.2 /usr/local/src/pjproject-2.13/pjsip/lib/libpjsip-ua.so /usr/local/src/pjproject-2.13/pjsip/lib/libpjsip-simple.so.2 /usr/local/src/pjproject-2.13/pjsip/lib/libpjsip-simple.so /usr/local/src/pjproject-2.13/pjsip/lib/libpjsip.so.2 /usr/local/src/pjproject-2.13/pjsip/lib/libpjsip.so /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia-codec.so.2 /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia-codec.so /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia-videodev.so.2 /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia-videodev.so /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia.so.2 /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia.so /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia-audiodev.so.2 /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia-audiodev.so /usr/local/src/pjproject-2.13/pjnath/lib/libpjnath.so.2 /usr/local/src/pjproject-2.13/pjnath/lib/libpjnath.so /usr/local/src/pjproject-2.13/pjlib-util/lib/libpjlib-util.so.2 /usr/local/src/pjproject-2.13/pjlib-util/lib/libpjlib-util.so /usr/local/src/pjproject-2.13/pjlib/lib/libpj.so.2 /usr/local/src/pjproject-2.13/pjlib/lib/libpj.so /usr/lib/; \
else \
    cp -af /usr/local/src/pjproject-2.13/pjsip/lib/libpjsua-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjsip/lib/libpjsip-ua-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjsip/lib/libpjsip-simple-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjsip/lib/libpjsip-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia-codec-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia-videodev-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia-audiodev-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjnath/lib/libpjnath-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjlib-util/lib/libpjlib-util-x86_64-unknown-linux-gnu.a  /usr/local/src/pjproject-2.13/third_party/lib/libsrtp-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/third_party/lib/libsrtp.so.2 /usr/local/src/pjproject-2.13/third_party/lib/libsrtp.so /usr/local/src/pjproject-2.13/third_party/lib/libresample-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/third_party/lib/libresample.so.2 /usr/local/src/pjproject-2.13/third_party/lib/libresample.so /usr/local/src/pjproject-2.13/third_party/lib/libgsmcodec-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/third_party/lib/libgsmcodec.so.2 /usr/local/src/pjproject-2.13/third_party/lib/libgsmcodec.so /usr/local/src/pjproject-2.13/third_party/lib/libspeex-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/third_party/lib/libspeex.so.2 /usr/local/src/pjproject-2.13/third_party/lib/libspeex.so /usr/local/src/pjproject-2.13/third_party/lib/libilbccodec-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/third_party/lib/libilbccodec.so.2 /usr/local/src/pjproject-2.13/third_party/lib/libilbccodec.so /usr/local/src/pjproject-2.13/third_party/lib/libg7221codec-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/third_party/lib/libg7221codec.so.2 /usr/local/src/pjproject-2.13/third_party/lib/libg7221codec.so /usr/local/src/pjproject-2.13/third_party/lib/libwebrtc-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/third_party/lib/libwebrtc.so.2 /usr/local/src/pjproject-2.13/third_party/lib/libwebrtc.so /usr/local/src/pjproject-2.13/pjlib/lib/libpj-x86_64-unknown-linux-gnu.a /usr/local/src/pjproject-2.13/pjsip/lib/libpjsua.so.2 /usr/local/src/pjproject-2.13/pjsip/lib/libpjsua.so /usr/local/src/pjproject-2.13/pjsip/lib/libpjsip-ua.so.2 /usr/local/src/pjproject-2.13/pjsip/lib/libpjsip-ua.so /usr/local/src/pjproject-2.13/pjsip/lib/libpjsip-simple.so.2 /usr/local/src/pjproject-2.13/pjsip/lib/libpjsip-simple.so /usr/local/src/pjproject-2.13/pjsip/lib/libpjsip.so.2 /usr/local/src/pjproject-2.13/pjsip/lib/libpjsip.so /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia-codec.so.2 /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia-codec.so /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia-videodev.so.2 /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia-videodev.so /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia.so.2 /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia.so /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia-audiodev.so.2 /usr/local/src/pjproject-2.13/pjmedia/lib/libpjmedia-audiodev.so /usr/local/src/pjproject-2.13/pjnath/lib/libpjnath.so.2 /usr/local/src/pjproject-2.13/pjnath/lib/libpjnath.so /usr/local/src/pjproject-2.13/pjlib-util/lib/libpjlib-util.so.2 /usr/local/src/pjproject-2.13/pjlib-util/lib/libpjlib-util.so /usr/local/src/pjproject-2.13/pjlib/lib/libpj.so.2 /usr/local/src/pjproject-2.13/pjlib/lib/libpj.so /usr/lib/; \
fi
mkdir -p /usr/include/
for d in pjlib pjlib-util pjnath pjmedia pjsip; do \
    cp -RLf $d/include/* /usr/include/; \
done
mkdir -p /usr/lib/pkgconfig
sed -e "s!@PREFIX@!/usr!" libpjproject.pc.in | \
    sed -e "s!@INCLUDEDIR@!/usr/include!" | \
    sed -e "s!@LIBDIR@!/usr/lib!" | \
    sed -e "s/@PJ_VERSION@/2.13/" | \
    sed -e "s!@PJ_INSTALL_LDFLAGS@!-L/usr/lib -lpjsua2 -lstdc++ -lpjsua -lpjsip-ua -lpjsip-simple -lpjsip -lpjmedia-codec -lpjmedia -lpjmedia-videodev -lpjmedia-audiodev -lpjmedia -lpjnath -lpjlib-util -lpj!" | \
    sed -e "s!@PJ_INSTALL_LDFLAGS_PRIVATE@! -lsrtp -lresample -lgsmcodec -lspeex -lilbccodec -lg7221codec -lwebrtc  -lopus -lssl -lcrypto -luuid -lm -lrt -lpthread !" | \
    sed -e "s!@PJ_INSTALL_CFLAGS@!-I/usr/include -DPJ_AUTOCONF=1  -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1!" > /usr/lib/pkgconfig/libpjproject.pc


Solution

  • I found a solution that uses a container Image from Dockerhub:

    docker pull andrius/pjsua
    

    Dockerhub: andrius/pjsua container image

    The pre-requisite is that it needs Docker in the host machine.