SIP on the Web
OverSIP + jsSIP: SIP over WebSocket
José Luis Millán <jmillan@aliax.net>
Iñaki Baz Castillo <ibc@aliax.net>
Introduction
The aim of this presentation is to show the SIP protocol working within a web browser and interoperating with any SIP network.
After some slides describing the used technology there is a signaling flowchart and a
video
showing a real implementation.
This is
SIP on the Web
. Enjoy.
WebSocket
RFC 6455 "The WebSocket Protocol"
.
Two-way realtime communication between web browser and server for carrying application data.
Bye bye HTTP long polling and Comet.
Managed by JavaScript:
WebSocket API
.
WebSocket is just a transport layer.
The site admin decides the message format (AKA "WebSocket subprotocol") carried on top of it.
That can be a custom chat protocol in JSON, or...
SIP over WebSocket
draft-ietf-sipcore-sip-websocket
.
A WebSocket subprotocol for a new transport in SIP.
SIP messages are carried on top of a WebSocket connection.
Requirements:
SIP stack written in JavaScript.
SIP proxy/server implementing WebSocket transport.
No protocols gateway here! This is not "SIP to/from WebSocket", this is pure SIP!
Just covers the signaling component. For media... hello
WebRTC
! :)
OverSIP (
www.oversip.net
)
SIP proxy implementing UDP, TCP, TLS and WebSocket transports.
Fully asynchronous event-based design, never block!
It behaves as a SIP Outbound Edge Proxy (as defined in
RFC 5626
).
Web browsers (or any WebSocket client) establish a WebSocket connection with OverSIP.
... and pure SIP messages exchange begins (
draft-ietf-sipcore-sip-websocket
).
No changes to SIP protocol, no need for a special B2BUA, no protocol conversion.
... but just pure SIP.
jsSIP (
www.jssip.net
)
JavaScript library implementing a full SIP stack.
Audio/video calls (WebRTC), instant messaging and presence.
Lightweight (~160 KB).
Easy to use and powerful user API.
Works with OverSIP, Kamailio and Asterisk servers.
Uses WebSocket for sending/receiving SIP messages.
... again
draft-ietf-sipcore-sip-websocket
.
SIP intelligence in the endpoint!
Real Demo
Next slides show the network topology of a working environment.
And then a video showing it in action!
Video "SIP on the Web"
See OverSIP + jsSIP in action, download the video:
Ogg Vorbis
video (17 MB).
MP4
video (5.7 MB).
AVI
video (46 MB).
Or watch it in Youtube:
http://www.youtube.com/watch?v=qfFlK1KyF6Q
.
Real screenshot of JsSIP with audio+video (webcam):
screenshot
.