SlideShare a Scribd company logo
Janus and WebRTC: a practical journey
Lorenzo Miniero
Who am I?
Lorenzo Miniero
• Ph.D @ UniNA
• Chairman @ Meetecho
• Main author of Janus®
Contacts and info
• rtcexpo@meetecho.com
• https://twitter.com/elminiero
• https://www.slideshare.net/LorenzoMiniero
Just a few words on Meetecho
• Co-founded in 2009 as an academic spin-off
• University research efforts brought to the market
• Completely independent from the University
• Focus on real-time multimedia applications
• Strong perspective on standardization and open source
• Several activities
• Consulting services
• Commercial support and Janus licenses
• Streaming of live events (IETF, ACM, etc.)
• Proudly brewed in sunny Napoli, Italy
Home Sweet Home!
We just met in Napoli for JanusCon!
https://januscon.it
We just met in Napoli for JanusCon!
https://januscon.it
WebRTC reference architecture: peer-to-peer
WebRTC reference architecture: peer-to-peer
Involving a server as a peer (and applications)
Involving a server as a peer (and applications)
Involving a server as a peer (and applications)
Involving a server as a peer (and applications)
Involving different technologies as well
Involving different technologies as well
Involving different technologies as well
What’s Janus?
Janus
General purpose, open source WebRTC server
• https://github.com/meetecho/janus-gateway
• Demos and documentation: https://janus.conf.meetecho.com
• Community: https://groups.google.com/forum/#!forum/meetecho-janus
A vibrant community
Modular architecture
• The core only implements the WebRTC stack
• JSEP/SDP, ICE, DTLS-SRTP, Data Channels, Simulcast, VP9-SVC, ...
• Plugins expose Janus API over different “transports”
• Currently HTTP / WebSockets / RabbitMQ / Unix Sockets / MQTT / Nanomsg
• “Application” logic implemented in plugins too
• Users attach to plugins via the Janus core
• The core handles the WebRTC stuff
• Plugins route/manipulate the media/data
• Plugins can be combined on client side as “bricks”
• Video SFU, Audio MCU, SIP gatewaying, broadcasting, etc.
Modular architecture
• The core only implements the WebRTC stack
• JSEP/SDP, ICE, DTLS-SRTP, Data Channels, Simulcast, VP9-SVC, ...
• Plugins expose Janus API over different “transports”
• Currently HTTP / WebSockets / RabbitMQ / Unix Sockets / MQTT / Nanomsg
• “Application” logic implemented in plugins too
• Users attach to plugins via the Janus core
• The core handles the WebRTC stuff
• Plugins route/manipulate the media/data
• Plugins can be combined on client side as “bricks”
• Video SFU, Audio MCU, SIP gatewaying, broadcasting, etc.
Modular architecture
• The core only implements the WebRTC stack
• JSEP/SDP, ICE, DTLS-SRTP, Data Channels, Simulcast, VP9-SVC, ...
• Plugins expose Janus API over different “transports”
• Currently HTTP / WebSockets / RabbitMQ / Unix Sockets / MQTT / Nanomsg
• “Application” logic implemented in plugins too
• Users attach to plugins via the Janus core
• The core handles the WebRTC stuff
• Plugins route/manipulate the media/data
• Plugins can be combined on client side as “bricks”
• Video SFU, Audio MCU, SIP gatewaying, broadcasting, etc.
Modular architecture
• The core only implements the WebRTC stack
• JSEP/SDP, ICE, DTLS-SRTP, Data Channels, Simulcast, VP9-SVC, ...
• Plugins expose Janus API over different “transports”
• Currently HTTP / WebSockets / RabbitMQ / Unix Sockets / MQTT / Nanomsg
• “Application” logic implemented in plugins too
• Users attach to plugins via the Janus core
• The core handles the WebRTC stuff
• Plugins route/manipulate the media/data
• Plugins can be combined on client side as “bricks”
• Video SFU, Audio MCU, SIP gatewaying, broadcasting, etc.
Extensible Architecture and API
Extensible Architecture and API
Configuring Janus
• Janus and plugins can be configured via .jcfg files (libconfig format)
• Old INI format still supported, though
• Some (core-only) properties can be set via command-line as well
• Several options to configure the server’s behaviour
• Logging, transport, media settings, etc.
• Format of libconfig files is quite simple to understand and use
# This is a comment
name0 = value0
category1: {
name1 = number
name2 = "string"
name3 = boolean
...
}
category2: {
name2 = [ array ]
...
}
Configuring Janus
• Janus and plugins can be configured via .jcfg files (libconfig format)
• Old INI format still supported, though
• Some (core-only) properties can be set via command-line as well
• Several options to configure the server’s behaviour
• Logging, transport, media settings, etc.
• Format of libconfig files is quite simple to understand and use
# This is a comment
name0 = value0
category1: {
name1 = number
name2 = "string"
name3 = boolean
...
}
category2: {
name2 = [ array ]
...
}
Configuring Janus
• Janus and plugins can be configured via .jcfg files (libconfig format)
• Old INI format still supported, though
• Some (core-only) properties can be set via command-line as well
• Several options to configure the server’s behaviour
• Logging, transport, media settings, etc.
• Format of libconfig files is quite simple to understand and use
# This is a comment
name0 = value0
category1: {
name1 = number
name2 = "string"
name3 = boolean
...
}
category2: {
name2 = [ array ]
...
}
Example of configuration file
# This is a comment
general: {
configs_folder = "/opt/janus/etc/janus"
plugins_folder = "/opt/janus/lib/janus/plugins"
transports_folder = "/opt/janus/lib/janus/transports"
events_folder = "/opt/janus/lib/janus/events"
debug_level = 5
admin_secret = "janusoverlord"
}
certificates: {
}
media: {
rfc_4588 = true
rtp_port_range = "20000-40000"
}
nat: {
nice_debug = false
ice_ignore_list = "vmnet"
}
plugins: {
}
transports: {
}
events: {
}
Configuring the core
• The Janus core is configured in janus.jcfg
• As anticipated, some properties can be overridden via command-line too
• Different categories that can be configured
• general
• General settings (logging, daemonization, etc.)
• certificates
• Certificate and key to use (DTLS only, autogenerated if missing)
• media
• Media related stuff (RTP range, DTLS mtu, etc.)
• nat
• ICE related settings (ICE Lite/TCP, STUN/TURN, etc.)
• plugins, transports
• Media and transport plugins NOT to load
• events
• Event handlers settings
Configuring the core
• The Janus core is configured in janus.jcfg
• As anticipated, some properties can be overridden via command-line too
• Different categories that can be configured
• general
• General settings (logging, daemonization, etc.)
• certificates
• Certificate and key to use (DTLS only, autogenerated if missing)
• media
• Media related stuff (RTP range, DTLS mtu, etc.)
• nat
• ICE related settings (ICE Lite/TCP, STUN/TURN, etc.)
• plugins, transports
• Media and transport plugins NOT to load
• events
• Event handlers settings
Configuring the core
• The Janus core is configured in janus.jcfg
• As anticipated, some properties can be overridden via command-line too
• Different categories that can be configured
• general
• General settings (logging, daemonization, etc.)
• certificates
• Certificate and key to use (DTLS only, autogenerated if missing)
• media
• Media related stuff (RTP range, DTLS mtu, etc.)
• nat
• ICE related settings (ICE Lite/TCP, STUN/TURN, etc.)
• plugins, transports
• Media and transport plugins NOT to load
• events
• Event handlers settings
Configuring the core
• The Janus core is configured in janus.jcfg
• As anticipated, some properties can be overridden via command-line too
• Different categories that can be configured
• general
• General settings (logging, daemonization, etc.)
• certificates
• Certificate and key to use (DTLS only, autogenerated if missing)
• media
• Media related stuff (RTP range, DTLS mtu, etc.)
• nat
• ICE related settings (ICE Lite/TCP, STUN/TURN, etc.)
• plugins, transports
• Media and transport plugins NOT to load
• events
• Event handlers settings
Configuring the core
• The Janus core is configured in janus.jcfg
• As anticipated, some properties can be overridden via command-line too
• Different categories that can be configured
• general
• General settings (logging, daemonization, etc.)
• certificates
• Certificate and key to use (DTLS only, autogenerated if missing)
• media
• Media related stuff (RTP range, DTLS mtu, etc.)
• nat
• ICE related settings (ICE Lite/TCP, STUN/TURN, etc.)
• plugins, transports
• Media and transport plugins NOT to load
• events
• Event handlers settings
Configuring the core
• The Janus core is configured in janus.jcfg
• As anticipated, some properties can be overridden via command-line too
• Different categories that can be configured
• general
• General settings (logging, daemonization, etc.)
• certificates
• Certificate and key to use (DTLS only, autogenerated if missing)
• media
• Media related stuff (RTP range, DTLS mtu, etc.)
• nat
• ICE related settings (ICE Lite/TCP, STUN/TURN, etc.)
• plugins, transports
• Media and transport plugins NOT to load
• events
• Event handlers settings
Configuring the core
• The Janus core is configured in janus.jcfg
• As anticipated, some properties can be overridden via command-line too
• Different categories that can be configured
• general
• General settings (logging, daemonization, etc.)
• certificates
• Certificate and key to use (DTLS only, autogenerated if missing)
• media
• Media related stuff (RTP range, DTLS mtu, etc.)
• nat
• ICE related settings (ICE Lite/TCP, STUN/TURN, etc.)
• plugins, transports
• Media and transport plugins NOT to load
• events
• Event handlers settings
Media/IP settings (media)
Name Value Description
ipv6 true/false Enable IPv6 for media or not
dtls_mtu int Maximum size of DTLS packets
dtls_timeout int Retransmission step in ms (BoringSSL only)
rtp_port_range min-max Range of ports to bind to for RTP/RTCP
rfc_4588 true/false Whether rtx should be supported
max_nack_queue int How many packets (window size in ms) to store for
retransmissions
no_media_timer int How long to wait (in seconds) before detecting no
incoming media
Considerations
• dtls_mtu and dtls_timeout can have an impact on DTLS handshake
• Make sure rtp_port_range reflects the server firewall, if any
Generic ICE settings (nat)
Name Value Description
ice_lite true/false Whether to use ICE Lite or not
ice_tcp true/false Whether to use ICE TCP or not (needs ICE Lite)
full_trickle true/false Whether Janus should do full-trickle or not
nat_1_1_mapping ip IP to replace host addresses with (e.g., AWS)
ice_enforce_list list List of interfaces/IPs (even partial) to gather on
ice_ignore_list list List of interfaces/IPs (even partial) NOT to gather on
nice_debug true/false Enable libnice debugging or not
Considerations
• ice_lite can be quicker, if the server has a public address
• Don’t mix nat_1_1_mapping and STUN, and only use it on AWS
• ice_enforce_list and ice_ignore_list can make gathering faster
STUN settings (nat)
Most of the times you won’t need STUN in Janus (only for users), but if you do...
Name Value Description
stun_server address Address of the STUN server
stun_port port Port of the STUN server
Considerations
• If Janus has a public address (common) or NAT-1-1, STUN makes things slower
• If Janus is NATted, check the type of NAT first
• STUN would most likely NOT work if it’s behind a symmetric NATs
TURN settings (nat)
Most of the times you won’t need TURN in Janus (only for users), but if you do...
Name Value Description
turn_server address Address of the TURN server
turn_port port Port of the TURN server
turn_type udp/tcp/tls Protocol to use to connect to the TURN server
turn_user string Username to authenticate, if needed
turn_pwd string Password to authenticate, if needed
Considerations
• 99% of the times, it’s users that need TURN, NOT Janus
• If Janus can work with host or STUN, TURN makes things MUCH slower
• Connections are much less efficient when TURN is used in Janus
TURN REST API settings (nat)
In case TURN credentials are not static, but ephemeral...
Name Value Description
turn_rest_api address Backend to contact for ephemeral credentials
turn_rest_api_key string API key to authenticate at the backend
turn_rest_api_method GET/POST HTTP method to use
Considerations
• As for TURN, plus the overhead of a new GET/POST per each PeerConnection
• Explicit TURN info and TURN REST API are mutually exclusive
A ton of scenarios done today with Janus!
• SIP and RTSP gatewaying
• WebRTC-based call/contact centers
• Conferencing & collaboration
• E-learning & webinars
• Cloud platforms
• Media production
• Broadcasting & Gaming
• Identity verification
• Internet of Things
• Augmented/Virtual Reality
• ...and more!
A quick look at plugins: EchoTest
https://janus.conf.meetecho.com/docs/echotest
A quick look at plugins: Record & Play
https://janus.conf.meetecho.com/docs/recordplay
A quick look at plugins: Record & Play
https://janus.conf.meetecho.com/docs/recordplay
A quick look at plugins: SIP gateway
https://janus.conf.meetecho.com/docs/sipsofia
A quick look at plugins: Audio MCU
https://janus.conf.meetecho.com/docs/audiobridge
A quick look at plugins: Video SFU
https://janus.conf.meetecho.com/docs/videoroom
A quick look at plugins: Streaming
https://janus.conf.meetecho.com/docs/streaming
Writing your own plugin in C (1)
• Plugin initialization and information
• init(): called when plugin is loaded
• destroy(): called when Janus is shutting down
• get_api_compatibility(): must return JANUS_PLUGIN_API_VERSION
• get_version(): numeric version identifier (e.g., 3)
• get_version_string(): verbose version identifier (e.g., “v1.0.1”)
• get_description(): verbose description of the plugin (e.g., “This is my awesome plugin
that does this and that”)
• get_name(): short display name for your plugin (e.g., “My Awesome Plugin”)
• get_author(): author of the plugin (e.g., “Meetecho s.r.l.”)
• get_package(): unique package identifier for your plugin (e.g., “janus.plugin.myplugin”)
Writing your own plugin in C (2)
• Sessions management (callbacks invoked by the core)
• create_session(): a user (session+handle) just attached to the plugin
• handle_message(): incoming message/request (with or without a JSEP/SDP)
• handle_admin_message(): incoming message/request from Admin API
• setup_media(): PeerConnection is now ready to be used
• incoming_rtp(): incoming RTP packet
• incoming_rtcp(): incoming RTCP message
• incoming_data(): incoming DataChannel message
• slow_link(): notification of problems on media path
• hangup_media(): PeerConnection has been closed (e.g., DTLS alert)
• query_session(): called to get plugin-specific info on a user session
• destroy_session(): existing user gone (handle detached)
Writing your own plugin in C (3)
• Interaction with the core (methods invoked by the plugin)
• push_event(): send the user a JSON message/event (with or without a JSEP/SDP)
• relay_rtp(): send/relay the user an RTP packet
• relay_rtcp(): send/relay the user an RTCP message
• relay_data(): send/relay the user a DataChannel message
• close_pc(): close the user’s PeerConnection
• end_session(): close a user session (force-detach core handle)
• events_is_enabled(): check whether the event handlers mechanism is enabled
• notify_event(): notify an event to the registered and subscribed event handlers
Sequence diagrams (core↔plugin interaction)
Sequence diagrams (core↔plugin interaction)
Sequence diagrams (core↔plugin interaction)
Sequence diagrams (core↔plugin interaction)
Sequence diagrams (core↔plugin interaction)
Sequence diagrams (core↔plugin interaction)
Beyond C: plugins in Lua or JavaScript
https://janus.conf.meetecho.com/docs/lua
https://janus.conf.meetecho.com/docs/duktape
Sequence diagrams (Lua/Duktape)
Sequence diagrams (Lua/Duktape)
Sequence diagrams (Lua/Duktape)
Sequence diagrams (Lua/Duktape)
Combining plugins: Webinar example
Combining plugins: SocialTV example
Recording streams
MJR00002 (8 bytes)
LEN (2 bytes) JSON header (variable length)
MEETECHO (8 bytes)
LEN (2 bytes) RTP packet (variable length)
MEETECHO (8 bytes)
LEN (2 bytes) RTP packet (variable length)
MEETECHO (8 bytes)
LEN (2 bytes) RTP packet (variable length)
...
Table: Old Janus MJR format
https://janus.conf.meetecho.com/docs/recordings
Recording streams
MJR00002 (8 bytes)
LEN (2 bytes) JSON header (variable length)
MEET (4 bytes) + Timestamp (4 bytes)
LEN (2 bytes) RTP packet (variable length)
MEET (4 bytes) + Timestamp (4 bytes)
LEN (2 bytes) RTP packet (variable length)
MEET (4 bytes) + Timestamp (4 bytes)
LEN (2 bytes) RTP packet (variable length)
...
Table: New Janus MJR format
https://janus.conf.meetecho.com/docs/recordings
Processing a Janus recording
janus-pp-rec /path/to/file.mjr /path/to/video.webm
Processing Janus recordings (IETF example)
Converting a Janus recording to pcap
mjr2pcap /path/to/file.mjr /path/to/file.pcap
Retransmissions (no rtx)
Retransmissions (using rtx)
Capping the bandwidth (REMB)
https://tools.ietf.org/id/draft-alvestrand-rmcat-remb-03.html
Client-side bandwidth estimation (BWE)
https://github.com/meetecho/janus-gateway/pull/1118 (merged)
Simulcasting & SVC
https://www.slideshare.net/LorenzoMiniero/simulcastsvc-iitrtc-2019
Native data channels support
https://www.meetecho.com/blog/data-channels-broadcasting-with-janus/
RTP forwarding functionality
RTP forwarding functionality
Implementing large-scale broadcasting
https://www.slideshare.net/LorenzoMiniero/scaling-webrtc-applications-with-janus
Implementing large-scale broadcasting
https://www.slideshare.net/LorenzoMiniero/scaling-webrtc-applications-with-janus
Implementing geo-distributed access
https://www.slideshare.net/LorenzoMiniero/scaling-webrtc-applications-with-janus
Implementing geo-distributed access
https://www.slideshare.net/LorenzoMiniero/scaling-webrtc-applications-with-janus
Deploying Janus: a few possible topologies
Deploying Janus: a few possible topologies
Deploying Janus: a few possible topologies
Deploying Janus: a few possible topologies
Deploying Janus: a few possible topologies
Deploying Janus: a few possible topologies
Deploying Janus: a few possible topologies
Anything wrong? Check the Admin API first!
• One option is the requests/response API to interrogate Janus
• Query server capabilities
• Control some aspects (e.g., enable/disable debugging)
• Inspect handles and WebRTC “internals”
https://www.meetecho.com/blog/understanding-the-janus-admin-api/
Admin API features: WebRTC internals
Admin API features: detecting NAT types
{
"janus": "test_stun",
"transaction": "123",
"admin_secret": "janusoverlord",
"address": "stun.l.google.com",
"port": 19302,
"localport": 7000
}
{
"janus": "test_stun",
"transaction": "456",
"admin_secret": "janusoverlord",
"address":"stun.voip.eutelia.it",
"port": 3478,
"localport": 7000
}
https://janus.conf.meetecho.com/docs/admin
Admin API features: detecting NAT types
{
"janus": "success",
"transaction": "123",
"public_ip": "93.44 .. ",
"public_port": 50819,
"elapsed": 114808
}
{
"janus": "success",
"transaction": "456",
"public_ip": "93.44 .. ",
"public_port": 65492,
"elapsed": 127515
}
https://janus.conf.meetecho.com/docs/admin
Admin API features: capturing traffic
https://www.meetecho.com/blog/capturing-webrtc-traffic-in-janus/
An asynchronous approach
• Admin API is cool, but is request/response...
• Needs constant polling, and data is unavailable after the session ends
• What about an asynchronous approach?
• A new mechanism: Event Handlers
• Core and plugins generate events
• Custom modules can subscribe to and handle them
• e.g., save to DB, send to external service, CDR, etc.
• Multiple handlers available out of the box
• HTTP, WebSockets, RabbitMQ, MQTT, Nanomsg
An asynchronous approach
• Admin API is cool, but is request/response...
• Needs constant polling, and data is unavailable after the session ends
• What about an asynchronous approach?
• A new mechanism: Event Handlers
• Core and plugins generate events
• Custom modules can subscribe to and handle them
• e.g., save to DB, send to external service, CDR, etc.
• Multiple handlers available out of the box
• HTTP, WebSockets, RabbitMQ, MQTT, Nanomsg
An asynchronous approach
• Admin API is cool, but is request/response...
• Needs constant polling, and data is unavailable after the session ends
• What about an asynchronous approach?
• A new mechanism: Event Handlers
• Core and plugins generate events
• Custom modules can subscribe to and handle them
• e.g., save to DB, send to external service, CDR, etc.
• Multiple handlers available out of the box
• HTTP, WebSockets, RabbitMQ, MQTT, Nanomsg
Event Handlers overview
Type of events
• Different events handlers can subscribe to
• Core events (e.g., startup/shutdown)
• Session related events (e.g., session created/destroyed)
• Handle related events (e.g., handle attached/detached)
• JSEP related events (e.g., got/sent offer/answer)
• WebRTC related events (e.g., ICE/DTLS state changes)
• Media related events (e.g., stats on packets/bytes)
• Plugin-originated events (specific to the application)
• Transport-originated (specific to the transport)
• External events (originated via Admin API)
• Correlation possible on different identifiers
• Transport instances that originate specific session
• Opaque ID applications can set on handles of same “user”
• Plugin-specific identifiers (e.g., in VideoRoom)
Type of events
• Different events handlers can subscribe to
• Core events (e.g., startup/shutdown)
• Session related events (e.g., session created/destroyed)
• Handle related events (e.g., handle attached/detached)
• JSEP related events (e.g., got/sent offer/answer)
• WebRTC related events (e.g., ICE/DTLS state changes)
• Media related events (e.g., stats on packets/bytes)
• Plugin-originated events (specific to the application)
• Transport-originated (specific to the transport)
• External events (originated via Admin API)
• Correlation possible on different identifiers
• Transport instances that originate specific session
• Opaque ID applications can set on handles of same “user”
• Plugin-specific identifiers (e.g., in VideoRoom)
Why is correlation important?
Why is correlation important?
Why is correlation important?
“Sample Event Handler”: HTTP as a notifier
• Simply forwards all events as JSON to an HTTP backend
• Supports basic authentication
• Can group events (i.e., JSON array vs. multiple JSON objects)
• Implements basic retransmissions (exponential back-off)
• Does nothing more than that: logic needs to be elsewhere
• HTTP backend decides what to do with events, if anything
• Behaviour can be tweaked via Admin API calls
Need something else? Check the alternatives or write your own!
A few other event handlers also available
• Other transports (in repo), SQLite (by Mozilla)
“Sample Event Handler”: HTTP as a notifier
• Simply forwards all events as JSON to an HTTP backend
• Supports basic authentication
• Can group events (i.e., JSON array vs. multiple JSON objects)
• Implements basic retransmissions (exponential back-off)
• Does nothing more than that: logic needs to be elsewhere
• HTTP backend decides what to do with events, if anything
• Behaviour can be tweaked via Admin API calls
Need something else? Check the alternatives or write your own!
A few other event handlers also available
• Other transports (in repo), SQLite (by Mozilla)
“Sample Event Handler”: HTTP as a notifier
• Simply forwards all events as JSON to an HTTP backend
• Supports basic authentication
• Can group events (i.e., JSON array vs. multiple JSON objects)
• Implements basic retransmissions (exponential back-off)
• Does nothing more than that: logic needs to be elsewhere
• HTTP backend decides what to do with events, if anything
• Behaviour can be tweaked via Admin API calls
Need something else? Check the alternatives or write your own!
A few other event handlers also available
• Other transports (in repo), SQLite (by Mozilla)
Sample Event Handler example
Sample Event Handler example
Writing your own event handler in C (1)
• Plugin initialization and information
• init(): called when event handler is loaded
• destroy(): called when Janus is shutting down
• get_api_compatibility(): must return JANUS_EVENTHANDLER_API_VERSION
• get_version(): numeric version identifier (e.g., 3)
• get_version_string(): verbose version identifier (e.g., “v1.0.1”)
• get_description(): verbose description of the plugin (e.g., “This is my awesome event
handler that does this and that”)
• get_name(): short display name for your plugin (e.g., “My Awesome Event Handler”)
• get_author(): author of the plugin (e.g., “Meetecho s.r.l.”)
• get_package(): unique package identifier for your plugin (e.g.,
“janus.eventhandler.myhandler”)
Writing your own event handler in C (2)
• Events management (callbacks invoked by the core)
• incoming_event(): incoming event to manage (queue and process in your thread)
• handle_request(): incoming request from Admin API to tweak the plugin
How can you handle events?
• Generating events is easy, evaluating them is another matter...
• Event Handlers typically just relay events, and don’t do processing themselves
• Analyzing and correlating tons of events is complicated
• A few different approaches, from easiest to trickiest
1 https://github.com/stirlab/janus-event-server (dumping events to file)
2 https://github.com/mozilla/janus-eventhandler-sqlite (dumping events to SQLite)
3 Write your own backend, e.g.,
https://www.meetecho.com/blog/event-handlers-a-practical-example/
https://www.meetecho.com/blog/correlating-janus-event-handlers/
• A much better approach: trust the smart guys!
• https://github.com/sipcapture/homer
• https://hepic.tel/
How can you handle events?
• Generating events is easy, evaluating them is another matter...
• Event Handlers typically just relay events, and don’t do processing themselves
• Analyzing and correlating tons of events is complicated
• A few different approaches, from easiest to trickiest
1 https://github.com/stirlab/janus-event-server (dumping events to file)
2 https://github.com/mozilla/janus-eventhandler-sqlite (dumping events to SQLite)
3 Write your own backend, e.g.,
https://www.meetecho.com/blog/event-handlers-a-practical-example/
https://www.meetecho.com/blog/correlating-janus-event-handlers/
• A much better approach: trust the smart guys!
• https://github.com/sipcapture/homer
• https://hepic.tel/
How can you handle events?
• Generating events is easy, evaluating them is another matter...
• Event Handlers typically just relay events, and don’t do processing themselves
• Analyzing and correlating tons of events is complicated
• A few different approaches, from easiest to trickiest
1 https://github.com/stirlab/janus-event-server (dumping events to file)
2 https://github.com/mozilla/janus-eventhandler-sqlite (dumping events to SQLite)
3 Write your own backend, e.g.,
https://www.meetecho.com/blog/event-handlers-a-practical-example/
https://www.meetecho.com/blog/correlating-janus-event-handlers/
• A much better approach: trust the smart guys!
• https://github.com/sipcapture/homer
• https://hepic.tel/
Event Handlers in HOMER since “day one”
Presentations from JanusCon
https://www.youtube.com/watch?v=bR3CoeXF-Mo
Presentations from JanusCon
https://www.youtube.com/watch?v=auutg9cou4I
WIP: Modular logging
https://github.com/meetecho/janus-gateway/pull/1814
Thanks! Questions? Comments?
Get in touch!
https://www.meetecho.com
rtcexpo@meetecho.com

More Related Content

What's hot

Janus & docker: friends or foe
Janus & docker: friends or foe Janus & docker: friends or foe
Janus & docker: friends or foe
Alessandro Amirante
 
A comparison of segment routing data-plane encodings
A comparison of segment routing data-plane encodingsA comparison of segment routing data-plane encodings
A comparison of segment routing data-plane encodings
Gunter Van de Velde
 
The Low-Risk Path to Building Autonomous Car Architectures
The Low-Risk Path to Building Autonomous Car ArchitecturesThe Low-Risk Path to Building Autonomous Car Architectures
The Low-Risk Path to Building Autonomous Car Architectures
Real-Time Innovations (RTI)
 
Advanced OpenVPN Concepts on pfSense 2.4 & 2.3.3 - pfSense Hangout February 2017
Advanced OpenVPN Concepts on pfSense 2.4 & 2.3.3 - pfSense Hangout February 2017Advanced OpenVPN Concepts on pfSense 2.4 & 2.3.3 - pfSense Hangout February 2017
Advanced OpenVPN Concepts on pfSense 2.4 & 2.3.3 - pfSense Hangout February 2017
Netgate
 
WebRTC, RED and Janus @ ClueCon21
WebRTC, RED and Janus @ ClueCon21WebRTC, RED and Janus @ ClueCon21
WebRTC, RED and Janus @ ClueCon21
Lorenzo Miniero
 
Janus + Audio @ Open Source World
Janus + Audio @ Open Source WorldJanus + Audio @ Open Source World
Janus + Audio @ Open Source World
Lorenzo Miniero
 
Multiprocessor Game Loops: Lessons from Uncharted 2: Among Thieves
Multiprocessor Game Loops: Lessons from Uncharted 2: Among ThievesMultiprocessor Game Loops: Lessons from Uncharted 2: Among Thieves
Multiprocessor Game Loops: Lessons from Uncharted 2: Among ThievesNaughty Dog
 
Killzone Shadow Fall: Threading the Entity Update on PS4
Killzone Shadow Fall: Threading the Entity Update on PS4Killzone Shadow Fall: Threading the Entity Update on PS4
Killzone Shadow Fall: Threading the Entity Update on PS4
jrouwe
 
(NEMO-UX) WAYLAND 기반 컴포지팅 최적화 기술 소개
(NEMO-UX) WAYLAND 기반 컴포지팅 최적화 기술 소개(NEMO-UX) WAYLAND 기반 컴포지팅 최적화 기술 소개
(NEMO-UX) WAYLAND 기반 컴포지팅 최적화 기술 소개
nemoux
 
VXLAN Integration with CloudStack Advanced Zone
VXLAN Integration with CloudStack Advanced ZoneVXLAN Integration with CloudStack Advanced Zone
VXLAN Integration with CloudStack Advanced Zone
Yoshikazu Nojima
 
Hardware supports for Virtualization
Hardware supports for VirtualizationHardware supports for Virtualization
Hardware supports for VirtualizationYoonje Choi
 
[Ndc11 박민근] deferred shading
[Ndc11 박민근] deferred shading[Ndc11 박민근] deferred shading
[Ndc11 박민근] deferred shadingMinGeun Park
 
Janus/SIP @ OpenSIPS 2019
Janus/SIP @ OpenSIPS 2019Janus/SIP @ OpenSIPS 2019
Janus/SIP @ OpenSIPS 2019
Lorenzo Miniero
 
Operational Efficiency Hacks Web20 Expo2009
Operational Efficiency Hacks Web20 Expo2009Operational Efficiency Hacks Web20 Expo2009
Operational Efficiency Hacks Web20 Expo2009John Allspaw
 
Khaleel Devops Resume (2)
Khaleel Devops Resume (2)Khaleel Devops Resume (2)
Khaleel Devops Resume (2)khaleel a
 
Deploying CloudStack and Ceph with flexible VXLAN and BGP networking
Deploying CloudStack and Ceph with flexible VXLAN and BGP networking Deploying CloudStack and Ceph with flexible VXLAN and BGP networking
Deploying CloudStack and Ceph with flexible VXLAN and BGP networking
ShapeBlue
 
Scaling server side web rtc applications the janus challenge by lorenzo miniero
Scaling server side web rtc applications the janus challenge by lorenzo minieroScaling server side web rtc applications the janus challenge by lorenzo miniero
Scaling server side web rtc applications the janus challenge by lorenzo miniero
Greg Kawere
 
Github Action, AWS S3, CloudFront를 활용한 React 애플리케이션 CICD 파이프라인 구축
Github Action, AWS S3, CloudFront를 활용한 React 애플리케이션 CICD 파이프라인 구축Github Action, AWS S3, CloudFront를 활용한 React 애플리케이션 CICD 파이프라인 구축
Github Action, AWS S3, CloudFront를 활용한 React 애플리케이션 CICD 파이프라인 구축
Eunsu Kim
 

What's hot (20)

Janus & docker: friends or foe
Janus & docker: friends or foe Janus & docker: friends or foe
Janus & docker: friends or foe
 
A comparison of segment routing data-plane encodings
A comparison of segment routing data-plane encodingsA comparison of segment routing data-plane encodings
A comparison of segment routing data-plane encodings
 
The Low-Risk Path to Building Autonomous Car Architectures
The Low-Risk Path to Building Autonomous Car ArchitecturesThe Low-Risk Path to Building Autonomous Car Architectures
The Low-Risk Path to Building Autonomous Car Architectures
 
Advanced OpenVPN Concepts on pfSense 2.4 & 2.3.3 - pfSense Hangout February 2017
Advanced OpenVPN Concepts on pfSense 2.4 & 2.3.3 - pfSense Hangout February 2017Advanced OpenVPN Concepts on pfSense 2.4 & 2.3.3 - pfSense Hangout February 2017
Advanced OpenVPN Concepts on pfSense 2.4 & 2.3.3 - pfSense Hangout February 2017
 
WebRTC, RED and Janus @ ClueCon21
WebRTC, RED and Janus @ ClueCon21WebRTC, RED and Janus @ ClueCon21
WebRTC, RED and Janus @ ClueCon21
 
Janus + Audio @ Open Source World
Janus + Audio @ Open Source WorldJanus + Audio @ Open Source World
Janus + Audio @ Open Source World
 
Multiprocessor Game Loops: Lessons from Uncharted 2: Among Thieves
Multiprocessor Game Loops: Lessons from Uncharted 2: Among ThievesMultiprocessor Game Loops: Lessons from Uncharted 2: Among Thieves
Multiprocessor Game Loops: Lessons from Uncharted 2: Among Thieves
 
Killzone Shadow Fall: Threading the Entity Update on PS4
Killzone Shadow Fall: Threading the Entity Update on PS4Killzone Shadow Fall: Threading the Entity Update on PS4
Killzone Shadow Fall: Threading the Entity Update on PS4
 
(NEMO-UX) WAYLAND 기반 컴포지팅 최적화 기술 소개
(NEMO-UX) WAYLAND 기반 컴포지팅 최적화 기술 소개(NEMO-UX) WAYLAND 기반 컴포지팅 최적화 기술 소개
(NEMO-UX) WAYLAND 기반 컴포지팅 최적화 기술 소개
 
VXLAN Integration with CloudStack Advanced Zone
VXLAN Integration with CloudStack Advanced ZoneVXLAN Integration with CloudStack Advanced Zone
VXLAN Integration with CloudStack Advanced Zone
 
CloudStack Networking
CloudStack NetworkingCloudStack Networking
CloudStack Networking
 
Hardware supports for Virtualization
Hardware supports for VirtualizationHardware supports for Virtualization
Hardware supports for Virtualization
 
[Ndc11 박민근] deferred shading
[Ndc11 박민근] deferred shading[Ndc11 박민근] deferred shading
[Ndc11 박민근] deferred shading
 
Janus/SIP @ OpenSIPS 2019
Janus/SIP @ OpenSIPS 2019Janus/SIP @ OpenSIPS 2019
Janus/SIP @ OpenSIPS 2019
 
Operational Efficiency Hacks Web20 Expo2009
Operational Efficiency Hacks Web20 Expo2009Operational Efficiency Hacks Web20 Expo2009
Operational Efficiency Hacks Web20 Expo2009
 
Khaleel Devops Resume (2)
Khaleel Devops Resume (2)Khaleel Devops Resume (2)
Khaleel Devops Resume (2)
 
Ether channel fundamentals
Ether channel fundamentalsEther channel fundamentals
Ether channel fundamentals
 
Deploying CloudStack and Ceph with flexible VXLAN and BGP networking
Deploying CloudStack and Ceph with flexible VXLAN and BGP networking Deploying CloudStack and Ceph with flexible VXLAN and BGP networking
Deploying CloudStack and Ceph with flexible VXLAN and BGP networking
 
Scaling server side web rtc applications the janus challenge by lorenzo miniero
Scaling server side web rtc applications the janus challenge by lorenzo minieroScaling server side web rtc applications the janus challenge by lorenzo miniero
Scaling server side web rtc applications the janus challenge by lorenzo miniero
 
Github Action, AWS S3, CloudFront를 활용한 React 애플리케이션 CICD 파이프라인 구축
Github Action, AWS S3, CloudFront를 활용한 React 애플리케이션 CICD 파이프라인 구축Github Action, AWS S3, CloudFront를 활용한 React 애플리케이션 CICD 파이프라인 구축
Github Action, AWS S3, CloudFront를 활용한 React 애플리케이션 CICD 파이프라인 구축
 

Similar to Janus workshop @ RTC2019 Beijing

Janus Workshop @ ClueCon 2020
Janus Workshop @ ClueCon 2020Janus Workshop @ ClueCon 2020
Janus Workshop @ ClueCon 2020
Lorenzo Miniero
 
Fuzzing Janus @ IPTComm 2019
Fuzzing Janus @ IPTComm 2019Fuzzing Janus @ IPTComm 2019
Fuzzing Janus @ IPTComm 2019
Lorenzo Miniero
 
Janus/Asterisk @ Astricon 2017
Janus/Asterisk @ Astricon 2017Janus/Asterisk @ Astricon 2017
Janus/Asterisk @ Astricon 2017
Lorenzo Miniero
 
Fuzzing RTC @ Kamailio World 2019
Fuzzing RTC @ Kamailio World 2019Fuzzing RTC @ Kamailio World 2019
Fuzzing RTC @ Kamailio World 2019
Lorenzo Miniero
 
Convergence Best Poster Award
Convergence Best Poster AwardConvergence Best Poster Award
Convergence Best Poster Award
Rethinking Audiovisual Archives
 
PEARC17: Live Integrated Visualization Environment: An Experiment in General...
PEARC17: Live Integrated Visualization Environment: An Experiment in General...PEARC17: Live Integrated Visualization Environment: An Experiment in General...
PEARC17: Live Integrated Visualization Environment: An Experiment in General...
moneyjh
 
Portets to composite applications
Portets to composite applicationsPortets to composite applications
Portets to composite applications
Serge Huber
 
Janus @ DevDay Napoli
Janus @ DevDay NapoliJanus @ DevDay Napoli
Janus @ DevDay Napoli
Lorenzo Miniero
 
Janus: an open source and general purpose WebRTC (gateway) server
Janus: an open source and general purpose WebRTC (gateway) serverJanus: an open source and general purpose WebRTC (gateway) server
Janus: an open source and general purpose WebRTC (gateway) server
DevDay
 
Janus @ RTC2017 Beijing
Janus @ RTC2017 BeijingJanus @ RTC2017 Beijing
Janus @ RTC2017 Beijing
Lorenzo Miniero
 
DPFManager workshop
DPFManager workshopDPFManager workshop
Sutol How To Be A Lion Tamer
Sutol How To Be A Lion TamerSutol How To Be A Lion Tamer
Sutol How To Be A Lion Tamer
Sharon James
 
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Ruby Meditation
 
WebRTC Rockstars Asian Tour 2017
WebRTC Rockstars Asian Tour 2017WebRTC Rockstars Asian Tour 2017
WebRTC Rockstars Asian Tour 2017
Lorenzo Miniero
 
How to be a lion tamer
How to be a lion tamerHow to be a lion tamer
How to be a lion tamer
Sharon James
 
How to be a lion tamer
How to be a lion tamerHow to be a lion tamer
How to be a lion tamer
Wannes Rams
 
ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...
ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...
ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...
Altinity Ltd
 
Write a SocialTV app @ OpenSIPS 2021
Write a SocialTV app @ OpenSIPS 2021Write a SocialTV app @ OpenSIPS 2021
Write a SocialTV app @ OpenSIPS 2021
Lorenzo Miniero
 
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Anthony Dahanne
 
From Device to Data Center to Insights: Architectural Considerations for the ...
From Device to Data Center to Insights: Architectural Considerations for the ...From Device to Data Center to Insights: Architectural Considerations for the ...
From Device to Data Center to Insights: Architectural Considerations for the ...
P. Taylor Goetz
 

Similar to Janus workshop @ RTC2019 Beijing (20)

Janus Workshop @ ClueCon 2020
Janus Workshop @ ClueCon 2020Janus Workshop @ ClueCon 2020
Janus Workshop @ ClueCon 2020
 
Fuzzing Janus @ IPTComm 2019
Fuzzing Janus @ IPTComm 2019Fuzzing Janus @ IPTComm 2019
Fuzzing Janus @ IPTComm 2019
 
Janus/Asterisk @ Astricon 2017
Janus/Asterisk @ Astricon 2017Janus/Asterisk @ Astricon 2017
Janus/Asterisk @ Astricon 2017
 
Fuzzing RTC @ Kamailio World 2019
Fuzzing RTC @ Kamailio World 2019Fuzzing RTC @ Kamailio World 2019
Fuzzing RTC @ Kamailio World 2019
 
Convergence Best Poster Award
Convergence Best Poster AwardConvergence Best Poster Award
Convergence Best Poster Award
 
PEARC17: Live Integrated Visualization Environment: An Experiment in General...
PEARC17: Live Integrated Visualization Environment: An Experiment in General...PEARC17: Live Integrated Visualization Environment: An Experiment in General...
PEARC17: Live Integrated Visualization Environment: An Experiment in General...
 
Portets to composite applications
Portets to composite applicationsPortets to composite applications
Portets to composite applications
 
Janus @ DevDay Napoli
Janus @ DevDay NapoliJanus @ DevDay Napoli
Janus @ DevDay Napoli
 
Janus: an open source and general purpose WebRTC (gateway) server
Janus: an open source and general purpose WebRTC (gateway) serverJanus: an open source and general purpose WebRTC (gateway) server
Janus: an open source and general purpose WebRTC (gateway) server
 
Janus @ RTC2017 Beijing
Janus @ RTC2017 BeijingJanus @ RTC2017 Beijing
Janus @ RTC2017 Beijing
 
DPFManager workshop
DPFManager workshopDPFManager workshop
DPFManager workshop
 
Sutol How To Be A Lion Tamer
Sutol How To Be A Lion TamerSutol How To Be A Lion Tamer
Sutol How To Be A Lion Tamer
 
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
 
WebRTC Rockstars Asian Tour 2017
WebRTC Rockstars Asian Tour 2017WebRTC Rockstars Asian Tour 2017
WebRTC Rockstars Asian Tour 2017
 
How to be a lion tamer
How to be a lion tamerHow to be a lion tamer
How to be a lion tamer
 
How to be a lion tamer
How to be a lion tamerHow to be a lion tamer
How to be a lion tamer
 
ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...
ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...
ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...
 
Write a SocialTV app @ OpenSIPS 2021
Write a SocialTV app @ OpenSIPS 2021Write a SocialTV app @ OpenSIPS 2021
Write a SocialTV app @ OpenSIPS 2021
 
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018
 
From Device to Data Center to Insights: Architectural Considerations for the ...
From Device to Data Center to Insights: Architectural Considerations for the ...From Device to Data Center to Insights: Architectural Considerations for the ...
From Device to Data Center to Insights: Architectural Considerations for the ...
 

More from Lorenzo Miniero

WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
Lorenzo Miniero
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
Lorenzo Miniero
 
Getting AV1/SVC to work in the Janus WebRTC Server
Getting AV1/SVC to work in the Janus WebRTC ServerGetting AV1/SVC to work in the Janus WebRTC Server
Getting AV1/SVC to work in the Janus WebRTC Server
Lorenzo Miniero
 
WebRTC Broadcasting @ TADSummit 2023
WebRTC Broadcasting @ TADSummit 2023WebRTC Broadcasting @ TADSummit 2023
WebRTC Broadcasting @ TADSummit 2023
Lorenzo Miniero
 
BWE in Janus
BWE in JanusBWE in Janus
BWE in Janus
Lorenzo Miniero
 
The challenges of hybrid meetings @ CommCon 2023
The challenges of hybrid meetings @ CommCon 2023The challenges of hybrid meetings @ CommCon 2023
The challenges of hybrid meetings @ CommCon 2023
Lorenzo Miniero
 
Real-Time Text and WebRTC @ Kamailio World 2023
Real-Time Text and WebRTC @ Kamailio World 2023Real-Time Text and WebRTC @ Kamailio World 2023
Real-Time Text and WebRTC @ Kamailio World 2023
Lorenzo Miniero
 
Become a rockstar using FOSS!
Become a rockstar using FOSS!Become a rockstar using FOSS!
Become a rockstar using FOSS!
Lorenzo Miniero
 
Janus SFU cascading @ IIT-RTC 2022
Janus SFU cascading @ IIT-RTC 2022Janus SFU cascading @ IIT-RTC 2022
Janus SFU cascading @ IIT-RTC 2022
Lorenzo Miniero
 
SIP transfer with Janus/WebRTC @ OpenSIPS 2022
SIP transfer with Janus/WebRTC @ OpenSIPS 2022SIP transfer with Janus/WebRTC @ OpenSIPS 2022
SIP transfer with Janus/WebRTC @ OpenSIPS 2022
Lorenzo Miniero
 
WHIP WebRTC Broadcasting @ FOSDEM 2022
WHIP WebRTC Broadcasting @ FOSDEM 2022WHIP WebRTC Broadcasting @ FOSDEM 2022
WHIP WebRTC Broadcasting @ FOSDEM 2022
Lorenzo Miniero
 
WHIP and Janus @ IIT-RTC 2021
WHIP and Janus @ IIT-RTC 2021WHIP and Janus @ IIT-RTC 2021
WHIP and Janus @ IIT-RTC 2021
Lorenzo Miniero
 
JamRTC @ Wonder WebRTC unConference
JamRTC @ Wonder WebRTC unConferenceJamRTC @ Wonder WebRTC unConference
JamRTC @ Wonder WebRTC unConference
Lorenzo Miniero
 
Scaling WebRTC deployments with multicast @ IETF 110 MBONED
Scaling WebRTC deployments with multicast @ IETF 110 MBONEDScaling WebRTC deployments with multicast @ IETF 110 MBONED
Scaling WebRTC deployments with multicast @ IETF 110 MBONED
Lorenzo Miniero
 
Janus Workshop pt.2 @ ClueCon 2021
Janus Workshop pt.2 @ ClueCon 2021Janus Workshop pt.2 @ ClueCon 2021
Janus Workshop pt.2 @ ClueCon 2021
Lorenzo Miniero
 
Janus + NDI @ ClueCon 2021
Janus + NDI @ ClueCon 2021Janus + NDI @ ClueCon 2021
Janus + NDI @ ClueCon 2021
Lorenzo Miniero
 
Can WebRTC help musicians? @ FOSDEM 2021
Can WebRTC help musicians? @ FOSDEM 2021Can WebRTC help musicians? @ FOSDEM 2021
Can WebRTC help musicians? @ FOSDEM 2021
Lorenzo Miniero
 
Virtual IETF meetings with WebRTC @ IETF 109 MOPS
Virtual IETF meetings with WebRTC @ IETF 109 MOPSVirtual IETF meetings with WebRTC @ IETF 109 MOPS
Virtual IETF meetings with WebRTC @ IETF 109 MOPS
Lorenzo Miniero
 
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
 
Insertable Streams and E2EE @ ClueCon2020
Insertable Streams and E2EE @ ClueCon2020Insertable Streams and E2EE @ ClueCon2020
Insertable Streams and E2EE @ ClueCon2020
Lorenzo Miniero
 

More from Lorenzo Miniero (20)

WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Getting AV1/SVC to work in the Janus WebRTC Server
Getting AV1/SVC to work in the Janus WebRTC ServerGetting AV1/SVC to work in the Janus WebRTC Server
Getting AV1/SVC to work in the Janus WebRTC Server
 
WebRTC Broadcasting @ TADSummit 2023
WebRTC Broadcasting @ TADSummit 2023WebRTC Broadcasting @ TADSummit 2023
WebRTC Broadcasting @ TADSummit 2023
 
BWE in Janus
BWE in JanusBWE in Janus
BWE in Janus
 
The challenges of hybrid meetings @ CommCon 2023
The challenges of hybrid meetings @ CommCon 2023The challenges of hybrid meetings @ CommCon 2023
The challenges of hybrid meetings @ CommCon 2023
 
Real-Time Text and WebRTC @ Kamailio World 2023
Real-Time Text and WebRTC @ Kamailio World 2023Real-Time Text and WebRTC @ Kamailio World 2023
Real-Time Text and WebRTC @ Kamailio World 2023
 
Become a rockstar using FOSS!
Become a rockstar using FOSS!Become a rockstar using FOSS!
Become a rockstar using FOSS!
 
Janus SFU cascading @ IIT-RTC 2022
Janus SFU cascading @ IIT-RTC 2022Janus SFU cascading @ IIT-RTC 2022
Janus SFU cascading @ IIT-RTC 2022
 
SIP transfer with Janus/WebRTC @ OpenSIPS 2022
SIP transfer with Janus/WebRTC @ OpenSIPS 2022SIP transfer with Janus/WebRTC @ OpenSIPS 2022
SIP transfer with Janus/WebRTC @ OpenSIPS 2022
 
WHIP WebRTC Broadcasting @ FOSDEM 2022
WHIP WebRTC Broadcasting @ FOSDEM 2022WHIP WebRTC Broadcasting @ FOSDEM 2022
WHIP WebRTC Broadcasting @ FOSDEM 2022
 
WHIP and Janus @ IIT-RTC 2021
WHIP and Janus @ IIT-RTC 2021WHIP and Janus @ IIT-RTC 2021
WHIP and Janus @ IIT-RTC 2021
 
JamRTC @ Wonder WebRTC unConference
JamRTC @ Wonder WebRTC unConferenceJamRTC @ Wonder WebRTC unConference
JamRTC @ Wonder WebRTC unConference
 
Scaling WebRTC deployments with multicast @ IETF 110 MBONED
Scaling WebRTC deployments with multicast @ IETF 110 MBONEDScaling WebRTC deployments with multicast @ IETF 110 MBONED
Scaling WebRTC deployments with multicast @ IETF 110 MBONED
 
Janus Workshop pt.2 @ ClueCon 2021
Janus Workshop pt.2 @ ClueCon 2021Janus Workshop pt.2 @ ClueCon 2021
Janus Workshop pt.2 @ ClueCon 2021
 
Janus + NDI @ ClueCon 2021
Janus + NDI @ ClueCon 2021Janus + NDI @ ClueCon 2021
Janus + NDI @ ClueCon 2021
 
Can WebRTC help musicians? @ FOSDEM 2021
Can WebRTC help musicians? @ FOSDEM 2021Can WebRTC help musicians? @ FOSDEM 2021
Can WebRTC help musicians? @ FOSDEM 2021
 
Virtual IETF meetings with WebRTC @ IETF 109 MOPS
Virtual IETF meetings with WebRTC @ IETF 109 MOPSVirtual IETF meetings with WebRTC @ IETF 109 MOPS
Virtual IETF meetings with WebRTC @ IETF 109 MOPS
 
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
 
Insertable Streams and E2EE @ ClueCon2020
Insertable Streams and E2EE @ ClueCon2020Insertable Streams and E2EE @ ClueCon2020
Insertable Streams and E2EE @ ClueCon2020
 

Recently uploaded

How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 

Recently uploaded (20)

How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 

Janus workshop @ RTC2019 Beijing

  • 1. Janus and WebRTC: a practical journey Lorenzo Miniero
  • 2. Who am I? Lorenzo Miniero • Ph.D @ UniNA • Chairman @ Meetecho • Main author of Janus® Contacts and info • rtcexpo@meetecho.com • https://twitter.com/elminiero • https://www.slideshare.net/LorenzoMiniero
  • 3. Just a few words on Meetecho • Co-founded in 2009 as an academic spin-off • University research efforts brought to the market • Completely independent from the University • Focus on real-time multimedia applications • Strong perspective on standardization and open source • Several activities • Consulting services • Commercial support and Janus licenses • Streaming of live events (IETF, ACM, etc.) • Proudly brewed in sunny Napoli, Italy
  • 5. We just met in Napoli for JanusCon! https://januscon.it
  • 6. We just met in Napoli for JanusCon! https://januscon.it
  • 9. Involving a server as a peer (and applications)
  • 10. Involving a server as a peer (and applications)
  • 11. Involving a server as a peer (and applications)
  • 12. Involving a server as a peer (and applications)
  • 16. What’s Janus? Janus General purpose, open source WebRTC server • https://github.com/meetecho/janus-gateway • Demos and documentation: https://janus.conf.meetecho.com • Community: https://groups.google.com/forum/#!forum/meetecho-janus
  • 18. Modular architecture • The core only implements the WebRTC stack • JSEP/SDP, ICE, DTLS-SRTP, Data Channels, Simulcast, VP9-SVC, ... • Plugins expose Janus API over different “transports” • Currently HTTP / WebSockets / RabbitMQ / Unix Sockets / MQTT / Nanomsg • “Application” logic implemented in plugins too • Users attach to plugins via the Janus core • The core handles the WebRTC stuff • Plugins route/manipulate the media/data • Plugins can be combined on client side as “bricks” • Video SFU, Audio MCU, SIP gatewaying, broadcasting, etc.
  • 19. Modular architecture • The core only implements the WebRTC stack • JSEP/SDP, ICE, DTLS-SRTP, Data Channels, Simulcast, VP9-SVC, ... • Plugins expose Janus API over different “transports” • Currently HTTP / WebSockets / RabbitMQ / Unix Sockets / MQTT / Nanomsg • “Application” logic implemented in plugins too • Users attach to plugins via the Janus core • The core handles the WebRTC stuff • Plugins route/manipulate the media/data • Plugins can be combined on client side as “bricks” • Video SFU, Audio MCU, SIP gatewaying, broadcasting, etc.
  • 20. Modular architecture • The core only implements the WebRTC stack • JSEP/SDP, ICE, DTLS-SRTP, Data Channels, Simulcast, VP9-SVC, ... • Plugins expose Janus API over different “transports” • Currently HTTP / WebSockets / RabbitMQ / Unix Sockets / MQTT / Nanomsg • “Application” logic implemented in plugins too • Users attach to plugins via the Janus core • The core handles the WebRTC stuff • Plugins route/manipulate the media/data • Plugins can be combined on client side as “bricks” • Video SFU, Audio MCU, SIP gatewaying, broadcasting, etc.
  • 21. Modular architecture • The core only implements the WebRTC stack • JSEP/SDP, ICE, DTLS-SRTP, Data Channels, Simulcast, VP9-SVC, ... • Plugins expose Janus API over different “transports” • Currently HTTP / WebSockets / RabbitMQ / Unix Sockets / MQTT / Nanomsg • “Application” logic implemented in plugins too • Users attach to plugins via the Janus core • The core handles the WebRTC stuff • Plugins route/manipulate the media/data • Plugins can be combined on client side as “bricks” • Video SFU, Audio MCU, SIP gatewaying, broadcasting, etc.
  • 24. Configuring Janus • Janus and plugins can be configured via .jcfg files (libconfig format) • Old INI format still supported, though • Some (core-only) properties can be set via command-line as well • Several options to configure the server’s behaviour • Logging, transport, media settings, etc. • Format of libconfig files is quite simple to understand and use # This is a comment name0 = value0 category1: { name1 = number name2 = "string" name3 = boolean ... } category2: { name2 = [ array ] ... }
  • 25. Configuring Janus • Janus and plugins can be configured via .jcfg files (libconfig format) • Old INI format still supported, though • Some (core-only) properties can be set via command-line as well • Several options to configure the server’s behaviour • Logging, transport, media settings, etc. • Format of libconfig files is quite simple to understand and use # This is a comment name0 = value0 category1: { name1 = number name2 = "string" name3 = boolean ... } category2: { name2 = [ array ] ... }
  • 26. Configuring Janus • Janus and plugins can be configured via .jcfg files (libconfig format) • Old INI format still supported, though • Some (core-only) properties can be set via command-line as well • Several options to configure the server’s behaviour • Logging, transport, media settings, etc. • Format of libconfig files is quite simple to understand and use # This is a comment name0 = value0 category1: { name1 = number name2 = "string" name3 = boolean ... } category2: { name2 = [ array ] ... }
  • 27. Example of configuration file # This is a comment general: { configs_folder = "/opt/janus/etc/janus" plugins_folder = "/opt/janus/lib/janus/plugins" transports_folder = "/opt/janus/lib/janus/transports" events_folder = "/opt/janus/lib/janus/events" debug_level = 5 admin_secret = "janusoverlord" } certificates: { } media: { rfc_4588 = true rtp_port_range = "20000-40000" } nat: { nice_debug = false ice_ignore_list = "vmnet" } plugins: { } transports: { } events: { }
  • 28. Configuring the core • The Janus core is configured in janus.jcfg • As anticipated, some properties can be overridden via command-line too • Different categories that can be configured • general • General settings (logging, daemonization, etc.) • certificates • Certificate and key to use (DTLS only, autogenerated if missing) • media • Media related stuff (RTP range, DTLS mtu, etc.) • nat • ICE related settings (ICE Lite/TCP, STUN/TURN, etc.) • plugins, transports • Media and transport plugins NOT to load • events • Event handlers settings
  • 29. Configuring the core • The Janus core is configured in janus.jcfg • As anticipated, some properties can be overridden via command-line too • Different categories that can be configured • general • General settings (logging, daemonization, etc.) • certificates • Certificate and key to use (DTLS only, autogenerated if missing) • media • Media related stuff (RTP range, DTLS mtu, etc.) • nat • ICE related settings (ICE Lite/TCP, STUN/TURN, etc.) • plugins, transports • Media and transport plugins NOT to load • events • Event handlers settings
  • 30. Configuring the core • The Janus core is configured in janus.jcfg • As anticipated, some properties can be overridden via command-line too • Different categories that can be configured • general • General settings (logging, daemonization, etc.) • certificates • Certificate and key to use (DTLS only, autogenerated if missing) • media • Media related stuff (RTP range, DTLS mtu, etc.) • nat • ICE related settings (ICE Lite/TCP, STUN/TURN, etc.) • plugins, transports • Media and transport plugins NOT to load • events • Event handlers settings
  • 31. Configuring the core • The Janus core is configured in janus.jcfg • As anticipated, some properties can be overridden via command-line too • Different categories that can be configured • general • General settings (logging, daemonization, etc.) • certificates • Certificate and key to use (DTLS only, autogenerated if missing) • media • Media related stuff (RTP range, DTLS mtu, etc.) • nat • ICE related settings (ICE Lite/TCP, STUN/TURN, etc.) • plugins, transports • Media and transport plugins NOT to load • events • Event handlers settings
  • 32. Configuring the core • The Janus core is configured in janus.jcfg • As anticipated, some properties can be overridden via command-line too • Different categories that can be configured • general • General settings (logging, daemonization, etc.) • certificates • Certificate and key to use (DTLS only, autogenerated if missing) • media • Media related stuff (RTP range, DTLS mtu, etc.) • nat • ICE related settings (ICE Lite/TCP, STUN/TURN, etc.) • plugins, transports • Media and transport plugins NOT to load • events • Event handlers settings
  • 33. Configuring the core • The Janus core is configured in janus.jcfg • As anticipated, some properties can be overridden via command-line too • Different categories that can be configured • general • General settings (logging, daemonization, etc.) • certificates • Certificate and key to use (DTLS only, autogenerated if missing) • media • Media related stuff (RTP range, DTLS mtu, etc.) • nat • ICE related settings (ICE Lite/TCP, STUN/TURN, etc.) • plugins, transports • Media and transport plugins NOT to load • events • Event handlers settings
  • 34. Configuring the core • The Janus core is configured in janus.jcfg • As anticipated, some properties can be overridden via command-line too • Different categories that can be configured • general • General settings (logging, daemonization, etc.) • certificates • Certificate and key to use (DTLS only, autogenerated if missing) • media • Media related stuff (RTP range, DTLS mtu, etc.) • nat • ICE related settings (ICE Lite/TCP, STUN/TURN, etc.) • plugins, transports • Media and transport plugins NOT to load • events • Event handlers settings
  • 35. Media/IP settings (media) Name Value Description ipv6 true/false Enable IPv6 for media or not dtls_mtu int Maximum size of DTLS packets dtls_timeout int Retransmission step in ms (BoringSSL only) rtp_port_range min-max Range of ports to bind to for RTP/RTCP rfc_4588 true/false Whether rtx should be supported max_nack_queue int How many packets (window size in ms) to store for retransmissions no_media_timer int How long to wait (in seconds) before detecting no incoming media Considerations • dtls_mtu and dtls_timeout can have an impact on DTLS handshake • Make sure rtp_port_range reflects the server firewall, if any
  • 36. Generic ICE settings (nat) Name Value Description ice_lite true/false Whether to use ICE Lite or not ice_tcp true/false Whether to use ICE TCP or not (needs ICE Lite) full_trickle true/false Whether Janus should do full-trickle or not nat_1_1_mapping ip IP to replace host addresses with (e.g., AWS) ice_enforce_list list List of interfaces/IPs (even partial) to gather on ice_ignore_list list List of interfaces/IPs (even partial) NOT to gather on nice_debug true/false Enable libnice debugging or not Considerations • ice_lite can be quicker, if the server has a public address • Don’t mix nat_1_1_mapping and STUN, and only use it on AWS • ice_enforce_list and ice_ignore_list can make gathering faster
  • 37. STUN settings (nat) Most of the times you won’t need STUN in Janus (only for users), but if you do... Name Value Description stun_server address Address of the STUN server stun_port port Port of the STUN server Considerations • If Janus has a public address (common) or NAT-1-1, STUN makes things slower • If Janus is NATted, check the type of NAT first • STUN would most likely NOT work if it’s behind a symmetric NATs
  • 38. TURN settings (nat) Most of the times you won’t need TURN in Janus (only for users), but if you do... Name Value Description turn_server address Address of the TURN server turn_port port Port of the TURN server turn_type udp/tcp/tls Protocol to use to connect to the TURN server turn_user string Username to authenticate, if needed turn_pwd string Password to authenticate, if needed Considerations • 99% of the times, it’s users that need TURN, NOT Janus • If Janus can work with host or STUN, TURN makes things MUCH slower • Connections are much less efficient when TURN is used in Janus
  • 39. TURN REST API settings (nat) In case TURN credentials are not static, but ephemeral... Name Value Description turn_rest_api address Backend to contact for ephemeral credentials turn_rest_api_key string API key to authenticate at the backend turn_rest_api_method GET/POST HTTP method to use Considerations • As for TURN, plus the overhead of a new GET/POST per each PeerConnection • Explicit TURN info and TURN REST API are mutually exclusive
  • 40. A ton of scenarios done today with Janus! • SIP and RTSP gatewaying • WebRTC-based call/contact centers • Conferencing & collaboration • E-learning & webinars • Cloud platforms • Media production • Broadcasting & Gaming • Identity verification • Internet of Things • Augmented/Virtual Reality • ...and more!
  • 41. A quick look at plugins: EchoTest https://janus.conf.meetecho.com/docs/echotest
  • 42. A quick look at plugins: Record & Play https://janus.conf.meetecho.com/docs/recordplay
  • 43. A quick look at plugins: Record & Play https://janus.conf.meetecho.com/docs/recordplay
  • 44. A quick look at plugins: SIP gateway https://janus.conf.meetecho.com/docs/sipsofia
  • 45. A quick look at plugins: Audio MCU https://janus.conf.meetecho.com/docs/audiobridge
  • 46. A quick look at plugins: Video SFU https://janus.conf.meetecho.com/docs/videoroom
  • 47. A quick look at plugins: Streaming https://janus.conf.meetecho.com/docs/streaming
  • 48. Writing your own plugin in C (1) • Plugin initialization and information • init(): called when plugin is loaded • destroy(): called when Janus is shutting down • get_api_compatibility(): must return JANUS_PLUGIN_API_VERSION • get_version(): numeric version identifier (e.g., 3) • get_version_string(): verbose version identifier (e.g., “v1.0.1”) • get_description(): verbose description of the plugin (e.g., “This is my awesome plugin that does this and that”) • get_name(): short display name for your plugin (e.g., “My Awesome Plugin”) • get_author(): author of the plugin (e.g., “Meetecho s.r.l.”) • get_package(): unique package identifier for your plugin (e.g., “janus.plugin.myplugin”)
  • 49. Writing your own plugin in C (2) • Sessions management (callbacks invoked by the core) • create_session(): a user (session+handle) just attached to the plugin • handle_message(): incoming message/request (with or without a JSEP/SDP) • handle_admin_message(): incoming message/request from Admin API • setup_media(): PeerConnection is now ready to be used • incoming_rtp(): incoming RTP packet • incoming_rtcp(): incoming RTCP message • incoming_data(): incoming DataChannel message • slow_link(): notification of problems on media path • hangup_media(): PeerConnection has been closed (e.g., DTLS alert) • query_session(): called to get plugin-specific info on a user session • destroy_session(): existing user gone (handle detached)
  • 50. Writing your own plugin in C (3) • Interaction with the core (methods invoked by the plugin) • push_event(): send the user a JSON message/event (with or without a JSEP/SDP) • relay_rtp(): send/relay the user an RTP packet • relay_rtcp(): send/relay the user an RTCP message • relay_data(): send/relay the user a DataChannel message • close_pc(): close the user’s PeerConnection • end_session(): close a user session (force-detach core handle) • events_is_enabled(): check whether the event handlers mechanism is enabled • notify_event(): notify an event to the registered and subscribed event handlers
  • 57. Beyond C: plugins in Lua or JavaScript https://janus.conf.meetecho.com/docs/lua https://janus.conf.meetecho.com/docs/duktape
  • 64. Recording streams MJR00002 (8 bytes) LEN (2 bytes) JSON header (variable length) MEETECHO (8 bytes) LEN (2 bytes) RTP packet (variable length) MEETECHO (8 bytes) LEN (2 bytes) RTP packet (variable length) MEETECHO (8 bytes) LEN (2 bytes) RTP packet (variable length) ... Table: Old Janus MJR format https://janus.conf.meetecho.com/docs/recordings
  • 65. Recording streams MJR00002 (8 bytes) LEN (2 bytes) JSON header (variable length) MEET (4 bytes) + Timestamp (4 bytes) LEN (2 bytes) RTP packet (variable length) MEET (4 bytes) + Timestamp (4 bytes) LEN (2 bytes) RTP packet (variable length) MEET (4 bytes) + Timestamp (4 bytes) LEN (2 bytes) RTP packet (variable length) ... Table: New Janus MJR format https://janus.conf.meetecho.com/docs/recordings
  • 66. Processing a Janus recording janus-pp-rec /path/to/file.mjr /path/to/video.webm
  • 67. Processing Janus recordings (IETF example)
  • 68. Converting a Janus recording to pcap mjr2pcap /path/to/file.mjr /path/to/file.pcap
  • 71. Capping the bandwidth (REMB) https://tools.ietf.org/id/draft-alvestrand-rmcat-remb-03.html
  • 72. Client-side bandwidth estimation (BWE) https://github.com/meetecho/janus-gateway/pull/1118 (merged)
  • 74. Native data channels support https://www.meetecho.com/blog/data-channels-broadcasting-with-janus/
  • 81. Deploying Janus: a few possible topologies
  • 82. Deploying Janus: a few possible topologies
  • 83. Deploying Janus: a few possible topologies
  • 84. Deploying Janus: a few possible topologies
  • 85. Deploying Janus: a few possible topologies
  • 86. Deploying Janus: a few possible topologies
  • 87. Deploying Janus: a few possible topologies
  • 88. Anything wrong? Check the Admin API first! • One option is the requests/response API to interrogate Janus • Query server capabilities • Control some aspects (e.g., enable/disable debugging) • Inspect handles and WebRTC “internals” https://www.meetecho.com/blog/understanding-the-janus-admin-api/
  • 89. Admin API features: WebRTC internals
  • 90. Admin API features: detecting NAT types { "janus": "test_stun", "transaction": "123", "admin_secret": "janusoverlord", "address": "stun.l.google.com", "port": 19302, "localport": 7000 } { "janus": "test_stun", "transaction": "456", "admin_secret": "janusoverlord", "address":"stun.voip.eutelia.it", "port": 3478, "localport": 7000 } https://janus.conf.meetecho.com/docs/admin
  • 91. Admin API features: detecting NAT types { "janus": "success", "transaction": "123", "public_ip": "93.44 .. ", "public_port": 50819, "elapsed": 114808 } { "janus": "success", "transaction": "456", "public_ip": "93.44 .. ", "public_port": 65492, "elapsed": 127515 } https://janus.conf.meetecho.com/docs/admin
  • 92. Admin API features: capturing traffic https://www.meetecho.com/blog/capturing-webrtc-traffic-in-janus/
  • 93. An asynchronous approach • Admin API is cool, but is request/response... • Needs constant polling, and data is unavailable after the session ends • What about an asynchronous approach? • A new mechanism: Event Handlers • Core and plugins generate events • Custom modules can subscribe to and handle them • e.g., save to DB, send to external service, CDR, etc. • Multiple handlers available out of the box • HTTP, WebSockets, RabbitMQ, MQTT, Nanomsg
  • 94. An asynchronous approach • Admin API is cool, but is request/response... • Needs constant polling, and data is unavailable after the session ends • What about an asynchronous approach? • A new mechanism: Event Handlers • Core and plugins generate events • Custom modules can subscribe to and handle them • e.g., save to DB, send to external service, CDR, etc. • Multiple handlers available out of the box • HTTP, WebSockets, RabbitMQ, MQTT, Nanomsg
  • 95. An asynchronous approach • Admin API is cool, but is request/response... • Needs constant polling, and data is unavailable after the session ends • What about an asynchronous approach? • A new mechanism: Event Handlers • Core and plugins generate events • Custom modules can subscribe to and handle them • e.g., save to DB, send to external service, CDR, etc. • Multiple handlers available out of the box • HTTP, WebSockets, RabbitMQ, MQTT, Nanomsg
  • 97. Type of events • Different events handlers can subscribe to • Core events (e.g., startup/shutdown) • Session related events (e.g., session created/destroyed) • Handle related events (e.g., handle attached/detached) • JSEP related events (e.g., got/sent offer/answer) • WebRTC related events (e.g., ICE/DTLS state changes) • Media related events (e.g., stats on packets/bytes) • Plugin-originated events (specific to the application) • Transport-originated (specific to the transport) • External events (originated via Admin API) • Correlation possible on different identifiers • Transport instances that originate specific session • Opaque ID applications can set on handles of same “user” • Plugin-specific identifiers (e.g., in VideoRoom)
  • 98. Type of events • Different events handlers can subscribe to • Core events (e.g., startup/shutdown) • Session related events (e.g., session created/destroyed) • Handle related events (e.g., handle attached/detached) • JSEP related events (e.g., got/sent offer/answer) • WebRTC related events (e.g., ICE/DTLS state changes) • Media related events (e.g., stats on packets/bytes) • Plugin-originated events (specific to the application) • Transport-originated (specific to the transport) • External events (originated via Admin API) • Correlation possible on different identifiers • Transport instances that originate specific session • Opaque ID applications can set on handles of same “user” • Plugin-specific identifiers (e.g., in VideoRoom)
  • 99. Why is correlation important?
  • 100. Why is correlation important?
  • 101. Why is correlation important?
  • 102. “Sample Event Handler”: HTTP as a notifier • Simply forwards all events as JSON to an HTTP backend • Supports basic authentication • Can group events (i.e., JSON array vs. multiple JSON objects) • Implements basic retransmissions (exponential back-off) • Does nothing more than that: logic needs to be elsewhere • HTTP backend decides what to do with events, if anything • Behaviour can be tweaked via Admin API calls Need something else? Check the alternatives or write your own! A few other event handlers also available • Other transports (in repo), SQLite (by Mozilla)
  • 103. “Sample Event Handler”: HTTP as a notifier • Simply forwards all events as JSON to an HTTP backend • Supports basic authentication • Can group events (i.e., JSON array vs. multiple JSON objects) • Implements basic retransmissions (exponential back-off) • Does nothing more than that: logic needs to be elsewhere • HTTP backend decides what to do with events, if anything • Behaviour can be tweaked via Admin API calls Need something else? Check the alternatives or write your own! A few other event handlers also available • Other transports (in repo), SQLite (by Mozilla)
  • 104. “Sample Event Handler”: HTTP as a notifier • Simply forwards all events as JSON to an HTTP backend • Supports basic authentication • Can group events (i.e., JSON array vs. multiple JSON objects) • Implements basic retransmissions (exponential back-off) • Does nothing more than that: logic needs to be elsewhere • HTTP backend decides what to do with events, if anything • Behaviour can be tweaked via Admin API calls Need something else? Check the alternatives or write your own! A few other event handlers also available • Other transports (in repo), SQLite (by Mozilla)
  • 107. Writing your own event handler in C (1) • Plugin initialization and information • init(): called when event handler is loaded • destroy(): called when Janus is shutting down • get_api_compatibility(): must return JANUS_EVENTHANDLER_API_VERSION • get_version(): numeric version identifier (e.g., 3) • get_version_string(): verbose version identifier (e.g., “v1.0.1”) • get_description(): verbose description of the plugin (e.g., “This is my awesome event handler that does this and that”) • get_name(): short display name for your plugin (e.g., “My Awesome Event Handler”) • get_author(): author of the plugin (e.g., “Meetecho s.r.l.”) • get_package(): unique package identifier for your plugin (e.g., “janus.eventhandler.myhandler”)
  • 108. Writing your own event handler in C (2) • Events management (callbacks invoked by the core) • incoming_event(): incoming event to manage (queue and process in your thread) • handle_request(): incoming request from Admin API to tweak the plugin
  • 109. How can you handle events? • Generating events is easy, evaluating them is another matter... • Event Handlers typically just relay events, and don’t do processing themselves • Analyzing and correlating tons of events is complicated • A few different approaches, from easiest to trickiest 1 https://github.com/stirlab/janus-event-server (dumping events to file) 2 https://github.com/mozilla/janus-eventhandler-sqlite (dumping events to SQLite) 3 Write your own backend, e.g., https://www.meetecho.com/blog/event-handlers-a-practical-example/ https://www.meetecho.com/blog/correlating-janus-event-handlers/ • A much better approach: trust the smart guys! • https://github.com/sipcapture/homer • https://hepic.tel/
  • 110. How can you handle events? • Generating events is easy, evaluating them is another matter... • Event Handlers typically just relay events, and don’t do processing themselves • Analyzing and correlating tons of events is complicated • A few different approaches, from easiest to trickiest 1 https://github.com/stirlab/janus-event-server (dumping events to file) 2 https://github.com/mozilla/janus-eventhandler-sqlite (dumping events to SQLite) 3 Write your own backend, e.g., https://www.meetecho.com/blog/event-handlers-a-practical-example/ https://www.meetecho.com/blog/correlating-janus-event-handlers/ • A much better approach: trust the smart guys! • https://github.com/sipcapture/homer • https://hepic.tel/
  • 111. How can you handle events? • Generating events is easy, evaluating them is another matter... • Event Handlers typically just relay events, and don’t do processing themselves • Analyzing and correlating tons of events is complicated • A few different approaches, from easiest to trickiest 1 https://github.com/stirlab/janus-event-server (dumping events to file) 2 https://github.com/mozilla/janus-eventhandler-sqlite (dumping events to SQLite) 3 Write your own backend, e.g., https://www.meetecho.com/blog/event-handlers-a-practical-example/ https://www.meetecho.com/blog/correlating-janus-event-handlers/ • A much better approach: trust the smart guys! • https://github.com/sipcapture/homer • https://hepic.tel/
  • 112. Event Handlers in HOMER since “day one”
  • 116. Thanks! Questions? Comments? Get in touch! https://www.meetecho.com rtcexpo@meetecho.com