Server SDKs
Build AI agents, control calls, send messages, and more
Leave the current room.
Promise<Record<string, unknown>> — Server response confirming the leave.
Promise<Record<string, unknown>>
1import { RelayClient } from '@signalwire/sdk';23const client = new RelayClient({4 project: process.env.SIGNALWIRE_PROJECT_ID!,5 token: process.env.SIGNALWIRE_API_TOKEN!,6 contexts: ['default']7});89client.onCall(async (call) => {10 await call.answer();1112 // Join a room13 await call.joinRoom('meeting-room-1');1415 // Later, leave the room16 await call.leaveRoom();17 await call.hangup();18});1920await client.run();