PJSIP is an Open Source SIP prototol stack, designed to be very small in footprint, have high performance, and very flexible.
PJSIP has been actively developed since 2003, but its history goes well beyond that. The author has been developing SIP stack since 1999 during RFC 2543 era, and after several experimentation with different approaches in the programming (the first stack actually was in C++!), and also with the evolution of the SIP protocol itself, the current/third generation of PJSIP (the 0.2.9 version is the second generation) can be considered as pretty stable in term of design, and should incorporate all design considerations (and implementation tricks!) that have been learned over the years. Of course only time will tell if this statement can still be held true in the future.
PJSIP consists of multiple levels of APIs, which each of them layered on top of another. Because of this, new readers may find it a bit difficult to find the place to start.
In general, I think perhaps I can recommend two approaches on using PJSIP.
Using PJSUA API
PJSUA API - High Level Softphone API wraps together all SIP components and media into a high level API, suitable for creating typical SIP user agent applications. It features easy to use API for:
- multiple client registration (accounts),
- high level SIP and media session (calls),
- buddy list, presence and instant messaging,
- powerful and very easy to use media manipulation,
while maintaining some space for customization (custom SIP transport, custom SIP media, etc.) needed by some types of applications. PJSUA API - High Level Softphone API is also aimed to be able to run on devices such as PDA or mobile phones, by carefully allowing application to set the appropriate threading strategy and memory limits (number of calls, media ports, etc.).
However, PJSUA API - High Level Softphone API may not be the most suitable API for some types of applications, since it is directed towards an easy to use API. For more more advanced use, you may better implement the application by using PJSIP + PJMEDIA directly, as described below.
Using PJSIP and PJMEDIA Directly
For the ultimate flexibility and power, using PJSIP and PJMEDIA directly is the way to go. The drawback will be, of course, steeper learning curve.
However, the following links may provide some useful information:
About This Document
This document contains the reference information about PJSIP. For more in-depth guide (and information in general), readers are encouraged to read the PJSIP Developer's Guide PDF document which can be downloaded from http://www.pjsip.org/docs.htm.
How to Read This Document
For main navigation, please go to Modules link on top of this page.
This document was generated with Doxygen from PJSIP header files.
Click on Modules link on top of this page to get the detailed table of contents.
The following are top level sections in the Modules, as laid out in the following diagram:
Static Library Layout
Enumerating the static libraries from the bottom:
- PJLIB, is the platform abstraction and framework library, on which all other libraries depend,
- PJLIB-UTIL, provides auxiliary functions such as text scanning, XML, and STUN,
- PJMEDIA is the multimedia framework,
- PJMEDIA-CODEC is the placeholder for media codecs,
- Core SIP Library (PJSIP-CORE) is the very core of the PJSIP library, and contains the SIP Endpoint, which is the owner/manager for all SIP objects in the application, messaging elements, parsing, transport management, module management, and stateless operations, and also contains:
- The Transaction Layer module inside PJSIP-CORE provides stateful operation, and is the base for higher layer features such as dialogs,
- Event and Presence Framework (PJSIP-SIMPLE) provides the base SIP event framework (which uses the common/base dialog framework) and implements presence on top of it, and is also used by call transfer functions,
- User Agent Library (PJSIP-UA) is the high level abstraction of INVITE sessions (using the common/base dialog framework). This library also provides SIP client registration and call transfer functionality,