Represents a recording of a call. You can obtain instances of this class by starting a Recording with one of the following methods: - [Call.record](./voice-call.mdx#record) - [Call.recordAudio](./voice-call.mdx#recordaudio) #### Example Recording the audio of the call as soon as the other party answers the phone. We also print the id of the recording and, when it ends, the URL (which can be used to download the recording). js import { Voice } from @signalwire/realtime-api; const client = new Voice.Client({ project: , token: , topics: [office], }); const call = await client.dialPhone({ from: +YYYYYYYYYY, to: +XXXXXXXXXX, }); await call.playTTS({ text: This call will be recorded. }); // Print out the URL of the recording, as soon as the recording ends. call.on(recording.ended, (recording) => { console.log(Recording URL:, recording.url); }); // Start recording const recording = await call.recordAudio({ direction: both, endSilenceTimeout: 0, terminators: , }); ## Properties ### id The unique id for this recording. **Syntax:** CallRecording.id() **Returns:** string ## Methods ### pause ▸ **pause**(): Promise - See [CallRecording](./callrecording.mdx) for more details. Pauses the recording. | Parameters | Value | |:|:-| | behavior? | **skip**: Does not record during the pause period
**silence**: Replaces the actual audio of the call with silence during the pause period. | #### Returns Promise - See [CallRecording](./callrecording.mdx) for more details. #### Example js const recording = await call.recordingAudio({ direction: both}); ... await recording.pause(); ### resume ▸ **resume**(): Promise - See [CallRecording](./callrecording.mdx) for more details. Resumes the recording. #### Returns Promise - See [CallRecording](./callrecording.mdx) for more details. #### Example js const recording = await call.recordingAudio({ direction: both}); ... await recording.resume(); ### stop ▸ **stop**(): Promise - See [CallRecording](./callrecording.mdx) for more details. Stops the recording. #### Returns Promise - See [CallRecording](./callrecording.mdx) for more details. #### Example js const recording = await call.recordAudio({ direction: both }); ... await recording.stop();