SIP Stack Research

news/2025/2/25 7:45:37

Items to research

  • Licensing
  • Is the license compatible with core Asterisk SCF?
  • Does the license require us to do things we may not want to do?
  • Community
  • Is the community active?
  • Are they continually adding new functionality and fixing bugs?
  • Can we get help from the community easily if need be?
  • Ease of use
  • Can we easily interface with the API?
  • Is it easy to add new things?
  • If we distribute it, is it easy to work into our build system?
  • Feature richness
  • Does it have the features our customers will want?
  • Are new features being developed based on new RFCs?
  • Do they include an SDP parser and generator?
  • Do they implement the SDP offer/answer negotiation for us?
  • Transport: UDP, TCP, TLS, IPv6
  • Platform support
  • Are the platforms supported that we need to be supported?
  • If not, is it easy to support them?
  • Scaling
  • Does the stack scale to the amount we want?
  • Has any performance testing been done on it?
  • Interoperability
  • Are they widely used by many companies?
  • Are there many reports of interop issues?

SIP stacks under consideration

Resiprocate

URL: http://www.resiprocate.org/
License: ~jcolp:The Vovida Software License, Version 1.0
Language: C++

Resiprocate is used in many commercial products, such as X-Lite/Eyebeam/Bria/Whatever it may be called these days from our friends at Counterpath. Interoperability with other SIP stacks is quite good. The community is fairly active and new development continues. The stack is fairly full featured supporting a wide range of current RFCs for the things that companies actually care about. Using the higher level DUM API it appears to be relatively simple to create a user agent using resiprocate. Based on my research the stack can handle well over 1000 transactions per second, but this was against an older version so it may have been improved even more in later ones. The area that seems to be a potential problem is that the transport layer for TCP and TLS isn't implemented as best as it could be causing performance in that area to be less. How much less I can't be sure without proper testing between UDP and TCP/TLS. The stack is supported on all of the operating systems we wish to target and should also work on the ones we aren't directly targeting (such as FreeBSD). An implementation for an SDP parser and generator is provided. A build system using GNU Makefiles is provided, along with Visual Studio project files.

Sofia-sip

URL: http://sofia-sip.sourceforge.net/
License: LGPL
Language: C

Sofia-sip was originally created by Nokia and continues to be primarily developed by them. Community members also submit patches for inclusion. Interoperability seems to be quite good. The community is as active as resiprocate based on reading the mailing list. A single API, nua, is provided for writing user agents. It requires more knowledge of SIP then the resiprocate DUM API and could present a larger barrier of entry for community developers. The stack contains a substantial number of features, but not as substantial as resiprocate. A document is provided which details how to write a basic user agent and the general architecture of how things work. The information I have found for scaling puts sofia SIP on par with resiprocate, with potentially less transactions per second. The stack is supported on most current operating systems. An implementation for an SDP parser and generator is provided. A build system using autotools is provided, along with a Visual Studio project file.

PJSIP

URL: http://pjsip.org/
License: Dual (GPL and "alternate") Details at http://www.pjsip.org/licensing.htm/
Lnaguage: C

PJSIP is maintained by Teluu. The community and development are active. The latest PJSIP release was in May of this year. PJSIP provides several separate APIs. Amongst these are PJSIP (handles SIP signaling, transactions, transport, SDP negotiation, and event subscription), PJMEDIA (support for a variety of codecs, CNG, VAD, PLC, manipulation, etc.) and PJNATH (NAT traversal helper with STUN/TURN/ICE support). We can use any or all of these. The APIs are very well documented, both in the source and as separate guides. As far as scaling goes, see this link. According to their graphs, they were able to handle as high as 2500 cps on an FC5 box, though numbers on other platforms topped out at an average of 2000 cps. Keep in mind that these tests were performed four years ago, so newer versions of PJSIP may perform better or worse than the version used for these benchmarking tests. As far as features go, PJSIP is very feature rich, implementing all major features I would expect from a SIP stack. PJSIP runs on Linux, Windows, all *BSD variants, RTEMS, Android, and iPhone and iPad. Makefiles are provided, along with Visual Studio project files.


PJSIP vs. reSIProcate

Based on discussion, the decision seems to be between PJSIP and reSIProcate for our SIP stack. Neither stack is perfect, but here are some pros and cons of the two:
PJSIP

  • + PJMEDIA framework for handling media outclasses reSIProcate's tools and is easier to use.
  • + STUN/TURN/ICE support for NAT traversal.
  • + More feature-rich
  • + More active community
  • + Better performance/scalability
  • + We have several contacts with PJSIP experience (Simon Perreault, Adrian Georgescu, Klaus Darillion, Saul Ibarra)
  • - Written in C
  • - Reports of race conditions and deadlocks (See Malcolm's comment with links to mailing list posts), though these problems may have been resolved since the time that the problems were experienced.
  • - More open issue reports than reSIProcate. However, there were no open issues for deadlocks, race conditions, or thread safety issues

reSIProcate

  • + Written in C++
  • + IANAL, but the license seems to be a better fit.
  • + Likely easier to learn than PJSIP (though not by a whole lot)
  • + Used in larger projects by larger companies (e.g. CounterPath's softphones)
  • - reTurn tool has STUN/TURN support but no ICE. Also, reTurn uses a different license from reSIProcate (3-clause BSD license)

 


http://www.niftyadmin.cn/n/2219416.html

相关文章

为陈天桥私有化盛大叫好

盛大网络(NASDAQ:SNDA)于11月22日晚间宣布,公司已经与Premium Lead Company Limited和New Era Investment Holding Ltd达成股权收购协议,私有化交易得到进一步落实。Premium Lead 是盛大网络董事长、CEO和总裁陈天桥、其妻子雒芊芊…

Java中的编码问题

一、各种编码所占的字节空间: gbk编码: 中文占 2 个字节,英文占 1 个字节; Java中项目的默认编码方式; utf-8编码: 中文占 3个字节,英文占 1 个字节; utf-16be编码&a…

Java中文件的遍历

一、File类的简单用法以及注意事项: 1.File类只用于表示文件的信息,大小,不能用于文件的访问; 2.注意区分文件和目录;文件一般带有明显是后缀,如.txt文件,.doc文件等;二目录一般是…

HTML5 Canvas与localStorage简单应用

Canvas 是HTML5的一大2d图形处理利器,localStorage是本地存储,它有一个很有意思的API,类似于观察者模型的事件storage事件,一者本地存储发生改变,它会响应注册了storage事件的所有窗口。 这样当我们在其中一个窗口的Canvas中画东西…

c与python哪个简单_Python与C的简单比较(Python3.0)

Python可以说是目前最火的语言之一了,人工智能的兴起让Python一夜之间变得家喻户晓,Python号称目前最最简单易学的语言,现在有不少高校开始将Python作为大一新生的入门语言。本萌新也刚开始接触Python,发现Python与其他语言确实有…

Java中自定义异常的使用

Java中的自定义异常的使用步骤&#xff1a; 1.定义异常&#xff0c;并继承Exception&#xff0c;分别构造无参函数和有参构造函数&#xff0c;并在构造函数中分别调用父类的无参构造函数和有参构造函数 <span style"font-size:18px;">package com.bluesky;pub…

服务器管理Linux经典命令

1.站点根目录下查找是否被放置webshell***根据语句判断是不是PHP***脚本 # find /storage/www/ -name "*.php" | xargs grep -in --color "eval(" # grep -i --include*.php -r system\s*\( /storage/www/ 2.统计访问日志中来自同ip出现的次数分析盗链、**…

Java中应用Collections工具类的Sort()方法对List进行排序

一、Sort排序方法的使用&#xff1a; 1.对Integer类型进行排序 (该类型已经实现Comparable接口) 2.对String类类型进行排序 (该类型已经实现Comparable接口) 3.对其他类型进行排序 (需要自己实现Comparable接口) 二、Comparable接口和Comparator接口的比较&am…