Overview
Telecom Lookup Tools
Get Call Records
Get CDR Records for a Specific Time Period.

Get Information

URL:
[start_date] would be month-day-year or 04-24-2017 [end_date] would be month-day-year or 04-26-2017
Optional GET parameters: source - Filter records having only a specified source number destination - Filter records having only a specified destination number
Full Sample URL:
1
https://api.teleapi.net/cdr/04-24-2017/04-26-2017?token=ABC-ABC-ABC
Copied!
shell
PHP+CURL
RESPONSE
SQL
CURL
1
curl -v -X GET "https://api.teleapi.net/cdr/04-24-2017/04-26-2017/?token=XXXX"
Copied!
PHP + Curl
1
<?php
2
$start_date = "04-24-2017";
3
$end_date = "04-26-2017";
4
โ€‹
5
$baseurl = "https://api.teleapi.net/cdr/";
6
$baseurl .= $start_date."/".$end_date."/?token=XXXX";
7
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
8
$retval = curl_exec($ch);
9
curl_close($ch);
10
โ€‹
11
$object = json_decode($retval);
12
print_r($object);
Copied!

Responses from API

Successful Download

This is a sample of what to expect from the API. If you open this in a web browser, it will download a file for you.
1
date gmt,source,destination,callerid,hangup code,sip account,orig ip,duration,per minute,callcost,type
2
2017-04-22 03:02:30,5615551212,5614441313,15659993333 <5615551212>,NORMAL_CLEARING,callforward,na,66,0.008500,0.009400,term
Copied!

Invalid Date Range

The code may return an empty set if the date range cannot get a result.

Failed to Download

1
{
2
"status":"error",
3
"error":"invalid date"
4
}
Copied!

SQL Equivalents

1
date gmt: DATETIME
2
source: bigint(20)
3
destination: bigint(20)
4
hangup_code: varchar(100) ("NORMAL_CLEARING", "USER_BUSY", "ORIGINATOR_CANCEL", "NORMAL_CIRCUIT_CONGESTION", "NONE" or other errors)
5
sip_account: varchar(100)
6
orig_ip: varchar(30)
7
duration: int(12)
8
per_minute: decimal(14,6) or float()
9
callcost: decimal(14,6) or float()
10
type: varchar(50) ("term", "did", "intlterm", "faxoutbound", "exception")
Copied!
Last modified 1yr ago
Copy link