The PJPROJECT is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. It combines signaling protocol (SIP) with rich multimedia framework and NAT traversal functionality into high level API that is portable and suitable for almost any type of systems ranging from desktops, embedded systems, to mobile handsets.
- Rust bindings for pjsua
- Pip-installable pjsua2 python module
- Installing pjsip on Debian
- Pjsua usage examples in
c
andrust
- Pjsua2 usage examples in
c++
andpython3
- A ready to use docker image with pjsua and pjsua2 installed
- A ready to use docker image with a dev
kamailio
sip server
- For the Installation of pjsip on Debian, you need to install
gcc
,g++
andmake
sudo apt install -y gcc g++ make
- For generating the rust bindings for pjsau, you need to install
rust
,clang
andpkg-config
sudo apt install -y curl clang pkg-config
sudo curl https://sh.rustup.rs -sSf | sh -s -- -y
- For building the pjsua2 python module, you need to install
python3
,python3-dev
andswig
sudo apt install -y swig python3 python3-dev
- Navigate to pjproject directory
cd pjproject
- Configure the build
./configure --enable-shared
- Build the project
make dep
make
- Install the project
sudo make install
- Navigate to pjsua2 swig python directory
cd pjproject/pjsip-apps/src/swig/python
- Build the module
make
- Install the module
sudo make install
sudo pip3 install git+https://github.com/JadKHaddad/THE-PJPROJECT.git --verbose
- C
cd c
make
./out
make clean
- C++
cd cpp
make
./out
make clean
- Rust
cd rust
cd demo
cargo run
cargo clean
- Python3
cd python3
python3 main.py
- Set the environment variable
LD_LIBRARY_PATH
to the directory where the libraries are located
export LD_LIBRARY_PATH=/usr/local/lib
- Run the following command to collect your libraries and headers
chmod u+x ./copy-lib-include.sh
./copy-lib-include.sh
- Now you can set the environment variable
LD_LIBRARY_PATH
to the directory where the libraries are located
- Create a docker network
docker network create net
- Build and run the kamailio docker image
docker build -t kamailio5.5.0-trusty -f dockerfiles/Dockerfile.kamailio .
docker run -it --rm --name kamailio5.5.0-trusty --network net -p 5060:5060/udp kamailio5.5.0-trusty
- Build and run the debian docker image
docker build -t pjsip -f dockerfiles/Dockerfile.debian .
docker run -it --rm --name pjsip --network net --add-host=host.docker.internal:host-gateway pjsip
- Inside the pjsip container, run the examples using
kamailio5.5.0-trusty:5060
as a sip domain
- pjproject downloaded from the official release page in version
2.13
on2022-12-06
PJSUA_MAX_CALLS
,PJSUA_MAX_ACC
,PJSUA_MAX_PLAYERS
andPJSUA_MAX_RECORDERS
are set inpjproject/pjsip/include/pjsua-lib/pjsua.h
to32
. You can change them to any value less than 32 to save memory.PJ_IOQUEUE_MAX_HANDLES
is set inpjproject/pjlib/include/pj/config.h
to128
.RTP_RETRY
is set inpjproject/pjsip/src/pjsua-lib/pjsua_media.c
to10000
to try bind to5000
ports when establishing calls.- You have to recompile the project after changing any value.