unhold

View as MarkdownOpen in Claude

Release the call from hold, resuming normal audio between the parties.

This method emits calling.call.hold events. See Call Events for payload details.

Parameters

None.

Returns

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

Example

import { RelayClient } from '@signalwire/sdk';
const client = new RelayClient({
project: process.env.SIGNALWIRE_PROJECT_ID!,
token: process.env.SIGNALWIRE_API_TOKEN!,
contexts: ['default']
});
client.onCall(async (call) => {
await call.answer();
await call.play([{ type: 'tts', text: 'Please hold while I look that up.' }]);
// Put the call on hold
await call.hold();
// Do some processing...
await new Promise((resolve) => setTimeout(resolve, 5000));
const result = await call.unhold();
console.log(`Call resumed from hold: ${JSON.stringify(result)}`);
await call.play([{ type: 'tts', text: 'Thanks for holding. I have your answer.' }]);
});
await client.run();