Node.js
Create the event webhook
Finally, you need to create the event webhook to receive call progress events and output them to the console.
Add the following route below your /webhooks/dtmf route:
app.post('/webhooks/events', (req, res) => {
console.log(req.body);
res.sendStatus(204);
});
Note: This route returns HTTP 204 No Content to acknowledge receipt of the data to the Vonage API platform and prevent it from making multiple requests to the webhook with the same event data.
Build a Call Menu
Create an interactive voice response (IVR) menu to handle customer calls
Available on:
Steps
1
Introduction2
Prerequisites3
What you will build4
Install the dependencies5
Create the server6
Create the answer webhook7
Create the DTMF webhook8
Create the event webhook9
Configure your Voice application10
Run it!11
Conclusion12
What's next?