Retrieve a list of call records for the current day.
The data object in the return result contains the following keys:
| Key | Description |
|---|---|
| cdr | An array of call records. Each call is represented by an object. The format of this object is discussed below. |
| tot / calls | The total number of calls returned in the cdr array. |
| options | Inidicates if any cached data should be cleared. See the Data Caching documentation for more information. |
Each object in the cdr array represents a single call record, and includes the following keys:
| Key | Description |
|---|---|
| id | The ID of the call. This is the ID that should be passed to the lastcdr parameter in subsequent API calls to retrieve only newer calls. |
| date | The time that the call started, represented as the number of seconds since the UNIX epoch. |
| external | An object representing the non-AVANSER phone number involved in the call. avanser is the phone number in AVANSER format, and cutamper is a unique identifier for this phone number. |
| adSource | The AdSource name of the AVANSER BNUM. |
| status | An integer representing the call status. The meaning of each possible value is listed in the table below. |
| duration | The duration of the call in seconds. |
| internal | An object representing the answerpoint for inbound calls, or the from number for outbound calls. avanser is the phone number in AVANSER format, and name is the answerpoint name. |
| country | The country that the call originated from. |
| state | The state that the call originated from. |
| location | The location that the call originated from. |
| audio | An object representing an audio file associated with a call. url is the URL to access the audio file (or an empty string if there is no audio file associated with the call), and type is a string representing the type of audio, either recording or message. |
| direction | The direction of the call. Possible values are call-in and call-out. |
Note: Calls in the cdr array are returned in reverse-chronological order, with the newest call appearing first in the array.
When making a subsequent API call to retrieve newer calls, the application should pass the highest ID value in the lastcdr parameter.
The table below lists the meaning of each of the possible integer values returned in the status key:
| Status Code | Description |
|---|---|
| 0 | Abandoned |
| 1 | Answered |
| 2 | Busy |
| 3 | Unanswered |
| 4, 5 | Reserved |
| 6 | Fax |
- Avanser Productionhttps://p3.avanser.com/app/calls
- AVANSER Mock Serverhttps://avanser.redocly.app/_mock/user-api/references/calls
curl -i -X GET \
'https://p3.avanser.com/app/calls?lastcdr=0&token=YOUR_API_KEY_HERE'Call records for the current day.
The time that the API response left the server, represented as the number of seconds since the UNIX epoch.
The number of seconds that it took to process the API request.
Boolean indicating whether there was an error returned by the API request.
{ "timestamp": 1510092008, "exection": 0.0013340220451355, "error": false, "data": { "tot": 5, "cdr": [ … ], "calls": 5, "options": null } }