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
How to start software development project

The Ultimate Guide to Hiring Developers for Your Project

Sometimes choosing a developer is as simple as asking a fellow business whom they use in their projects. However, other times you have to go through selection routines. Your main objective must be to create your own list of suitable developers, which conforms with your needs, and then reduce this...
READ ARTICLE

QR Code Solution for Mobile Devices

Business Needs High level of competition in business creates needs to provide as much services as possible for less money. Companies try to inform clients as much as possible about the opportunities and competitive advantages. Large spaces of printed surfaces are used to show the content marketing information. The tendency…

READ ARTICLE
Node.js: pros and cons

Bringing Node.js into your project: pros and cons

Introduction “Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.” This is what official Node.js website tells us, and this...
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.