CDRs

Ongoing CDRs

List Ongoing Calls

This endpoint allows you to retrieve a list of active calls in the PBX.

Request Body

  • format: The format of the response.

  • destination: Search by destination number.

  • bridged: [0 => not bridged , 1 => bridged]

  • bill_duration_from: Filter the bill duration from (sec).

  • bill_duration_till: Filter the bill duration till (sec).

  • {custom_field}: Filter by custom fields (Key -> field name, Value -> field value).

Response

The response will contain:

  • count: The count of active calls.

  • cdrs: An array of active call details including id, unique_id, channel_name, source, destination, original_destination, caller_id, call_start, duration, bill_duration, bridged, bridged_agent_name, bridged_agent_extension, direction, and custom_fields.

post/api/ongoing

Request

  • Base URL
    https://your-instance.stats.pbx.commpeak.com
  • URL
    https://your-instance.stats.pbx.commpeak.com/api/ongoing
  • Auth
    API key in header X-API-KEY

Request body application/x-www-form-urlencoded

bill_duration_fromstring
bill_duration_tillstring
bridgedstring
destinationstring
formatstring
{custom_field}string

Example request

{
  "bill_duration_from": "<number>",
  "bill_duration_till": "<number>",
  "bridged": "<boolean>",
  "destination": "<number>",
  "format": "json",
  "{custom_field}": "<string>"
}

Response

successful operation

countstring

Example response

{
  "cdrs": [
    {
      "bill_duration": "<string>",
      "bridged": "<boolean>",
      "bridged_agent_extension": "<string>",
      "bridged_agent_name": "<string>",
      "call_start": "<dateTime>",
      "caller_id": "<string>",
      "channel_name": "<string>",
      "custom_fields": "<string>",
      "destination": "<string>",
      "direction": "incoming",
      "duration": "<string>",
      "id": "<integer>",
      "original_destination": "<string>",
      "source": "<string>",
      "unique_id": "<string>"
    },
    {
      "bill_duration": "<string>",
      "bridged": "<boolean>",
      "bridged_agent_extension": "<string>",
      "bridged_agent_name": "<string>",
      "call_start": "<dateTime>",
      "caller_id": "<string>",
      "channel_name": "<string>",
      "custom_fields": "<string>",
      "destination": "<string>",
      "direction": "internal",
      "duration": "<string>",
      "id": "<integer>",
      "original_destination": "<string>",
      "source": "<string>",
      "unique_id": "<string>"
    }
  ],
  "count": "<number>"
}

Changes

No recorded changes to this operation across all 1 revision of this API.