joinRoom

View as MarkdownOpen in Claude

Join a video/audio room. Rooms provide multi-party communication with additional features beyond conferences, including video support.

Use leaveRoom() to leave the room.

Parameters

name
stringRequired

Room name to join.

statusUrl
string | undefined

URL to receive room status webhooks.

Returns

Promise<Record<string, unknown>> — Server response confirming the join.

Example

1import { RelayClient } from '@signalwire/sdk';
2
3const client = new RelayClient({
4 project: process.env.SIGNALWIRE_PROJECT_ID!,
5 token: process.env.SIGNALWIRE_TOKEN!,
6 contexts: ['default']
7});
8
9client.onCall(async (call) => {
10 await call.answer();
11
12 // Join a room
13 await call.joinRoom('meeting-room-1');
14
15 // The call is now in the room until leaveRoom() or hangup
16});
17
18await client.run();