We're pleased to announce the addition of some new features to the Dial 9 platform today, that will interest our customers in the developer community in particular - the ability to setup webhooks to receive data for certain service events.
What is a webhook?
A webhook in its simplest form is a set of data sent from one service to another automatically, when a certain event occurs. This allows you to then trigger actions in your own service, such as logging a call in an external database once it has been completed.
Webhooks in Dial 9
Using webhooks in Dial 9, you can receive data to your own custom endpoint via an HTTP request, when certain events occur in your service.
The following events are supported to trigger the webhook for:
IncomingCall
- when an incoming call has been received in your serviceOutgoingCall
- when an outbound call has been initiated from your serviceCallProcessed
- when a call has been completed and processed
When a request is received, you'll be sent a payload like the following example for a CallProcessed
event:
{
"payload":{
"event":"CallProcessed",
"call_id":"2f533604-aaaf-11e7-b600-7ac8e42434d2",
"call_cost":0.0,
"call_type":"incoming",
"call_duration":6,
"call_status":"answered",
"source":{
"type":"address_contact",
"id":8203
},
"destination":{
"type":"extension",
"id":7048
}
},
"timestamp":1507305512,
"auth_token":"my-token"
}
You can find our more about how to set up webhooks in our documentation.