SIP 和 Java,从哪里开始,从什么开始?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2652049/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 22:13:00  来源:igfitidea点击:

SIP and Java, where to start and with what?

javasip

提问by Senne

I want to implement the SIP protocol in java and would want to be able to create different clients (5 or more) and make them connect to a proxy server. This is all for testing purposes so I would like to be able to see well what's happening on a rather low level.
The clients should first be able to communicate trough text and later on maybe also by audio. (If I ever get that far)

我想在 java 中实现 SIP 协议,并且希望能够创建不同的客户端(5 个或更多)并使它们连接到代理服务器。这一切都是为了测试目的,所以我希望能够在相当低的水平上清楚地看到发生了什么。
客户端首先应该能够通过文本进行交流,然后也可以通过音频进行交流。(如果我能走那么远)

I already reada bit about the JAIN libraries and what I understood from that is that they are not really well suited for the server side? I also didn't really find any proxy server examples, tutorials, using JAIN.
I also found this SIP Servlet Tutorial book, I used HTTP servlets in the past but should I prefer servlets or JAIN or ...?

我已经阅读了一些关于 JAIN 库的内容,从中我了解到它们不太适合服务器端?我也没有真正找到任何使用 JAIN 的代理服务器示例、教程。
我还找到了这本SIP Servlet Tutorial book,我过去使用过 HTTP servlet,但我应该更喜欢 servlets 还是 JAIN 还是……?

I'm quite new to SIP so I don't really know where to start or what to choose in combination with java.

我对 SIP 很陌生,所以我真的不知道从哪里开始或与 java 结合选择什么。

采纳答案by sipwiz

If the intention is to incorporate your SIP stack into a production application then my advice to you would be to do everything you can to avoid writing your own from scratch. It's not an exaggeration to say it will take you over years to get your stack working smoothly with all the different SIP devices and servers out there. If you have a very narrow set of integration requirements then maybe you could do it quicker but it would still be a big undertaking.

如果打算将您的 SIP 堆栈合并到生产应用程序中,那么我对您的建议是尽一切可能避免从头开始编写自己的应用程序。可以毫不夸张地说,要让您的堆栈与所有不同的 SIP 设备和服务器顺利运行需要数年时间。如果您的集成要求集非常狭窄,那么也许您可以更快地完成它,但这仍然是一项艰巨的任务。

Here's a good list of available SIP stacks. If on the other hand you do decide to implement your own start by looking over the SIP RFC list. RFC 3261is the core protocol specification but it's been updated by a number of other RFC's so you'll need to implement a minimum of half a dozen just for the core SIP functionality. After that if you want to support things like transfers, presence, message waiting etc. then that's even more RFCs to implement. Here's that list of SIP stacksagain.

这是可用SIP 堆栈的一个很好的列表。另一方面,如果您确实决定通过查看SIP RFC 列表来实现您自己的开始。RFC 3261是核心协议规范,但它已被许多其他 RFC 更新,因此您至少需要为核心 SIP 功能实现六个。之后,如果您想支持诸如传输、在线状态、消息等待等内容,那么就需要更多的 RFC 来实现。这是SIP 堆栈的列表。

回答by GeorgeVagenas

A Sip Servlets platform will help you build Converged applications, that is HTTP and SIP applications. A Sip end user device would interact with a Sip Servlet application. A Sip Servlet application could be a B2BUA or a SIP Proxy for example.

Sip Servlets 平台将帮助您构建融合应用程序,即 HTTP 和 SIP 应用程序。Sip 最终用户设备将与 Sip Servlet 应用程序交互。例如,Sip Servlet 应用程序可以是 B2BUA 或 SIP 代理。

I would suggest you to try Mobicents Sip Servletwhich is a complete Sip Servlet platform on top of Java Servlets, certified to the JSR289 spec and using Jain Sip for SIP Stack.

我建议您尝试Mobicents Sip Servlet,它是一个基于 Java Servlet 的完整 Sip Servlet 平台,经过 JSR289 规范认证,并使用 Jain Sip 进行 SIP 堆栈。

There is an active community around the project and you will find useful examples to get started.

该项目有一个活跃的社区,您会找到有用的示例来开始。

By choosing a platform to get started you are able to concentrate on the business logic and you don't have to mess with the details of

通过选择一个平台开始,您可以专注于业务逻辑,而不必打乱细节