Node.js
Introduction
You can use the Vonage Voice API to connect a call to a WebSocket, giving you a two-way stream of the call audio delivered over the WebSocket protocol in real-time. This enables you to process the call audio to perform tasks such as sentiment analysis, real-time transcription and decision-making using artificial intelligence.
In this tutorial, you will connect an inbound call to a WebSocket endpoint. The WebSocket server will listen to the call audio and echo it back to you. You will implement this using the express web application framework and express-ws, which lets you define WebSocket endpoints like any other express route.
Connect to a WebSocket
Connect an inbound call to a WebSocket with the Voice API
Steps
1
Introduction2
Prerequisites3
Buy a Vonage number4
Create a Voice Application5
Link a Vonage number6
Create the project7
Write your answer webhook8
Write your event webhook9
Create the WebSocket10
Create your server11
Test your application12
Conclusion13
What's next?