Get a Call Recording

The Voice provider's getCallRecording function allows you to download a call recording from the URL returned in a Voice API event after a call has been completed.

Method Signature

getCallRecording(recordingUrl: string)

Getting a Call Recording

const session = vcr.createSession();
const voice = new Voice(session);

const stream = await voice.getCallRecording('$RECORDING_URL');
stream.pipe(fs.createWriteStream('$PATH'));

Upload a Call Recording to Assets

The Vonage Cloud Runtime SDK has a helper function to allow you to directly store Voice API call with the Assets provider.

Method Signature

uploadCallRecording(recordingUrl: string, assetsPath: string)

Uploading a Call Recording to Assets

const session = vcr.createSession();
const voice = new Voice(session);

await voice.uploadCallRecording('$RECORDING_URL', '/calls');