1

I'm newbie in WebRtc technology and I have to implement audio/video and data exchanging using my own tomcat server for signaling.

I've already fork mobicents implementation from github (https://github.com/Mobicents/sip-servlets), but it is huge project which is not working properly and I don't have knowledge to fix/configure it.

I will be glad for some instructions how to implement server side in java, or maybe some working, brief example. Of course, I have been looking for tutorials online, but I didn't found anything understandable.

edit:

For now, I am trying to run mobicents demo websockets-sip-servlet. I am obtaining some error in the console at browser such as:

* 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)

I have downloaded tomcat 8 release from https://mobicents.ci.cloudbees.com/job/MobicentsSipServlets-Release/lastSuccessfulBuild/artifact/.

and stack trace from tomcat logs:

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)

it is not a full stacktrace

Araneo
  • 477
  • 2
  • 9
  • 25

1 Answers1

0

Can you explain what are you trying to achieve exactly so that it is easier to guide you ? First, it would be easier to download a binary than working from the source code. So try to use a newer release from https://mobicents.ci.cloudbees.com/job/MobicentsSipServlets-Release/lastSuccessfulBuild/artifact/

Mobicents SIP Servlets and Restcomm uses WebRTComm as the Client Side Javascript library. This library allows you do use a simple API abstracting the complexities of WebRTC and use SIP Over WebSockets as the signaling protocol for exchanging chat messages or setting up and tearing down Audio and Video calls.

RestComm comes by default with a WebRTC client that you can use and customize to fit your needs see http://www.telestax.com/livechat-and-video-call-with-restcomm/ or you can download the newer version we are working on https://github.com/Mobicents/olympus and help contributing to it.

jeand
  • 2,325
  • 14
  • 12
  • I've added some information you asking for in my first post – Araneo May 20 '15 at 12:31
  • it seems this is a problem with Tomcat 8, let us investigate. Can you use Tomcat 7 or JBoss AS 7 version in the meanwhile ? – jeand May 20 '15 at 13:03
  • At Tomcat7 I've obtained one error in browser console : Failed to load resource: the server responded with a status of 400 (Bad Request) (https://api.xirsys.com/getIceServers ) WebRTC seems to start, I see room, participants and chat parts, but And I can not add participants. (I'm seeing "Uncaught ReferenceError: addParticipant is not defined " in console) – Araneo May 20 '15 at 13:16
  • You can discard the xirsys failed API call this is for TURN usage. – jeand May 20 '15 at 13:19
  • For Adding a participant, do not use the + sign on the right side of the screen. Add the participant name in the input field on the left and click the + sign that appears just beside the input field still on the left (or use Tab then Enter) – jeand May 20 '15 at 13:20
  • I thought that left side is for room adding, isn't it? – Araneo May 20 '15 at 13:25
  • The UI is a bit confusing as it is an example application. Basically it doesn't support multiple participants at the moment. So one Room == one participant. One you have added the room, click on it and then you can start chatting/calling the other party (pending he is registered too) – jeand May 20 '15 at 14:22
  • So how I can register the second person? For example, I am in office right now and I want to talk with my friend who is in home. Is that possible with this application? Thanks for your responses – Araneo May 22 '15 at 07:05
  • Yes it's possible. Your server would need to be on a public IP address so both of you can access it. If your firewalls are too restrictive, you may need the TURN Media Relay, but try first and report back. Thanks – jeand May 22 '15 at 12:07
  • I does not work. Nothing happened when I run it in two machines. I don't receive any information in first machine that second machine is connected – Araneo May 22 '15 at 13:46
  • There is no presence support in the application yet. just try to send a text message to see if it is received from the other side. – jeand May 24 '15 at 19:07
  • I've tried and I don't receive any messages. Thanks for your support anyways – Araneo May 24 '15 at 20:08
  • You can try to send over the Chrome or Firefox console logs and also MSS tomcat logs to see what's going on – jeand May 25 '15 at 08:59