Background Reading

Submitted by aalhad on Sat, 09/05/2020 - 14:10

Languages you need to know

Java, Kotlin, Lua


WebRTC chapter from a book by Ilya Grigorik -
Actually the entire book is good


This is the XMPP client library that jitsi uses -
And this is the XMPP server that jitsi uses -


Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal


Understand and take notes of the ICE implementation that jitsi uses

Real world implementation of TURN - also, there was a reference to this on the jitsi forums

The coturn home page has a good list of RFCs

TURN specs:

RFC 5766 - base TURN specs
RFC 6062 - TCP relaying TURN extension
RFC 6156 - IPv6 extension for TURN
RFC 7443 - ALPN support for STUN & TURN
RFC 7635 - oAuth third-party TURN/STUN authorization
DTLS support (
Mobile ICE (MICE) support (
Origin field in TURN (Multi-tenant TURN Server) (
TURN Bandwidth draft specs (
TURN-bis (with dual allocation) draft specs (

STUN specs:

RFC 3489 - "classic" STUN
RFC 5389 - base "new" STUN specs
RFC 5769 - test vectors for STUN protocol testing
RFC 5780 - NAT behavior discovery support
RFC 7443 - ALPN support for STUN & TURN
RFC 7635 - oAuth third-party TURN/STUN authorization

Supported ICE and related specs:

RFC 5245 - ICE
RFC 5768 – ICE–SIP
RFC 6336 – ICE–IANA Registry
RFC 6544 – ICE–TCP
RFC 5928 - TURN Resolution Mechanism

The implementation fully supports the following client-to-TURN-server protocols:

UDP (per RFC 5766)
TCP (per RFC 5766 and RFC 6062)
TLS (per RFC 5766 and RFC 6062): TLS1.0/TLS1.1/TLS1.2; ECDHE is supported.
DTLS ( DTLS versions 1.0 and 1.2.
SCTP (experimental implementation).

Supported relay protocols:

UDP (per RFC 5766)
TCP (per RFC 6062)


An XMPP protocol extension for initiating and managing peer-to-peer media sessions between two XMPP entities in a way that is interoperable with existing Internet standards.


a signaling protocol used for initiating, maintaining, and terminating real-time sessions that include voice, video and messaging applications.

RTP - realtime transport protocol


a network control protocol designed for use in entertainment and communications systems to control streaming media servers


a format for describing multimedia communication sessions for the purposes of session announcement and session invitation



Jibri provides services for recording or streaming a Jitsi Meet conference.


an XMPP extension that allows real-time communications clients to discover and interact with conference bridges that provide conference mixing or relaying capabilities.

SFUs, MCUs and performance

Multipoint Control Units (MCUs), Selective Forwarding Units (SFUs)

Overall flow of Jitsi

Overall steps in the communication between client, jicofo and jvb.

A client connects to the xmpp, and sends an IQ to the jicofo component address.
Jicofo creates a room, joins the room, and make the one who requested to create the room an owner in the room, if he is the first one.
The client receives the succesfull response from jicofo and joins the room.
Nothing happens, here as there is just one participant.
A second participant joins, jicofo sees that and starts the process of connecting both clients sends an IQ to the jvb component address to allocate channels for both participants.
uses the allocated channels data to create jingle session-initiate, which then sends to both clients

Clients accept it and start sending and they are now connected using jvb.

A nice diagram showing the flow