Receive an inbound call
This code snippet demonstrates how to receive an inbound call on your Smart Number.
Prerequisites
Create an Application
Check out Getting Started with Vonage CLI for more information on how to install and configure the CLI.
Use the following command to create a Vonage application:
Once you have the application, you then need to add the voice capabilities; make sure you replace the webhook URLs with your own:
The application is then created and has the required capabilities. Creating an application and adding application capabilities are covered in detail in the application overview.
Go to the Application's page on the Dashboard, and define a Name for your Application.

Make sure to click on the Generate public and private key button, and keep the file private.key around.
Then, enable the Voice capability. For the moment, leave everything by default.

Finally, click Save at the bottom of the page.
Install dependencies
Initialize your dependencies
Create a file named receive-an-inbound-call.js and add the following code:
Write the code
Add the following to receive-an-inbound-call.js:
Try it out
Save the file to your machine and run it using the following command:
When you call your Smart Number you will hear a text-to-speech message.