All Samples

PJSUA2 Samples

Sample

Library(s)

Description

pjsua2_demo.cpp

PJSUA2

Demonstrates basic usages of PJSUA2.

pygui

PJSUA2 (Python)

Python GUI application supporting audio calls, presence, and instant messaging.

confbot

PJSUA2 (Python)

Simple audio conference and chatroom server

Android sample

PJSUA2 (Android, Java)

TBD. (see getting started on Android)

Java sample

PJSUA2 (SWIG, Java)

TBD. This requires the Java SWIG module. After building the SWIG module, run make test from this directory to run the app.

PJSUA-LIB Samples

Sample

Library(s)

Description

simple_pjsua.c

PJSUA-LIB

This small app (~200 LoC) is a fully functional SIP user agent, supporting registration and audio call (P.S. you need to modify credentials in the source code to register). Use this sample to study the general pattern and flow of PJSUA-LIB.

pjsua

PJSUA-LIB

This is the reference implementation of PJSIP, demonstrating everything that PJSIP has to offer. We use this for any testing and for actual communications as well.

pjsystest

PJSUA-LIB

Perform series of tests to detect problems and measure the performance of the system, especially the audio subsystem, such as playback test, recording test, measuring audio device performance such as bursts, latency, and drifts, AEC performance, as well as displaying basic audio system information.

vidgui

PJSUA-LIB

GUI user agent supporting video. Requires Qt toolkit.

PJSIP Samples

Sample

Library(s)

Description

sipstateless.c

PJSIP (core)

This is the simplest SIP application if using the low level PJSIP (core) library. It demonstrate the core concept of PJSIP handling of SIP messages using PJSIP module.

This simple program responds any incoming requests (except ACK, of course!) with 501/Not Implemented. It supports UDP and TCP.

stateless_proxy.c, proxy.h

PJSIP (core)

Simple implementation of pure stateless proxy as spec-ed by RFC 3261.

stateful_proxy.c, proxy.h

PJSIP (core)

Simple implementation of stateful proxy as spec-ed by RFC 3261.

sipecho.c

PJSIP-UA

Accepts all incoming calls with SDP to make caller send media to itself. Useful for auto-responding test server. Supports UDP, TCP, IPv6.

invtester.c

PJSIP-UA

Utility to send INVITE or re-INVITE without SDP, for testing.

pjsip-perf.c

PJSIP-UA

SIP call generator/load testing/performance measurement, can be used as both server and client. Only performs signaling (SIP and SDP negotiation) and does not do RTP.

simpleua.c, util.h

PJSIP-UA, PJMEDIA (Codec, AudioDev, VideoDev)

Full implementation of a SIP user agent, supporting SIP, SDP, RTP, audio, and video, with actual sound device and camera, using the low level PJSIP and PJMEDIA libraries.

siprtp.c

PJSIP-UA, PJMEDIA

A specialized program to measure audio quality under load by using RTCP feedback. Can be used to generate/handle load testing with many calls.

This program establishes SIP INVITE session and media, and calculate the media quality (packet lost, jitter, rtt, etc.). Unlike normal pjmedia applications, this program bypasses all pjmedia stream framework and transmit encoded RTP packets manually using own thread.

PJMEDIA Samples

Below are PJMEDIA samples. Open the source file for more information.

Sample

Library(s)

Description

aectest.c

PJMEDIA

Tests the effectiveness of the AEC in PJMEDIA by feeding it with playback and (simulated) captured WAV files from the microphone, and outputs the results of AEC processing as another WAV file.

auddemo.c

PJMEDIA-(core, audiodev)

Interactively demonstrates operations to the sound devices, such as listing, refreshing, recording, playback, getting/setting latencies, and performing timing tests.

aviplay.c

PJMEDIA-(core, codec, audiodev, videodev)

AVI media player.

confbench.c

PJMEDIA

Internal utility to benchmark the conference bridge

confsample.c

PJMEDIA

Interactive demo of the conference bridge, allowing mixing, audio level setting, and audio level meter.

encdec.c

PJMEDIA-(core, codec)

Encoding and decoding WAV file to demonstrate how to use the codec framework.

PJNATH Samples

Below are PJNATH samples. Open the source file for more information.

Sample

Library(s)

Description

icedemo.c

PJNATH

Interactive demo of ICE without (SIP) signaling, by creating two instances of this program, and copy/pasting the candidates to the other instance for the “signaling”.


Tip

Press h for instructions.