Voice IN Service Call Events

Voice IN Call Events enables its users to receive a real-time call events for calls to DID numbers. There are no delays caused by batching and every request contains exactly one event. All events are delivered with HTTP POST request, headers example:

POST /call-events HTTP/1.1
Host: 192.0.2.5
User-Agent: CDR-streamer
Accept: */*
Content-Type: text/plain
Content-Encoding: gzip
Content-Length: 2358
Expect: 100-continue

Call Start Event

Call Start Event originated by DIDWW once call routing (destination determination process) is completed. 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

Call Connect Event originated by DIDWW once 200OK/Connect received from call legB (Destination). If call was terminated before the successful handshake (200OK), Call Connect event will not be sent to customers API.

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

Call End Event originated by DIDWW when 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"
    }
}

Event attributes descriptions:

type

String
Event type. For Voice In Call events possible values 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 and time_connect attribute at incoming-call-end-event will be null.

time_end

Timestamp
Time when the call was disconnected.

call_id

String
SIP Call-ID of the call leg between customers 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 incoming-call-start-event step. So call_id attribute is not present in incoming-call-start-event payload.

duration

Integer
Call duration in seconds. For non-connected calls duration is 0.

src_number

String
Caller-ID

did_number

String
DID number than receives call