Record a message

A code snippet that shows how to record a conversation. Answer an incoming call and return an NCCO that includes a record action. When the call is complete, a webhook is sent to the eventUrl you specify. The webhook includes the URL of the recording.

Example

Prerequisites

npm install express body-parser

Write the code

Add the following to record-a-message.js:

View full source

Run your code

Save this file to your machine and run it:

node record-a-message.js

Try it out

You will need to:

  1. Record a message by dialling your Vonage Number, and leaving your message after the tone (this code snippet).
  2. Download the recording. See the Download a recording code snippet for how to do this.

Further Reading

  • Voicemail - Learn how to record audio from inbound calls using .NET and the Vonage Voice API.