Call Log API

Call log API allows you to pull call record details (CDR) by a simple web request. You can receive up to 10,000 CDR result per reqeust by a filter of your choice. You can analyze the data and generate automated reports regarding your call center performance, store the call history of your clients along with the url for the call record.
call log api scheme

The Call-Log API works as follows:

 

The first part of the Call-Log api allows you the set which call records details (CDR's) you will receive based on your filter (search criteria) and your request.
You will decide which on which search criteria to use in order to receive your CDR's, the search criteria will based on:

  1. From date & to date
  2. Phone numbers
  3. extensions
  4. IdentityCriteria
  5. CallID
  6. cdrTypes.

 

Secondly, you decide which CDR fields will be returned to you by Voicenter.
You decide what information you will receive in your reqeust to Voicenter.
You can set to get only certain CDR fields like record url, status and type of the call, rest of the CDR fields will not be returned.

For security purposes you need to send your request with a code to authenticate your account and make sure the IP address of your server which will be sending api request to Voicenter is authorized in your account.

The code can be provided by our Backoffice team.

 

General Description

API URI

 

1
          
https://api.voicenter.com/hub/cdr/
        

Acceptable Request Types

 

  1. POST
  2. GET

 

Possible Response Formats

 

  1. JSON

 

Request Parameters

 

As stated above, the Call Log api is divided into 2 "parts":

  1. The first part you need to authenticate and set the filter (search criteria) which will decide what CDR's you will receive.
  2. The second part you will need to set which fields that hold the call details record will be returned to you by Voicenter.

 

Search Criteria Options

 

Parameter Description Type
codeString. A request can also be send with bearer token.A unique organization identifier. Mandatory.
fromdateDate time in ISO 8601 format.
Important – the value is in GMT 0.
Mandatory.
todateDate time in ISO 8601 format.
Important – the value is in GMT 0.
Mandatory.
phonesArray of strings.
Each string is phone number to search include country code.
Israel prefix can be filter without the country code.
Optional.
extensionsArray of strings. Each string is Voicenter SIP extension.Optional.
IdentityCriteriaOne of the following: Account, Hierarchical, Department, User.Optional.
callIDString.
Filter the search for a specific Voicenter call id.
Optional.
cdrTypesArray of integers.
Allows to filter CDRs by a specific call types (incoming, click2call,dialer etc.).
E.g. [4, 18].
Optional.
campaignIDArray of numbers, each number is a Voicenter campaign ID.Optional.
queueIDArray of numbers, each number is a Voicenter queue ID.Optional.

Sort

 

You can decide how to sort the information in the response you receive from Voicenter.

Parameter Description Type
fieldOne of the fields list which the sorting criteria will take place.
orderasc \ desc.
which order to organize the returned results – ascending or descending.
* It is an Array type, you can send requests with multiple field & order.

Reqeust Parameters

 

These are the CDR fields you can configure to receive in the Response from Voicenter.

Below is an explanation about each field.

Field Description Example
CallerNumberDisplays the caller’s phone number.
The phone number that will show to the call destination.
"CallerNumber":"0722776772"
TargetNumberDisplays the destination of the call.
Can be a phone number or the extension SIP code.
The phone number value will be sent with the international country prefix.
"TargetNumber":"AAPINFzL" / “TargetNumber":"972722776772"
DateDisplays the time and date that the call was made."Date":"2022-007-31 09:59:29"
DateEpochDisplays the time and date that the call was made in Epoch format."DateEpoch":1554027973
DurationDisplays the duration of the call (seconds).This duration does not include the ringing duration, only the actual time of the conversation that was made."Duration":33
CallIDDisplays the ID code of the specific call."CallID":"20200720095ilila137b2f69s"
TypeDisplays the type of Call.
For example: if it is an incoming/outgoing call? There are several call types (More details are down below).
"Type":"Incoming Call" / "Type":"Extension Outgoing" / "Type":"Click2Callleg1"
CdrTypeThe “Type” field returns the call type.
The “CdrTypes” filed retunes the corresponding numeric value of the call type.
The digit id of each call type can be seen below at the Call Type table.
"TargetPrefixName": 4
DialStatusDisplays what happened with the specific call?
If the call had 2 legs, this field will show the status of the leg1 part of the call(call types: Click2call, Automatic Dialer calls).
There are several call statuses(More details are in the next pages).
"DialStatus":"ANSWER" / "DialStatus":"ABANDONE" / "DialStatus":"TE"
TargetextensionDisplays the extension SIP code that received the incoming call.
Sometimes this value will be identical to the "TargetNumber" field.
There are cases that the incoming call is received not directly to the extension, so the "TargetNumber" can display different value.
"Targetextension":"AAPINFzL"
CallerextensionDisplays the extension SIP code that the call was dialed from.
This value is different from the "CallerNumber" field.
In the "CallerNumber" field it displays the actual number that will appear to the call destination.
"Callerextension":"AAPINFzL"
DIDDisplays the origin phone number that the caller called to.
This field will only show value if the call direction was an incoming call.
"DID":"0722776772"
QueueNameIf the call was directed to a queue service, it displays the queue name."QueueName":"Service Queue"
RecordURLDisplays a URL link to the call recording."RecordURL":"https://cpanel.voicenter.co.i l/CallsHistory/PlayRecord/123abc.mp3"
RecordExpectA Boolean type field.
Displays if the call was recorded or not.
"RecordExpect":true
PriceDisplays the total price of the call in ILS cents (Agorot)."Price":7
RingTimeDisplays the ringing duration of the call(seconds).
Not include the actual conversation duration.
"RingTime":23
RepresentativeNameDisplays the Voicenter representative name that the specific call was associated with.
This field will only be displayed if the user was logged in to an extension when the call was made.
"RepresentativeName":"Walter Melon"
RepresentativeCodeDisplays the Voicenter representative ID code that the specific call was associated with.
This field will only be displayed if the user was logged in to an extension when the call was made.
"RepresentativeCode":"19996"
UserNameSimilar to the field "RepresentativeName".
If a user was logged in to an extension when the call was made, this field will show the same value as "RepresentativeName".
But if a user was not logged in then this field will show the user name that the extension\DID is associated with.
"UserName":"Walter Melon"
DTMFDataA JSON array type field. Displays the stages in the IVR that an incoming call went through.
Fields:
"LayerName" – The IVR layer name as it appears in the Voicenter control panel (CPanel).
"DTMF" – If the caller pressed on a digit\s. If the caller did not press an any digit the default value will be “0”.
"LayerNumber" - The IVR layer ID.
"DTMFData":"[{LayerName: "Main Menu", DTMF: 2, LayerNumber: "0"}, {LayerName: "Sales", DTMF: 0, LayerNumber: "15"}]"
CustomDataA JSON array type field. Displays custom data that was sent to us.
In addition, if a specific call has an origin call it will display here with the field name "OriginalIvrUniqueID".
For example: if a call was first answered by one representative who then transferred it to another representative.
The second part of the call that was transferred, will have in the "CustomData" field a callID value of the original call, thus associating both calls.
"CustomData": {"OriginalIvrUniqueID":"2020072118102as sdsdas"}" / "CustomData": {"var_clientID":"2118102", {"var_clientAccountID":"123456"}"
DepartmentNameDisplays the department\account name (as it appears in Voicenter) that the call was associated with."DepartmentName":"Voicenter Account"
DepartmentIdDisplays the department\account ID (as it appears in Voicenter) that the call was associated with."DepartmentId":123456
TargetPrefixNameDisplays the name of the country that the call was dialed to."TargetPrefixName":"Israel"


Call Type

 

In Voicenter we have different call type as detailed in the table below.

You can combine the call type and call statuses parameters to generate automated processes in your organization.

For example, if your sales tried to contact a lead via Click2call of an outgoing call (call types) and failed to receive an answer (call status) for the potential client you can send an SMS/WhatsApp/email to that lead informing them you tried to contact them.

CDR type name CDR type id Description
Incoming Call1A regular incoming call that was dialed to a phone number and ended up in the IVR or an extension (did not end in a queue, which will make it type 4).
CC2A call that was made through a calling card (Access number) service.
Extension Outgoing4A regular outgoing call (manually dialed from the phone).
Queue8An incoming call that was received by a queue.
Click2Call leg19A call that was made by click2call (Not by Dialer).
Leg 1 of the call.
Leg 1 - the initial connection of the call to the extension.
This is the “Phone” parameter in the Click2call API.
Click2Call leg210A call that was made by click2call (Not by Dialer).
Leg 2 of the call.
Leg 2 - the actual call that is being made to the destination. This is the “Target” parameter in the Click2call API.
VoiceMail11A call that was answered by Voicenter voicemail.
Callference12A call that was made through Voicenter callference service.
XferCDR13A call that manually transferred from an extension to a DID/another extension.
ProductiveCall Leg114A "leg 1" Agents Auto Dialer calls. Leg1 - the initial connection of the call to the extension.
ProductiveCall Leg215A "leg 2" Agents Auto Dialer calls. Leg 2 -the actual call that is being made to the destination.
Scrubber16A call that was made through Voicenter's Scrubber service.
Click 2 IVR17"Leg1" Predictive Dialer calls.
Leg1 - the initial connection of the call to the destination.
Click 2 IVR Incoming18This is the "Leg 2" Predictive Dialer call.
After the initial Leg1 (Click 2 IVR) call was answered, this new leg is dialing the IVR (a layer in Voicenter telephony menu) and Leg 1 is connected to the representatives.
This call type is for all Click 2 IVR that did not enter a queue.
If the call enters a queue service the type will be type 15.
Click 2 Queue Incoming19This is the "Leg 2" Predictive Dialer call.
After the initial Leg1 (Click 2 IVR) call was answered, this new leg is dialing the IVR (a layer in Voicenter telephony menu) and Leg 1 is connected to the representatives.
If the call enters a queue, then the call status will be - Click 2 Queue. Else, the call type will be type 14.
FaxCdr20A call that was made through Voicenter's internal outgoing fax service.
*Not released yet.
Attended CDR leg121A call that was transferred with consultation.
Attended CDR leg222A call that was transferred with consultation.
This type will only be made in a case of an incoming call that was answered by representative "A", "A" will then put the call on hold and make another call(consult) to another person - "B". Afterward, "A" will transfer the initial call to "B".
The "Leg 2" is the part of the call between "B" and the initial caller.
Auto forward23A call that was automatically transferred from an extension to a DID (usually representatives configure their phones manually to transfer calls when they are not available).

 

Call statuses

 

In Voicenter we have different call statuses as detailed below.
Along with the call type (provided above) you can create an automated process, for example send an email to your call center manage asking to callback a client who abandoned (call status) the queue (call type) or tried to join when the queue was full (call status) with other callers.

You can use the information provided by our Call Log api to perform many automated process your organizational business logic dictates.

CDR Status Name Description
NOTDIALEDHang-up occurred before the call was made.
ANSWERA call was answered. A successful dial.
A successful dial.
The caller reached the destination.
Whenever we receive an answer response signal, also when the call reached local voicemail service and etc.
BUSYBusy signal.
The dial command reached its number but the number is busy.
NOANSWERNo answer.
The dial command reached its number, the number rang for too long, then the dial timed out.
CANCELA call is canceled.
The dial command reached its number but the caller hung up before the call destination could answer.
ABANDONEWhen using Voicenter's queue service, the caller hung up before the call destination could answer.
TIMEOUTWhen using Voicenter's queue service - a call has reached timeout in the queue.
FULLWhen using Voicenter's queue service - a call tried to enter a queue service, but the queue reached the maximum amount of waiting callers.
EXITWhen using Voicenter's queue service - a caller while waiting in the queue, chose to exit from the queue.
JOINEMPTYWhen using Voicenter's queue service - a call tried to enter a queue service, but there were no representatives who were logged-in to it.
VOENDHang-up during IVR without actual dialing.
In this case, the caller waited in the IVR but hung up before the call rang in any extension.
TEWhen an incoming call is directed to an IVR recording and afterward it configured to hung up the call.
NOTCALLEDA Leg2 Click2Call was not called.
When using a click2call service and the Leg1 initial stage was not successful (not answered).
VOICEMAILCall entered to Voicenter voicemail service.

Call Error Types

 

These error responses display cases when there was a problem connecting to the target destinations.

It mainly used for Voicenter internal Tracking.

Error Types Description
CONGESTIONCongestion.
This status is usually a sign that the dialed number is not recognized.
CHANUNAVAILChannel unavailable.
On SIP, peer may not be registered.
INVALIDARGSError parsing dial command arguments.
SSWPREAUTHSSW outgoing call cancel before actual dial.

 

Get Reqeust Example

 

Here below is an example for a reqeust to Call Log API in a POST JSON format.

You can see the fields which you want to receive back in the response.

You can see the search criteria you can use and sorting order.

1
2
          
https://api.voicenter.com/hub/cdr/?code=xxxxxxxxxxxxxxxxxxxx&fromdate=2021-10-02T08:09:40&todate=2021-11-
09T23:59:40&phones=972501234567&extensions=SipSip&fields=Date&fields=Type&Fields=DID&Fields=CallerNumber
        

JSON Request Example

 

Here below is an example for a reqeust to Call Log API in a POST JSON format.

You can see the fields which you want to receive back in the response.

You can see the search criteria you can use and sorting order.

 

{
"code": "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
"fields": [
"CallerNumber",
"TargetNumber",
"Date",
"DateEpoch",
"Duration",
"CallID",
"CustomData",
"Type",
"CdrType",
"DialStatus",
"TargetExtension",
"CallerExtension",
"DID",
"QueueName",
"RecordURL",
"Price",
"RingTime",
"RepresentativeName",
"RepresentativeCode",
"DTMFData",
"DepartmentName",
"DepartmentId"
]
"search": {
"fromdate": "2021-10-02T08:09:40",
"todate": "2021-11-09T23:59:40",
"cdrTypes": [
1,
8,
9
]
"phones": [
"972501234567",
"0722776772"
]
"extensions": [
"SipSip"
]
"IdentityCriteria": "Account",
"CallID": "xxxxxxxxxxxxxxxxxxxxxx"
}
"sort": [
{
"order": "desc",
"field": "date"
}
{
"order": "asc",
"field": "Duration"
}
]
}

 

Response Parameters

 

Below are the parameters which are included in the response

Parameter Description
ERROR_NUMBERInteger.
Represents error number.
ERROR_DESCRIPTIONString.
Represents error description.
STATUS_CODEInteger.
Http response code.
TOTAL_HITSInteger.
The total sum of CDRs results of the client request.
RETURN_HITSInteger.
How many CDRs results returned in the response(we limit each request up to 10,000 CDRs).
CDR_LISTArray of objects.
Each object is call detailed record, as requested.

 

JSON Response Example

 

After sending a reqeust to Voicenter, you will receive a response which will enable you to receive the CDR's according to your search criteria.

Below is an example of a response you will receive from Voicenter.

 

{
"ERROR_NUMBER": 0,
"ERROR_DESCRIPTION": "OK",
"STATUS_CODE": 200,
"TOTAL_HITS": 2,
"RETURN_HITS": 2,
"CDR_LIST": [
{
"CallerNumber": "0722776772",
"TargetNumber": "972501234567",
"Date": "2021-10-10T09:04:58Z",
"Duration": 2,
"CallID": "202110101204550233243ghff3189e5c",
"CustomData": {
}
"Type": "Extension Outgoing",
"CdrType": 4,
"DialStatus": "ANSWER",
"TargetExtension": "",
"CallerExtension": "SipSip",
"DID": "",
"RecordURL": "https://cpanel.voicenter.co.il/CallsHistory/PlayRecord/2021101043950926.mp3",
"RingTime": 10,
"RepresentativeName": "rep 1",
"RepresentativeCode": "87654321",
"DTMFData": [
]
"DepartmentName": "Test Account",
"DepartmentId": 12345678
}
{
"CallerNumber": "0501234567",
"TargetNumber": "SipSip",
"Date": "2021-10-02T12:55:18Z",
"Duration": 0,
"CallID": "202110021555160180fd3jhj455",
"CustomData": {
"OriginalIvrUniqueID": "20211002156fdf534hfgh453df34"
}
"Type": "Incoming Call",
"CdrType": 1,
"DialStatus": "CHANUNAVAIL",
"TargetExtension": "SipSip",
"CallerExtension": "",
"DID": "0722776772",
"RecordURL": "",
"RingTime": 2,
"RepresentativeName": "rep 1",
"RepresentativeCode": "87654321",
"DTMFData": [
{
"LayerName": "rep 1",
"DTMF": 0,
"LayerNumber": "1"
}
]
"DepartmentName": "Test Account",
"DepartmentId": 12345678,
"TargetPrefixName": ""
}
]
}

 

Error Number Response Description

 

Upon receiving the response from Voicenter there will be an error number and the description of the error.

Below is a detailed explanation.

 

ERROR_ NUMBER ERROR_DESCRIPTION STATUS_CODE Description
0OK200The request was sent successfully.
1Request limit exceeded.
Please try again later.
403There is a limit to how many requests a client can send in a specific period of time.
It is recommended to send one request every 5 seconds.
2Authorization failed.403Code value is not valid.
4IP address xx.xx.xx.xx is not trusted.403The request is sent from unauthorized IP address.
5Out of range404There was a problem with search fields: fromdate, todate.
The search range is invalid.

 

Service Limits and security

 

  1. The CDRs are updated in the service a few minutes after the calls are ended.
  2. Can receive up to 10,000 CDR results per request.
  3. Can send up to 30 requests per one minute.
  4. Requests can only be sent from an authorized IP address that can be set in the Cpanel.