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-parserRun your code
Save this file to your machine and run it:
Prerequisites
Add the following to build.gradle:
Run your code
We can use the application plugin for Gradle to simplify the running of our application. Update your build.gradle with the following:
Run the following gradle command to execute your application, replacing com.vonage.quickstart.kt.voice with the package containing RecordMessage:
Prerequisites
Add the following to build.gradle:
Run your code
We can use the application plugin for Gradle to simplify the running of our application. Update your build.gradle with the following:
Run the following gradle command to execute your application, replacing com.vonage.quickstart.voice with the package containing RecordMessage:
Prerequisites
Install-Package VonagePrerequisites
composer require slim/slim:^3.8 vonage/clientRun your code
Save this file to your machine and run it:
Prerequisites
pip install vonage python-dotenv fastapi[standard]Run your code
Save this file to your machine and run it:
Prerequisites
gem install sinatra sinatra-contribRun your code
Save this file to your machine and run it:
Try it out
You will need to:
- Record a message by dialling your Vonage Number, and leaving your message after the tone (this code snippet).
- 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.