pause

View as MarkdownOpen in Claude

Pause the recording.

Parameters

behavior
string | undefined

Optional pause behavior. Controls what happens to the audio stream while paused (e.g., silence insertion).

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 // Pause during sensitive information
14 await action.pause();
15 // ... sensitive exchange ...
16 await action.resume();
17});
18
19await client.run();