API Version: 6.5
System-Admin
or Billing Call-Summary
permissions. At this level of query (raw CDR data) it is not trivial to determine which rows belong to which company - That takes significant processing./rest/call/read
acctid
which is not necessarily date order, though it will be close to it.calldate
column is returned as a string, but can be translated to a real date simply by passing it to Javascript using new Date(string)
.properties
are optional, and are filled when available.{
	"type": "cdr",
	"scope": {
		"minID": lowest acctid value to return,
		"maxRows": max-rows-to-return (default 500),
		"minDate": start-date-epoch-milliseconds,
		"maxDate": end-date-epoch-milliseconds,
		"queuedata": (optional) bool to include queue events (since 6.3.21),
		"cachedata": (optional) bool to include cache columns (since 6.3.21)
	}

}
{
"result": "success",
"minID": requested-minID,
"maxRows": max-rows-value,
"values": [
{
"acctid": sequence-number,
"calldate": "date as string with timezone",
"clid": "\"cidname\" <cidnum>",
"src": "caller-number",
"dst": "dest-number",
"dcontext": "dialplan-context",
"channel": "source-channel",
"dstchannel": "dest-channel",
"lastapp": "last-dialpaln-command",
"lastdata": "parameters-for-last-dialpaln-command",
"duration": seconds,
"billsec": billable-seconds,
"disposition": "FAILED|BUSY|ANSWERED|NOANSWER",
"amaflags": 2,
"accountcode": "company or >nnn",
"uniqueid": "semi-unique-call-id (epoch.integer)",
"linkedid": "common unique-id across call transfers",
"properties" : {
"target": "target company",
"company": "calling company",
"src_ext": "source extension",
"dial_short": "Short dialled number",
"dial_full": "Full dialled number",
"trunk": "channel or trunk",
"bill_to": "bill-to",
"xfer": "Transferrer",
"is_ivr": "IVR (Boolean)",
"is_park": "Park record (Boolean)",
"is_pick": "Pickup record (Boolean)",
"is_auth": "Auth leg (Boolean)",
"auth": "Auth ID for external dialin",
"is_bounce": "Bounce back flag",
"call_rec": "Call recording filename hint"
},
"queue_data": {
"time": "date as string with timezone",
"queuename": "q_nnn",
"agent": "agent name where relevant or NONE",
"event": One of 'CONNECT','ABANDON','TIMEOUT','KEY','EMPTY'
}
},
...
],
"numrows": number-of-rows
}
{
"result": "success",
"minID": null,
"maxRows": 500,
"values": [
{
"calldate": "2016-03-22 10:52:41+00",
"clid": ""Bob's Desk" <01908276650>",
"src": "01908276650",
"dst": "441908276650",
"dcontext": "voip-external",
"channel": "IAX2/handbag-3265",
"dstchannel": "",
"lastapp": "ResetCDR",
"lastdata": "wv",
"duration": 45,
"billsec": 45,
"disposition": "ANSWERED",
"amaflags": 2,
"accountcode": "default",
"uniqueid": "1458643961.228",
"linkedid": "1458643961.228",
"acctid": 44493,
"properties": {
"xfer": "",
"target": "default",
"company": "default",
"src_ext": "01908276654",
"dial_full": "227",
"dial_short": "227",
"bill_to": ""
}
}
],
"numRows": 1
}