我是 WebRtc 技术的新手,我必须使用我自己的 tomcat 服务器进行信号传输来实现音频/视频和数据交换。
我已经从 github ( https://github.com/Mobicents/sip-servlets ) 分叉了 mobicents 实现,但这是一个无法正常工作的巨大项目,我不知道修复/配置它。
我会很高兴有一些说明如何在 Java 中实现服务器端,或者一些可行的简短示例。当然,我一直在网上寻找教程,但我没有发现任何可以理解的东西。
编辑:
现在,我正在尝试运行 mobicents 演示 websockets-sip-servlet。我在浏览器的控制台中收到一些错误,例如:
* PrivateJainSipClientConnector:processSipRegisterResponse(): SIP registration failed:500 [object Object]
* GET http://localhost:8080/websockets-sip-servlet/Room/undefined 404 (Not Found)
* POST https://api.xirsys.com/getIceServers 400 (Bad Request)
我已经从https://mobicents.ci.cloudbees.com/job/MobicentsSipServlets-Release/lastSuccessfulBuild/artifact/下载了 tomcat 8 版本。
和来自 tomcat 日志的堆栈跟踪:
2015-05-20 14:56:15,891 ERROR [org.mobicents.servlet.sip.core.dispatchers.DispatchTask] (SIP-TCP-Core-PipelineThreadpool-2) Unexpected exception while processing message REGISTER sip:telestax.com SIP/2.0
[...]
org.mobicents.servlet.sip.core.DispatcherException: An unexpected servlet exception occured while routing an initial request
at org.mobicents.servlet.sip.core.dispatchers.InitialRequestDispatcher$InitialDispatchTask.dispatch(InitialRequestDispatcher.java:744)
at org.mobicents.servlet.sip.core.dispatchers.DispatchTask.dispatchAndHandleExceptions(DispatchTask.java:61)
at org.mobicents.servlet.sip.core.dispatchers.InitialRequestDispatcher.dispatchInsideContainer(InitialRequestDispatcher.java:454)
at org.mobicents.servlet.sip.core.dispatchers.InitialRequestDispatcher.dispatchMessage(InitialRequestDispatcher.java:309)
at org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl.processRequest(SipApplicationDispatcherImpl.java:825)
at gov.nist.javax.sip.EventScanner.deliverEvent(EventScanner.java:230)
at gov.nist.javax.sip.SipProviderImpl.handleEvent(SipProviderImpl.java:185)
at gov.nist.javax.sip.DialogFilter.processRequest(DialogFilter.java:1324)
at gov.nist.javax.sip.stack.SIPServerTransactionImpl.processRequest(SIPServerTransactionImpl.java:807)
at gov.nist.javax.sip.stack.ConnectionOrientedMessageChannel.processMessage(ConnectionOrientedMessageChannel.java:452)
at gov.nist.javax.sip.stack.NioWebSocketMessageChannel.processMessage(NioWebSocketMessageChannel.java:287)
at gov.nist.javax.sip.parser.NioPipelineParser$Dispatch.run(NioPipelineParser.java:174)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.servlet.ServletException: the sip servlet with the name WebSocketB2BUASipServlet doesn't exist in the sip application WebsocketSample
at org.mobicents.servlet.sip.core.session.SipSessionImpl.setHandler(SipSessionImpl.java:1317)
at org.mobicents.servlet.sip.core.dispatchers.InitialRequestDispatcher$InitialDispatchTask.dispatch(InitialRequestDispatcher.java:741)
... 14 more
2015-05-20 14:56:15,904 ERROR [org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl] (SIP-TCP-Core-PipelineThreadpool-2) Unexpected exception while processing request REGISTER sip:telestax.com SIP/2.0
[...]
java.lang.IllegalStateException: Cannot create a response for request REGISTER sip:telestax.com SIP/2.0
transaction is null, a final error response has probably already been sent
at org.mobicents.servlet.sip.message.SipServletRequestImpl.createResponse(SipServletRequestImpl.java:309)
at org.mobicents.servlet.sip.message.SipServletRequestImpl.createResponse(SipServletRequestImpl.java:290)
at org.mobicents.servlet.sip.core.dispatchers.MessageDispatcher.sendErrorResponse(MessageDispatcher.java:126)
at org.mobicents.servlet.sip.core.dispatchers.DispatchTask.dispatchAndHandleExceptions(DispatchTask.java:69)
at org.mobicents.servlet.sip.core.dispatchers.InitialRequestDispatcher.dispatchInsideContainer(InitialRequestDispatcher.java:454)
at org.mobicents.servlet.sip.core.dispatchers.InitialRequestDispatcher.dispatchMessage(InitialRequestDispatcher.java:309)
at org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl.processRequest(SipApplicationDispatcherImpl.java:825)
at gov.nist.javax.sip.EventScanner.deliverEvent(EventScanner.java:230)
at gov.nist.javax.sip.SipProviderImpl.handleEvent(SipProviderImpl.java:185)
at gov.nist.javax.sip.DialogFilter.processRequest(DialogFilter.java:1324)
at gov.nist.javax.sip.stack.SIPServerTransactionImpl.processRequest(SIPServerTransactionImpl.java:807)
at gov.nist.javax.sip.stack.ConnectionOrientedMessageChannel.processMessage(ConnectionOrientedMessageChannel.java:452)
at gov.nist.javax.sip.stack.NioWebSocketMessageChannel.processMessage(NioWebSocketMessageChannel.java:287)
at gov.nist.javax.sip.parser.NioPipelineParser$Dispatch.run(NioPipelineParser.java:174)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
它不是完整的堆栈跟踪