Get Call History List voximplant.statistic.get

Choose a tool for developing with an AI agent:

  • use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
  • use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation

Scope: telephony

Who can execute the method: user with Call Statistics — View permission

The method voximplant.statistic.get returns a list of calls from telephony statistics.

Method Parameters

Required parameters are marked with *

Name
type

Description

FILTER
object

An object for filtering in the format {"field_1": "value_1", ... "field_N": "value_N"}.

See the list of available fields for filtering below.

Supported operators in the filter key:

  • ! — not equal
  • >= — greater than or equal
  • > — greater than
  • <= — less than or equal
  • < — less than
  • >< — between (inclusive range)
  • !>< — not between (outside range)
  • ? — string search
  • = — equal, exact match (used by default)
  • != — not equal
  • % — LIKE, substring search
  • !% — NOT LIKE, substring search

By default — no filtering

SORT
string

Sorting field.

The same fields as in the list of fields for filtering are used, except for CALL_TYPE.

By default — no sorting

ORDER
string

Sorting direction.

Possible values:

  • ASC — ascending order
  • DESC — descending order

By default — no sorting

start
integer

Pagination parameter.

The page size for results is 50 records.

To get the second page, pass 50; for the third — 100, and so on.

Formula:

start = (N - 1) * 50, where N is the page number

Available Fields for Filtering

Name
type

Description

ID
integer

Internal identifier of the statistics record

CALL_ID
string

Call identifier

EXTERNAL_CALL_ID
string

Call identifier on the external PBX/integration side

CALL_CATEGORY
string

Call category

PORTAL_USER_ID
integer

User identifier.

The identifier can be obtained using the user.get method

PORTAL_NUMBER
string

Line number through which the call was made

PHONE_NUMBER
string

Subscriber number

CALL_TYPE
integer

Type of call.

Possible values:

  • 1 — outgoing
  • 2 — incoming
  • 3 — incoming with redirection
  • 4 — callback
  • 5 — informational call

CALL_DURATION
integer

Duration of the call in seconds

CALL_START_DATE
datetime

Date and time of the call start in ISO-8601 format with timezone indication

CALL_LOG
string

Call log URL

CALL_RECORD_URL
string

Call recording URL

CALL_VOTE
integer

Call rating.

Possible values:

  • 1, 2, 3, 4, 5

If the rating is absent — 0 or null

COST
double

Cost of the call

COST_CURRENCY
string

Currency of the call cost

CALL_FAILED_CODE
string

Call result code.

Possible values:

  • 200 — successful call
  • 304 — missed call
  • 603 — declined
  • 603-S — call canceled
  • 403 — forbidden
  • 404 — invalid number
  • 486 — busy
  • 484 — direction unavailable
  • 503 — direction unavailable
  • 480 — temporarily unavailable
  • 402 — insufficient funds
  • 423 — blocked
  • OTHER — undefined

CALL_FAILED_REASON
string

Text of the reason/result of the call

CRM_ENTITY_TYPE
string

Type of CRM object.

Possible values:

  • CONTACT — contact
  • COMPANY — company
  • LEAD — lead

CRM_ENTITY_ID
integer

Identifier of the CRM object from CRM_ENTITY_TYPE

CRM_ACTIVITY_ID
integer

Identifier of the CRM activity for the call

REST_APP_ID
integer

Application identifier

REST_APP_NAME
string

Application name

TRANSCRIPT_ID
integer

Identifier of the call transcript

TRANSCRIPT_PENDING
string

Indicator of pending transcription.

Possible values:

  • Y — transcription pending
  • N — transcription available or absent

SESSION_ID
integer

Session identifier on the telephony side

REDIAL_ATTEMPT
integer

Number of redial attempts (for callback scenarios)

COMMENT
string

Comment on the call

RECORD_DURATION
integer

Duration of the call recording file

Code Examples

How to Use Examples in Documentation

curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"FILTER":{"ID":[1,7],">=CALL_START_DATE":"2025-01-01T00:00:00+01:00"},"SORT":"ID","ORDER":"ASC"}' \
        https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/voximplant.statistic.get
        
curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"FILTER":{"ID":[1,7],">=CALL_START_DATE":"2025-01-01T00:00:00+01:00"},"SORT":"ID","ORDER":"ASC","auth":"**put_access_token_here**"}' \
        https://**put_your_bitrix24_address**/rest/voximplant.statistic.get
        
// This snippet is an ES module: top-level await requires type="module" or a bundler.
        // $b24 is an already-initialized SDK instance (see the SDK "Get started" guide).
        import { Text } from '@bitrix24/b24jssdk'
        import type { B24Frame, ISODate } from '@bitrix24/b24jssdk'
        
        declare const $b24: B24Frame
        
        // Shape of each CallStatRecord returned in result[]
        type CallStatRecord = {
          ID: string
          PORTAL_USER_ID: string
          PORTAL_NUMBER: string
          PHONE_NUMBER: string
          CALL_ID: string
          EXTERNAL_CALL_ID: string | null
          CALL_CATEGORY: string
          CALL_LOG: string | null
          CALL_DURATION: string
          CALL_START_DATE: ISODate
          CALL_RECORD_URL: string | null
          CALL_VOTE: string | null
          COST: string
          COST_CURRENCY: string
          CALL_FAILED_CODE: string
          CALL_FAILED_REASON: string
          CRM_ENTITY_TYPE: string
          CRM_ENTITY_ID: string
          CRM_ACTIVITY_ID: string
          REST_APP_ID: string | null
          REST_APP_NAME: string | null
          TRANSCRIPT_ID: string | null
          TRANSCRIPT_PENDING: string
          SESSION_ID: string | null
          REDIAL_ATTEMPT: string | null
          COMMENT: string | null
          RECORD_DURATION: string | null
          RECORD_FILE_ID: number | null
          CALL_TYPE: string
        }
        
        try {
          // voximplant.statistic.get returns a single page (max 50 records). For the whole result set
          // use a list helper: $b24.actions.v2.callList.make() returns every record as one
          // array, $b24.actions.v2.fetchList.make() yields them in chunks (async generator).
          // NOTE: the list helpers do not accept `order` (it is excluded from their params, so
          // passing it is a TS error) — keep this call.make + `start` variant when sort matters.
          const response = await $b24.actions.v2.call.make<CallStatRecord[]>({
            method: 'voximplant.statistic.get',
            params: {
              FILTER: {
                ID: [1, 7],
                '>=CALL_START_DATE': '2025-01-01T00:00:00+03:00',
              },
              SORT: 'ID',
              ORDER: 'ASC',
              start: 0,
            },
            requestId: Text.getUuidRfc4122()
          })
        
          // The payload is available only on a successful response
          if (!response.isSuccess) {
            console.error(response.getErrorMessages().join('; '))
          } else {
            const result = response.getData()!.result
            console.info('Fetched call statistics:', result.length, 'records', result)
          }
        } catch (error) {
          // Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
          console.error(error)
        }
        
<!-- Load the SDK (UMD build); it is exposed as the global B24Js -->
        <script src="https://unpkg.com/@bitrix24/b24jssdk@1/dist/umd/index.min.js"></script>
        <script>
          async function fetchCallStatistics() {
            try {
              // Initialize the SDK inside a Bitrix24 frame
              const $b24 = await B24Js.initializeB24Frame()
        
              // voximplant.statistic.get returns a single page (max 50 records). For the whole result set
              // use a list helper: $b24.actions.v2.callList.make() returns every record as one
              // array, $b24.actions.v2.fetchList.make() yields them in chunks (async generator).
              // NOTE: the list helpers do not accept `order` (it is excluded from their params, so
              // passing it is a TS error) — keep this call.make + `start` variant when sort matters.
              const response = await $b24.actions.v2.call.make({
                method: 'voximplant.statistic.get',
                params: {
                  FILTER: {
                    ID: [1, 7],
                    '>=CALL_START_DATE': '2025-01-01T00:00:00+03:00',
                  },
                  SORT: 'ID',
                  ORDER: 'ASC',
                  start: 0,
                },
                requestId: B24Js.Text.getUuidRfc4122()
              })
        
              // The payload is available only on a successful response
              if (!response.isSuccess) {
                console.error(response.getErrorMessages().join('; '))
                return
              }
        
              const result = response.getData().result
              console.info('Fetched call statistics:', result.length, 'records', result)
            } catch (error) {
              // Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
              console.error(error)
            }
          }
        
          document.addEventListener('DOMContentLoaded', fetchCallStatistics)
        </script>
        
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
        
        filter = {
            "ID": [
                1,
                7,
            ],
            ">=CALL_START_DATE": "2025-01-01T00:00:00+03:00",
        }
        
        try:
            bitrix_response = client.voximplant.statistic.get(
                filter=filter,
                sort="ID",
                order="ASC",
            ).response
            result = bitrix_response.result
            print(result)
        except BitrixAPIError as error:
            print(
                "Bitrix API error",
                f"error: {error.error}",
                f"error_description: {error.error_description}",
                sep="\n",
            )
        except BitrixSDKException as error:
            print(f"Bitrix SDK error: {error.message}")
        except Exception as error:
            print(f"Unexpected error: {error}")
        
try {
            $response = $b24Service
                ->core
                ->call(
                    'voximplant.statistic.get',
                    [
                        'FILTER' => [
                            'ID' => [1, 7],
                            '>=CALL_START_DATE' => '2025-01-01T00:00:00+01:00'
                        ],
                        'SORT' => 'ID',
                        'ORDER' => 'ASC'
                    ]
                );
        
            $result = $response
                ->getResponseData()
                ->getResult();
        
            echo 'Success: ' . print_r($result, true);
            processData($result);
        
        } catch (Throwable $e) {
            error_log($e->getMessage());
            echo 'Error fetching statistics: ' . $e->getMessage();
        }
        
BX24.callMethod(
            "voximplant.statistic.get",
            {
                FILTER: {
                    ID: [1, 7],
                    '>=CALL_START_DATE': '2025-01-01T00:00:00+01:00'
                },
                SORT: 'ID',
                ORDER: 'ASC'
            },
            function(result)
            {
                if (result.error())
                {
                    console.error(result.error(), result.error_description());
                }
                else
                {
                    console.log(result.data());
                }
            }
        );
        
require_once('crest.php');
        
        $result = CRest::call(
            'voximplant.statistic.get',
            [
                'FILTER' => [
                    'ID' => [1, 7],
                    '>=CALL_START_DATE' => '2025-01-01T00:00:00+01:00'
                ],
                'SORT' => 'ID',
                'ORDER' => 'ASC'
            ]
        );
        
        echo '<PRE>';
        print_r($result);
        echo '</PRE>';
        
// client and ctx are already created — see the Go SDK section
        res, err := client.Core().Call(ctx, "voximplant.statistic.get", b24.Params{
        	"FILTER": b24.Params{
        		"ID":                []int{1, 7},
        		">=CALL_START_DATE": "2025-01-01T00:00:00+03:00",
        	},
        	"SORT":  "ID",
        	"ORDER": "ASC",
        }, b24.WithIdempotent())
        if err != nil {
        	return fmt.Errorf("voximplant.statistic.get: %w", err)
        }
        
        var items []struct {
        	ID           b24.ID `json:"ID"`
        	PortalUserID b24.ID `json:"PORTAL_USER_ID"`
        	PortalNumber string `json:"PORTAL_NUMBER"`
        	PhoneNumber  string `json:"PHONE_NUMBER"`
        	CallID       string `json:"CALL_ID"`
        	CallCategory string `json:"CALL_CATEGORY"`
        }
        if err := json.Unmarshal(res.Result, &items); err != nil {
        	return fmt.Errorf("parse response: %w", err)
        }
        for _, it := range items {
        	fmt.Println(it.ID, it.PortalUserID)
        }
        

Response Handling

HTTP Status: 200

{
            "result": [
                {
                "ID": "1",
                "PORTAL_USER_ID": "1",
                "PORTAL_NUMBER": "reg133788",
                "PHONE_NUMBER": "+19061234567",
                "CALL_ID": "11018129443EB80D.1754478570.11438214",
                "EXTERNAL_CALL_ID": null,
                "CALL_CATEGORY": "external",
                "CALL_LOG": "https://storage-gw-com-02.voximplant.com/voximplant-logs/2025/08/06/YTdjNmMxYWMyNzNmZDA2NTAwZTlkODYzMWExODN06ODM0MkU1MjY2OEIxMkMuMTc1NDQ3ODUyMC4xMTQzODIxNV8xODUuMTY0LjE0OC4xMzIubG9n?sessionid=3841557776",
                "CALL_DURATION": "0",
                "CALL_START_DATE": "2025-08-06T14:08:40+01:00",
                "CALL_RECORD_URL": "",
                "CALL_VOTE": null,
                "COST": "0.0000",
                "COST_CURRENCY": "EUR",
                "CALL_FAILED_CODE": "603-S",
                "CALL_FAILED_REASON": "Decline self",
                "CRM_ENTITY_TYPE": "CONTACT",
                "CRM_ENTITY_ID": "275",
                "CRM_ACTIVITY_ID": "7739",
                "REST_APP_ID": null,
                "REST_APP_NAME": null,
                "TRANSCRIPT_ID": null,
                "TRANSCRIPT_PENDING": "N",
                "SESSION_ID": "3841557776",
                "REDIAL_ATTEMPT": null,
                "COMMENT": null,
                "RECORD_DURATION": null,
                "RECORD_FILE_ID": null,
                "CALL_TYPE": "1"
                },
                {
                "ID": "7",
                "PORTAL_USER_ID": "1269",
                "PORTAL_NUMBER": "3",
                "PHONE_NUMBER": "19061234568",
                "CALL_ID": "externalCall.716f1cb73def9700a23842adf9c4c568.1773130779",
                "EXTERNAL_CALL_ID": null,
                "CALL_CATEGORY": "external",
                "CALL_LOG": null,
                "CALL_DURATION": "95",
                "CALL_START_DATE": "2026-03-10T11:19:38+01:00",
                "CALL_RECORD_URL": null,
                "CALL_VOTE": "5",
                "COST": "0.0000",
                "COST_CURRENCY": "",
                "CALL_FAILED_CODE": "200",
                "CALL_FAILED_REASON": "",
                "CRM_ENTITY_TYPE": "CONTACT",
                "CRM_ENTITY_ID": "797",
                "CRM_ACTIVITY_ID": "7943",
                "REST_APP_ID": "3",
                "REST_APP_NAME": "REST API Documentation",
                "TRANSCRIPT_ID": "1",
                "TRANSCRIPT_PENDING": "N",
                "SESSION_ID": null,
                "REDIAL_ATTEMPT": null,
                "COMMENT": null,
                "RECORD_DURATION": null,
                "RECORD_FILE_ID": 9079,
                "CALL_TYPE": "2"
                }
            ],
            "total": 2,
            "time": {
                "start": 1773141841,
                "finish": 1773141841.595178,
                "duration": 0.5951778888702393,
                "processing": 0,
                "date_start": "2026-03-10T14:24:01+01:00",
                "date_finish": "2026-03-10T14:24:01+01:00",
                "operating_reset_at": 1773142441,
                "operating": 0
            }
        }
        

Returned Data

Name
type

Description

result
array

Array of statistics records. The composition of records depends on the FILTER conditions.

An empty array means there are no records matching the FILTER conditions

total
integer

Total number of records in the selection

next
integer

Offset for the next page (if any)

time
time

Information about the execution time of the request

Error Handling

HTTP Status: 403

{
            "error": "ACCESS_DENIED",
            "error_description": "Access denied!"
        }
        

Name
type

Description

error
string

String error code. It consists of digits, Latin letters, and underscores. It may arrive empty — in that case only error_description shows the reason

error_description
string

Error message for the developer. Do not show it to the end user without processing

Possible Error Codes

Code

Description

Value

ACCESS_DENIED

Access denied!

Insufficient permissions to view call statistics

Statuses and System Error Codes

HTTP Status: 4xx, 5xx

The errors described below are returned by the REST API itself, not by the logic of a specific method. They can arrive in response to any method.

Status

Code
Error Message

Description

500

INTERNAL_SERVER_ERROR
Internal server error

An internal server error has occurred. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support

500

ERROR_UNEXPECTED_ANSWER
Server returned an unexpected response

The server returned an unexpected response. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support

503

QUERY_LIMIT_EXCEEDED
Too many requests

The request intensity limit has been exceeded

429

OPERATION_TIME_LIMIT
Method is blocked due to operation time limit

The method is blocked because the request resource intensity limit has been exceeded. The block is lifted automatically once the accumulated execution time of the method no longer exceeds the limit

401

NO_AUTH_FOUND
Wrong authorization data

The request contains no authorization data: neither an access token nor a webhook code was passed

401

INVALID_REQUEST
Https required

Methods are called over the HTTPS protocol only

401

OVERLOAD_LIMIT
REST API is blocked due to overload

The REST API is blocked due to overload. This is a manual individual block. To have it lifted, contact Bitrix24 technical support

401

ACCESS_DENIED
REST is available only on commercial plans

REST API access is not active for this account. In Bitrix24 Cloud, check the current plan or trial status: Vibe+ plans include REST API access, while Essentials plans do not. A webhook receives a different error message — REST is available only by subscription

401

INVALID_CREDENTIALS
Invalid request credentials

No active webhook with the specified user identifier and secret code was found

404

ERROR_METHOD_NOT_FOUND
Method not found!

No method with this name was found. The name is misspelled, the method does not exist in the REST API, or it is unavailable without the required scope

401

insufficient_scope
The request requires higher privileges than provided by the webhook token

The request requires broader permissions than the token has: for a webhook these are the permissions granted to it, for an application it is the scope. For an application, the error message ends with provided by the access token

401

expired_token
The access token provided has expired

The access token has expired

401

user_access_error
The user does not have access to the application

The application is installed, but the Bitrix24 administrator has granted access to it only to specific users

403

PORTAL_DELETED
Portal was deleted

The public part of the site is closed. To open it on an on-premise installation, disable the "Temporary closure of the public part of the site" option. Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site

Continue Learning