Voice IN Call Events
Voice IN Call Events allow you to receive real-time call events for calls to DID numbers using HTTP protocol. There are no delays caused by batching and every request contains only one event. All events are delivered with HTTP POST request, content can be optionally gzipped. Example header:
POST /call-events HTTP/1.1
Host: 192.0.2.5
User-Agent: CDR-streamer
Accept: */*
Content-Type: application/vnd.api+json
Content-Encoding: gzip
Content-Length: 2358
Call Start Event
A Call Start Event is sent to the customer using HTTP protocol after call routing process is completed by DIDWW (destination determination process). SIP INVITE will originate from DIDWW to Call Destination.
HTTP request payload example:
{
"type": "incoming-call-start-event",
"id": "10-10282FC6-5F632C460006A397-AC8C7700",
"attributes": {
"time_start": "2020-03-05T11:05:33.879559+00:00",
"did_number": "123456789123",
"src_number": "111111222222"
}
}
Call Connect Event
A Call Connect Event is sent to the customer using HTTP protocol after 200OK/Connect is received from call legB (Destination). If the call is terminated before a successful handshake (200OK), Call Connect event will not be sent to the customer’s endpoint.
HTTP request payload example:
{
"type": "incoming-call-connect-event",
"id": "10-10282FC6-5F632C460006A397-AC8C7700",
"attributes": {
"time_start": "2020-03-05T11:05:33.879559+00:00",
"time_connect": "2020-03-05T11:05:38.879559+00:00",
"did_number": "123456789123",
"src_number": "111111222222",
"call_id": "26-26-3F1808BB-61090891000DD511-EA83C700"
}
}
Call End Event
A Call End Event is sent to the customer using HTTP protocol when the call is terminated in any way.
HTTP request payload example:
{
"type": "incoming-call-end-event",
"id": "10-10282FC6-5F632C460006A397-AC8C7700",
"attributes": {
"time_start": "2020-03-05T11:05:33.879559+00:00",
"time_connect": "2020-03-05T11:05:38.879559+00:00",
"time_end": "2020-03-05T11:05:58.879559+00:00",
"duration": 20,
"did_number": "123456789123",
"src_number": "111111222222",
"call_id": "26-26-3F1808BB-61090891000DD511-EA83C700"
}
}
Description of Event attributes:
- type
String
Event type. Possible values for Voice In Call Events are incoming-call-start-event, incoming-call-connect-event, incoming-call-end-event- id
String
Unique call identifier. All events related to the same call will contain the same id value.- attributes
Hash
Structure contains all the CDR attributes. See description below.- time_start
Timestamp
Start time when the initial INVITE is received.- time_connect
Timestamp
Time of the successful handshake (200OK SIP). For non-connected calls incoming-call-connect-event will not be originated andtime_connect
attribute atincoming-call-end-event
will be null.- time_end
Timestamp
Call disconnection time.- call_id
String
SIP Call-ID of the call leg between customer’s equipment and DIDWW. All events related to the same call will contain the same call_id value. As DIDWW system supports call rerouting (see trunk group configuration) it is not possible to know which call leg will be connected on the incoming-call-start-event step, therefore call_id attribute is not present in the incoming-call-start-event payload.- duration
Integer
Call duration in seconds. For non-connected calls the duration is 0.- src_number
String
Caller-ID- did_number
String
DID number that receives the call.