Using PJSIP Library in Server and Client Applications

Marina Astapchik
IT Trends Research Specialist
December 27, 2012

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

LATEST ARTICLES

iot and life insurance

How IoT Is Changing Health Insurance

By 2020 there could be 20 billion connected devices in the world, reports GrowthEnabler as referred to Gartner/World Bank. The figures are impressive, no wonder that many industries, including insurance, anticipate the wave of sensor-powered digital transformation. How does insurance benefit from IoT? In a word, it leads to personalized...
READ ARTICLE

AI in Healthcare: High Hopes, Reality and Future

There’s a lot of buzz around artificial intelligence these days. It’s been a matter of casual conversations in Silicon Valley for the past few years, and now the technology is being discussed in higher circles as Washington sees opportunities for AI to improve efficiency and increase economic growth. As for...
READ ARTICLE
telemedicine

Decentralization Of Care With Telemedicine: Trends And Considerations

A lot of myths and prejudice surrounds the concept of telemedicine. People refer to it as the dehumanization of care, “uberization” of health or simply discounted consultation in front of a display of a computer. In fact, telemedicine is a new way of bringing patients and caregivers together in a...
READ ARTICLE