I am using sipML5 for audio and video calls that use web socket. When I register a SIP account with details, it sends a request to the server for authentication with details and the server responds with Status(like 401 or 403 Forbidden etc.) in some sipMl.js function. Now I want to get the server response passed in to some Java function like in SIP servlets Process Response for further processing.
2 Answers
if you mean how to process the response coming from MobicentsSIPServlets in your Javascript, there is no specific way related to MobicentsSipServlets container, since this is plain SIP over Websocket signalling. In this case, yo ushould take a look to sipML5 doc, and how to regsiter callback JS function to process SIP responses.
From sipML5 doc it seems you may pass a JS function reference during registration as in sipML5 reg/login . Look contents of var eventsListener.

- 371
- 2
- 6
You can have a look at https://github.com/RestComm/sip-servlets/tree/master/sip-servlets-examples/websocket-b2bua as example of how to handle responses and requests. This application is the out of the box WebRTC application that ships with RestComm SIP Servlets.
Please also read the JSR 289 Specification, it is a good resource to learn more about SIP Servlets in general.
Note: Mobicents brand has been renamed to Restcomm. See more at http://www.telestax.com/restcomm-moves-beyond-mobicents/

- 2,325
- 14
- 12
-
I studied both but how i get response from SIP server in My Java Class Method. I am using Spring MVC. – vipin kumar Apr 13 '16 at 10:42
-
well you need to create a SipServlet class and configure the sip.xml descriptor as you would do with a regular HTTPServlet. How this can be integrated into Spring MVC is out of the scope of SipServlet container. – Jaime Casero Jun 21 '16 at 15:54