Get CDRs of a customer
getCustomerCDRs returns the call records (CDRs) of the sub-customers of the authenticated customer, with the cost charged to each sub-customer. Without filters it returns the calls of all your sub-customers for the last hour. For the calls of your own accounts, use getAccountCDRs.
The method supports trusted mode with i_wholesaler, the ID of the customer that owns the sub-customers.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
i_customer |
int | no | ID of the sub-customer. Default: all sub-customers of the authenticated customer |
start_date |
string | no | Return calls from this time, UTC, in the format %H:%M:%S.000 GMT %a %b %d %Y, for example 09:57:29.000 GMT Wed Nov 18 2009. Default: one hour ago |
end_date |
string | no | Return calls up to this time, same format as start_date |
cli |
string | no | Return calls whose CLI, after translation rules, is like this pattern. Use % for any characters |
cld |
string | no | Return calls whose CLD, after translation rules, is like this pattern |
type |
string | no | Which calls to return: non_zero_and_errors (default), non_zero, all, complete, incomplete or errors. The values mean the same as in getAccountCDRs |
i_cdrs_customer |
int | no | Return only the customer CDR with this ID |
offset |
int | no | Skip this many CDRs |
limit |
int | no | Return at most this many CDRs |
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
result |
string | OK |
cdrs |
array | The CDRs, each a struct with the fields below |
Each CDR has these fields:
| Name | Type | Description |
|---|---|---|
i_customer |
int | ID of the sub-customer |
setup_time |
string | Time the call was set up, in the start_date format |
connect_time |
string | Time the call was answered, in the start_date format |
billed_duration |
int | Billed duration, in seconds |
cli |
string | CLI after the incoming translation rules |
cld |
string | CLD after the incoming translation rules |
cli_in |
string | CLI as received, before any translation |
cld_in |
string | CLD as received, before any translation |
cost |
string | Amount charged to the sub-customer, in the sub-customer’s currency |
country |
string | Country of the dialled destination |
description |
string | Description of the dialled destination |
remote_ip |
string | IP address the call came from |
result |
int | Call result: 0 for a completed call, a SIP response code for a failed call, a negative value for an internal error |
Example
Section titled “Example”call("getCustomerCDRs", { "i_customer": 17, "start_date": "00:00:00.000 GMT Thu Jan 15 2026", "end_date": "00:00:00.000 GMT Fri Jan 16 2026", "limit": 500,}){ "result": "OK", "cdrs": [ { "i_customer": 17, "setup_time": "14:02:05.000 GMT Thu Jan 15 2026", "connect_time": "14:02:11.000 GMT Thu Jan 15 2026", "billed_duration": 126, "cli": "441632960001", "cld": "441632960123", "cli_in": "01632960001", "cld_in": "01632960123", "cost": "0.0504", "country": "United Kingdom", "description": "United Kingdom - Fixed", "remote_ip": "192.0.2.10", "result": 0, }, ],}Related
Section titled “Related”- Call records (CDRs): the customer CDRs in the panel
- Get CDRs of an account
- Get customer information