Server SDKs
Build AI agents, control calls, send messages, and more
Release the call from hold, resuming normal audio between the parties.
This method emits calling.call.hold events. See Call Events for payload details.
calling.call.hold
None.
Promise<Record<string, unknown>> — Server response confirming the unhold operation.
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();11 await call.play([{ type: 'tts', text: 'Please hold while I look that up.' }]);1213 // Put the call on hold14 await call.hold();1516 // Do some processing...17 await new Promise((resolve) => setTimeout(resolve, 5000));1819 const result = await call.unhold();20 console.log(`Call resumed from hold: ${JSON.stringify(result)}`);21 await call.play([{ type: 'tts', text: 'Thanks for holding. I have your answer.' }]);22});2324await client.run();