Node.js
Write your event webhook
Implement a webhook that captures call events so that you can observe the lifecycle of the call in the console.
app.post('/webhooks/events', (req, res) => {
console.log(req.body)
res.send(200);
})
Vonage makes a POST request to this endpoint every time the call status changes.
Play Audio into a WebSocket
Learn how to connect an inbound Voice API call to a WebSocket, then play audio with JavaScript.
以下の言語で利用可能:
手順
1
Introduction to this task2
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
Test your application11
What's next?