Quality on Demand API Webhooks
Webhooks are an integral part of the Vonage QoD API. Vonage will send your application updates about the QoD session without your application having to query. This type of webhook is also called a "callback".
Receiving webhooks
To allow the Vonage servers to send data to your application via webhooks, you must configure an application in the Vonage customer dashboard with the URL of your webserver that you want data to be sent to.
Callbacks
When you send a request to the QoD API, you will receive a response that looks like this:
Receiving this response does not mean that the QoD session has been created. If the status value is PENDING, it means that the request has been accepted by the Vonage servers. Callbacks are used to provide updates on the status of a QoD session. You may also receive an error response, for example if the request does not follow the API specification or if the authentication is invalid.
The QoD session creation (or failure) will be reported in a callback using the status field:
PENDING: The QoD session has not yet been processed by the underlying network.ACTIVE: The QoD session has been created, and the QoD profile selected is being applied to the network flow.COMPLETED: The QoD session has completed successfully.CANCELLING: The QoD session is in the process of being cancelled, but has not yet reached a terminal state.FAILED: The QoD session has completed but due to failure; more details can be found in thereasonfield.
An example callback can be found below:
When the session is accepted by the network:
When the session duration finishes:
Further Reading
- Using Webhooks with the Vonage APIs.
- Quality on Demand API Reference for more details on requests, webhooks, and errors.