Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

paste-code-macro
languagejson
titleCDR Object
{
    "type": "cdr"<string>,
    "payload": {
     "call_id": <integer>,
 extension    "phone_number": <ext><string>,
     "caller_id": <string>,
 number       "unique_id": <client_number><string>,
        dial_number  : <dial_number>"call_direction": <string>,
     "dispostion_code": <string>,
 call_ref     "sip_code": <internal_call_ref><integer>,
        contact_ref  : <custom_call_ref>"user_id": <integer>,
     "campaign_id": <integer>,
 dialed_at    "list_id": <dialed_at> <integer>,
        end_reason   "call_type": <disposition><integer>,
     "recording_url": <string>,
 end_code     "start_date_time": <ISDN_termination_code><DateTime>,
        call"end_date_time    ": <call_time> <DateTime>,
        hold"ivr_time    ": <hold_time><integer>,
        call_dir     : <call_dir>"ring_time": <integer>,
        recording_url: <recording_ref>"talk_time": <integer>,
     "user_time": <integer>,
 ref    "hold_time": <integer>,
    : "click-dial"
wrap_time": <integer>
   }
}

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

  • Outbound: the caller ID that was shown to the callee

  • Inbound: the (DID) number that was dialed by the caller

...

<internal_call_ref>

...

Current (inline with Dialer spec)

  • Unique Internal identifier for this specific call, this is used to download recordings.

...

<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.

...

Outbound/External: This reference can be set upon creating a C2D call via the API

...

Inbound: the value is either an empty string or can be set by the caller via an IVR if that feature is enabled.

...

<disposition>

...

Dispositions: how the call ended

...

<ISDN_termination_code>

...

The ISDN termination code

...

<client_number>

The clients number (as opposed to the agent)

...

Inbound: callers number (can be empty if the callers number is set to private)

...

Field

Type

Description

type

string

The type of notification

Payload Data

call_id

integer

The ID of the call.

phone_number

string

The external phone number of the call.

caller_id

string

The phone number that was displayed.

reference_id

string

The external reference ID of the call.

call_direction

string

The direction of the call.

dispostion_code

string

The disposition code of the call.

sip_code

integer

This is the SIP Response code for the call https://en.wikipedia.org/wiki/List_of_SIP_response_codes

user_id

integer

The ID of the user.

campaign_id

integer

The ID of the campaign.

list_id

integer

The ID of the list.

call_type

integer

The type of call.

recording_url

string

The name of the call recording file.

start_date_time

DateTime

The start date and time of the call.

end_time_time

DateTime

The end date and time of the call.

ivr_time

integer

The total time in milliseconds the callee spent in the IVR.

ring_time

integer

The total ring time in milliseconds of the call.

talk_time

integer

The total talk time in milliseconds of the call.

user_time

integer

The total time in milliseconds the callee spent with the user.

hold_time

integer

The total hold time in milliseconds of the call.

wrapup_time

integer

The total wrapup time in milliseconds of the call.