Get CDR log
Retrieve CDR log list, filtered according to given options.
CDR data is generated immediately after a call ends, but a delay may occur between generating and registering the data, as it needs to be processed first (e.g. calculating costs).
When using the resource, up to the first 10 items of the full list can be retrieved.
Please note, that when creating an API token, you can mark or unmark a checkbox that evaluates the “Allowed resources” list as a regular expression (regex). In such cases with the GET request, query parameters are considered when running the API, so rules and restrictions can be applied to these. This is applicable when e.g. you want to limit your API requests to certain projects (with projectid).
Tip: If you have not received a response, this may be due to a slowdown. We suggest querying the CDR data 5 minutes after sending the Webhook request. You can subsequently retry querying the CDR data every 5 minutes, up to a total of 20 times.
Request | |
---|---|
Method | GET |
Resource | https://[customer].asp.virtual-call-center.eu/v2/cdrs/[year]/[month]/[day] |
Options | projectid, start, num |
Body | N/A |
Response | |
Body | Array of CDR objects, encoded in JSON. |
Request
Resource parameters
Name | Type | Mandatory | Comment |
---|---|---|---|
customer | string | yes | Your call centre’s unique identifier (subdomain). |
year | integer | yes | Year. |
month | integer | yes | Month within the requested year. Possible values: – 01-12 |
day | integer | no | Day within the requested month. Possible values: – 01-31 |
Options
Name | Type | Mandatory | Comment |
---|---|---|---|
num | integer | no | Specifies the maximum number of CDRs to be returned. Possible values: – [0-9]+ Without populating this parameter, the resource works with a limit of 10. |
projectid | integer | no | Narrows down the scope of data to be searched in a given project. |
start | integer | no | Specifies the offset of the first CDR. Possible values: – [0-9]+ |
Response
Response object
Name | Type | Comment |
---|---|---|
rows | array of object | Array of CDR elements. |
totalCount | integer | Number of CDRs for the given period. |
CDR object
Name | Type | Comment |
---|---|---|
afterwork | integer | Duration/length of afterwork, in seconds. |
beforequeuetime | integer | Time spent before the call is placed in a queue (e.g. time spent in IVR), in seconds. |
billing_ts | string | Time the conversation begins, in YYYY-MM-DD hh-mm-ss format. |
billing_ts_utc | string | Time the conversation begins in UTC, in YYYY-MM-DD hh-mm-ss format. |
billingtime | integer | Length of complete call, in seconds (including ivr, queue and conversation time, but excluding ringtime). |
callfilename | string | The UUID of the related voice file. |
call_rate | string | The rate applied to the call. |
call_quantity | string | The quantity used for rate calculation. |
currency | string | The currency used for rate calculation. |
dc | string | The disconnect cause code associated with the call. |
destination | string | Called phone number. |
dialermode | integer | The dialer mode with which the call was mode |
dispositionid | integer | Unique disposition identifier in the database set for the call. |
disposition_comment | string | The comment added to the disposition. |
dispositionreach | integer | Disposition summary. Possible values: – 1: not reached – 2: reached – 3: successful |
dispositionstatus | integer | Disposition type. See: status key. |
disposition_export_name | string | Export name of the disposition |
direction | string | Call direction: – inbound – outbound |
extensionId | integer | Unique extension identifier, if the call is an IP phone |
extensionName | string | The name of the extension, if the call is an IP phone |
hangup_disposition | string | Displays who hung up the call. |
holdtime | integer | Duration/length of hold, in seconds. |
lastArchivedTime | string | The last time the the voicefile related to the CDR was archived. |
lastArchivedTime_utc | string | The last time the the voicefile related to the CDR was archived in UTC. |
next_contact | string | The date and time when the system will try to call a specific phone number next. |
next_contact_utc | string | The date and time when the system will try to call a specific phone number next in UTC. |
numberid | integer | Unique record identifier in the database. |
prework | integer | Duration/length of prework, in seconds. |
pricetag | string | The pricetag applied to the call. |
projectid | integer | Unique project identifier in the database. |
queuetime | integer | If the call is placed in a queue, then the time spent in the queue, in seconds. |
ringtime | integer | Duration/length of ringing, in seconds. |
shortid | string | The shortid of the CDR helps connect different legs of the call. |
source | string | Caller’s phone number. |
start_ts | string | Time the call is initiated, in YYYY-MM-DD hh-mm-ss format. |
start_ts_utc | string | Time the call is initiated in UTC, in YYYY-MM-DD hh-mm-ss format. |
sum_work | string | The sum of time spent with working on the call. |
talktime | integer | Time during the call in which talking takes place, in seconds. |
userid | integer | Unique user identifier (-1 system, otherwise agent). |
uuid | string | Unique call identifier. |
userfullname | string | The full name of the agent who made the call |
username | string | The username of the agent who made the call |
userextension | string | The extension number used for making the call |
queueid | integer | Queue’s identifier. |
total_fee | string | The total fee applied to the call. |
vcc_score | string | The scores that are relevant to the call. |
recordCustomFieldData | string | The content of the custom fields associated with the call. |
statusArchived | string | Displays whether the call is displayed. |
trashUserId | string | The user ID of who put the call in to trash. |
deletedUserId | string | The user ID of who deleted the call. |
amd | integer | Indicates whether AMD detection was performed on a call or not. Possible values: – 1: Yes – 0: Nol |
Example
List the first CDR in November, 2014.
Request
https://mycc.asp.virtual-call-center.eu/v2/cdrs/2014/11?start=0&num=1
Response body
{
"response": {
"rows": [
{
"uuid": "d3c584b4-5f38-11e9-81be-eb8ee87cf8bf",
"source": "3433335343",
"shortid": "9S8G4J56",
"destination": "3434334333",
"userid": 0,
"numberid": 0,
"extensionId": "1600",
"extensionName": "LMR",
"start_ts": "2019-04-15 06:42:08",
"start_ts_utc": "2019-04-15 06:42:08",
"billing_ts": "2019-04-15 06:42:09",
"billing_ts_utc": "2019-04-15 06:42:09",
"ringtime": 0,
"billingtime": 223,
"talktime": 223,
"queuetime": 0,
"beforequeuetime": 0,
"dispositionid": 0,
"dispositionreach": 0,
"dispositionstatus": 0,
"projectid": 370,
"userfullname": "Jack White",
"username": "vcc_jack_white_op",
"userextension": "339",
"holdtime": 0,
"afterwork": 0,
"prework": 0,
"direction": "inbound",
"sum_work": "00:03:43",
"queueid": 0,
"next_contact": "0000-00-00 00:00:00",
"next_contact_utc": "0000-00-00 00:00:00",
"call_rate": "0.000000",
"call_quantity": "3.716667",
"currency": "huf",
"dialermode": 1,
"dc": 16,
"disposition_comment": null,
"pricetag": "hu-in-landline",
"total_fee": "0.000000",
"hangup_disposition": "operator",
"callfilename": "63806387-a79e-4034-8c84-b0329ccc9a71",
"vcc_score": null,
"recordCustomFieldData": null,
"statusArchived": "no",
"lastArchivedTime": null,
"lastArchivedTime_utc": null,
"trashUserId": null,
"amd": 0,
"deletedUserId": null
}
],
"totalCount": 1
},
"errors": []
}
Comments
Can’t find what you need? Use the comment section below to connect with others, get answers from our experts, or share your ideas with us.
There are no comments yet.