A Call System Shaped Like a Room, Not a Mesh

Browsers connect to on-site media servers, which bridge RTP toward a room camera and a projector
Clients come in from the public internet to a small set of servers. Those servers fan streams out. A camera and a projector, if you still have a physical room, sit on a segment you control. They do not join the mesh of home routers.

We needed calls between people who were about to leave the building. The first whiteboard was a mesh: every browser sends media to every other browser. Four people is twelve directed streams. Ten people is ninety. The sketch looked friendly until someone multiplied it out. We stopped designing a mesh that day.

Three processes, because the call is three steps

Capture with getUserMedia, signaling over a WebSocket, ICE, then DTLS-SRTP
The four steps, and the reminder in the footer of the figure: once the call is up, media does not have to hairpin through the signaling server. A relay stays on the path only when a peer cannot connect directly.

Capture. getUserMedia, one audio track, one video track, simulcast when the browser offers it. This fails for ordinary reasons: the permission prompt, a camera already open in another tab. Show that error. Do not file it as a network incident.

Signaling. A WebSocket server exchanges SDP offers and answers, and it tells the client which forwarding process owns the room. It holds no media. The room row outlives the process: room id, process address, participant ids. A restarted signaling server can pick the row back up. Clients re-register. An in-progress call does not have to die because the directory process restarted.

Connect, then stream. ICE tries a host candidate, then a server-reflexive candidate, then TURN. The iceServers list has to include the TURN URL. Leave it out and step three never relays. The interface still says connected, because the signaling socket is up. We shipped that. The person behind a symmetric NAT could see the room and nobody could hear them. DTLS-SRTP carries the media once ICE finishes. Janus videoroom forwards the packets. It does not decode them. Decoding is what a mixing unit does, and a mixing unit falls over as the room grows, which is the moment you needed it.

The test: three laptops and a phone

Three laptops on a network that allows UDP. One phone on a hotspot. The laptops should settle on host or server-reflexive candidates and never touch the relay. The phone should fail those and pick a relay candidate.

If the phone's ICE state goes to failed, the TURN URL is missing or the credential is wrong. If the phone connects and the relay's bandwidth graph does not move, you are watching a different path than the one you think you configured. We run this before a release. A test from the office desk does not include the peer who will have the problem.

A single videoroom process caps at 16 publishers. The 17th spills to another process. The room id stays the same. Only the signaling server knows which process that is. Clients do not pick neighbors. There are no neighbors to pick, because there is no mesh.

TURN does not share a failure domain with signaling. A full relay should not take down the socket that tells the next client to use a different relay. Three processes feel like extra parts on the first afternoon. On the day one of them dies, they are the reason the other two are still up.