resume

View as MarkdownOpen in Claude

Resume a paused recording.

Returns

Promise<Record<string, unknown>> — Server acknowledgment.

Example

1import { RelayClient } from '@signalwire/sdk';
2
3const client = new RelayClient({
4 project: process.env.SIGNALWIRE_PROJECT_ID!,
5 token: process.env.SIGNALWIRE_API_TOKEN!,
6 contexts: ['default']
7});
8
9client.onCall(async (call) => {
10 await call.answer();
11 const action = await call.record({ direction: 'both', format: 'wav' });
12
13 await action.pause();
14 // ... sensitive exchange ...
15 await action.resume();
16
17 const event = await action.wait();
18 const recordInfo = (event.params.record ?? {}) as Record<string, unknown>;
19 console.log(`Recording URL: ${recordInfo.url}`);
20});
21
22await client.run();