Predictive Call API
Common API - API for getting call records
Interface description
the interface for the customer to actively pull the list of call records.
Request method
POST, form-data format
Get call record interface request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Cdr.GetBill |
| token |
string |
yes |
The token obtained through the authorization interface |
| starttime |
string |
yes |
(Dial) start time, format:yyyy-mm-dd hh:mm:ss |
| endtime |
string |
yes |
(Dial) end time, format:yyyy-mm-dd hh:mm:ss |
| syncflag |
int |
yes |
Get record type: 1. Get unqueried records (default); 2. Get queried records; 3. Get all records. |
| direction |
int |
yes |
Call direction: 1. Incoming; 2. Outgoing; 3. All (default). |
| callmethod |
int |
yes |
Call method: 0, unlimited; 1, mutual extension dial; 2, extension direct dial (manual dial); 3, API call (default); 4, API double call; 5, predictive outbound call; 6, IVR/group call . |
| currentpage |
int |
yes |
number of pages, default: 1 |
| itemsperpage |
int |
yes |
Number per page, default: 10, minimum: 1; maximum: 1000 |
| extnumber |
string |
yes |
Extension number, multiple extension numbers are separated by English commas, when passing a null value, it is all |
| destnumber |
string |
yes |
The target number of the call, when passing a null value, it is all |
| userid |
string |
yes |
Custom data (employee ID), nullable |
| memberid |
string |
yes |
Custom data (member ID), can be empty |
| chengshudu |
string |
no |
Custom Data (Maturity) |
| customuuid |
string |
no |
Custom Data (Customer ID) |
API Request Example for Obtaining Call Records(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Cdr.GetBill',
'token' => 'ABCDEFG',
'starttime' => '2019-01-12 00:00:00',
'endtime' => '2020-12-12 00:00:00',
'direction' => 3
'syncflag' => 3,
'callmethod' => 0,
'currentpage' => 1,
'itemsperpage' => 10,
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "get success",
"result": {
"totalitems": 8151,
"currentpage": 1,
"itemsperpage": 10,
"bills": [
{
"id": 22670,
"extnumber": "",
"destnumber": "13387525701",
"displaynumber": "2190170001",
"starttime": "2019-09-27 14:58:37",
"answertime": null,
"endtime": "2019-09-27 14:59:05",
"duration": 28,
"billsec": 0,
"direction": "callout",
"callmethod": 6,
"userid": "0",
"memberid": "0",
"chengshudu": "0",
"customuuid": "0",
"recordfilename": "",
"downloadip": "",
"hangupdirection": 10041,
"hangupcause": 10020,
"userkey":"#"
}
]
},
"reqtime": 1581502410,
"rsptime": 1581502410
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| result |
objest |
returned result set |
| —totalitems |
int |
total number of records |
| —currentpage |
int |
current page number |
| —itemsperpage |
int |
Quantity per page |
| —bills |
array |
record array |
| ——id |
int |
record id |
| ——extnumber |
string |
Ext |
| ——destnumber |
string |
target number |
| ——displaynumber |
string |
display number |
| ——starttime |
string |
call time |
| ——answertime |
string |
response time |
| ——endtime |
string |
call end time |
| ——duration |
int |
call waiting time |
| ——billsec |
int |
call time |
| ——direction |
string |
call direction |
| ——callmethod |
int |
call method |
| ——userid |
string |
Custom parameter (user id) |
| ——memberid |
string |
Custom parameters (member id) |
| ——chengshudu |
string |
Custom parameters (maturity) |
| ——customuuid |
string |
Custom parameters (customer id) |
| ——recordfilename |
string |
call log file name |
| ——downloadip |
string |
download ip |
| ——hangupdirection |
int |
hang up directions |
| ——hangupcause |
int |
hang up reason |
| ——userkey |
string |
user button |
Postman Example request parameters

Common API - Obtain authorization token interface
Interface Description
Tokens required to access other interfaces must be obtained from this interface through the authorized Appid and Accesskey (except for the batch IVR interface). The timeliness of the interface authorization Token is 12 hours.
Request method
POST, form-data format
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| appid |
string |
yes |
authorized appid |
| accesskey |
string |
yes |
authorized accesskey |
| service |
string |
yes |
App.Sip_Auth.Login |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Auth.Login',
'appid' => 'ABCDEFG',
'accesskey' => 'ABCDEFG',
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
Return Data Structure Example
{
"ret":200,
"data":{
"status":0,
"desc":"Authorization successful",
"result":{
"companycode":"1",
"companyname":"test",
"token":"773a70dd02f0695d50205e9b267692b9",
"authtime":"2020-01-01 00:00:00",
"authmodel":""
},
"reqtime":1581240882,
"rsptime":1581240882
},
"msg":""
}
Return parameter description
| parameter name |
type |
illustrate |
| companycode |
int |
Company code |
| companyname |
string |
Company Name |
| token |
string |
Authorization token, used to access other interfaces |
Common API - Clear the Token interface
Interface Description
Note: When there is a new extension or an abnormality occurs after the extension is adjusted, you can clear the Token through this interface, and then obtain the Token again to continue the operation.
Request method
POST, form-data format
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Auth.Logout |
| token |
string |
yes |
Token string |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => ' App.Sip_Auth.Logout',
'token' => 'ABCDEFG',
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "logout successful",
"reqtime": 1602655204,
"rsptime": 1602655204
},
"msg": ""
}
Common API - Global error and status codes
Interface exception error
Description
ret is not 200, msg is abnormal error message.
{
"ret":400, // status code
"data":[],
"msg":"Illegal request: invalid parameter"
}
| ret |
msg |
illustrate |
| 400 |
illegal request |
Generally, the parameters are invalid |
| 500 |
|
Server Error |
| 600 |
|
The token is invalid, please log in again to verify |
| 601 |
appid is not authorized |
Please check the appid or contact Yunhu Technology for authorization |
| 602 |
|
appid authorization has expired |
| 603 |
|
Module not licensed |
| 604 |
IP is not authorized |
Please contact the manufacturer to authorize access |
The interface request is normal, but the internal processing error
Description
ret is 200. In the data structure, the status is 1, desc is the Chinese description of the failure, and errors is the detailed error information. For the code code, please refer to the corresponding description. msg is empty.
{
"ret": 200,
"data": {
"status": 1,
"desc": "xxxfail",
"errors": {
"code": "1003",
"codemsg": "Authorization failed"
},
"reqtime": 1507529858,
"rsptime": 1507529858
},
"msg": ""
}
| code |
codemsg |
illustrate |
| 1001 |
Server connection failed |
Usually due to network |
| 1002 |
Abnormal operation |
Generally, it is a check exception, etc. |
| 1003 |
operation failed |
Generally, authorization failure, logout failure, command sending failure, server connection exception, etc. |
| 1010 |
Extension exception |
It may be a newly added extension, you need to log in again to get a new token |
| 1011 |
illegal extension |
not owned by the company |
| 1012 |
extension does not exist |
Extension Number Status |
| 1013 |
extension disabled |
Extension Number Status |
| 1014 |
extension not registered |
Extension Number Status |
| 1015 |
The extension is not in a call |
Extension Number Status |
| 1016 |
extension enabled |
Extension Number Status |
| 1017 |
extension is registered |
Extension Number Status |
| 1018 |
Number is enabled |
Caller ID status |
| 1019 |
number disabled |
Caller ID status |
| 1020 |
number does not exist |
Caller ID status |
| 1021 |
illegal number |
not owned by the company |
| 1024 |
task does not exist |
Predictive task interface return status |
| 1025 |
has not started |
Predictive task interface return status |
| 1026 |
in progress |
Predictive task interface return status |
| 1027 |
pause |
Predictive task interface return status |
| 1028 |
over |
Predictive task interface return status |
| 1201 |
idle |
Extension is legal, enabled and registered |
| 1202 |
ringing |
extension return |
| 1203 |
off-hook |
extension return |
| 1204 |
calling |
extension return |
| 1205 |
User rejects |
Called party rejects |
| 1210 |
Queue exception |
return in predictive outbound |
| 1211 |
illegal queue |
Does not exist or is not owned by the company |
| 1212 |
did not answer |
Assigned unanswered |
| 1213 |
Waiting |
Waiting for assignment (idle) |
| 1214 |
receiving |
Status of extensions in queue |
| 1215 |
answered |
Status of extensions in the queue |
| 1216 |
Reject |
Status of extensions in the queue |
| 1217 |
pause |
show busy |
| 1218 |
checked in |
The extension is already checked into the queue |
| 10001 |
hang up normally |
call state |
| 10002 |
call cancel |
call state |
| 10003 |
refuse to answer |
call state |
| 10004 |
Outbound channel line failure |
Usually due to wiring |
| 10005 |
User timed out |
call state |
| 10006 |
User is busy |
call state |
| 10040 |
caller hang up |
call state |
| 10041 |
Called hang up |
call state |
Common API - call record callback parameters
Description
Bill callback needs to be configured with a callback address for the corresponding account.
Callback address configuration of bills: The customer provides an interface address that can receive json data, which can be configured by us or configured by the customer in the background.
Call record callback data format json
{
"callmethod": 3,
"starttime": "2018-03-14 12:18:21",
"answertime": "",
"endtime": "2018-03-14 12:18:35",
"duration": 14,
"billsec": 0,
"crmid": "2001",
"hangupdirection": 10015,
"chengshudu": "0",
"hangupcause": 10001,
"memberid": "18533700187590656",
"disnumber": "02566823420",
"destnumber": "015029913692",
"downloadip": "120.76.152.137",
"recordfilename": "",
"companycode": 20000013,
"type": "callout",
"id": 982,
"extnumber": "7003"
"uuid": "cda5c6c4-0a17-11e8-b177-e7cbf2bd1f36"
"userkey":1
"customuuid": "customuuid"
}
Description of Call Record Callback Parameters
| parameter name |
type |
illustrate |
| callmethod |
int |
Call method: 0, unlimited; 1, mutual extension dial; 2, extension direct dial (manual dial); 3, API call (default); 4, API double call; 5, predictive outbound call; 6, IVR/group call . |
| starttime |
string |
call time |
| answertime |
string |
response time |
| endtime |
string |
call end time |
| duration |
int |
call waiting time |
| billsec |
int |
call time |
| crmid |
string |
employee number |
| hangupdirection |
int |
On-hook direction |
| chengshudu |
string |
Custom Parameters - Maturity |
| hangupcause |
int |
Hangup Reason Code |
| memberid |
string |
Custom parameter - member id |
| disnumber |
string |
calling number |
| destnumber |
string |
called number |
| downloadip |
string |
recording download ip |
| recordfilename |
string |
recording file name |
| companycode |
string |
company id |
| type |
string |
call type |
| extnumber |
string |
Ext |
| uuid |
string |
call uuid |
| userkey |
string |
user button |
| customuuid |
string |
Custom parameter - customer id |
Common API - Call recording download link interface
Interface Description
Get the download link for the call log file. At present, call recordings are saved for 3 months, and it is recommended to save them locally。
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Cdr.GetRecodeFile |
| token |
string |
yes |
The token obtained through the authorization interface |
| filename |
string |
yes |
The recording file name returned in the call recording callback |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Cdr.GetRecodeFile',
'token' => 'ABCDEFG',
'filename' => 'abcdefg',
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "get success",
"result": {
"downurl": "http://127.0.0.1:8080/abcdefg",
"expiredtime": "Expiration time:2020-02-11 17:27:23"
},
"reqtime": 1581412943,
"rsptime": 1581412943
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| result |
objest |
returned result set |
| downurl |
string |
Call recording file download link |
| expiredtime |
string |
Download link expiration time |
Common API - Extension call state callback parameters
Interface Description
To call back the call status of an extension, you need to configure a callback address for the corresponding account.
Callback address configuration for extension call status: The customer provides an interface address that can receive json data, which can be configured by us or by the customer in the background.
Extension call status callback data format
{
"buuid":"526d643a-e8fe-11ea-a84a-cf6e45e88543",
"callee":"87847569524",
"caller":"90240005",
"companycode":"9024",
"customuuid":"123Abc",
"direction":"callout",
"disnumber":"2190240001",
"extnumber":"90240005",
"isbleg":"false",
"method":"3",
"starttime":"1598598959",
"status":"ring",
"type":"call",
"uuid":"526d637c-e8fe-11ea-a849-cf6e45e88543"
}
Explanation of extension call status callback parameters
| parameter name |
type |
illustrate |
| buuid |
string |
The uuid of the called number on side b of the call |
| callee |
int |
called number |
| caller |
int |
calling number |
| companycode |
int |
The company id corresponding to the account |
| customuuid |
string |
Custom parameter - customer id |
| direction |
string |
Call direction: 1. Incoming; 2. Outgoing; |
| disnumber |
int |
Destination number to call |
| extnumber |
int |
Ext |
| isbleg |
string |
true is ringing on the mobile phone side; false is ringing on the seat side; |
| method |
string |
Call method: 0, unlimited; 1, mutual extension dial; 2, extension direct dial; 3, API call (default); 4, API double call; 5, predictive outbound call; 6, IVR/group call. |
| starttime |
string |
call time |
| status |
string |
call type |
| type |
string |
call type |
| uuid |
string |
call uuid |
Predictive Outbound - Create a pre-test outbound task interface
Interface Description
Create a pre-test outbound task. Note: The number of numbers for a single task should not exceed 10,000. If you need to add more numbers, please submit through the additional interface。
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Yccall.TaskCreat |
| token |
string |
yes |
Obtain token through interface authorization |
| assigntype |
int |
yes |
Allocation Type 1: Extension; 2: Queue; 3: Group |
| assignagent |
string |
yes |
Set as an extension, fill in the extension directly; set as a queue, fill in the queue name; set as a group, fill in the group name |
| telphone |
string(JSON) |
yes |
|
| Mobile phone number, preset call time (time stamp) (the current time stamp is the default, if the time is greater than this time, no call will be made), etc. example:[{“phone”:18012345678,”time”:1500000000,”userid”:””,”memberid”:””,”chengshudu”:””,”customuuid”:””}] |
|
|
|
| taskscale |
string |
yes |
Idle agent call ratio Format 1:1 |
| disnumber |
string |
yes |
Calling number, multiple numbers separated by commas (empty means random) |
| taskname |
string |
no |
task name |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
foreach ($phoneArr as $phone){
$telphoneArr[] = [
'phone' => trim($phone),
'time' => $start_time,
'memberid' => '',
'chengshudu' => '',
'customuuid' => '',
];
}
$postFields = [
'service' => 'App.Sip_Yccall.TaskCreat',
'token' => 'ABCDEFG',
'assigntype' => 2,
'assignagent' => 'queue-1',
'telphone' => json_encode($telphoneArr),
'taskscale' => '1:1',
'disnumber' => ''
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "created successfully",
"result": {
"taskid": "20200212163504393460",
"invaliddata": []
},
"reqtime": 1581496504,
"rsptime": 1581496504
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| result |
object |
return result |
| taskid |
string |
task unique id |
| invaliddata |
array |
invalid data |
Predictive Outbound - Callback data description
illustrate:
After the pre-test outbound task starts, the system will call the corresponding number according to the parameters passed in when creating the task. When the target number is connected, the system will assign the user to the task group according to the busy status of the agents in the task group to which the task belongs Among the free agent extensions in , the corresponding extension will ring (at this time, the extension ringing status callback data will be sent to the extension status callback address configured in the background), and when the customer service personnel answer (the extension status callback address configured in the background will be sent to After sending extension answering status callback data) and then hanging up (at this time, the extension hangup status callback data will be sent to the extension status callback address configured in the background), the system will send bill callback data to the bill push callback address configured in the background.
Request Method
The callback method is to submit a form-data form to the callback address, the field name is detail, and the value is a json string
Example of extension status callback data
{
"buuid":"9c6f2092-6aad-11eb-a1b9-5107cdf1d50a",
"callee":"89683227899",
"caller":"20280005",
"companycode":"2028",
"direction":"callout",
"disnumber":"2120280001",
"extnumber":"20280005",
"isbleg":"true",
"method":"2",
"starttime":"1612857945",
"status":"ring",
"type":"call",
"uuid":"9c568ac8-6aad-11eb-a1b3-5107cdf1d50a"
}
field description
| field |
type |
illustrate |
| buuid |
string |
Unique id on side B |
| callee |
string |
Called number (user number) |
| caller |
string |
Call Number (extension) |
| companycode |
string |
company code |
| direction |
string |
Call direction callin incoming call, callout outgoing call |
| disnumber |
string |
display number |
| extnumber |
string |
Ext |
| isbleg |
string |
Is it B side |
| method |
string |
Call mode, 1 extension, 2 manual, 3 interface, 4 double call, 5 prediction |
| starttime |
string |
call start time |
| status |
string |
Extension status ring ringing answer answer hangup hangup |
| type |
string |
call |
| uuid |
string |
call unique id |
Callback Data Example
{
"type":"callout",
"callmethod":6,
"starttime":"2021-02-09 10:00:03",
"answertime":"",
"endtime":"2021-02-09 10:00:15",
"duration":12,
"billsec":0,
"crmid":"0",
"memberid":"0",
"chengshudu":"0",
"disnumber":"211040260001",
"destnumber":"81211623586",
"extnumber":"000000",
"recordfilename":"",
"downloadip":"",
"hangupdirection":10040,
"hangupcause":10020,
"companycode":"104026",
"uuid":"863ff91e-6a7a-11eb-acf1-5107cdf1d50a",
"userkey":"",
"customuuid":"110001475"
}
field description
| field |
type |
illustrate |
| type |
string |
call method |
| callmethod |
int |
call method |
| starttime |
string |
call time |
| answertime |
string |
answering time |
| endtime |
string |
Hang up time |
| duration |
int |
waiting time |
| billsec |
int |
call time |
| crmid |
string |
agent id |
| memberid |
string |
Custom parameters |
| chengshudu |
string |
Custom parameters |
| disnumber |
string |
calling number |
| destnumber |
string |
target number |
| extnumber |
string |
Ext |
| recordfilename |
string |
call file name |
| downloadip |
string |
download ip |
| hangupdirection |
int |
hang up directions |
| hangupcause |
int |
hang up reason |
| companycode |
string |
company code |
| uuid |
string |
call unique id |
| userkey |
string |
user button |
| customuuid |
string |
Custom parameters |
Predictive Outbound - Get extension call status
Interface Description
Get the extension list information owned by the user。
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Status.GetSipCallStatus |
| token |
string |
yes |
The token obtained through the authorization interface |
| extnumber |
string |
yes |
Extension number, multiple extension numbers are separated by commas |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Status.GetSipCallStatus',
'token' => 'ABCDEFG',
'extnumber' => '100001'
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "get success",
"result": [
{
"extnumber": "90170002",
"status": 1014,
"caller": null,
"callee": null,
"disnumber": null,
"direction": null,
"channel": null,
"idleduration": null,
"callduration": null
}
],
"reqtime": 1581506689,
"rsptime": 1581506689
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| result |
array |
extension data array |
| —extnumber |
string |
Ext |
| —status |
int |
Extension Status |
| —caller |
string |
caller |
| —callee |
string |
called person |
| —disnumber |
string |
display number |
| —direction |
string |
call direction |
| —channel |
string |
channel |
| —idleduration |
int |
idle time |
| —callduration |
int |
call time |
Predictive Outbound - Get extension enabled status
Interface Description
Get the extension list information owned by the user。
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Status.GetSipValidStatus |
| token |
string |
yes |
The token obtained through the authorization interface |
| extnumber |
string |
yes |
Extension number, multiple extension numbers are separated by commas |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Status.GetSipValidStatus',
'token' => 'ABCDEFG',
'extnumber' => '100001'
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "get success",
"result": [
{
"extnumber": "90170002",
"code": 1016
}
],
"reqtime": 1581508401,
"rsptime": 1581508401
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| result |
array |
extension data array |
| —extnumber |
string |
Ext |
| —code |
int |
Extension Status |
Predictive Outbound - Get extension registration information
Interface Description:
Get the extension list information owned by the user。
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Status.GetSipRegisterStatus |
| token |
string |
yes |
The token obtained through the authorization interface |
| extnumber |
string |
yes |
Extension number, multiple extension numbers are separated by commas |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Status.GetSipRegisterStatus',
'token' => 'ABCDEFG',
'extnumber' => '100001'
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "get success",
"result": [
{
"extnumber": "90170002",
"code": 1014,
"clientip": null,
"serverip": null
}
],
"reqtime": 1581507361,
"rsptime": 1581507361
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| result |
array |
extension data array |
| —extnumber |
string |
Ext |
| —code |
int |
Extension Status |
| —clientip |
string |
Extension registration client IP |
| —serverip |
string |
Extension registration server IP |
Predictive Outbound - Get extension status interface
Interface Description
Get the list of task groups owned by the current user。
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Queue.GetQueueSipStatus |
| token |
string |
yes |
The token obtained through the authorization interface |
| queuename |
string |
no |
Task group name, get all if empty |
| extnumber |
string |
no |
Extension number, if empty get all |
| state |
int |
no |
Agent status: 0, unlimited 1, idle 2, waiting 3, receiving 4, talking |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Queue.GetQueueSipStatus',
'token' => 'ABCDEFG',
'queuename' => 'queue-1',
'extnumber' => '100001',
'state' =>0,
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "get success",
"result": [
{
"queuename": "queue-1",
"seatsname": "9026004_9026004_autocall-9026",
"extnumber": "100001",
"status": 1213,
"state": 1213,
"lastanswertime": "2020-02-05 21:03:36",
"lastassigntime": "2020-02-05 21:03:34",
"seatschangetime": "2020-02-05 21:03:29",
"noanswercount": 0,
"callsanswered": 1,
"externalcallscount": 0,
"wrapuptime": 0,
"maxnoanswer": 0
}
],
"reqtime": 1581488746,
"rsptime": 1581488746
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| result |
array |
returned result array |
| —queuename |
string |
task group name |
| —seatsname |
string |
Agent name |
| —extnumber |
string |
Ext |
| —extnumber |
string |
Ext |
| —status |
int |
Extension Status |
| —state |
int |
Agent status |
| —lastanswertime |
string |
last answer time |
| —lastassigntime |
string |
Last allocation time |
| —seatschangetime |
string |
Agent change time |
| —noanswercount |
int |
Missed call statistics |
| —callsanswered |
int |
Answer Statistics |
| —externalcallscount |
string |
Number of external calls, non-predictive task call statistics, can be ignored |
| —wrapuptime |
string |
Call finishing time, that is, the interval between answering a call and dialing a new number |
| —maxnoanswer |
string |
The maximum number of no responses, temporarily invalid, can be ignored |
Predictive Outbound - Pre-test outbound call task status callback parame
illustrate
This interface is mainly used to return the status of predictive tasks. The customer provides an interface address that can receive json data, and we can configure it.
Predictive task status callback data format
{
"taskid":"20210222110030244314",
"companycode":"9027",
"status":3
}
Predictive task status callback parameter description
| parameter name |
type |
illustrate |
| taskid |
string |
Corresponding predictive task ID |
| companycode |
string |
The company number of the corresponding account |
| status |
string |
The task completion flag, only returns 3 |
Predictive Outbound - Pre-test outbound task number addition
Interface Description
In the created predictive task, the number in the task can be added through this interface, and the single added number should not exceed 10,000。
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Yccall.TaskAdd |
| token |
string |
yes |
The token obtained through the authorization interface |
| taskid |
string |
yes |
Predictive task ID |
| telphone |
string(JSON) |
yes |
Mobile phone number, preset call time (time stamp) (the current time stamp is the default, if the time is greater than this time, no call will be made), etc. example:[{“phone”:18012345678,”time”:1500000000,”userid”:””,”memberid”:””,”chengshudu”:””,”customuuid”:””}] |
Example request interface(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Yccall.TaskAdd',
'token' => 'ABCDEFG',
'taskid' => 'ADSFNIDJN',
'telphone' => '[{"phone":18012345678,"time":1500000000,"userid":"","memberid":"","chengshudu":"","customuuid":""}]'
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "Additional success",
"result": {
"success": 7,
"invaliddata": []
},
"reqtime": 1613962979,
"rsptime": 1613962979
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| result |
object |
return result |
| success |
int |
Append the successful number |
| invaliddata |
array |
invalid data |
Predictive Outbound - Pre-test outbound task number remove
Interface Description:
In the created predictive task, the number in the task can be added through this interface, and the single added number should not exceed 10,000。
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Yccall.TaskAdd |
| token |
string |
yes |
The token obtained through the authorization interface |
| taskid |
string |
yes |
Predictive task ID |
| telphone |
string |
yes |
Mobile phone number,Separate multiple numbers with commas. |
|
|
|
|
Example request interface(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Yccall.taskDelPhone',
'token' => 'ABCDEFG',
'taskid' => 'ABCDEFG',
'telphone' => 1,
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "删除成功",
"reqtime": 1581496800,
"rsptime": 1581496800
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| desc |
string |
return description |
Predictive Outbound - Predictive outbound call access process
Predictive outbound call access process

Predictive Outbound - Set the pre-test outbound task status interface
Interface Description
Set the status of the pretest outbound task。
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Yccall.TaskSet |
| token |
string |
yes |
The token obtained through the authorization interface |
| taskid |
string |
yes |
The unique id returned when the task was created |
| taskstatus |
int |
yes |
Set task status 1: open, 2: pause, 3: end |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Yccall.TaskSet',
'token' => 'ABCDEFG',
'taskid' => 'ABCDEFG',
'taskstatus' => 1,
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "successfully set",
"reqtime": 1581496800,
"rsptime": 1581496800
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| desc |
string |
return description |
Predictive Outbound - delete taskgroup
Interface Description
delete taskgroup。
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Queue.DelQueue |
| token |
string |
yes |
The token obtained through the authorization interface |
| queuename |
string |
yes |
task group name |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Queue.DelQueue',
'token' => 'ABCDEFG',
'queuename' => 'queue-1'
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "successfully deleted",
"reqtime": 1587891639,
"rsptime": 1587891639
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| desc |
string |
result description |
Predictive Outbound - edit task group
Interface Description
Create task group。
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Queue.EditQueue |
| token |
string |
yes |
The token obtained through the authorization interface |
| queuename |
string |
yes |
task group name |
| remark |
string |
yes |
task group ID |
| strategy |
string |
no |
Ringing strategy: 1. The longest idle time ringing; 2. The shortest call time ringing; 3. Simultaneous ringing; 4. Round-robin ringing; 5. Sequential ringing; 6. Random ringing; Ringing; 8. Priority ringing. Default is 1 |
| announcefreq |
string |
no |
Notification frequency (unit: second), the default is 30 |
| ringdelay |
string |
no |
Ring delay (unit: second), the default is 30 |
| maxwaittime |
string |
no |
Maximum wait time, default is 0 |
| withnoagenttime |
string |
no |
No agent waiting timeout, the default is 0 |
| noagentrejoiningtime |
string |
no |
The call re-enters the task group time when there is no agent, the default is 5 |
| discardtime |
string |
no |
The maximum discard time, the default is 90 |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Queue.EditQueue',
'token' => 'ABCDEFG',
'queuename' => 'queue-1',
'remark' => 'remark',
'strategy' => '1',
'announcefreq' => '30',
'ringdelay' => '30',
'maxwaittime' => '0',
'withnoagenttime' => '0',
'noagentrejoiningtime' => '5',
'discardtime' => '90',
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "Successfully modified",
"reqtime": 1587891639,
"rsptime": 1587891639
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| desc |
string |
result description |
Predictive Outbound - Add group extension
Interface Description
Create a task group required before creating a predictive outbound task。
Request method
POST, form-data format
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Extgroup.AddExtnumber |
| token |
string |
yes |
The token obtained through the authorization interface |
| name |
string |
yes |
group name |
| extnumber |
string |
yes |
Ext |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Extgroup.AddExtnumber',
'token' => 'ABCDEFG',
'name' => 'queue-1',
'extnumber' => '700000001',
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "Added successfully",
"reqtime": 1587891639,
"rsptime": 1587891639
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| desc |
string |
result description |
Predictive Outbound - Create extension group
Interface Description
Create a task group required before creating a predictive outbound task。
Request method
POST, form-data format
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Extgroup.AddExtgroup |
| token |
string |
yes |
The token obtained through the authorization interface |
| name |
string |
yes |
group name |
| status |
string |
no |
Whether to enable: 1 enable 0 disable 2 all |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Extgroup.AddExtgroup',
'token' => 'ABCDEFG',
'name' => 'queue-1',
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "Added successfully",
"reqtime": 1587891639,
"rsptime": 1587891639
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| desc |
string |
result description |
Predictive Outbound - Edit group extension
Interface Description
Create a task group required before creating a predictive outbound task。
Request method
POST, form-data format
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Extgroup.EditExtnumber |
| token |
string |
yes |
The token obtained through the authorization interface |
| name |
string |
yes |
group name |
| extnumber |
string |
yes |
Ext |
| state |
string |
yes |
Extension status idle: idle, busy: busy |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Extgroup.EditExtnumber',
'token' => 'ABCDEFG',
'name' => 'queue-1',
'extnumber' => '700000001',
'state' => 'idle',
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "edited successfully",
"reqtime": 1587891639,
"rsptime": 1587891639
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| desc |
string |
result description |
Predictive Outbound - Get group extension information
Interface Description:
Create a task group required before creating a predictive outbound task。
Request method
POST, form-data format
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Extgroup.GetGroupExt |
| token |
string |
yes |
The token obtained through the authorization interface |
| name |
string |
yes |
group name |
| extnumber |
string |
no |
Ext |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Extgroup.GetGroupExt',
'token' => 'ABCDEFG',
'name' => 'queue-1',
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": [
{
"name": "test2",
"extnumber": "701005",
"status": "hangup",
"state": "idle"
}
],
"msg": "",
}
Return parameter description
| parameter name |
type |
illustrate |
| desc |
string |
result description |
Predictive Outbound - Get group information
Interface Description
Create a task group required before creating a predictive outbound task。
Request method
POST, form-data format
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Extgroup.GetExtgroupInfo |
| token |
string |
yes |
The token obtained through the authorization interface |
| name |
string |
yes |
group name |
| status |
string |
no |
Whether to enable: 1 enable 0 disable 2 all |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Extgroup.GetExtgroupInfo',
'token' => 'ABCDEFG',
'name' => 'queue-1',
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "get success",
"result": [
{
"id": 3,
"name": "test1",
"status": 1042
},
{
"id": 4,
"name": "test2",
"status": 1042
}
],
"reqtime": 1615537609,
"rsptime": 1615537609
},
"msg": "",
}
Return parameter description
| parameter name |
type |
illustrate |
| desc |
string |
result description |
Predictive Outbound - delete group extension
Interface Description
Create a task group required before creating a predictive outbound task。
Request method
POST, form-data format
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Extgroup.DelExtnumber |
| token |
string |
yes |
The token obtained through the authorization interface |
| name |
string |
yes |
group name |
| extnumber |
string |
yes |
Ext |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Extgroup.DelExtnumber',
'token' => 'ABCDEFG',
'name' => 'queue-1',
'extnumber' => '700000001',
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "successfully deleted",
"reqtime": 1587891639,
"rsptime": 1587891639
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| desc |
string |
result description |
Predictive Outbound - Get queue extension information
Interface Description
Get the extension list information owned by the user。
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Sipnum.GetSipnumberInfo |
| token |
string |
yes |
The token obtained through the authorization interface |
| status |
int |
yes |
extension status. 1: enable (default), 2: disable, 3: all |
| extnumber |
string |
no |
Extension number, empty to get all |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Sipnum.GetSipnumberInfo',
'token' => 'ABCDEFG',
'status' => 3,
'extnumber' => '100001'
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "get success",
"result": [
{
"extnumber": "100001",
"password": "100001",
"status": 1016,
"register": "nreg"
}
],
"reqtime": 1581506241,
"rsptime": 1581506241
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| result |
array |
extension list array |
| —extnumber |
string |
Ext |
| —password |
string |
Extension login password |
| —status |
int |
Extension Status |
| —register |
string |
Extension registration status. nreg: not registered; reg: registered |
Predictive Outbound - Get queue list
Interface Description
Get the list of task groups owned by the current user。
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Queue.GetQueueList |
| token |
string |
yes |
The token obtained through the authorization interface |
| queuename |
string |
no |
Task group name, if not passed, get all task groups |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Queue.GetQueueList',
'token' => 'ABCDEFG',
'queuename' => 'ABCDEFG'
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "get success",
"result": [
{
"queuename":"autocall_test-1101",
"remark":"test-1101-edit",
"strategy":8,
"announce":"announce.wav",
"announcefreq":1,
"ringdelay":1,
"maxwaittime":1,
"withnoagenttime":1,
"noagentrejoiningtime":1,
"discardtime":1,
"autocall":"busy"
}
],
"reqtime": 1581419353,
"rsptime": 1581419353
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| result |
array |
returned result array |
| —queuename |
string |
task group name |
| —remark |
string |
task group ID |
| —strategy |
string |
Ring strategy 1, longest idle time ring 2, shortest call time ring 3, simultaneous ring 4, round robin ring 5, sequential ring 6, random ring 7, least answer ring 8, priority ring bell |
| —announce |
string |
announcement voice |
| —announcefreq |
string |
Notification frequency (unit: second) |
| —ringdelay |
string |
Ringing delay (unit: second) |
| —maxwaittime |
string |
maximum waiting time |
| —withnoagenttime |
string |
No seat waiting timeout |
| —noagentrejoiningtime |
string |
Call re-entering task group time when there are no agents |
| —discardtime |
string |
Maximum discard time |
| —autocall |
string |
Predicted outbound call status busy: indicates busy, idle: indicates idle, unavailable: predicts outbound call is unavailable |
Predictive Outbound - Set agent idle status
Interface Description
Set the idle status of the agent。
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Queue.SetSeatsStatus |
| token |
string |
yes |
The token obtained through the authorization interface |
| settype |
int |
yes |
Setting status 1: show busy, 2: show idle |
| extnumber |
string |
|
Ext |
| crmid |
int |
yes |
agent id |
| queuename |
string |
yes |
task group name |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Queue.SetSeatsStatus',
'token' => 'ABCDEFG',
'taskid' => 'ABCDEFG',
'taskstatus' => 1,
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "successfully set",
"reqtime": 1581496800,
"rsptime": 1581496800
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| desc |
string |
return description |
Predictive Outbound - create queue
Interface Description
Create a task group required before creating a predictive outbound task。
Request method
POST, form-data format
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Queue.AddQueue |
| token |
string |
yes |
The token obtained through the authorization interface |
| queuename |
string |
yes |
task group name |
| autocall |
string |
yes |
Whether to automatically call out the task group: yes 、 no |
| remark |
string |
yes |
task group ID |
| strategy |
string |
no |
Ringing strategy: 1. The longest idle time ring; 2. The shortest call time ring; 3. Simultaneous ringing; 4. Round-robin ringing; 5. Sequential ringing; 6. Random ringing; 7. Least answering Ringing; 8. Priority ringing. Default is 1 |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Queue.AddQueue',
'token' => 'ABCDEFG',
'queuename' => 'queue-1',
'autocall' => 'yes',
'remark' => 'remark',
'strategy' => '1',
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "Added successfully",
"reqtime": 1587891639,
"rsptime": 1587891639
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| desc |
string |
result description |
Predictive Outbound - extension check in
Interface Description
Check extension into task group。
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Queue.SipSignIn |
| token |
string |
yes |
The token obtained through the authorization interface |
| queuename |
string |
yes |
task group name |
| extnumber |
string |
yes |
Ext |
| crmid |
int |
yes |
Employee seat number |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Queue.SipSignIn',
'token' => 'ABCDEFG',
'queuename' => 'queue-1',
'extnumber' => '100001',
'crmid' => 10,
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "check in successful",
"reqtime": 1581494135,
"rsptime": 1581494135
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| desc |
string |
return description |
Predictive Outbound - extension sign out
Interface Description
Check extension into task group。
request parameters
| parameter name |
type |
Is it necessary |
illustrate |
| service |
string |
yes |
App.Sip_Queue.SipSignOut |
| token |
string |
yes |
The token obtained through the authorization interface |
| queuename |
string |
yes |
task group name |
| extnumber |
string |
yes |
Ext |
| crmid |
int |
yes |
Employee seat number |
Interface request example(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Queue.SipSignOut',
'token' => 'ABCDEFG',
'queuename' => 'queue-1',
'extnumber' => '100001',
'crmid' => 10,
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
return data structure example
{
"ret": 200,
"data": {
"status": 0,
"desc": "checkout successful",
"reqtime": 1581492868,
"rsptime": 1581492869
},
"msg": ""
}
Return parameter description
| parameter name |
type |
illustrate |
| desc |
string |
return description |