1

我正在使用 sipML5 进行使用 Web 套接字的音频和视频通话。当我注册一个带有详细信息的 SIP 帐户时,它会向服务器发送一个请求以进行详细身份验证,并且服务器在某些 sipMl.js 函数中以状态(如 401 或 403 禁止等)响应。现在我想将服务器响应传递给一些 Java 函数,如 SIP servlets Process Response 中的进一步处理。

4

2 回答 2

1

如果您的意思是如何在 Javascript 中处理来自 MobicentsSIPServlets 的响应,则没有与 MobicentsSipServlets 容器相关的特定方式,因为这是基于 Websocket 信令的普通 SIP。在这种情况下,你应该看看 sipML5 文档,以及如何注册回调 JS 函数来处理 SIP 响应。

从 sipML5 doc 看来,您可以在注册期间传递 JS 函数引用,如sipML5 reg/login。查看 var eventsListener 的内容。

于 2016-05-11T14:23:01.530 回答
0

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/

于 2016-03-30T19:35:11.890 回答