sip server比较

1.OpenSER->OpenSIPS
2.Asterisk 用于100用户以下的中小企业和家庭用户->FreeSWITCH
不推荐asterisk的sip协议栈,理由如下:
(1)和asterisk的其它模块耦合太紧,不太容易分离,更难扩展
(2)代码写得太过艰涩,尤其是关于互斥锁的使用,没有一定的功底最好别碰。
3.OpenSER->Kamailio
总结:Kamailio功能高于OpenSIPS,opensips的路由功能完全通过脚本来实现,opensips自带的脚本文件功能太少,需要参考kamailio中的kamailio.cfg脚本文件,同时OpenSIPS性能上是目前最快的SIP服务器之一,可用于电信级产品构建。
4.Cipango用java写的。不好维护。
5.Mobicents Platform (JSLEE[2] 1.0 compliant and Sip Servlets 1.1 compliant application server)
6.Mysipswitch用C#开发,数据库是 PostgreSQL
7.SailFin用java写的。不好维护。
8.SIP Express Router更新太慢。稳定版本是2007.3.12号的。
9.sipX主要应用于数百用户至一万用户的大中型企业,呼叫控制协议只支持SIP协议;分布式模块架构。
10.YXA版本更新于2007.3前。更新慢。
通过以上开发语言及性能上比较。Kamailio,freeSwitch,sipX再进行功能上比较。
sipX集成了freeSwitch的媒体部分。
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Python中有一些库可以用来开发SIP服务器,例如pjsipsipsimple、sippy、python-sipsimple等。这些库提供了丰富的功能和API,可以帮助开发人员快速构建高性能的SIP服务器。 以下是一个使用sipsimple库实现简单SIP服务器的示例代码: ```python from sipsimple.core import SIPCoreError, SIPURI, ToHeader from sipsimple.application import SIPApplication, SIPApplicationError from sipsimple.account import AccountManager, Account from sipsimple.streams import AudioStream from sipsimple.lookup import DNSLookup, SRVLookup from sipsimple.configuration.settings import SIPSimpleSettings from sipsimple.threading import run_in_thread class MySIPServer(SIPApplication): def __init__(self): SIPApplication.__init__(self) self.account_manager = AccountManager() self.account = None def start(self): super(MySIPServer, self).start() self.account_manager.start() def stop(self): self.account_manager.stop() super(MySIPServer, self).stop() @run_in_thread() def register_account(self, username, password, domain): try: sip_uri = SIPURI(username=username, password=password, host=domain) self.account = Account(username=sip_uri, password=password, domain=domain) self.account_manager.register(self.account) except (SIPCoreError, SIPApplicationError) as e: print("Failed to register account: %s" % str(e)) def handle_request(self, req): # 处理收到的SIP请求 print("Received SIP request: %s" % req) to_header = ToHeader("<sip:%s@%s>" % (req.to_details.username, req.to_details.host)) response = req.create_response(200, "OK") response.headers["To"] = to_header self.transport.send(response) if __name__ == "__main__": # 初始化SIPSimple设置 SIPSimpleSettings().initialize() # 创建SIP服务器实例 server = MySIPServer() # 注册SIP账户 server.register_account("username", "password", "example.com") # 启动SIP服务器 server.start() # 运行事件循环 server.run() ``` 在这个示例中,我们使用SIPApplication类来实现SIP服务器,通过注册SIP账户来处理收到的SIP请求,并在收到请求后返回一个200 OK的响应。开发人员可以根据自己的需求使用不同的库和API来实现SIP服务器。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值