Call Webhook
When making calls through voicehub platform, widget or API, voicehub allows for sending callbacks to your backend to help you track call status, call recordings and call analysis.
Configuring Webhook through Voicehub
In voicehub, each agent can be configured to send webhook requests per calls. This configuration can be found under API Sidebar menu item as in the next screenshot

In the configuration of webhook, you will have multiple options that need to be configured for the webhook.
Webhook URL: This is the endpoint url that the webhook will send POST requests to on your end.
Secret: This is any secret key you want to be used for verifying webhook requests. It will be sent through a header on the post request
x-webhook-secret
Retrying attempts and delays: Requests will be retired couple of times to your end points with delays in milliseconds sepcified in the fields
Request timeout also is configurable
Events sent through call webhook
Currently, voicehub triggers three different types of events through the lifecycle of a call.
CallStatusChanged
This event is triggered whenever a change happens to your call status. The payload of the post body contains the following jsonized string
{
eventType: WebhookEventType.CallStatusChanged,
timestamp: "Date iso string when event happened",
eventId: "Unique event Id",
status: "new call status",
callId: "call id",
}
RecordingsAvailable
This event is triggered upong having the call voice recordings available. The body of the payload is
{
eventType: WebhookEventType.RecordingsAvailable,
timestamp: "Date iso string when event happened",
eventId: "Unique event Id",
callId: "call id",
recordings: "list of recordings path"
}
AnalysisResultReady
This event is triggered whenever the analysis of the call is available. Callback payload contains a link to fetch the results. Beware that the result request requires using the API Key as a header x-dq-api-key
{
eventType: WebhookEventType.AnalysisResultReady,
analysisId: "Analysis Id",
timestamp: "Date iso string when event happened",
eventId: "Unique event Id",
callId: "call id",
analysisResultUrl: 'URL for call analysis fetching',
}
Last updated