Sip Over Websocket - AudioCodes Mediant 4000 SBC User Manual

Session border controllers
Hide thumbs Also See for Mediant 4000 SBC:
Table of Contents

Advertisement

CHAPTER 28    Advanced SBC Features
2.
The Web page receives Web page elements and JavaScript code for WebRTC from the Web
hosting server. The JavaScript code runs locally on the Web browser.
3.
When the client clicks the Call button or call link, the browser runs the JavaScript code which
sends the HTTP upgrade request for WebSocket in order to establish a WebSocket session
with the device. The address of the device is typically included in the JavaScript code.
4.
A WebSocket session is established between the WebRTC client and the device in order for
the WebRTC client to register with the device. This is done using a SIP REGISTER message
sent over the WebSocket session (SIP over WebSocket). Registration can be initiated when
the client enters credentials (username and password) on the Web page or it can be done
automatically when the client initially browses to the page. This depends on the design of the
Web application (JavaScript). On the WebRTC client, the WebSocket connection is
established for registration when the Web page is loaded; for click-to-call applications,
registration is not needed and the WebSocket connection is established when the button for
calling is clicked.
5.
Once registered with the device, the client can receive or make calls, depending on the Web
application.
6.
To make a call, the client clicks the call button or link on the Web page.
7.
Negotiation of a workable IP address between the WebRTC client and the device is done
through ICE.
8.
Negotiation of SRTP keys using DTLS is done between WebRTC and the client on the media.
9.
Media flows between the WebRTC client and the SIP client located behind the device.

SIP over WebSocket

The device supports the transmission of SIP signaling over WebSocket. WebSocket is a protocol
providing real-time, full-duplex (two-way) communication over a single TCP connection (socket)
between a Web browser or page (client) and a remote host (server). This is used for browser-based
applications such as click-to-call from a Web page. As WebSocket has been defined by the
WebRTC standard as mandatory, its support by the device is important for deployments
implementing WebRTC.
A WebSocket connection starts as an HTTP connection between the Web client and the server,
guaranteeing full backward compatibility with the pre-WebSocket world. The protocol switch from
HTTP to WebSocket is referred to as the WebSocket handshake, which is done over the same
underlying TCP/IP connection. A WebSocket connection is established using a handshake
between the Web browser (WebSocket client) and the server (i.e., the device). The browser sends
a request to the server, indicating that it wants to switch protocols from HTTP to WebSocket. The
client expresses its' desire through the Upgrade header (i.e., upgrade from HTTP to WebSocket
protocol) in an HTTP GET request, for example:
GET /chat HTTP/1.1
Upgrade: websocket
Connection: Upgrade
Host: <IP address:port of SBC device>
Sec-WebSocket-Protocol: SIP
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Origin: <server that provided JavaScript code to browser, e.g., http://domain.com>
Sec-WebSocket-Version: 13
If the server understands the WebSocket protocol, it agrees to the protocol switch through the
Upgrade header in an HTTP 101 response, for example:
HTTP/1.1 101 Switching Protocols
Upgrade: WebSocket
Connection: Upgrade
- 606 -
Mediant 4000 SBC | User's Manual

Advertisement

Table of Contents
loading

Table of Contents