This page covers the call control plane: how a client joins a call, connects to the relay, keeps the right to send and listen, survives network drops and leaves. Audio and video frame formats and SFrame media encryption are on Media, MLS groups on MLS and sealed messages, and ring push delivery on Notifications. The full rules are in document 15.

A client or bot that joins calls needs four parts:

  • an HTTP client for the call endpoints on the context's hosting server;
  • a handler for call events on the event WebSocket;
  • a WebRTC data-channel client for the relay;
  • state machines for lease ticks, the transmit gate and auto-rejoin.

A bot that joins calls meets every client requirement in document 15 except those about the user interface (15 §1.4).

Where calls happen

A call exists only in a voice channel, a 1:1 DM or a group DM. Anywhere else, a text channel included, call requests fail with call.unsupported_context. A context has at most one call at a time, and its hosting server is the single controller: it assigns participant indexes, computes leases, picks the relay and drives the SFU if one is used. There is no limit on call length (15 §2.1).

A call has its context's security mode, fixed for the call's life. When the context's mode changes, the call ends and clients move to a new one (see Planned migrations).

Warning

Take a call's security mode from your own view of the context, never from the server: the secure state you pinned for a channel; for a DM, the mode you compute from the participants' IdentityStates, and for a group DM also your secure-state pin. Never use Call.security, the RelayTicket's sec or call.ended's next. If the server presents a call as insecure (in the Call, the ticket, or a lease tick without epoch) while you hold the context as secure, don't join, don't send media and don't play or forward unencrypted frames. In a channel, or a group DM you hold a secure-state pin for, show W9. In a 1:1 DM, refetch the IdentityStates and join only if your own computation now says the DM is insecure; otherwise treat the call as unavailable and record a diagnostic. Run this check before every automatic rejoin too (15 §2.1 item 4).

The Call and Participant objects

A Call, from 15 §2.5.4 with one of its participants:

{
  "callId": "01938f40-5a6b-7c8d-9e0f-102132435465",
  "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566",
  "security": "secure",
  "startedAt": "2026-12-04T18:20:02.114Z",
  "participants": [
    { "pid": 3, "addr": "bob@b.com", "name": "Bob", "did": "Yx3kP0aL9qR2sT5uV8wZ1B",
      "kind": "user", "state": "connected", "joinedAt": "2026-12-04T18:20:02.114Z",
      "selfMuted": false, "selfDeafened": false, "mutedForEveryone": false,
      "sources": { "screen": true, "screenAudio": true, "webcam": false }, "leafIndex": 2 }
  ],
  "videoRoute": "dc",
  "mediaEpoch": 42,
  "profiles": ["voice-dc/1", "video-dc/1", "sfu-rtp/1"],
  "maxParticipants": 200,
  "ringing": null
}

videoRoute is dc (video over the relay) or sfu. mediaEpoch is the MLS epoch senders use in a secure call, and null in an insecure one. ringing is the pending Ring of a DM call, or null. Unknown values have fixed fallbacks: security → secure (send nothing until you understand the call), videoRoute → dc.

Each device in a call has one participation, recorded as a seat with a Participant and a pid from 0 to 65535. A freed pid isn't reused for 60 s, so a late frame can't be attributed to the wrong person (15 §2.5.2). In the Participant:

  • check name against addr as Addresses describes before showing it anywhere, including the incoming-call screen and the operating system's call interface;
  • state is connecting, connected or reconnecting (unknown → connecting), and kind is user or bot (unknown → user);
  • selfMuted, selfDeafened and sources are reported by the participant's own client and are for display only; only the lease lists are enforced;
  • leafIndex is the device's MLS leaf in a secure call (null in an insecure one). It is only a hint: check a frame's sender against your own MLS state as 18 §4.5 requires (15 §17 item 3).

Joining

Before you join

From the join request until your participation ends, keep a full subscription to the call's context stream, whatever screen the user is on, and renew it after every WebSocket reconnect. Untargeted call events reach only full subscribers (15 §3.1).

Whenever a socket gains a full subscription to a call-capable context, and after every session.resync_required for it, the server sends call.state with the current Call or null. Call events are ephemeral and never replayed, so this is how you catch up. GET /v1/contexts/{ctx}/call returns the same {"call": …} to any member of the context, which is how a channel list shows who is in a voice channel.

Across servers the one-call rule is yours to enforce: leave a call on one server before joining a call on another (15 §2.3).

The join request

Send POST /v1/contexts/{ctx}/call/join to the hosting server with a session (Authorization: Bearer) or bot token (Authorization: Bot). The body is a JoinRequest:

Member Default Meaning
features required Supported media profiles: voice-dc/1 (required), video-dc/1, sfu-rtp/1.
create true Start a call if none is active; with false, no call gives 404 call.not_active.
takeOver false End the user's other participation on this server.
rejoinToken — Restore this device's seat after a drop.
planned false With rejoinToken: this rejoin is a planned migration.
selfMuted, selfDeafened false Initial self state.
ring true DM only: ring the others when this join starts the call.
video false The caller starts with the webcam on.
POST https://b.com/v1/contexts/ch:01938a11-2b3c-7d4e-8f90-112233445566/call/join
Authorization: Bearer rs_4kJ…
Idempotency-Key: 9f0c1e2a-join-1

{ "features": ["voice-dc/1", "video-dc/1", "sfu-rtp/1"], "selfMuted": false }

Send an Idempotency-Key with every join. Use a fresh key for every new join, every auto-rejoin attempt and every resend with a changed body, and reuse one only to resend the same request after losing its response; a replayed response carries a newly issued RelayTicket (15 §3.3.1). Every automatic join sends ring: false, so a reconnect never rings anyone.

Rate limits are per session, answered with 429 core.rate_limited: join 30 per minute, participant updates 10 per second, epoch-ready 10 per second (15 §3.1).

Admission checks

The server checks these in order and returns the first failure (15 §2.2):

  1. The session is authenticated.
  2. You may know about the context. A channel you can't view, or a DM you aren't in, answers 404 core.not_found exactly like an unknown context, so hidden channels reveal nothing. Then the context must be call-capable.
  3. Membership: community membership and bans in a channel; in a DM, an active participation, or a pending one (or declined, in a 1:1 DM) that the join makes active by implicit acceptance.
  4. Secure context: the account is secure and the device enrolled (security.account_required, security.device_not_enrolled).
  5. Channel: channel membership. On channel.join_required, join the channel silently and retry.
  6. Secure context: a current leaf in the context's MLS group. On call.mls_join_required, complete the MLS join and retry.
  7. The one-call rule (call.already_in_call).
  8. Capacity: fewer than maxCallParticipants seats, default 200 (call.full).
  9. A relay can take the call (call.relay_unavailable).

Joining doesn't need speak_and_share; a member without it is admitted as a listener. If no call is active and create is true, the server creates one and emits call.started, then call.participant_joined.

The join response

{
  "call": { "callId": "01938f40-5a6b-7c8d-9e0f-102132435465", "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566",
            "security": "secure", "startedAt": "2026-12-04T18:20:02.114Z", "participants": [ "…" ],
            "videoRoute": "dc", "mediaEpoch": 42,
            "profiles": ["voice-dc/1", "video-dc/1", "sfu-rtp/1"], "maxParticipants": 200, "ringing": null },
  "pid": 7,
  "rejoinToken": "rj_Vb7mQ2xT9kLp4sWz0aYc1dRf8gHn3uJe6iKo5tBv2Nw",
  "seatRestored": false,
  "lease": { "callId": "01938f40-5a6b-7c8d-9e0f-102132435465", "pid": 7, "listen": true,
             "audio": true, "video": true, "audioBlockedBy": null, "videoBlockedBy": null },
  "tick": { "callId": "01938f40-5a6b-7c8d-9e0f-102132435465", "seq": 1185, "validMs": 3000,
            "audio": [3, 7], "video": [3, 7], "listeners": [3, 7], "epoch": 42 },
  "relay": { "url": "https://relay1.b.com/r",
             "ticket": "eyJhbGciOiJFZERTQSIsInR5cCI6InN2LXJlbGF5K2p3dCIsImtpZCI6ImIuY29tIzIwMjYtMTJhIn0.eyJpc3Mi…",
             "ticketExpiresAt": "2026-12-04T18:21:00.000Z" }
}

The JoinResponse is from 15 §3.3.3. Points to get right:

  • Keep rejoinToken in memory and delete it when the participation ends.
  • tick is your first lease tick. Its receipt time is when you first sent a join with this Idempotency-Key, not when the response arrived, so a slow response can't make it look fresh.
  • Use relay.url, never ServerMetadata endpoints.relayUrl.

Connect to the relay at once. Your transmit gate stays closed until the relay session is up and, in a secure call, send keys for your sending epoch are installed (15 §3.3.4).

One call per user

A user has at most one participation per hosting server, even across devices. A conflicting join answers 409 call.already_in_call with data {ctx, callId, sameDevice, sameCall}; resend with takeOver: true to resolve it (15 §2.3). When the old participation is on the same device in another call, this is a switch: send takeOver: true without asking, because changing voice channels is an ordinary click. When it is on another device, it is Move voice here: ask once, worded by sameCall.

Leaving

Send POST /v1/contexts/{ctx}/call/leave with {"callId": "01938f40-5a6b-7c8d-9e0f-102132435465"}, then close the relay connection and SFU session and stop auto-rejoin. The answer is always 204, also for a seat that no longer exists (15 §3.4).

Pressing Leave is the only way a user ends their own participation. Call leave when the user presses Leave or deliberately closes the call screen, and never on your own because of network trouble. Closing the relay connection without leave is an outage, and the server holds the seat for 30 s.

Voice leases and ticks

Every second, call control states who may listen and who may send, and every relay, SFU and client obeys only statements less than 3 s old. This is how a revoked participant is cut off within 4 s on every path. All media goes through the relay or the SFU, which both enforce these statements, so the cut holds even against modified clients (15 §4, §4.8, §17 item 7).

The three lists

A LeaseSnapshot holds three sorted, duplicate-free pid lists, with audio and video subsets of listeners:

{ "callId": "01938f40-5a6b-7c8d-9e0f-102132435465", "seq": 1186, "validMs": 3000,
  "audio": [3], "video": [3, 7], "listeners": [3, 7, 12], "epoch": 42 }
sourceId Source List
0 Microphone audio
1 Screen video video
2 Screen or application sound audio
3 Webcam video
4–15 Reserved None: never forwarded or played

seq strictly increases and may skip values. validMs is always 3000; use 3,000 ms whatever it says. epoch appears only in secure calls. Ignore a snapshot whose arrays break the ordering or subset rules (15 §4.2).

Your own view arrives as a VoiceLease in the join response and in call.lease_changed. It adds why a list is closed to you: audioBlockedBy is no_permission, muted_for_everyone, server_muted, timed_out or other (unknown → other), and videoBlockedBy is no_permission, timed_out or other. When several inputs block a list, the first in the order timed_out, no_permission, muted_for_everyone, server_muted is named (15 §4.1). Use it to explain a block to the user; ticks are what enforce it (15 §4.10).

Processing ticks

Ticks reach you twice with the same payload: as call.tick on the relay's control channel and as the WebSocket event call.tick. The WebSocket copy keeps arriving while the relay connection is down. Process both as one stream (15 §4.4, §4.6):

  1. Keep the tick with the highest seq for your current callId, and ignore any tick that isn't higher. On joining a new call, discard the old tick state and start from the join response's tick.
  2. Timestamp each tick on the audio engine's monotonic clock when it arrives. Ticks carry no timestamp, and no clocks are compared between parties.
  3. A sender is covered for a list while the newest tick lists it and that tick arrived less than 3,000 ms ago. If the newest tick omits a sender, it is uncovered at once.
  4. Drop each incoming frame whose sender isn't covered at playout scheduling time, on both routes: relay and SFU.
  5. Send a source only while you are covered for its list yourself, and stop within one frame interval when you aren't.
  6. Wedge recovery. Once your newest tick is 3,000 ms old or older, accept the next WebSocket tick of the same call whatever its seq. A relay that sends a huge seq can then stall you for about 3 s, not for the rest of the call.

The test vectors R1, R2 and V1 in 15 §4.11 are normative. Use them as unit tests.

Connecting to the relay

Every server runs a relay. It forwards WebRTC data-channel messages, never decodes media and enforces leases. Keep a relay connection for the whole participation, even while your video travels through the SFU, because the relay carries your microphone audio, lease ticks, MediaAttestations and feedback (15 §6, §7.1).

The relay ticket

relay.ticket is a RelayTicket: a compact JWS with typ sv-relay+jwt, signed with EdDSA by the hosting server's sign key (15 §5):

{ "alg": "EdDSA", "typ": "sv-relay+jwt", "kid": "b.com#2026-12a" }
{ "iss": "b.com", "aud": "https://relay1.b.com/r", "sub": "alice@a.com", "did": "q2bS9xVg3m0yJpQe1vT0Aw",
  "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566", "cid": "01938f40-5a6b-7c8d-9e0f-102132435465",
  "pid": 7, "sec": "secure", "prof": ["voice-dc/1", "video-dc/1"],
  "iat": 1764872400, "exp": 1764872460, "jti": "t1QmR8fZ0aXc3vB6nK9wEg" }

A client treats it as opaque and never reuses it. It lives at most 60 s, is valid only at the relay named in aud, and is single use, so a stolen ticket gives at most one connection within a minute. Relay authors will find the validation steps in 15 §5.2 and a full test vector on the public RFC 8032 key in 15 §5.3.

The connect request

Create one RTCPeerConnection with the three data channels below, create an offer, and send it without waiting for ICE gathering to POST {relayUrl}/connect (15 §6.2):

POST https://relay1.b.com/r/connect
Authorization: Bearer eyJhbGciOiJFZERTQSIsInR5cCI6InN2LXJlbGF5K2p3dCIsImtpZCI6ImIuY29tIzIwMjYtMTJhIn0.eyJpc3Mi…
Content-Type: application/json

{ "offer": "v=0\r\no=- 4611731400430051336 2 IN IP4 127.0.0.1\r\n…m=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\n…" }

The relay answers 201 {answer, relaySessionId}, with all its ICE candidates in the answer. The session is up when sv-control opens and relay.welcome arrives. TURN is never used, and you configure no STUN servers for the relay connection, because the relay's public candidates are enough. The relay answers a=setup:passive, so you are the DTLS client, and every data-channel message stays at or below 16 KiB (15 §6.3).

Every relay connection uses this layout. Create every channel with negotiated: true and a fixed id, so no in-band channel-opening protocol is needed (15 §6.4):

id Label Delivery Carries
0 sv-control Ordered, reliable, UTF-8 JSON Control messages
1 sv-audio Unordered, maxRetransmits: 0, binary voice-dc/1 Sources 0 and 2
2 sv-video Unordered, maxPacketLifeTime: 120 ms, binary video-dc/1 Sources 1 and 3

Audio is never retransmitted because a late voice frame is worse than a concealed one.

Control messages

Each sv-control message is a ControlMessage, {t, from?, to?, d}. The relay ignores your from and stamps the session's pid on what it forwards. Ignore unknown t values (15 §6.5). A session starts like this (15 §6.8):

{ "t": "relay.welcome", "d": { "callId": "01938f40-5a6b-7c8d-9e0f-102132435465", "pid": 7, "relaySessionId": "r1-8f2c91", "maxInboundKbps": 10000 } }
{ "t": "call.tick", "d": { "callId": "01938f40-5a6b-7c8d-9e0f-102132435465", "seq": 1185, "validMs": 3000, "audio": [3, 7], "video": [3, 7], "listeners": [3, 7], "epoch": 42 } }
{ "t": "relay.subscribe", "d": { "sources": [ { "pid": 3, "sourceId": 1 }, { "pid": 3, "sourceId": 2 } ] } }
  • relay.welcome comes first; maxInboundKbps (default 10,000) caps what you may send.
  • Send relay.ping with an incrementing n every 5 s; the relay answers relay.pong.
  • relay.subscribe lists the sources 1–3 you want, replacing the last list. Microphone audio is always forwarded. Subscribe to what the user is watching, and automatically in a small call.
  • relay.closing ends the session; its reason decides what you do (see What counts as a drop).
  • relay.error reports a bad control message and never ends the session.

When connect fails

Never reuse a ticket. "Rejoin" below means a join with your rejoin token and planned: false, which returns a fresh ticket (15 §6.2 item 3):

/connect answer What to do
relay.ticket_invalid, relay.ticket_expired, relay.ticket_replayed, relay.call_unknown Rejoin at once; if it fails the same way, follow the auto-rejoin schedule.
relay.overloaded, other 5xx, network error, no answer in 10 s Wait retryAfterMs or the next scheduled attempt, whichever is later, then rejoin.
relay.wrong_relay, relay.bad_offer, other 4xx Rejoin once at once. If the new connection gets either of these codes again, the failure is terminal: close the call screen and send a call_failure report with phase: "relay_connect".

A failure before your first relay session is up isn't an unexpected drop, so the voice-activation mute doesn't apply: nothing was being sent yet. You still follow the auto-rejoin schedule from the join response. The seat stays connecting and is removed after 20 s without a relay session; later attempts rejoin with the token while it is valid and join afresh after that.

Failure detection

Declare the relay connection failed at the first instant, on your monotonic clock, that any of these holds (15 §6.7):

  • 5,000 ms without any control-channel message, whatever the ICE state;
  • ICE state failed;
  • ICE state disconnected for 5,000 ms;
  • the DTLS or SCTP transport closed.

Then close the connection and ignore anything that arrives on it later. The relay declares you gone after 10 s without a packet, and your seat becomes reconnecting.

Routing

Clients never send media to each other directly. Every source travels through the hosting server's relay or its SFU, in channels, 1:1 DMs and group DMs alike and in both security modes, so the server enforces leases on every path and no participant learns another's IP address from a call (15 §7.1 item 2, §17 item 6). The relay, the SFU and every other server you connect to do learn your address, as with any server.

Source Route
Microphone (0) Always the relay (voice-dc/1), never the SFU
Screen video (1), webcam (3) The relay (video-dc/1), or the SFU (sfu-rtp/1) when videoRoute is sfu
Screen or application sound (2) With screen video: follows that video's route, so the two stay in sync. Without screen video: always the relay

Call control chooses videoRoute for the whole call; the table fixes everything else about a source's route (15 §7.1).

The SFU route

When videoRoute is sfu, video goes through an SFU over sfu-rtp/1. Call control chooses it, only on an SFU-capable server and only in channels and group DMs; a 1:1 DM call never uses it. The recommended policy switches to sfu at more than 8 seats with at least one active video source, and back to dc after 60 s with at most 4 seats (15 §7.2). A device that didn't list sfu-rtp/1 in its join features can't send or receive video while videoRoute is sfu, and the SFU endpoints answer it with core.unsupported_feature; its voice is unaffected (15 §8.2). You never call the SFU's API: you exchange SDP with call control, which drives the SFU. Each device has one SFU session per call, and microphone audio never goes through it (15 §8.1).

When call.route_changed switches to sfu:

  1. POST /v1/contexts/{ctx}/call/sfu/session with {callId, offer, publish: [{mid, sourceId, rids}]} answers 201 {sfuSessionId, answer, tracks}.
  2. Publish your video, and the sound that goes with a screen share, on the SFU, and stop it on the relay within 5 s.
  3. Choose what you receive with PUT …/subscriptions {want: [{pid, sourceId, maxSpatialLayer?, maxTemporalLayer?}]} (202; each request replaces the previous set, and the server follows with sfu.offer if transceivers must change).
  4. Answer each sfu.offer within 10 s with POST …/answer {negotiationId, answer} (204); otherwise call control closes the session with sfu.closed, reason negotiation_timeout, and you create a new one. For your own changes use POST …/offer; you are the polite peer, and an offer sent while a server offer is outstanding gets 409 sfu.negotiation_conflict.

SFU failures interrupt video, never voice, and are not an outage (15 §8.3):

  • After a connection failure (ICE failed, or disconnected for 5 s), delete the session if you can and create a new one, retrying after 1, 2, 4 and 8 s and then every 30 s while videoRoute is sfu.
  • sfu.unavailable (503) carries retryAfterMs; retry on the same schedule. sfu.session_unknown means call control lost the session: create a new one.
  • After sfu.bad_sdp, retry once with a freshly built offer. If that also fails, stop publishing on the SFU for this call and send a call_failure report with phase: "in_call".

Secure contexts only

In a secure call, every frame published to the SFU is SFrame-encrypted, and only the codecs 18 §8.4.2 allows are negotiated: Opus for source 2, VP8 and VP9 for video.

Route changes are silent

Moving a source between the relay and the SFU, or switching videoRoute, must not prompt, warn, change the mute state, release a held push-to-talk, or show the user as disconnected. The transmit gate stays open throughout if it was open (15 §7.3).

Epoch switches

Secure contexts only

Only secure calls switch epochs. The SFrame keys themselves are on Media.

mediaEpoch is the MLS epoch whose SFrame keys senders use. Call control switches it once devices are ready, so nobody sends with keys the others don't hold yet (15 §9):

  1. When you process a commit creating epoch e, install keys for e but keep sending with the old ones.
  2. Post POST /v1/contexts/{ctx}/call/epoch-ready {"callId": "…", "epoch": 43} (204). After a join or rejoin, post your current epoch once the relay session is up.
  3. Call control switches when every connected seat with a leaf in e is ready, or 2,000 ms after the Delivery Service sequenced the commit, and emits call.epoch_switch {callId, epoch}.
  4. Switch at the first call.epoch_switch or tick naming e or later, or 2,000 ms after you processed the commit. A tick with a higher epoch counts as a switch.

If you learn of an epoch you haven't processed, fetch the commits at once. After 8 s your transmit gate closes with waiting_for_keys until you catch up (15 §9.5).

Auto-rejoin

A network drop doesn't end a call. The client rejoins by itself, with no attempt limit, while the call screen is open (15 §10).

What counts as a drop

Event Class
Relay failed; relay.closing with timeout, overloaded, session_expired, an unknown reason, or replaced you didn't cause; call.participant_left for your own seat with timeout or session_expired; call.ended with server_restart Unexpected drop (after session_expired, renew or re-create your session first): auto-rejoin, voice activation and open mic come back muted
call.migrate, relay.closing with drain; call.ended with security_upgraded or group_restarted; relay.closing with call_restarted Planned migration: everything kept
WebSocket drop with the relay fine; route changes; epoch switches Not a drop
relay.closing with left, removed, revoked, moved, switched or call_ended; call.moved; call.ended with any other reason Terminal: don't rejoin

Rejoining

Times are offsets from t0, when you detected the drop, on your monotonic clock (15 §10.4):

  1. Detect. Close the relay and SFU sessions, self-mute a voice-activation or open-mic user, turn the webcam off and hold any screen share.
  2. Attempt at t0 + 0, 1, 2, 4, 8 and 15 s, then every 30 s. A network-up signal starts one early. One attempt at a time.
  3. Restore. On 200, connect to the relay. If seatRestored is false, stop a held screen share.
  4. Complete when the relay's first tick arrives and, in a secure call, send keys are installed. A failure or 10 s without completing counts as a failed attempt.

Each attempt has a fresh Idempotency-Key, ring: false, features and the current self-mute, and runs your own security-mode check first (15 §10.5). Within 60 s of t0, while you hold a token, rejoin with it. This body is for a voice-activation user, whom the drop self-muted:

{ "features": ["voice-dc/1", "video-dc/1", "sfu-rtp/1"],
  "rejoinToken": "rj_Vb7mQ2xT9kLp4sWz0aYc1dRf8gHn3uJe6iKo5tBv2Nw",
  "planned": false, "ring": false, "selfMuted": true }

After 60 s, or after call.rejoin_expired, send a fresh join: create: true in a voice channel, create: false in a DM unless the call ended with server_restart (15 §10.5).

Match each answer against the ordered outcome table in 15 §10.5; the first row that fits decides. In short:

  • Transient (wait for the next attempt, honouring retryAfterMs when it is later): network errors, timeouts, 5xx, core.unavailable, core.rate_limited, call.relay_unavailable, call.full, and any other problem with retryable: true.
  • Transient, act first: call.mls_join_required (complete the MLS join at once, then continue on the schedule); dm.upgrade_in_progress (retry when dm.security_changed arrives or at the next scheduled time, whichever is first).
  • Retry in the same attempt: call.rejoin_expired and, in a voice channel, call.ended with data.reason empty or server_restart (fresh join, create: true); expired sessions (renew or re-create, then resend); call.already_in_call with sameDevice and sameCall both true (resend with takeOver: true).
  • Terminal: call.moved, other call.already_in_call, other call.ended and call.not_active, security.* gates (show G1 or G2), dm.closed, dm.encryption_pending, core.forbidden, core.not_found, call.rejoin_invalid, call.mls_join_required for a device awaiting re-add, and any other problem with retryable: false.

Don't decide from retryable alone: call.ended is retryable: false but sometimes transient, and call.mls_join_required is retryable: true but sometimes terminal.

Note

Your 60 s window counts from t0; the server's counts from lostAt, when the relay noticed, which is usually later (15 §10.2). Follow the client rule: after 60 s from t0, send a fresh join without the token, as test vector A2 in 15 §10.5 shows.

What others see (15 §10.3). Your seat goes reconnecting and keeps its pid and lease for 30 s. Others show a "reconnecting" badge after 2 s and play no leave sound. Rejoin within 30 s and you keep your pid with seatRestored: true. Between 30 and 60 s after lostAt you get a new pid, and call.participant_joined carries rejoined: true so nobody hears a join sound. Every rejoin re-runs the admission checks, so a right lost during the outage stays lost.

Push-to-talk continuity

The rule: the user must never feel the button pressed while the app disagrees about whether they are transmitting (15 §10.6). The transmit gate is open only while all of these hold (16 §7.2 and §7.3 are normative):

# Condition Reason shown when it fails
a The user wants to transmit: push-to-talk held, voice detected, or open mic, and not self-muted —
b A route is up: a usable relay connection, with the audio channel open, ICE neither disconnected nor failed, a message from the relay within the last 1,500 ms, and no uplink backlog held for 200 ms reconnecting (connecting before the first relay session is up)
c You are covered for audio not_allowed, with blockedBy from the VoiceLease
d Secure: send keys installed waiting_for_keys
  1. When (a) holds and any other condition fails, the user is not being heard. Say so plainly, for example "Reconnecting — you're not being heard", and never look like transmitting. A push-to-talk user holding the control while self-muted is also not being heard, with the reason muted.
  2. Discard audio captured while the gate is closed. Never send it late.
  3. Push-to-talk follows the physical control. Keep reading it through an outage; if it is held when (b) to (d) return, transmit at once with live audio. Releasing it closes the gate.
  4. Voice-activation and open-mic users come back muted after an unexpected drop, because they have no control to show intent and may have walked into a room. Send selfMuted: true with every rejoin attempt.
  5. Planned migrations and route changes keep mic mode, self-mute and push-to-talk state.
  6. When a VoiceLease reports audio blocked, a voice-activation or open-mic user is self-muted at that moment and stays muted after the block ends.
  7. After a drop the webcam stays off. A screen share resumes only if a join response with seatRestored: true arrived by t0 + 30 s (17 §4.5).

From 16 §7.11, in an insecure call with push-to-talk pressed at 0 s and the drop detected when the DTLS transport closes:

Time What happens TalkState
0.000–4.999 s Transmitting (transmitting, −)
5.000 s Drop detected (not_heard, reconnecting)
6.000 s Control released (idle, reconnecting)
7.000 s Control pressed again (not_heard, reconnecting); nothing sent
8.200 s Rejoin completes (transmitting, −)

Audio captured between 7.000 and 8.199 s is never sent. After a process restart you may rejoin by yourself only within 60 s, only if the user hadn't pressed Leave and the call screen is still present, and no video resumes (15 §10.9).

Planned migrations

A planned migration keeps mic mode, self-mute, push-to-talk, screen share and webcam, and shows no reconnecting state unless an outage actually happens (15 §10.8).

Relay migration (15 §6.9), started by call.migrate {callId, reason, deadlineMs: 10000} or relay.closing with drain:

  1. Rejoin with the token and planned: true; you get the new relay.url and keep your pid.
  2. Connect to the new relay without closing the old one.
  3. Once the new relay's first tick arrives, send every frame to both relays, deduplicate what arrives, and move your subscriptions over.
  4. The old relay closes after 10 s; if you haven't moved by then, you are in an unexpected drop.

Into a new call (15 §12.1, §12.5). A context that becomes secure ends its call with security_upgraded; a new MLS group generation ends it with group_restarted. Act on relay.closing with call_restarted without waiting for call.ended:

  1. Keep the call screen with a neutral status line, never a warning.
  2. Check the context's mode yourself; next is only a hint. An insecure account or unenrolled device closes the screen and shows G1 or G2.
  3. Get a current MLS leaf at once.
  4. Join with create: true, ring: false, no token, a fresh Idempotency-Key and your current self-mute, on the auto-rejoin schedule with t0 at the call.ended event, while the call screen is open.

Play no leave sound for that call.ended and no join sounds for people from the old call who rejoin within 60 s. A 1:1 DM that becomes insecure ends with security_downgraded, which is terminal, because a secure call never silently turns insecure (15 §12.3).

Move voice here

Device D2 joins with takeOver: true. Call control validates D2's join fully (if it fails, D1 is untouched), removes D1's seat with reason moved, sends D1 call.moved {callId, pid, sameCall}, waits at most 3,000 ms for the relay and SFU to confirm D1 is cut, and admits D2 with a new pid. If D2 joined the same call, call.participant_joined carries movedFrom, so nobody hears a leave or join sound and a 1:1 call doesn't end in between (15 §11).

D1 stops capture and playback at once, closes its call screen and never rejoins. If it was offline, it learns of the move from call.moved on its next rejoin. Self-mute doesn't move; a Mute for everyone does, because it belongs to the account.

Ringing

Only DM calls ring (15 §13). A join with ring: true that starts a DM call rings the DM's active participants, except bots and, in a 1:1 DM, anyone who blocked the caller. Someone for whom the DM is still a message request is never rung and sees a missed call instead. Each target gets call.ringing on its me stream and a call_ring notify.event push that is never coalesced, so the phone rings even while the desktop app is open:

{ "v": 1, "t": "call.ringing", "id": "01938f43-1111-7222-8333-444455556666",
  "ctx": "me", "ts": "2026-12-04T19:02:10.500Z",
  "d": { "ctx": "dm:Xq3v9LzKp0aT7mW2bN5cRg", "callId": "01938f43-0f00-7a00-8b00-0c0d0e0f1011", "by": { "addr": "alice@a.com", "name": "Alice" },
         "security": "secure", "video": false, "expiresAt": "2026-12-04T19:02:55.500Z" } }

Check by.name against by.addr before showing it. Here by is an object; in Ring it is an address string.

  • Answer with a join and create: false. If the call ended, you get call.not_active.
  • Decline with POST /v1/contexts/{ctx}/call/decline {"callId": "…"} (204) from any device of a target account. The ring stops on all the account's devices. A device that isn't a target gets 409 call.ring_not_allowed; a decline after the ring already ended is accepted and ignored.
  • Ring again with POST /v1/contexts/{ctx}/call/ring {"callId": "…", "targets": ["dan@d.com"]} (202). The caller must be a participant. targets is optional and defaults to everyone who may be rung and isn't in the call; excluded targets are skipped silently, and a target still being rung has its ring restarted. The limit is once every 10 s and 5 times per call (core.rate_limited); in a channel, or for an address that isn't in the DM, the answer is 409 call.ring_not_allowed (15 §13.3).

Each ring lasts 45 s and ends with call.ring_ended, reason answered, declined, timeout or cancelled (unknown → cancelled). In a group DM, targets are rung and decline independently, and one person declining doesn't end the call. When no target is left and no other account ever joined, the call ends with declined if every target declined and unanswered otherwise.

Mutes

Self state. Report mute, deafen and sources with PATCH /v1/contexts/{ctx}/call/participants/{pid} and any subset of selfMuted, selfDeafened and sources. A client that deafens also mutes. Turning on screen or webcam needs video in your lease, and screenAudio needs audio, or you get 403 call.not_permitted with data.blockedBy (15 §3.5). Self state is display only.

Mute for everyone. A moderator with mute_members silences every audio source of one person in a voice channel while their video continues (15 §3.6):

PUT https://b.com/v1/contexts/ch:01938a11-2b3c-7d4e-8f90-112233445566/call/mutes/carol@c.com
Authorization: Bearer rs_4kJ…
Idempotency-Key: 5d1e7a90-mute-1

{ "reason": "Background noise", "showReason": true }

The answer is 200 with a Mute; DELETE removes it and GET …/call/mutes lists them. The mute is stored per channel and account, so it survives rejoins, device moves and later calls. Within 500 ms the account leaves audio, others get call.participant_updated with mutedForEveryone: true, and the target gets call.lease_changed with audioBlockedBy: "muted_for_everyone". PUT and DELETE need mute_members in the channel: a caller without it gets 403 core.forbidden, and the hierarchy rules refuse with moderation.self_target or moderation.target_protected. DMs have no moderators and answer 403 call.not_permitted. Permissions and ServerMute are on Roles and moderation.

Action listeners audio video
Mute for everyone, ServerMute stays removed stays
Revoke speak_and_share, timeout stays removed removed
Kick, ban, removal from the DM, loss of view_channel removed removed removed
Self-mute stays stays stays

Diagnostics

Clients record call counters so the operator who runs the relay can fix problems users can't diagnose themselves (15 §14). Record a Sample every 10 s and at call close, keeping the last 30. The "Problem reports" setting has three values, and you never ask the user to choose one, during a call or anywhere else (15 §14.2):

  • off: nothing is uploaded.
  • failures (default): a call_failure report when a join failed and the user gave up, an unexpected drop wasn't repaired within 60 s, more than 3 unexpected drops happened within 10 minutes, or the relay connection couldn't be established.
  • full: also a call_summary at each call's close.

Upload a DiagnosticReport to the call's hosting server with POST /v1/diagnostics (202). Abridged from 15 §14.3:

POST https://b.com/v1/diagnostics

{ "reportId": "01938f55-0d1e-7f20-8a31-425364758697", "kind": "call_failure",
  "client": "sloppyvoice-desktop/1.0.3", "platform": "desktop",
  "createdAt": "2026-12-04T18:30:12.441Z",
  "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566", "callId": "01938f40-5a6b-7c8d-9e0f-102132435465",
  "data": { "phase": "rejoin", "code": "relay.overloaded", "security": "secure",
            "outageMs": 61250, "rejoinAttempts": 7, "iceState": "failed", "dtlsState": "closed",
            "samples": [ { "at": "2026-12-04T18:29:02.000Z", "rttMs": 48, "jitterMs": 6,
                           "lossPermille": 12, "maxTickAgeMs": 1020, "candidateTypes": ["host"] } ] } }

The server answers 202 with {"reportId": "…"}, and reportId makes the request idempotent. Keep each report within 64 KiB, because a larger body gets 413 core.too_large: first apply the upload bounds of 16 §13 (audio) and 17 §14 (video), then drop the oldest Samples. More than 30 reports per hour per session get 429 core.rate_limited (15 §14.3). candidateTypes names only the type of the relay connection's selected candidate pair, host or prflx (15 §14.1). Never include media, message content, SFrame or MLS key material, KIDs or nonces, SDP, IP or candidate addresses, other participants' names or addresses, device names, contact lists or location (15 §14.2).

Call events

All call events are ephemeral and never replayed; recover from call.state or GET …/call (15 §15).

Unknown reasons fall back as follows: call.participant_left → left, call.ended → context_closed (don't rejoin), sfu.closed → sfu_failed, call.migrate → drain. Every call.*, relay.* and sfu.* error code is listed in 15 §16.