Aggregate CDRs

Aggregate CDRs

This endpoint allows you to aggregate Call Detail Records (CDRs) based on specified parameters.

Request Body

  • group (string): Specifies the fields to group the CDRs by. Required

Example:

"user;call status;duration;hangup;destination;caller_id;q850;sip termination status;extension number;transfer to;conference to;trunk"

  • fields (string): Specifies the fields to include in the aggregated CDRs.

Example:

"user;call status;duration;hangup;destination;caller_id;q850;sip termination status;extension number;transfer to;conference to;trunk;total calls;successful calls;total duration;total bill duration;ACD;ASR;cost;transfer duration;conference duration;transfer cost;conference cost;total transfer;call agent duration"

  • period (string): Specifies the time period for aggregation.

Example: "year;month;day;hour"

  • filter (object): Contains the filter criteria for aggregating the CDRs. Required (strat_at & end_at) Example:
{ 
"start_at": "2020-01-01 00:00:00", // required, operator is not supported
"end_at": "2025-01-01 00:00:00", // required, operator is not supported
"destination": ["12","464646466465"], // single value or array, operator is not supported 
"caller_id": ["4565654654"], // single value or array, operator is not supported
"callAttributes": ["Conference","Transfer"], // array, operator is not supported 
"user": [2,3], // array of users ids, operator is not supported 
"original_trunk_id": [2], // array of trunks ids, operator is not supported 
"callsType": [6,4], // array of call types ids, operator is not supported 
// Allowed call types: 
// PHONEBOOK: 2 
// MANUAL_CALL: 3 
// INCOMING: 4 
// MISSED_CALL: 7 
// INTERNAL_CALL: 8 
"bill_duration": "3;>=" ,"duration": "5;>|9999;<" 
}

  • order (string): Specifies the order in which the aggregated CDRs should be presented. The field must be selected on group or fields values

Example: "user;desc"

  • limit (integer): Specifies the maximum number of aggregated CDRs to return. Example: 100
  • offset (integer): Specifies the offset for paginating through the aggregated CDRs.

Example: 0

Response

The response will include the aggregated CDRs based on the provided parameters.Example:

 [
  {
        "caller_user_id": 0,
        "status": "CALL_REJECTED",
        "client_hangup_disposition": "system",
        "dst": "*********024",
        "client_callerid_number": "2222102778",
        "q850": "Call rejected",
        "sip_term_status": 603,
        "src": "",
        "transfer_to": "",
        "conference_to": "",
        "trunk": "",
        "period": "2023 11 12",
        "total": "1",
        "successful": "0",
        "call_duration": "00:00:00",
        "call_bill_duration": "00:00:00",
        "acd": "0 (in 0 calls)",
        "asr": "0% (in 0 of 1 calls)",
        "cost": 0,
        "transfer_duration": "0",
        "conference_duration": "0",
        "transfer_cost": null,
        "conference_cost": null,
        "total_transfer": "0",
        "call_agent_duration": "0"
    },
    {
        "caller_user_id": 0,
        "status": "USER_BUSY",
        "client_hangup_disposition": "system",
        "dst": "*********968",
        "client_callerid_number": "447893930499",
        "q850": "User busy",
        "sip_term_status": 486,
        "src": "",
        "transfer_to": "",
        "conference_to": "",
        "trunk": "",
        "period": "2024 06 27",
        "total": "1",
        "successful": "0",
        "call_duration": "0:00:05",
        "call_bill_duration": "00:00:00",
        "acd": "0 (in 0 calls)",
        "asr": "0% (in 0 of 1 calls)",
        "cost": 0,
        "transfer_duration": "0",
        "conference_duration": "0",
        "transfer_cost": 0,
        "conference_cost": 0,
        "total_transfer": "0",
        "call_agent_duration": "0"
    }
]

Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!