Using PJSIP Library in Server and Client Applications

2012-12-27 by Marina Astapchik

Introduction

During the investigation process our team decided to choose .NET C# as the main development platform. The next step was to choose the way to implement the SIP protocol. Of course, there were several variants (with different financial and time efforts). Among them we could distinguish three main categories:

1. Full custom implementation of SIP
2. Commercial SIP library
3. GNU open source

Each of these ways has positive and negative sides. Let's discuss them in detail.

1. Custom implementation allows us to avoid any licensing problems and sell shareware products without any code sharing. But at the same time, it can make the development process difficult, increase costs, and ultimately we can get less stable and less functional results if compared to other variants.
2. A commercial library will require direct money payment for the working SIP communication solution, support and using samples from the library vendor. So, this option is fast, stable and also allows us to avoid problems with commercial usage. The only issue could be the price of such a solution. The price could vary from $200 (1 developer license for Independentsoft SIP.Net) to $349.000 (for ultimate Ozeki SDK license). So, it's important to calculate if the price of the library will be less than the cost of development from scratch.
3. An open source library has a lot of benefits like community support, good documentation, source code availability. All these features do not require any money, in case your project is also open source. Otherwise, you should read the library license attentively. Usually open source (GNU) projects are distributed under the GPL license. There are several GPL revisions, different in the source code publishing requirements and project linking. But most of them require your project also to be GNU. In some cases, however, there are extensions, and you can even buy a commercial license for the open source library.

We made a deep and detailed investigation, compared different possibilities (there is a separate blog article with a detailed description of the comparison) and decided to start using the open source PJSIP (www.PJSIP.org) library for a pilot project and buy a commercial licensee in case of shareware. (Full commercial and royalty-free license of PJSIP is available from Teluu company (https://www.teluu.com) for 7500 GBP/year.

The PJSIP library has a lot of advantages:

  • Portability. Written in native C++, it offers good portability for different mobile and desktop platforms and operating systems. For example, there are wrappers for Windows/*nix (Java, .NET, Python), Android, iOS, WM7, etc.
  • Good documentation. There are fully described API references, articles describing all best practices and multiplatform samples.
  • Wide knowledge base. Due to wide usage in different projects, there is a lot of discussion on different professional expertise-sharing resources.
  • Powerful functionality. PJSIP contains full implementation of SIP according to the RFC specification, as well as additional features. It supports audio and video communication, message chats, conference calls, and different audio and video codecs.
  • Maturity. The first build of PJSIP was compiled in February 2005, and the development is still being continued by a huge community of domain professionals.

PJSIP Architecture

A PJSIP project consists of several separate libraries which are responsible for different features. Basic PJSIP architecture for the client application can be seen on the figure below.


Fig. 1: PJSIP architecture

Conclusion

PJSIP libraries is an ideal solution for the development of SIP client applications and don't bother about the SIP Background implementation. It doesn't contain full SIP server realization, but Server Application could be also built based on the PJSIP library API and all low layer possibilities it references. Such a way of development will avoid implementation of basic SIP features, and will require only creation of server specific functionality. That will save a lot of time and money. As a result, it will give an opportunity to develop a fully functioning, stable and secure application that will support the majority of usable platforms with relatively low efforts.

Industries and Technology Areas:

Industries: telecommunications

Technology Areas: SIP/VOIP telephony, PJSIP, software development, Windows, Java, .NET, Python, Android, iOS, WM7

TAGS

RELATED ARTICLES

Elinext-Group-Included-in-Two-Key-2016-Belarus-Service-Providers-Lists

Elinext Group Included in Two Key 2016 Belarus Service Providers Lists

Information technology is a big deal these days and it seems like new vendors and agencies are emerging daily. It’s...
READ ARTICLE

Unique development bridge helps Elinext Group Create Healthcare Analytics Platform for a US Company

The healthcare industry, like many other businesses, is facing rapidly increasing volumes of data. At Elinext Group, we believe leading...
READ ARTICLE

Elinext iPad App for Life Insurance Automates Examination Process

The life insurance process (along with applying for a policy, getting a quote and coverage) requires underwriting, which means getting...
READ ARTICLE

Software development company and digital agency alliance

Elinext takes pride in its successful cooperation with Bitsens and is eager to conquer new heights and expand new horizons...
READ ARTICLE

CASE STUDIES