Voice OUT Service Call Events

Voice OUT Call Events enables its users to receive a real-time call events. Empowering developers to build an application for call tracking, monitoring, and billing purposes. 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": "outbound-call-start-event",
    "id": "10-10282FC6-5F632C460006A397-AC8C7700",
    "attributes": {
        "source_ip" : "1.2.3.4",
        "source_port": 5060,
        "call_id" : "3eab288b2e0eb547122434ce0e648bb5",
        "time_start": "2020-03-05T11:05:33.879559+00:00",
        "pop": "NYC",
        "original_src_number": "02089643990",
        "src_number": "123439643990",
        "dst_number": "441158720600",
        "trunk_name": "Trunk 1",
        "rate": "0.004",
        "initial_billing_interval": 1,
        "next_billing_interval": 1,
        "p_charge_info": "<sip:02089643990@customer.example.com;billing-account-id=212>",
        "diversion" : [ "<sip:+123456789@sip.didww.com>;reason=unconditional" ]
    }
}

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": "outbound-call-connect-event",
    "id": "10-10282FC6-5F632C460006A397-AC8C7700",
    "attributes": {
        "source_ip" : "1.2.3.4",
        "source_port": 5060,
        "call_id" : "3eab288b2e0eb547122434ce0e648bb5",
        "time_start": "2020-03-05T11:05:33.879559+00:00",
        "time_connect": "2020-03-05T11:05:38.879559+00:00",
        "pop": "NYC",
        "original_src_number": "02089643990",
        "src_number": "123439643990",
        "dst_number": "441158720600",
        "trunk_name": "Trunk 1",
        "rate": "0.004",
        "initial_billing_interval": 1,
        "next_billing_interval": 1,
        "p_charge_info": "<sip:02089643990@customer.example.com;billing-account-id=212>",
        "diversion" : [ "<sip:+123456789@sip.didww.com>;reason=unconditional" ]
    }
}

Call End Event

Call End Event originated by DIDWW when call is terminated in any way.

HTTP request payload example:

{
    "type": "outbound-call-end-event",
    "id": "10-10282FC6-5F632C460006A397-AC8C7700",
    "attributes": {
        "source_ip" : "1.2.3.4",
        "source_port": 5060,
        "call_id" : "3eab288b2e0eb547122434ce0e648bb5",
        "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": 10,
        "pop": "NYC",
        "original_src_number": "02089643990",
        "src_number": "123439643990",
        "dst_number": "441158720600",
        "trunk_name": "Trunk 1",
        "rate": "0.004",
        "initial_billing_interval": 1,
        "next_billing_interval": 1,
        "p_charge_info": "<sip:02089643990@customer.example.com;billing-account-id=212>",
        "diversion" : [ "<sip:+123456789@sip.didww.com>;reason=unconditional" ]
    }
}

CDR attributes descriptions:

type

String
Event type. For Voice Out Call events possible values are outbound-call-start-event, outbound-call-connect-event, outbound-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.

source_ip

String
IP address of the call originator.

source_port

Integer
Port of the call originator.

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.

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 outbound-call-connect-event will not be originated and time_connect attribute at outbound-call-end-event will be null.

time_end

Timestamp
Time when the call was disconnected.

duration

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

pop

String
Location of the DIDWW equipment that processed call, see DIDWW Point of Presence. Possible values:

  • NYC USA New-York

  • LAC USA Los Angeles

  • MIA USA Miami

  • FRA Germany, Frankfurt

  • SG - Singapore

original_src_number

String
Incoming Caller-ID.

src_number

String
Incoming Caller-ID after applying rewrites.

dst_number

String
Called destination number.

trunk_name

String
Outbound trunk friendly name.

rate

Numeric
Customers outbound call termination rate.

initial_billing_interval

Integer
Initial billing interval for the outbound call termination.

next_billing_interval

Integer
Next billing interval for the outbound call termination.

p_charge_info

String
P-Charge-Info header value is received from the call originator. Using this header, customers can add custom information to DIDWW CDR for technical and billing purposes. See Service description for more details.

diversion

Array of Strings
Diversion header values are received from the call originator. Diversion headers order in INVITE request is preserved.