Query call record interface description
1.Interface Introduction
It is mainly to query the call history of the account according to the time period.
It is recommended to use the event push method to obtain the call history. The event push method will push the local call to you immediately after the call, which has higher real-time performance.Event push documentation
2.Interface request
-
HTTP request method:POST
-
Authentication method:Interface authentication
-
Request url:{HOST}/v20180426/cdr/getCCCdr/ACCOUNTID?sig=sig
-
When requesting, please replace {HOST} with connection data query Domain name,ACCOUNTID is replaced with the account number, SIG is generated according to the authentication rules, please see the authentication document to see the specific generation rules.
-
Frequency limit:20 times / minute
3.The interface parameters are as follows:
Field | Types of | Is it necessary | Remark |
beginTime | String | yes | Get the start time of the call log time period, the time format is yyyy-MM-dd HH:mm:ss |
endTime | String | yes | Get the end time of the call log time period, the time format is yyyy-MM-dd HH:mm:ss |
callNo | String | no | Calling number |
calledNo | String | no | Called number |
connectType | String | no | Call type (values can be normal (normal incoming call), dialout (outgoing outgoing call), transfer (incoming call transfer), dialTransfer (outgoing call transfer) |
status | String | no | Processing status (values can be dealing (received), notDeal (ringing not answered), queueLeak (queue abandoned), voicemail (received message), leak (IVR abandoned), blackList (blacklist)) |
cdrVar | String | no | If cdrVar is passed in the webcall interface, then the name of the variable can be passed here to get the value. (If the value is passed, the time condition may not be passed) |
resultParams | String | no | Query parameters. Multiple parameters are separated by ",". If you only want to get some useful parameters, you can use this field, such as passing parameters FILE_SERVER, RECORD_FILE_NAME to query the recording address of all call records |
page | String | no | current page |
pageSize | String | no | Articles per page |
note: 1.A maximum of 10,000 pieces of data are obtained at a time. If there is a time query condition, the maximum time period for each request is 7 days. 2.The download address is: FILE_SERVER + RECORD_FILE_NAME. If you need to pull the recording locally, it is recommended to pull it in the early morning. Pulling during the day may affect the call quality of the agent. The limit of the pull frequency is 1 / 1s.
Request body example
{
"beginTime": "2017-01-04 00:00:00",
"endTime": "2017-01-05 10:15:00"
}
4.系统返回
Field | meaning |
success | whether succeed |
message | Response message |
data | Return data, JSON format |
The return parameters are as follows: (red must be returned)
parameter name | description |
_id | Unique ID for this call log |
CALL_SHEET_ID | Unique ID of this call record (consistent with _id value) |
CALL_NO | Calling number |
CALLED_NO | Called number |
CALL_ID | call id |
END_TIME | End Time |
CONNECT_TYPE | Call type, the values are normal (ordinary call), dialout (outgoing call), transfer (incoming call), dialTransfer |
STATUS | Processing status. The values are dealing (received), notDeal (ring did not answer), queueLeak (queen to give up), voicemail (received message), leak (IVR abandoned), blackList (blacklist) |
EXTEN | Handle Agent Number |
DISPOSAL_AGENT | Handle agent ID (field created for historical reasons, ignore if useless) |
BEGIN_TIME | Call start time (value only if the call is answered) |
OFFERING_TIME | Call origination time |
RECORD_FILE_NAME | Recording file name |
CUSTOMER_NAME | Target customer name |
REF_CALL_SHEET_ID | Transfer type call, this field records the ID of the previous call record |
PBX | ID of the PBX where the call originated |
QUEUE_NAME | Skill group name |
QueueTime | Incoming call time |
FILE_SERVER | Recording server address |
PROVINCE | province |
DISTRICT | city |
DISTRICT_CODE | City area code |
KEY_TAG | Whether to mark |
CALL_TIME_LENGTH | Call duration (0 if not connected) |
INVESTIGATE | satisfaction survey |
LABELS | Call tag |
ACTION_ID | Call the ActionID passed by the outbound interface |
COMMENTS | Remark |
message:
value | meaning |
account not found! | Incorrect account number |
account must need! | account field must be passed |
beginTime and endTime must need! | Start and end times must be passed |
beginTime or endTime format error! | Malformed start or end time |
beginTime and endTime must within a week! | The maximum time span for getting call history is 7 days |
Return success example
{
"success": true,
"data": [
{
"_id": "e0f40f68-7c7c-4689-ad56-86402104437a",
"CALL_SHEET_ID": "e0f40f68-7c7c-4689-ad56-86402104437a",
"CALL_NO": "01020002461",
"STATUS": "dealing",
"DISPOSAL_AGENT": "0405b8d0-e6ae-11e5-822d-71a9ab0b0e6a",
"BEGIN_TIME": "2016-12-01 09:53:41",
"END_TIME": "2016-12-01 09:53:55",
"CALLED_NO": "18615404183",
"OFFERING_TIME": "2016-12-01 09:53:41",
"CONNECT_TYPE": "transfer",
"RECORD_FILE_NAME": "monitor/1.1.1.101/20161201/20161201-095207_N00000000423_10000480_20002461_01066000027_10000480_pbx-1480557125.4593o.mp3",
"CUSTOMER_NAME": "Unknown customer",
"REF_CALL_SHEET_ID": "df239899-a97c-4d46-9a40-d03fd946146a",
"PBX": "1.1.1.101",
"QUEUE_NAME": "test",
"FILE_SERVER": "http://120.55.72.213:8090",
"PROVINCE": "Washington",
"DISTRICT": "Washington",
"DISTRICT_CODE": "010",
"CALL_TIME_LENGTH": 14
},
{
"_id": "df239899-a97c-4d46-9a40-d03fd946146a",
"CALL_SHEET_ID": "df239899-a97c-4d46-9a40-d03fd946146a",
"CALL_NO": "01020002461",
"STATUS": "dealing",
"DISPOSAL_AGENT": "0405b8d0-e6ae-11e5-822d-71a9ab0b0e6a",
"BEGIN_TIME": "2016-12-01 09:52:24",
"END_TIME": "2016-12-01 09:53:41",
"CALLED_NO": "01066000027",
"OFFERING_TIME": "2016-12-01 09:52:05",
"CONNECT_TYPE": "normal",
"RECORD_FILE_NAME": "monitor/1.1.1.101/20161201/20161201-095207_N00000000423_10000480_20002461_01066000027_10000480_pbx-1480557125.4593.mp3",
"CUSTOMER_NAME": "Unknown customer",
"REF_CALL_SHEET_ID": null,
"PBX": "1.1.1.101",
"QUEUE_NAME": "test",
"FILE_SERVER": "http://120.55.72.213:8090",
"PROVINCE": "Washington",
"DISTRICT": "Washington",
"DISTRICT_CODE": "010",
"CALL_TIME_LENGTH": 77
}
]
}