End of call notifications (CDR):
At the end of an inbound or outbound call, a callback is sent to the configured webhook. This callback contains a Call Data Record for the call. To determine whether the notification is from an inbound call use the call_dir field of the payload.
{ type: "cdr", payload: { extension : <ext>, number : <client_number>, dial_number : <dial_number>, call_ref : <internal_call_ref>, contact_ref : <custom_call_ref>, dialed_at : <dialed_at> , end_reason : <disposition>, end_code : <ISDN_termination_code>, call_time : <call_time> , hold_time : <hold_time>, call_dir : <call_dir>, recording_url: <recording_ref>, ref : "click-dial" } }
Values:
<ext> | The agent extension or number (if the call is external; between 2 external parties) |
---|---|
<dial_number> | The number the PBX used as part of this call
|
<internal_call_ref> | Current (inline with Dialer spec)
|
<custom_call_ref> | Your custom identifier for the caller/callee or matter. It should remain the same between multiple calls for the same callee and should be used to link CDR data to a specific person.
|
<disposition> | Dispositions: how the call ended |
<ISDN_termination_code> | |
<client_number> | The clients number (as opposed to the agent)
|