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

RELATED ARTICLES

Top Questions and Answers about CRM

Growing businesses are looking for a better way to manage customer relations. Understanding that the idea to store their information in note cards or Google documents is a bit old-fashioned, they are wondering, what is CRM, how it works and how it can help their businesses. These questions are hardly...
READ ARTICLE
Database Migration Best Practice

How to migrate high-load tables with zero downtime using background jobs and SQL views

Sometimes database migration may become a pain. The tables are large, the load is high, HDD space is expensive and the downtime should be as short as possible. Elinext team has recently investigated the issue within one of our Ruby on Rails projects and managed to offer a flexible data…

READ ARTICLE

Best practices of Big Data implementation

Part 1. How we struggled with big data implementation. The  whole story about big data implementation started with an ongoing project. Our team was working on a project for monitoring a range of devices: switches, routers, computers and more. The main goal of this system was to provide businesses with...
READ ARTICLE

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 a competitive space, but Elinext Group is well positioned to address the competition. We’ve been in business since 1997—a lifetime in this fast-paced Internet environment. Our years of experience in…

READ ARTICLE
WHO WE ARE

ABOUT ELINEXT

Elinext is a custom software development and consulting company focusing on web, mobile, desktop and embedded software development, QA and testing. Since 1997, we have been bringing digital transformation to mid-sized and large enterprises in Banking and Finance, Insurance, Telecommunications, Healthcare and Retail. Our key domains include enterprise software, e-commerce, BI and Big Data, e-learning and IoT.