Python
Write your event webhook
Implement a webhook that captures call events so that you can observe the lifecycle of the call in the console.
We won't use the request data in this tutorial, so your webhook should immediately return an HTTP 200 response (success):
@app.route("/webhooks/events", methods=["POST"])
def events():
return "200"
Vonage makes a POST request to this endpoint every time the call status changes.
Connect to a WebSocket
Connect an inbound call to a WebSocket with the Voice API
手順
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
Test your application11
Conclusion12
What's next?