Skip to navigation

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

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();
const action = await call.record({ direction: 'both', format: 'wav' });
// Pause during sensitive information
await action.pause();
// ... sensitive exchange ...
await action.resume();
});
await client.run();