API Version: Development
System-Admin
or Billing Call-Summary
permissions. A user with Billing / Call Reporting
permission may also read this data for companies they have permission to.{
	"result": "retry",
	"message": "Another user has billing locked. Please try again in a moment."
}
/rest/call/incalls
{
	"type": "cdr",
	"scope": {
		"company": "company", (optional, default to 'default')
		"day": day-number-to-report (optional),
		"month": month-number-to-report,
		"year": year-number-to-report,
		"days": days to include in day report (optional, default = 1),
		"extensions": [	(optional list of extensions to report on)
			"ext-num",
			...
		]
	}
}
{
"result": "success",
"values": {
extension-number: {
"name": "Extension-name",
"calls": [
{
"acctid": accounting-id,
"calldate": epoch-seconds,
"caller": "callers-id",
"type": "Internal|External",
"ringtime": seconds,
"billsecs": seconds,
"detail": "Call-disposition",
"qtime": "seconds or empty",
"qstatus": "Queued-call-disposition or empty"
},
...
(more-calls)
],
}
...
(more-extensions)
}
}
{
"type": "cdr",
"scope": {
"company": [
"test"
],
"month": 2,
"year": 2017
}
}
{
"result": "success",
"values": {
"200": {
"name": "200snom320",
"calls": [
{
"acctid": 27739,
"calldate": 1487850941,
"caller": "203",
"type": "Internal",
"ringtime": 14,
"billsecs": 0,
"detail": "Not answered",
"qtime": "",
"qstatus": ""
}
]
}
}
}
/rest/call/outcalls
{
	"type": "cdr",
	"scope": {
		"company": "company", (optional, default to 'default')
		"day": day-number-to-report (optional),
		"month": month-number-to-report,
		"year": year-number-to-report,
		"days": days to include in day report (optional, default = 1),
		"deviceids": [	(optional list of device-ids to report on)
			"device-id is mac + port",
			...
		],
		"keeviomerge": "bool to merge keevio calls with handset calls",
		"recalc": "bool to force recalculate of costs" (VERY high CPU load)
	}
}
{
"result": "success",
"values": {
"device-id": {
"name": "Device-owner",
"device": "SIP-name",
"calls": [
{
"acctid": accounting-id,
"calldate": epoch-seconds,
"type": "Numberr-type",
"called_info": "Extra-human-readable-call-info",
"called": "called-number-short-form",
"dialled": "number-as-dialled",
"billsecs": seconds,
"ringtime": seconds,
"cost": cost-in-configured-units,
"trunk": "trunk-id or blank",
"cid": "caller-id sent"
},
...
(more-calls)
],
},
...
(more-devices)
}
}
{
"type": "cdr",
"scope": {
"company": [
"test"
],
"month": 2,
"year": 2017
}
}
{
"result": "success",
"values": {
"0500000004000": {
"name": "YealinkRnD T46",
"device": "rndT46",
"calls": [
{
"acctid": 26123,
"calldate": 1487847464,
"type": "Test Number",
"called_info": "",
"called": "*600",
"dialled": "*600",
"billsecs": 61,
"ringtime": 0,
"cost": 0,
"trunk": "",
"cid": "301"
}
]
}
}
}
/rest/call/outsummary
{
	"type": "cdr",
	"scope": {
		"company": "company", (optional, default to show-all)
		"month": month-number-to-report,
		"year": year-number-to-report,
		"keeviomerge": "bool to merge keevio calls with handset calls",
		"detail": "bool to display per-device details",
		"recalc": "bool to force recalculate of costs" (VERY high CPU load)
	}
}
{
"result": "success",
"values": {
"company-id": {
"name": "Company Name",
"cost": cost,
"unknown": count calls where cost unknown,
"handset-id": {
"name": "handset-owner",
"device": "device name",
"cost": cost,
"seconds": billable-seconds,
"unknown": count calls where cost unknown
},
...
(more handsets)
},
...
(each company)
}
}
scope.detail
is null (so false) so only per-company details are shown.{
"type": "cdr",
"scope": {
"month": 2,
"year": 2017
}
}
{
"result": "success",
"values": {
"default": {
"name": "Default Company",
"cost": 1.23,
"seconds": 217,
"unknown": 1
}
}
}
scope.detail
is true.{
"type": "cdr",
"scope": {
"month": 2,
"year": 2017,
"detail": true
}
}
{
"result": "success",
"values": {
"default": {
"name": "Default Company",
"cost": 1.23,
"seconds": 217,
"unknown": 1,
"0200000000001": {
"name": "A User",
"device": "softphone",
"cost": 1.23,
"seconds": 217,
"unknown": 1
}
}
}
}
/rest/call/allcalls
6.2.16+{
	"type": "cdr",
	"scope": {
		"day": day-number-to-report (optional),
		"month": month-number-to-report,
		"year": year-number-to-report,
		"days": days to include in day report (optional, default = 1),
		"keeviomerge": "bool to merge keevio calls with handset calls",
		"recalc": "bool to force recalculate of costs" (VERY high CPU load)
	}
}
{
"result": "success",
"values": {
"company": {
"name": "Company name",
"out": {
"device-id": {
"name": "Device-owner",
"device": "SIP-name",
"calls": [ ... ]
},
...
(more devices)
},
"in": {
extension-number: {
"name": "Extension-name",
"calls": [ ... ]
},
...
(more extensions)
}
},
...
(more companies)
}
}
{
"type": "cdr",
"scope": {
"year": 2017,
"month": 5,
"day": 5,
"days": 7
}
}
{
"result": "success",
"values": {
"acompany": {
"name": "A Company",
"in": {
"446": {
"name": "Meeting Room",
"calls": [
{
"acctid": 2012560,
"calldate": 1493899151,
"caller": "203",
"type": "Internal",
"ringtime": 2,
"billsecs": 0,
"detail": "Not answered",
"qtime": "",
"qstatus": "",
"ddi": ""
}
]
}
},
"out": {
"0500000004000": {
"name": "YealinkRnD T46",
"device": "rndT46",
"calls": [
{
"acctid": 26123,
"calldate": 1493895749,
"type": "Test Number",
"called_info": "",
"called": "*600",
"dialled": "*600",
"billsecs": 61,
"ringtime": 0,
"cost": 0,
"trunk": "",
"cid": "301"
}
]
}
}
}
}
}
extra: true
attribute to the scope of the existing request."extra": {
	"frch": "source-channel",
	"toch": "target-channel",
	"xfch": "transferrer-channel",
	"crhint": "hint for call recording filename",
	"toint": bool - true for call targeted to PABX device,
	"frint": bool - true for call originated from PABX device,
	"frid": unique contact-id of caller,
	"frname": "Caller-name",
	"toid": unique contact-id of callee,
	"toname": "Callee-name"
	"xfid": unique contact-id of transferrer,
	"xfname": "Transferrer-name"
	"disposition": "FAILED|BUSY|ANSWERED|NO ANSWER|VOICEMAIL",
	"frchname": "Calling device name",
	"tochname": "Called device name",
	"frhdext": "extension number if hotdesked"
},
"xfer": [
	{
		"acctid": acctid of next call leg,
		"att": bool - attended=true / blind = false,
		"xferdate": transfer time in epoch-seconds
	},
	...
]
{
"type": "cdr",
"scope": {
"year": 2017,
"month": 5,
"day": 5,
"days": 7,
"extra": true
}
}
{
"result": "success",
"values": {
"acompany": {
"name": "A Company",
"in": {
"446": {
"name": "Meeting Room",
"calls": [
{
"acctid": 56609,
"calldate": 1521029878,
"called_info": "",
"called": "203",
"dialled": "203",
"billsecs": 32,
"ringtime": 2,
"trunk": "",
"cid": "203",
"extra": {
"frch": "SIP/t42",
"toch": "SIP/webrtc111",
"crhint": "1521029879-203-203",
"toint": true,
"frint": true,
"frid": 111,
"frname": "203t42 L.M.B",
"toid": 111,
"toname": "203t42 L.M.B",
"disposition": "ANSWERED",
"frchname": "t42",
"tochname": "203t42 L.M.B"
},
"xfer": [
{
"acctid": 56610,
"att": false,
"xferdate": 1521029905
}
]
},
{
"acctid": 56610,
"calldate": 1521029905,
"caller_info": "",
"caller": "203",
"type": "Internal xfer",
"ringtime": 2,
"billsecs": 5,
"detail": "Answered : 201snom360 Smith",
"extra": {
"frch": "SIP/t42",
"toch": "SIP/webrtc109",
"xfch": "SIP/webrtc111",
"toint": true,
"frint": true,
"frid": 111,
"frname": "203t42 L.M.B",
"toid": 109,
"toname": "201snom360 Smith",
"xfid": 111,
"xfname": "203t42 L.M.B",
"disposition": "ANSWERED",
"frchname": "t42",
"tochname": "201snom360 Smith"
}
}
]
}
},
"out": {
"0500000004000": {
"name": "YealinkRnD T46",
"device": "rndT46",
"calls": [
{
"acctid": 56692,
"calldate": 1522244293,
"called_info": "",
"called": "902",
"dialled": "902",
"billsecs": 6,
"ringtime": 0,
"trunk": "",
"cid": "203",
"extra": {
"frch": "SIP/t42",
"crhint": "1522244293-203-902",
"toint": true,
"frint": true,
"frid": 111,
"frname": "203t42 L.M.B",
"disposition": "ANSWERED",
"frchname": "t42"
}
}
]
}
}
}
}
}