This document discusses integrating WebRTC phone capabilities into a browser using sipML5 and Janus. sipML5 is an open-source HTML5 SIP client that uses WebRTC for audio and video calls without plugins. Janus is a general purpose WebRTC gateway that can be used with a SIP plugin to enable calls. The document outlines how sipML5 uses WebRTC protocols for signaling and media, and provides code examples for initialization and calls. It then explains how Janus acts as a gateway between a browser-based client and a PBX, and provides similar code examples. Overall, the document proposes using sipML5 for a browser phone with Janus as a gateway to enable calls to a NethServer VoIP PBX.
3. ale_polidori
Why ?
● Nethesis - Italian Open Source since 2003
● NethVoice Enterprise PBX
● NethCTI - Web Application
○ WebRTC SIP Phone
○ Conferencing, Presence
○ Customer Cards, Instant Messaging
○ Video sources, ...
4. ale_polidori
WebRTC: Web Real Time Communication
● 2011 Google project
● Javascript API for audio/video communications
● Native browser support
● Real-Time p2p communication
● 3 Components
○ getUserMedia: camera, microphone and screen access
○ RTCPeerConnection: negotiation, encoding, decoding, nat traversal
○ RTCDataChannel: exchange data between browsers
5. ale_polidori
Protocols
● 2 protocol groups
○ transport - RTP
○ signaling - SIP (Session Initiation Protocol)
● RTP - SRTP (Secure Real-time Transport Protocol)
○ secure real-time transport protocol
○ encryption
○ message authentication
● SDP - audio & video description
● STUN, TURN, ICE
10. ale_polidori
sipML5: CoDec
● Reduction / Compression / Decompression of data flow
● Bandwidth / Quality (MOS) / Latency
● Audio
○ G.711 (64 kbps)
○ Opus (6-510 kbps - dynamic bitrate)
● Video
○ VP8, VP9
○ H.264
11. ale_polidori
sipML5: some code
1. Engine initialization
2. Start SIP Stack
3. Extension registration
4. Start Audio/Video call
S I P m l global object
SIPml.init
new SIPml.Stack
newSession(‘register’..
newSession(‘call-audio’..
30. ale_polidori
Janus: some code
1. Engine initialization
2. Create a session
3. Link SIP plugin
4. Start Audio/Video call
J a n u s global object
Janus.init
new Janus({...});
Janus.attach({...});
pluginHandle.createOffer
38. ale_polidori
start your NS VoIP PBX...
$ git clone https://github.com/alepolidori/vagrant-files.git
$ cd vagrant-files/nethserver-freepbx-14.0.3.6
$ vagrant up
1
40. ale_polidori
Technical choices
● sipML5
○ bleeding edge
○ github
○ community
○ new functions
● Janus
○ communication with Apache webserver
○ technical support (meetecho)
○ same configuration for all extensions
○ cross-browser
○ monitoring