From 27514e15966a81eea85db5d4b9f4b3eafe0b9637 Mon Sep 17 00:00:00 2001 From: Jannis Braun <151788261+TheZwiss@users.noreply.github.com> Date: Wed, 8 Apr 2026 14:30:48 +0200 Subject: [PATCH] fix: use wss:// LiveKit URL in federated call relay, not https:// MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sendFederatedCallStart was sending `https://${domain}/livekit` as the LiveKit URL. The LiveKit SDK requires `wss://` for WebSocket connections. The caller (local) worked because it gets the URL from config.livekit.url (wss://). The federated acceptor failed because it used the relay URL (https://) — the SDK can't connect over HTTPS. Now uses config.livekit.url directly, falling back to wss:// if unset. --- packages/server/src/ws/events.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/server/src/ws/events.ts b/packages/server/src/ws/events.ts index 61c8d6b8..cebcffb0 100644 --- a/packages/server/src/ws/events.ts +++ b/packages/server/src/ws/events.ts @@ -1749,7 +1749,10 @@ async function sendFederatedCallStart( return; } - const livekitUrl = `https://${config.domain}/livekit`; + // Use the configured LiveKit URL (wss://domain/livekit from .env). + // Previously this was `https://${config.domain}/livekit` which fails because + // the LiveKit SDK requires a wss:// WebSocket URL, not https://. + const livekitUrl = config.livekit.url ?? `wss://${config.domain}/livekit`; // Build participants array (all member identities for Path B) const participants = members.map(m => ({