Skip to main content

Call Detail Record Object

This section describes the elements of the Call Detail Record object.

Call Detail Record Object Attributes

These fields and values make up the JSON object that gets returned with successful requests.

AttributeData TypeDescription
cic
read only

string

The current Carrier Identification Code (CIC) information.

cic_original
read only

string

The CIC information before any transformations were applied.

cic_transformed
read only

string

The CIC information after any transformations were applied.

date_insert
read only

string

The date and time when the detail record was inserted into the database.

date_start
read only

string

The date and time when the call was started.

date_stop
read only

string

The date and time when the call ended.

date_talk
read only

string

The date and time when the destination phone number answered the call.

direction
read only

string

The direction of the call. Values accepted in this field are:

  • any
  • inbound
  • outbound
  • undirected

disconnect_originator
read only

string

The originator of a call drop.

diversion_dst
read only

string

The destination diversion header.

diversion_src
read only

string

The source diversion header.

dr_sid
read only

string

The secure ID of the record.

duration
read only

number

The call duration in seconds. The value is calculated as date_stop -- date_start.

duration_billing
read only

number

The calculated call duration in seconds to set the price.

endpoint_sid_dst
read only

string

The destination endpoint secure ID. If the destination is an external phone number, this value will be populated with the System Gateway secure ID.

endpoint_sid_src
read only

string

The source endpoint secure ID. If the source is an external phone number, this value will be populated with the System Gateway secure ID.

identity
read only

string

The real phone number that the call is coming from. This field is populated from either PAI or RPID.

ip_dst
read only

string

The IP address of the destination of call.

ip_src
read only

string

The IP address of the source of call.

number_billing
read only

string

The subscriber phone number.

number_dst
read only

string

The destination phone number. Values accepted in this field are the calling number if the call is outbound, or the called number if the call is inbound.

number_dst_original
read only

string

The destination phone number before any transformations were applied. This field will populate if this value is different from number_dst.

number_dst_transformed
read only

string

The destination phone number after any transformations were applied. This field will populate if this value is different from number_dst.

number_external
read only

string

The non-subscriber phone number.

number_src
read only

string

The source number. Values accepted in this field are the calling number if the call is outbound, or the called number if the call is inbound.

number_src_original
read only

string

The source phone number before any transformations were applied. This field will populate if this value is different from number_src.

number_src_transformed
read only

string

The source phone number after any transformations were applied. This field will populate if this value is different from number_src.

partner_sid
read only

string

The secure ID of the partner associated with the call detail record.

price
read only

number

The price for the detail record.

price_lcr_dst
read only

number

The least-cost routing (LCR) price of the incoming call based on the rate_lcr_dst and duration.

price_lcr_src
read only

number

The least-cost routing (LCR) price of the outgoing call based on the rate_lcr_src and duration.

rate
read only

number

The rate that the system uses to calculate the price of the call.

rate_lcr_dst
read only

number

The least-cost routing (LCR) rate based on the secure ID of the receiving endpoint associated with the call.

rate_lcr_src
read only

number

The least-cost routing (LCR) rate based on the secure ID of the sending endpoint associated with the call.

sipcallid_dst
read only

string

The SIP call ID of the destination call.

sipcallid_src
read only

string

The SIP call ID of the source of call.

sipcause
read only

string

The SIP code that was used to end the call.

stir_attest
read only

string

The attestation level returned by the stir_validate transformation if the system ran it.

stir_identity
read only

boolean

Whether the identity was received in the outbound calls or sent in the inbound calls.

stir_orig_id
read only

string

The ID of the call originator returned by the stir_validate transformation if the system ran it.

stir_signing_entity
read only

string

If the call is signed, this field will display the signing authority which performed the call attestation.

stir_verstat
read only

string

The TN validation result returned by the stir_validate transformation if the system ran it. Is set to null for the calls with the inbound direction.

trunk_group_sid_dst
read only

string

The destination trunk group secure ID.

trunk_group_sid_src
read only

string

The source trunk group secure ID.

trunk_sid_dst
read only

string

The destination trunk secure ID.

trunk_sid_src
read only

string

The source trunk secure ID.

type
read only

string

The type of call. Values accepted in this field are:

  • conference_call
  • conference_meeting
  • mediator
  • mms
  • sms
  • telecom

user_data
read only

object

The custom user data set by the set_user_data transformation.

version
read only

integer

The version of the detail record as it comes from the resource.

Sample Call Detail Record Object

{
"cic": null,
"cic_original": null,
"cic_transformed": null,
"date_insert": "2024-01-18T15:35:03.000Z",
"date_start": "2024-01-18T15:32:15.589Z",
"date_stop": "2024-01-18T15:32:19.839Z",
"date_talk": "2024-01-18T15:32:16.535Z",
"direction": "inbound",
"disconnect_originator": "DST",
"diversion_dst": "+15162065451",
"diversion_src": "+15162065451",
"dr_sid": "c02a73b2-8401-459a-af7e-f4cc3eee7854",
"duration": "4.25015",
"duration_billing": "60",
"endpoint_sid_dst": "1ce5a6da-7d72-448a-ab81-897fe24b8f02",
"endpoint_sid_src": "7fc3e7ea-a0df-4de1-836f-50318ed66466",
"identity": null,
"ip_dst": "10.222.2.197:5060",
"ip_src": "162.251.180.18",
"number_billing": "15162065451",
"number_dst": "15162065451",
"number_dst_original": null,
"number_dst_transformed": null,
"number_external": "15012678830",
"number_src": "+15012678830",
"number_src_original": null,
"number_src_transformed": null,
"partner_sid": "ed437757-002d-4ecc-aa5a-efdf5e50dba0",
"price": "0.0025",
"price_lcr_dst": "0.0025",
"price_lcr_src": null,
"rate": "0.0025",
"rate_lcr_dst": "0.005",
"rate_lcr_src": null,
"sipcallid_dst": "11b5b29c3486cac52a7d5baa52c937c9@12.7.193.174",
"sipcallid_src": "428ac5df4582bea66501f7d45199a18d@162.251.180.24",
"sipcause": "200",
"stir_attest" : "A",
"stir_identity" : "false",
"stir_orig_id" : "+15012678830",
"stir_signing_entity" : "carrierX",
"stir_verstat": null,
"trunk_group_sid_dst": "cf7db13f-5c63-4c62-a447-fe3008cd72ef",
"trunk_group_sid_src": null,
"trunk_sid_dst": "7098d9f8-c8f2-400f-a31a-61ef7755985c",
"trunk_sid_src": null,
"type": "telecom",
"user_data" : {
"identity" : "eyJ0eXAiOiJwYXNzcG9ydCIsImFsZyI6I...alg=ES256;ppt=shaken"
},
"version": 2
}

Get Call Detail Records

This request returns data about sent and received calls including the date and time, originating and destination phone numbers, and IP addresses of the calling numbers.

get /calls/call_drs

Sample

A sample GET request to get call detail records matching the criteria in the request URL:

curl -X GET \
'https://api.carrierx.com/core/v2/calls/call_drs?before=e4db6148-ed3b-4eb8-83ce-17d71763a359&limit=1' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'

Response

200 status code with a list of Call Detail Record objects:

{
"count": 1,
"has_more": true,
"items": [
{
"cic": null,
"cic_original": null,
"cic_transformed": null,
"date_insert": "2024-01-18T15:35:03.000Z",
"date_start": "2024-01-18T15:32:15.589Z",
"date_stop": "2024-01-18T15:32:19.839Z",
"date_talk": "2024-01-18T15:32:16.535Z",
"direction": "inbound",
"disconnect_originator": "DST",
"diversion_dst": "+15162065451",
"diversion_src": "+15162065451",
"dr_sid": "c02a73b2-8401-459a-af7e-f4cc3eee7854",
"duration": "4.25015",
"duration_billing": "60",
"endpoint_sid_dst": "1ce5a6da-7d72-448a-ab81-897fe24b8f02",
"endpoint_sid_src": "7fc3e7ea-a0df-4de1-836f-50318ed66466",
"identity": null,
"ip_dst": "10.222.2.197:5060",
"ip_src": "162.251.180.18",
"number_billing": "15162065451",
"number_dst": "15162065451",
"number_dst_original": null,
"number_dst_transformed": null,
"number_external": "15012678830",
"number_src": "+15012678830",
"number_src_original": null,
"number_src_transformed": null,
"partner_sid": "ed437757-002d-4ecc-aa5a-efdf5e50dba0",
"price": "0.0025",
"price_lcr_dst": "0.0025",
"price_lcr_src": null,
"rate": "0.0025",
"rate_lcr_dst": "0.005",
"rate_lcr_src": null,
"sipcallid_dst": "11b5b29c3486cac52a7d5baa52c937c9@12.7.193.174",
"sipcallid_src": "428ac5df4582bea66501f7d45199a18d@162.251.180.24",
"sipcause": "200",
"stir_attest" : "A",
"stir_identity" : "false",
"stir_orig_id" : "+15012678830",
"stir_signing_entity" : "carrierX",
"stir_verstat": null,
"trunk_group_sid_dst": "cf7db13f-5c63-4c62-a447-fe3008cd72ef",
"trunk_group_sid_src": null,
"trunk_sid_dst": "7098d9f8-c8f2-400f-a31a-61ef7755985c",
"trunk_sid_src": null,
"type": "telecom",
"user_data" : {
"identity" : "eyJ0eXAiOiJwYXNzcG9ydCIsImFsZyI6I...alg=ES256;ppt=shaken"
},
"version": 2
}
],
"limit": 1,
"offset": 0,
"pagination": {
"previous": "https://api.carrierx.com/core/v2/calls/call_drs?before=c02a73b2-8401-459a-af7e-f4cc3eee7854&limit=1&offset=0"
},
"total": null
}

This request is enabled for Pagination (including after and before parameters), Result Filtering, and Field Filtering.

note

If used with after or before pagination, you can sort the response results by the Call Detail Record object date_stop attribute only (order=date_stop+asc or order=date_stop+desc).

Required Scopes

To get information about Call Detail Record objects, the partner must have one of the following scopes enabled:

  • calls.manage
  • calls.read

To get information about Call Detail Record objects for the inherited partners, the partner must additionally have the calls.read_descendant scope enabled.

Get Call Detail Record by SID

This request returns data for a call detail record, targeted by secure ID.

get /calls/call_drs/{dr_sid}

A sample GET request to get a Call Detail Record, targeted by secure ID:

curl -X GET \
'https://api.carrierx.com/core/v2/calls/call_drs/c02a73b2-8401-459a-af7e-f4cc3eee7854' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'

Response

200 status code with a serialized copy of the Call Detail Record object:

{
"cic": null,
"cic_original": null,
"cic_transformed": null,
"date_insert": "2024-01-18T15:35:03.000Z",
"date_start": "2024-01-18T15:32:15.589Z",
"date_stop": "2024-01-18T15:32:19.839Z",
"date_talk": "2024-01-18T15:32:16.535Z",
"direction": "inbound",
"disconnect_originator": "DST",
"diversion_dst": "+15162065451",
"diversion_src": "+15162065451",
"dr_sid": "c02a73b2-8401-459a-af7e-f4cc3eee7854",
"duration": "4.25015",
"duration_billing": "60",
"endpoint_sid_dst": "1ce5a6da-7d72-448a-ab81-897fe24b8f02",
"endpoint_sid_src": "7fc3e7ea-a0df-4de1-836f-50318ed66466",
"identity": null,
"ip_dst": "10.222.2.197:5060",
"ip_src": "162.251.180.18",
"number_billing": "15162065451",
"number_dst": "15162065451",
"number_dst_original": null,
"number_dst_transformed": null,
"number_external": "15012678830",
"number_src": "+15012678830",
"number_src_original": null,
"number_src_transformed": null,
"partner_sid": "ed437757-002d-4ecc-aa5a-efdf5e50dba0",
"price": "0.0025",
"price_lcr_dst": "0.0025",
"price_lcr_src": null,
"rate": "0.0025",
"rate_lcr_dst": "0.005",
"rate_lcr_src": null,
"sipcallid_dst": "11b5b29c3486cac52a7d5baa52c937c9@12.7.193.174",
"sipcallid_src": "428ac5df4582bea66501f7d45199a18d@162.251.180.24",
"sipcause": "200",
"stir_attest" : "A",
"stir_identity" : "false",
"stir_orig_id" : "+15012678830",
"stir_signing_entity" : "carrierX",
"stir_verstat": null,
"trunk_group_sid_dst": "cf7db13f-5c63-4c62-a447-fe3008cd72ef",
"trunk_group_sid_src": null,
"trunk_sid_dst": "7098d9f8-c8f2-400f-a31a-61ef7755985c",
"trunk_sid_src": null,
"type": "telecom",
"user_data" : {
"identity" : "eyJ0eXAiOiJwYXNzcG9ydCIsImFsZyI6I...alg=ES256;ppt=shaken"
},
"version": 2
}

This request is enabled for Field Filtering.

Required Scopes

To get information about a Call Detail Record object, the partner must have one of the following scopes enabled:

  • calls.manage
  • calls.read

To get information about a Call Detail Record object for the inherited partners, the partner must additionally have the calls.read_descendant scope enabled.

Path Arguments

ParameterData TypeDescription
dr_sid requiredstringThe secure ID of the Call Detail Record.