SlideShare a Scribd company logo
An SFU/MCU integration for
heterogeneous environments
Building a SIP/WebRTC conferencing system with Janus
and FreeSWITCH
Giacomo Vacca - RTC Architect at Nexmo
Introduction
Overview
Janus and FreeSWITCH are two open source real-time communications
projects that can be used to build conferencing systems.
Among other things, Janus implements an SFU (Selective Forwarding Unit).
FreeSWITCH includes a conference module, which works as MCU (Multipoint
Control Unit).
Often we are asked to build solutions integrating existing applications and
services: this presentation shows an approach and example.
The three big integration points
WebRTC / SIP
SFU / MCU
Janus / FreeSWITCH
About me
Started working in the VoIP area in 2001, and since have worked for Truphone,
Libon and others, while currently on the SIP infrastructure at Nexmo.
User, promoter and contributor of open source projects in the RTC field.
I design and maintain solutions based on Kamailio, FreeSWITCH, Asterisk,
RTPEngine, Janus, Homer, and love debugging/troubleshooting.
About Nexmo
Nexmo provides API for RTC: messaging, voice, video, and many other features.
The SIP stack connects the Nexmo Voice API with the external world (SIP
customers and PSTN carriers).
Programmable SIP and SIP Connect: Link a DID to an application, reach it from
PSTN or SIP, and program the user experience of your customers.
The core SIP stack is built on Kamailio, Asterisk, nginx, with Voice API providing
the main features with FreeSWITCH. Hepic (Homer) for troubleshooting and
QoS analysis.
Try it out!
https://www.nexmo.com/voice
Coupon code:
JNCNX19
with €10 credit, available from Sep 22nd to Oct 25th.
Why combining MCU and SFU?
MCU integrates features on the server - heavier processing -
more suitable for traditional/mobile clients
SFU routes streams but delegates features to clients - lighter
processing - suitable for modern browsers
About FreeSWITCH
FS as MCU and gateway to SIP/PSTN
FS implements an MCU with mod_conference
FS also integrates SIP clients (and so PSTN) and
WebRTC clients (via mod_verto) directly.
Currently FS does not offer an SFU approach.
FS is widely adopted as B2BUA and conference
server.
The MCU approach allows for creative mixing of
audio/video.
A single stream for the entire conference is well
suited for mobile clients and other “traditional”
VoIP clients.
Not just SIP
endpoints
FS supports:
- SIP endpoints
- PSTN GWs
- WebRTC clients (verto protocol)
- WebSockets to exchange media
- Opus
- Transcoding
About FS and opus:
https://freeswitch.org/confluence/display/FREESWI
TCH/FreeSWITCH+And+The+Opus+Audio+Codec
FS operations for this project
SIP and verto
At ClueCon 2014 on using Kamailio and FS to
build a WebRTC service:
https://www.slideshare.net/GiacomoVacca/top-
5-challenges-to-add-web-calls-to-truphone-voip-
platform
JsSIP + WebSocket + Ephemeral Auth + coturn
verto protocol:
- JSON-based, exchanging SDP and
other call information
- verto.invite, verto.media, verto.answer,
verto.bye, verto.attach
Great documentation here:
http://evoluxbr.github.io/verto-docs/
FS - mod_conference
- Conferencing (MCU)
- Recording
- Whisper, ASR
- Opus + Opus at low sample rate for
PSTN*
- Canvas composition
- Single stream to each participant
- Transcoding
- Mute/Unmute streams (see relate
later)
* About Opus session negotiation:
https://www.giacomovacca.com/2016/09/opus-negotiation-for-practical-man.html
About Janus
How does the Janus Videoroom work?
SFU implementation
Subscriber/Publisher pattern
“A router of streams”
Lightweight processing of streams
Many opportunities to design the UI
on the client side
Main operations:
- Client creates a transaction
- Attaches to the plugin (PeerConnection)
- Joins a room (as a Publisher once or as a
Subscriber many times)
- Configure audio (then exchange media)
The PoC
PoC - High level architecture
FreeSWITCH Janus
Controller
API
verto(W
ebSocket)
WebRTC
Client
SIP Client
SIP
RTP/SRTP
ESL(TCP)
DTLS SRTP
PC
,
D
TLS
SRTP
Web Server HTTPS
Controller application
The controller application for the PoC is written in nodejs.Any other
technology can be used.
There are many libraries implementing Janus and FS clients.
e.g. https://janus.conf.meetecho.com/docs/resources#stacks
Connects to FS as a verto client (WebSocket) and to the ESL interface (TCP).
Connects to Janus HTTP API (or over WebSocket).
Expected RTP flow 1/2
FreeSWITCH Janus
SIP Client
A
SIP Client
B
WebRTC
Client
C
WebRTC
Client
D
A
C
D
C
D
DA
A
A
CD
C
Expected RTP flow 2/2
FreeSWITCH Janus
SIP Client
A
SIP Client
B
WebRTC
Client
C
WebRTC
Client
D
A
B
C
D
C
D
D
C
A
A
A
CD
AB
AB
AB
BCD
ACD
FS becomes a Publisher
FreeSWITCH Janus
SIP Client
A
Controller
1. INVITE SDPa
2. 200 SDPfsa
4. verto.invite
SDPfsb
5.create/attach/offer SDPfsb
6. answer SDPja
7.verto.answer SDPja
8. ICE + DTLS3. RTP
9. DTLS SRTP
FS becomes a Publisher
Note: “sendonly” and
“trickle”: false, otherwise
Janus will keep waiting for
ICE candidates from FS and
never start the DTLS
negotiation.
FS becomes a Subscriber
FreeSWITCH Janus
Controller
6. verto.media
SDPf
3. attach/join
4. attached
SDPjc
1. C
8. ICE + DTLS
9. DTLS SRTP
WebRTC
Client
C
5. verto.invite SDPjc
2. publishers list
7. start room
SDPf
FS becomes a subscriber
“trickle”: false, otherwise
Janus will keep waiting for
ICE candidates from FS.
Prestidigitation with the streams
- In an SFU model streams are separate
- An MCU mixes the streams
- WebRTC clients receive already streams from Janus directly
FS needs to eliminate the streams from WebRTC clients for the feeds towards
other WebRTC clients
- ‘relate’ function in mod_conference. “nospeak” option.
Testing it
Demo
Code used for the PoC:
https://github.com/giavac/janus_freeswitch_integration
Can this be
achieved in a
different way?
An MCU plugin could be developed for Janus.
An SFU module could be developed for FS.
Likely these solutions would be more cohesive
and efficient, but would require a larger
development effort.
To be evaluated case by case.
Performance assessment was out of scope in
this PoC.
Browsers support/compatibility also to be
verified.
Scalability
Performance was not in the scope of this PoC. However…
Another benefit of this modularity is that Janus and FS can scale
independently.
Each one with its own best practice (farming/clustering for FS, cascading for
Janus).
Not considered in this PoC
Many things!
- Creating and configuring rooms in Janus
- Clustering of FS and Janus instances (scaling)
- Dynamic dialplan in FS
- ...
Integrating Janus and FS
can bring the best of two
worlds together.
Think of this as an option
when building a
conferencing system in an
heterogeneous environment.
References
FS verto documentation: http://evoluxbr.github.io/verto-docs/
Janus VideoRoom documentation: https://janus.conf.meetecho.com/docs/videoroom
RFC 7667, https://tools.ietf.org/html/rfc7667 - RTP Topologies
“FreeSWITCH 1.8”, A. Minessale, G. Maruzzelli, Packt
Thanks!
Get in touch:
@giavac
https://www.linkedin.com/in/gia
comovacca/

More Related Content

What's hot

SIP Attack Handling (Kamailio World 2021)
SIP Attack Handling (Kamailio World 2021)SIP Attack Handling (Kamailio World 2021)
SIP Attack Handling (Kamailio World 2021)
Fred Posner
 
Can SFUs and MCUs be friends @ IIT-RTC 2020
Can SFUs and MCUs be friends @ IIT-RTC 2020Can SFUs and MCUs be friends @ IIT-RTC 2020
Can SFUs and MCUs be friends @ IIT-RTC 2020
Lorenzo Miniero
 
FreeSWITCH as a Microservice
FreeSWITCH as a MicroserviceFreeSWITCH as a Microservice
FreeSWITCH as a Microservice
Evan McGee
 
Introduction to FreeSWITCH
Introduction to FreeSWITCHIntroduction to FreeSWITCH
Introduction to FreeSWITCH
Chien Cheng Wu
 
Openstack zun,virtual kubelet
Openstack zun,virtual kubeletOpenstack zun,virtual kubelet
Openstack zun,virtual kubelet
Chanyeol yoon
 
Kamalio and Asterisk: What, Why & How
Kamalio and Asterisk: What, Why & HowKamalio and Asterisk: What, Why & How
Kamalio and Asterisk: What, Why & How
Fred Posner
 
Nat traversal in WebRTC context
Nat traversal in WebRTC contextNat traversal in WebRTC context
Nat traversal in WebRTC context
AudioCodes
 
Security and Multi-Tenancy with Apache Pulsar in Yahoo! (Verizon Media) - Pul...
Security and Multi-Tenancy with Apache Pulsar in Yahoo! (Verizon Media) - Pul...Security and Multi-Tenancy with Apache Pulsar in Yahoo! (Verizon Media) - Pul...
Security and Multi-Tenancy with Apache Pulsar in Yahoo! (Verizon Media) - Pul...
StreamNative
 
Kamailio with Docker and Kubernetes
Kamailio with Docker and KubernetesKamailio with Docker and Kubernetes
Kamailio with Docker and Kubernetes
Paolo Visintin
 
Infrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfraInfrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfra
Tomislav Plavcic
 
Kvm performance optimization for ubuntu
Kvm performance optimization for ubuntuKvm performance optimization for ubuntu
Kvm performance optimization for ubuntuSim Janghoon
 
THE ESSENTIAL ELEMENT OF YOUR SECURITY
THE ESSENTIAL  ELEMENT OF YOUR SECURITYTHE ESSENTIAL  ELEMENT OF YOUR SECURITY
THE ESSENTIAL ELEMENT OF YOUR SECURITY
ETDAofficialRegist
 
FreeSWITCH Monitoring
FreeSWITCH MonitoringFreeSWITCH Monitoring
FreeSWITCH Monitoring
Moises Silva
 
Kamailio - Large Unified Communication Platforms
Kamailio - Large Unified Communication PlatformsKamailio - Large Unified Communication Platforms
Kamailio - Large Unified Communication Platforms
Daniel-Constantin Mierla
 
Janus/SIP @ OpenSIPS 2017
Janus/SIP @ OpenSIPS 2017Janus/SIP @ OpenSIPS 2017
Janus/SIP @ OpenSIPS 2017
Lorenzo Miniero
 
Cilium - overview and recent updates
Cilium - overview and recent updatesCilium - overview and recent updates
Cilium - overview and recent updates
Michal Rostecki
 
WebRTC, RED and Janus @ ClueCon21
WebRTC, RED and Janus @ ClueCon21WebRTC, RED and Janus @ ClueCon21
WebRTC, RED and Janus @ ClueCon21
Lorenzo Miniero
 
Expanding Asterisk with Kamailio
Expanding Asterisk with KamailioExpanding Asterisk with Kamailio
Expanding Asterisk with Kamailio
Fred Posner
 
Architecting your WebRTC application for scalability, Arin Sime
Architecting your WebRTC application for scalability, Arin SimeArchitecting your WebRTC application for scalability, Arin Sime
Architecting your WebRTC application for scalability, Arin Sime
Alan Quayle
 
Cloud Native Networking & Security with Cilium & eBPF
Cloud Native Networking & Security with Cilium & eBPFCloud Native Networking & Security with Cilium & eBPF
Cloud Native Networking & Security with Cilium & eBPF
Raphaël PINSON
 

What's hot (20)

SIP Attack Handling (Kamailio World 2021)
SIP Attack Handling (Kamailio World 2021)SIP Attack Handling (Kamailio World 2021)
SIP Attack Handling (Kamailio World 2021)
 
Can SFUs and MCUs be friends @ IIT-RTC 2020
Can SFUs and MCUs be friends @ IIT-RTC 2020Can SFUs and MCUs be friends @ IIT-RTC 2020
Can SFUs and MCUs be friends @ IIT-RTC 2020
 
FreeSWITCH as a Microservice
FreeSWITCH as a MicroserviceFreeSWITCH as a Microservice
FreeSWITCH as a Microservice
 
Introduction to FreeSWITCH
Introduction to FreeSWITCHIntroduction to FreeSWITCH
Introduction to FreeSWITCH
 
Openstack zun,virtual kubelet
Openstack zun,virtual kubeletOpenstack zun,virtual kubelet
Openstack zun,virtual kubelet
 
Kamalio and Asterisk: What, Why & How
Kamalio and Asterisk: What, Why & HowKamalio and Asterisk: What, Why & How
Kamalio and Asterisk: What, Why & How
 
Nat traversal in WebRTC context
Nat traversal in WebRTC contextNat traversal in WebRTC context
Nat traversal in WebRTC context
 
Security and Multi-Tenancy with Apache Pulsar in Yahoo! (Verizon Media) - Pul...
Security and Multi-Tenancy with Apache Pulsar in Yahoo! (Verizon Media) - Pul...Security and Multi-Tenancy with Apache Pulsar in Yahoo! (Verizon Media) - Pul...
Security and Multi-Tenancy with Apache Pulsar in Yahoo! (Verizon Media) - Pul...
 
Kamailio with Docker and Kubernetes
Kamailio with Docker and KubernetesKamailio with Docker and Kubernetes
Kamailio with Docker and Kubernetes
 
Infrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfraInfrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfra
 
Kvm performance optimization for ubuntu
Kvm performance optimization for ubuntuKvm performance optimization for ubuntu
Kvm performance optimization for ubuntu
 
THE ESSENTIAL ELEMENT OF YOUR SECURITY
THE ESSENTIAL  ELEMENT OF YOUR SECURITYTHE ESSENTIAL  ELEMENT OF YOUR SECURITY
THE ESSENTIAL ELEMENT OF YOUR SECURITY
 
FreeSWITCH Monitoring
FreeSWITCH MonitoringFreeSWITCH Monitoring
FreeSWITCH Monitoring
 
Kamailio - Large Unified Communication Platforms
Kamailio - Large Unified Communication PlatformsKamailio - Large Unified Communication Platforms
Kamailio - Large Unified Communication Platforms
 
Janus/SIP @ OpenSIPS 2017
Janus/SIP @ OpenSIPS 2017Janus/SIP @ OpenSIPS 2017
Janus/SIP @ OpenSIPS 2017
 
Cilium - overview and recent updates
Cilium - overview and recent updatesCilium - overview and recent updates
Cilium - overview and recent updates
 
WebRTC, RED and Janus @ ClueCon21
WebRTC, RED and Janus @ ClueCon21WebRTC, RED and Janus @ ClueCon21
WebRTC, RED and Janus @ ClueCon21
 
Expanding Asterisk with Kamailio
Expanding Asterisk with KamailioExpanding Asterisk with Kamailio
Expanding Asterisk with Kamailio
 
Architecting your WebRTC application for scalability, Arin Sime
Architecting your WebRTC application for scalability, Arin SimeArchitecting your WebRTC application for scalability, Arin Sime
Architecting your WebRTC application for scalability, Arin Sime
 
Cloud Native Networking & Security with Cilium & eBPF
Cloud Native Networking & Security with Cilium & eBPFCloud Native Networking & Security with Cilium & eBPF
Cloud Native Networking & Security with Cilium & eBPF
 

Similar to An SFU/MCU integration for heterogeneous environments

WebRTC standards update - November 2014
WebRTC standards update - November 2014WebRTC standards update - November 2014
WebRTC standards update - November 2014
Victor Pascual Ávila
 
Upperside WebRTC conference - WebRTC intro
Upperside WebRTC conference - WebRTC introUpperside WebRTC conference - WebRTC intro
Upperside WebRTC conference - WebRTC intro
Victor Pascual Ávila
 
DevCon5 (July 2014) - Intro to WebRTC
DevCon5 (July 2014) - Intro to WebRTCDevCon5 (July 2014) - Intro to WebRTC
DevCon5 (July 2014) - Intro to WebRTC
Crocodile WebRTC SDK and Cloud Signalling Network
 
WebRTC standards update (13 Nov 2013)
WebRTC standards update (13 Nov 2013)WebRTC standards update (13 Nov 2013)
WebRTC standards update (13 Nov 2013)
Victor Pascual Ávila
 
From MSS to TelScale - Mobicents Summit 2011
From MSS to TelScale - Mobicents Summit 2011From MSS to TelScale - Mobicents Summit 2011
From MSS to TelScale - Mobicents Summit 2011telestax
 
Workshop oracle
Workshop oracleWorkshop oracle
Workshop oracle
Douglas Tait
 
[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC
Giacomo Vacca
 
Upperside Webinar - WebRTC Standards Update
Upperside Webinar - WebRTC Standards UpdateUpperside Webinar - WebRTC Standards Update
Upperside Webinar - WebRTC Standards Update
UppersideConferences
 
Webrt integration by altanai bisht
Webrt integration by altanai bishtWebrt integration by altanai bisht
Webrt integration by altanai bisht
ALTANAI BISHT
 
WebRTC Standards Update (October 2014)
WebRTC Standards Update (October 2014)WebRTC Standards Update (October 2014)
WebRTC Standards Update (October 2014)
Victor Pascual Ávila
 
Webrtc - rich communication - quobis - victor pascual
Webrtc  - rich communication - quobis - victor pascualWebrtc  - rich communication - quobis - victor pascual
Webrtc - rich communication - quobis - victor pascual
Alan Quayle
 
InfluxDB Community Office Hours September 2020
InfluxDB Community Office Hours September 2020 InfluxDB Community Office Hours September 2020
InfluxDB Community Office Hours September 2020
InfluxData
 
June 2004 IPv6 – Hands on
June 2004 IPv6 – Hands on June 2004 IPv6 – Hands on
June 2004 IPv6 – Hands on Videoguy
 
WebRTC for Telco: Informa's WebRTC Global Summit Preconference
WebRTC for Telco: Informa's WebRTC Global Summit PreconferenceWebRTC for Telco: Informa's WebRTC Global Summit Preconference
WebRTC for Telco: Informa's WebRTC Global Summit Preconference
Tsahi Levent-levi
 
DevCon5 (July 2014) - Acision SDK
DevCon5 (July 2014) - Acision SDKDevCon5 (July 2014) - Acision SDK
DevCon5 (July 2014) - Acision SDK
Crocodile WebRTC SDK and Cloud Signalling Network
 
WebRTC And FreeSWITCH – What This Combination Means?
WebRTC And FreeSWITCH – What This Combination Means?WebRTC And FreeSWITCH – What This Combination Means?
WebRTC And FreeSWITCH – What This Combination Means?
MoonTechnolabsPvtLtd
 
Setup VoIP System and Interconnection with LTE network
Setup VoIP System and Interconnection with LTE networkSetup VoIP System and Interconnection with LTE network
Setup VoIP System and Interconnection with LTE network
Nazmul Hossain Rakib
 
WebRTC, Whats in it for me?
WebRTC, Whats in it for me?WebRTC, Whats in it for me?
WebRTC, Whats in it for me?
SeanDuBois3
 
WebRTC and VoIP: bridging the gap (Kamailio world conference 2013)
WebRTC and VoIP: bridging the gap (Kamailio world conference 2013)WebRTC and VoIP: bridging the gap (Kamailio world conference 2013)
WebRTC and VoIP: bridging the gap (Kamailio world conference 2013)Victor Pascual Ávila
 
NFV Open Source projects
NFV Open Source projectsNFV Open Source projects
NFV Open Source projects
Marie-Paule Odini
 

Similar to An SFU/MCU integration for heterogeneous environments (20)

WebRTC standards update - November 2014
WebRTC standards update - November 2014WebRTC standards update - November 2014
WebRTC standards update - November 2014
 
Upperside WebRTC conference - WebRTC intro
Upperside WebRTC conference - WebRTC introUpperside WebRTC conference - WebRTC intro
Upperside WebRTC conference - WebRTC intro
 
DevCon5 (July 2014) - Intro to WebRTC
DevCon5 (July 2014) - Intro to WebRTCDevCon5 (July 2014) - Intro to WebRTC
DevCon5 (July 2014) - Intro to WebRTC
 
WebRTC standards update (13 Nov 2013)
WebRTC standards update (13 Nov 2013)WebRTC standards update (13 Nov 2013)
WebRTC standards update (13 Nov 2013)
 
From MSS to TelScale - Mobicents Summit 2011
From MSS to TelScale - Mobicents Summit 2011From MSS to TelScale - Mobicents Summit 2011
From MSS to TelScale - Mobicents Summit 2011
 
Workshop oracle
Workshop oracleWorkshop oracle
Workshop oracle
 
[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC
 
Upperside Webinar - WebRTC Standards Update
Upperside Webinar - WebRTC Standards UpdateUpperside Webinar - WebRTC Standards Update
Upperside Webinar - WebRTC Standards Update
 
Webrt integration by altanai bisht
Webrt integration by altanai bishtWebrt integration by altanai bisht
Webrt integration by altanai bisht
 
WebRTC Standards Update (October 2014)
WebRTC Standards Update (October 2014)WebRTC Standards Update (October 2014)
WebRTC Standards Update (October 2014)
 
Webrtc - rich communication - quobis - victor pascual
Webrtc  - rich communication - quobis - victor pascualWebrtc  - rich communication - quobis - victor pascual
Webrtc - rich communication - quobis - victor pascual
 
InfluxDB Community Office Hours September 2020
InfluxDB Community Office Hours September 2020 InfluxDB Community Office Hours September 2020
InfluxDB Community Office Hours September 2020
 
June 2004 IPv6 – Hands on
June 2004 IPv6 – Hands on June 2004 IPv6 – Hands on
June 2004 IPv6 – Hands on
 
WebRTC for Telco: Informa's WebRTC Global Summit Preconference
WebRTC for Telco: Informa's WebRTC Global Summit PreconferenceWebRTC for Telco: Informa's WebRTC Global Summit Preconference
WebRTC for Telco: Informa's WebRTC Global Summit Preconference
 
DevCon5 (July 2014) - Acision SDK
DevCon5 (July 2014) - Acision SDKDevCon5 (July 2014) - Acision SDK
DevCon5 (July 2014) - Acision SDK
 
WebRTC And FreeSWITCH – What This Combination Means?
WebRTC And FreeSWITCH – What This Combination Means?WebRTC And FreeSWITCH – What This Combination Means?
WebRTC And FreeSWITCH – What This Combination Means?
 
Setup VoIP System and Interconnection with LTE network
Setup VoIP System and Interconnection with LTE networkSetup VoIP System and Interconnection with LTE network
Setup VoIP System and Interconnection with LTE network
 
WebRTC, Whats in it for me?
WebRTC, Whats in it for me?WebRTC, Whats in it for me?
WebRTC, Whats in it for me?
 
WebRTC and VoIP: bridging the gap (Kamailio world conference 2013)
WebRTC and VoIP: bridging the gap (Kamailio world conference 2013)WebRTC and VoIP: bridging the gap (Kamailio world conference 2013)
WebRTC and VoIP: bridging the gap (Kamailio world conference 2013)
 
NFV Open Source projects
NFV Open Source projectsNFV Open Source projects
NFV Open Source projects
 

More from Giacomo Vacca

STUN protocol
STUN protocolSTUN protocol
STUN protocol
Giacomo Vacca
 
Modern VoIP in modern infrastructures
Modern VoIP in modern infrastructuresModern VoIP in modern infrastructures
Modern VoIP in modern infrastructures
Giacomo Vacca
 
RIPP Notes
RIPP NotesRIPP Notes
RIPP Notes
Giacomo Vacca
 
Modern VoIP in Modern Infrastructures
Modern VoIP in Modern InfrastructuresModern VoIP in Modern Infrastructures
Modern VoIP in Modern Infrastructures
Giacomo Vacca
 
Kamailio World 2018 - Workshop: kamailio-tests
Kamailio World 2018 - Workshop: kamailio-testsKamailio World 2018 - Workshop: kamailio-tests
Kamailio World 2018 - Workshop: kamailio-tests
Giacomo Vacca
 
Homer - Workshop at Kamailio World 2017
Homer - Workshop at Kamailio World 2017Homer - Workshop at Kamailio World 2017
Homer - Workshop at Kamailio World 2017
Giacomo Vacca
 
Continuous Integration and Kamailio
Continuous Integration and KamailioContinuous Integration and Kamailio
Continuous Integration and Kamailio
Giacomo Vacca
 
Docker - From Walking To Running
Docker - From Walking To RunningDocker - From Walking To Running
Docker - From Walking To Running
Giacomo Vacca
 
Docker From Scratch
Docker From ScratchDocker From Scratch
Docker From Scratch
Giacomo Vacca
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous Integration
Giacomo Vacca
 
Automatic Kamailio Deployments With Puppet
Automatic Kamailio Deployments With PuppetAutomatic Kamailio Deployments With Puppet
Automatic Kamailio Deployments With Puppet
Giacomo Vacca
 

More from Giacomo Vacca (11)

STUN protocol
STUN protocolSTUN protocol
STUN protocol
 
Modern VoIP in modern infrastructures
Modern VoIP in modern infrastructuresModern VoIP in modern infrastructures
Modern VoIP in modern infrastructures
 
RIPP Notes
RIPP NotesRIPP Notes
RIPP Notes
 
Modern VoIP in Modern Infrastructures
Modern VoIP in Modern InfrastructuresModern VoIP in Modern Infrastructures
Modern VoIP in Modern Infrastructures
 
Kamailio World 2018 - Workshop: kamailio-tests
Kamailio World 2018 - Workshop: kamailio-testsKamailio World 2018 - Workshop: kamailio-tests
Kamailio World 2018 - Workshop: kamailio-tests
 
Homer - Workshop at Kamailio World 2017
Homer - Workshop at Kamailio World 2017Homer - Workshop at Kamailio World 2017
Homer - Workshop at Kamailio World 2017
 
Continuous Integration and Kamailio
Continuous Integration and KamailioContinuous Integration and Kamailio
Continuous Integration and Kamailio
 
Docker - From Walking To Running
Docker - From Walking To RunningDocker - From Walking To Running
Docker - From Walking To Running
 
Docker From Scratch
Docker From ScratchDocker From Scratch
Docker From Scratch
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous Integration
 
Automatic Kamailio Deployments With Puppet
Automatic Kamailio Deployments With PuppetAutomatic Kamailio Deployments With Puppet
Automatic Kamailio Deployments With Puppet
 

Recently uploaded

一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
ufdana
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
eutxy
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Brad Spiegel Macon GA
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
laozhuseo02
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Sanjeev Rampal
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
natyesu
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
laozhuseo02
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
JungkooksNonexistent
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
Javier Lasa
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
nirahealhty
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
GTProductions1
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptxInternet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
VivekSinghShekhawat2
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 

Recently uploaded (20)

一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptxInternet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 

An SFU/MCU integration for heterogeneous environments

  • 1. An SFU/MCU integration for heterogeneous environments Building a SIP/WebRTC conferencing system with Janus and FreeSWITCH Giacomo Vacca - RTC Architect at Nexmo
  • 3. Overview Janus and FreeSWITCH are two open source real-time communications projects that can be used to build conferencing systems. Among other things, Janus implements an SFU (Selective Forwarding Unit). FreeSWITCH includes a conference module, which works as MCU (Multipoint Control Unit). Often we are asked to build solutions integrating existing applications and services: this presentation shows an approach and example.
  • 4. The three big integration points WebRTC / SIP SFU / MCU Janus / FreeSWITCH
  • 5. About me Started working in the VoIP area in 2001, and since have worked for Truphone, Libon and others, while currently on the SIP infrastructure at Nexmo. User, promoter and contributor of open source projects in the RTC field. I design and maintain solutions based on Kamailio, FreeSWITCH, Asterisk, RTPEngine, Janus, Homer, and love debugging/troubleshooting.
  • 6. About Nexmo Nexmo provides API for RTC: messaging, voice, video, and many other features. The SIP stack connects the Nexmo Voice API with the external world (SIP customers and PSTN carriers). Programmable SIP and SIP Connect: Link a DID to an application, reach it from PSTN or SIP, and program the user experience of your customers. The core SIP stack is built on Kamailio, Asterisk, nginx, with Voice API providing the main features with FreeSWITCH. Hepic (Homer) for troubleshooting and QoS analysis.
  • 7. Try it out! https://www.nexmo.com/voice Coupon code: JNCNX19 with €10 credit, available from Sep 22nd to Oct 25th.
  • 8. Why combining MCU and SFU? MCU integrates features on the server - heavier processing - more suitable for traditional/mobile clients SFU routes streams but delegates features to clients - lighter processing - suitable for modern browsers
  • 10. FS as MCU and gateway to SIP/PSTN FS implements an MCU with mod_conference FS also integrates SIP clients (and so PSTN) and WebRTC clients (via mod_verto) directly. Currently FS does not offer an SFU approach. FS is widely adopted as B2BUA and conference server. The MCU approach allows for creative mixing of audio/video. A single stream for the entire conference is well suited for mobile clients and other “traditional” VoIP clients.
  • 11. Not just SIP endpoints FS supports: - SIP endpoints - PSTN GWs - WebRTC clients (verto protocol) - WebSockets to exchange media - Opus - Transcoding About FS and opus: https://freeswitch.org/confluence/display/FREESWI TCH/FreeSWITCH+And+The+Opus+Audio+Codec
  • 12. FS operations for this project SIP and verto At ClueCon 2014 on using Kamailio and FS to build a WebRTC service: https://www.slideshare.net/GiacomoVacca/top- 5-challenges-to-add-web-calls-to-truphone-voip- platform JsSIP + WebSocket + Ephemeral Auth + coturn verto protocol: - JSON-based, exchanging SDP and other call information - verto.invite, verto.media, verto.answer, verto.bye, verto.attach Great documentation here: http://evoluxbr.github.io/verto-docs/
  • 13. FS - mod_conference - Conferencing (MCU) - Recording - Whisper, ASR - Opus + Opus at low sample rate for PSTN* - Canvas composition - Single stream to each participant - Transcoding - Mute/Unmute streams (see relate later) * About Opus session negotiation: https://www.giacomovacca.com/2016/09/opus-negotiation-for-practical-man.html
  • 15. How does the Janus Videoroom work? SFU implementation Subscriber/Publisher pattern “A router of streams” Lightweight processing of streams Many opportunities to design the UI on the client side Main operations: - Client creates a transaction - Attaches to the plugin (PeerConnection) - Joins a room (as a Publisher once or as a Subscriber many times) - Configure audio (then exchange media)
  • 17. PoC - High level architecture FreeSWITCH Janus Controller API verto(W ebSocket) WebRTC Client SIP Client SIP RTP/SRTP ESL(TCP) DTLS SRTP PC , D TLS SRTP Web Server HTTPS
  • 18. Controller application The controller application for the PoC is written in nodejs.Any other technology can be used. There are many libraries implementing Janus and FS clients. e.g. https://janus.conf.meetecho.com/docs/resources#stacks Connects to FS as a verto client (WebSocket) and to the ESL interface (TCP). Connects to Janus HTTP API (or over WebSocket).
  • 19. Expected RTP flow 1/2 FreeSWITCH Janus SIP Client A SIP Client B WebRTC Client C WebRTC Client D A C D C D DA A A CD C
  • 20. Expected RTP flow 2/2 FreeSWITCH Janus SIP Client A SIP Client B WebRTC Client C WebRTC Client D A B C D C D D C A A A CD AB AB AB BCD ACD
  • 21. FS becomes a Publisher FreeSWITCH Janus SIP Client A Controller 1. INVITE SDPa 2. 200 SDPfsa 4. verto.invite SDPfsb 5.create/attach/offer SDPfsb 6. answer SDPja 7.verto.answer SDPja 8. ICE + DTLS3. RTP 9. DTLS SRTP
  • 22. FS becomes a Publisher Note: “sendonly” and “trickle”: false, otherwise Janus will keep waiting for ICE candidates from FS and never start the DTLS negotiation.
  • 23. FS becomes a Subscriber FreeSWITCH Janus Controller 6. verto.media SDPf 3. attach/join 4. attached SDPjc 1. C 8. ICE + DTLS 9. DTLS SRTP WebRTC Client C 5. verto.invite SDPjc 2. publishers list 7. start room SDPf
  • 24. FS becomes a subscriber “trickle”: false, otherwise Janus will keep waiting for ICE candidates from FS.
  • 25. Prestidigitation with the streams - In an SFU model streams are separate - An MCU mixes the streams - WebRTC clients receive already streams from Janus directly FS needs to eliminate the streams from WebRTC clients for the feeds towards other WebRTC clients - ‘relate’ function in mod_conference. “nospeak” option.
  • 27. Demo Code used for the PoC: https://github.com/giavac/janus_freeswitch_integration
  • 28. Can this be achieved in a different way? An MCU plugin could be developed for Janus. An SFU module could be developed for FS. Likely these solutions would be more cohesive and efficient, but would require a larger development effort. To be evaluated case by case. Performance assessment was out of scope in this PoC. Browsers support/compatibility also to be verified.
  • 29. Scalability Performance was not in the scope of this PoC. However… Another benefit of this modularity is that Janus and FS can scale independently. Each one with its own best practice (farming/clustering for FS, cascading for Janus).
  • 30. Not considered in this PoC Many things! - Creating and configuring rooms in Janus - Clustering of FS and Janus instances (scaling) - Dynamic dialplan in FS - ...
  • 31. Integrating Janus and FS can bring the best of two worlds together. Think of this as an option when building a conferencing system in an heterogeneous environment.
  • 32. References FS verto documentation: http://evoluxbr.github.io/verto-docs/ Janus VideoRoom documentation: https://janus.conf.meetecho.com/docs/videoroom RFC 7667, https://tools.ietf.org/html/rfc7667 - RTP Topologies “FreeSWITCH 1.8”, A. Minessale, G. Maruzzelli, Packt