Using PJSIP Library in Server and Client Applications
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:
2. Commercial SIP library
3. GNU open source
Each of these ways has positive and negative sides. Let's discuss them in detail.
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.
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
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:
Technology Areas: SIP/VOIP telephony, PJSIP, software development, Windows, Java, .NET, Python, Android, iOS, WM7
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.