The API response includes a "file" field. It is the URL for the CSV file. Copy-paste it into a web browser to download the CSV file and open it with any program or app the supports the format.
The CSV file itself includes the following information fields:
- Call Identifier - a unique ID for each call. It is created by combining its start time (in Unix time format), direction and other values. Note that all segments of a call share the same Call Identifier!
- Date - the date for the start time for the call log segment.
- Start Time - the start time for the call log segment.
- Caller Number or Name - phone number of the caller based on his caller ID. If it is not available, in the case his caller ID is blocked, his name will be used here (also for internal calls sometimes the name and number are idential on the PBX system).
- Caller Name - name of caller based on his caller ID. If it is not available his number will be used.
- Status - indication of the status of the call log segment in terms of connection between the source and destination points of the previous and current call flow legs. Possible responses include "answer","noanswer" (by the recipient), "cancel" (by the caller), "congestion" (too much traffic preventing a connection), "busy" (the recipient is on another call), or "chanunavail" - the destination communication channel is unavailable or the requested peer is not be registered.
- Direction - direction of the call segment, "in" for inbound call, "out" for outbound call, or "internal" for a segment that has been routed or transferred internally.
- Called Type - definition of the type of called point, where the caller originally dialed to or where the preceding call segment transfered the call to. Examples of type of points can be a specific department, a phone line, "ivr", "phone", "huntgroup", "voicemailbox", or "external" for outbound calls.
- Called Number or Name - the phone number or PBX name of the destination point for the current or previous leg. As a call progresses through a call flow this may be sometimes identical to called number.
- Dialed Number - the phone number of the destination point for the next leg where the call is going to be routed to. As a call progresses through a call flow this may be sometimes identical to the called number.
- Arrived to Type - a definition for the type of destination point (where the call was routed to) for the segment. Examples can be "ivr", "user, "queue", "external" etc.
- Arrived to Number or Name - the destination point for the segment where the call arrived to. It extends on the "Arrived to Type" with a more specific point. For example if the type is "user" than his name or number will be given here.
- Event Total Time - the total time (hours, minutes, seconds) for the call log segment including holding and talking time.
- Event Talk Time - the talk time (hours, minutes, seconds) for the call log segment.
- Total Time - an accumulation of total time (hold time+ talk time) for all preceding and current call log segments in hours, minutes, seconds.
- Total Talk Time - an accumulation of talk time for all preceding and current call log segments in hours, minutes, seconds.
- Call End Time - the date and time when the call ended.
|callid||string||If used, will limit the response to the one call specified by this parameter.|
You can obtain it by using the GET/pbx/logs request.
|*start||string||The starting time from which point the request is to display the call logs, specified in Unix timestamp.|
|*end||string||The ending time until which point the request is to display the call logs, specified in Unix timestamp.|
|descending||Boolean||Use this to sort the list - 1 to sort in descending order, 0 not to.|
|**limit||integer||Specify the number of call log records to be returned by the request.|
|offset||integer||Specify the first call log record to display. For example an offset of 3 will start the list on the 3rd record. If left empty the default will be the first record.|
* Use start=0 and end=-1 to display all records.
** The returned list may be many pages long. Using the limit parameter is particularly useful in this situation.
To request the first three available PBX logs records:
HTTPS method: GET
When downloaded the CSV file will look something like this (only four rows are shown here. The full file may contain hundreds of rows):
"Call Identifier",Date,"Start Time","Caller Number or Name","Caller Name",Status,"Call Direction","Called Type","Called Number or Name","Dialed Number","Arrived to Type","Arrived to Number or Name","Event Total Time","Event Talk Time","Total Time","Total Talk Time","Call End Time"
"1589949387.701748 ",05/20/2019,"12:36:27 PM","1 (212) 583-2122","ROBERT HARRISON",Answer,In,Number,"1 (212) 583-2122",16466991356,IVR,"Auto Attendant Main Menu",00:01:02,00:01:02,00:01:02,00:01:02,"05/20/2019 12:37:29 PM"
"1589949387.701748 ",05/20/2019,"12:36:33 PM","1 (212) 583-2122","ROBERT HARRISON",Answer,Internal,IVR,"Auto Attendant Main Menu",1409,Queue,"Sales Department ",00:00:56,00:00:56,00:01:02,00:01:02,"05/20/2019 12:37:29 PM"
"1589949387.701748 ",05/20/2019,"12:37:03 PM","1 (212) 583-2122","ROBERT HARRISON",Mailbox,Internal,Number,"1 (212) 583-2122",1113840,User,"Rick L. Goodwin",00:00:26,00:00:16,00:01:02,00:00:52,"05/19/2020 12:37:29 PM"