手动外呼
接口类型:HTTP请求
接口使用账户:企业账户
接口地址:localhost\127.0.0.1
接口返回值:JSON格式返回结果
Function xxxxx() {
var callAjax =$.ajax({
url: 'http://127.0.0.1:12307?cmd=dial_out&dial_number=0133xxxxxxxx&jsonpcallback=?',
dataType: 'JSONP',
time: 5000,
error:function(json){
},
success:function(json){
if(json.result == ' success '){
}else if(json.result == ' ext_offline '){
}else if(json.result == ' client_type_error '){
}
}
});
}
类型 |
参数名 |
描述 |
是否必填 |
数据类型 |
固定值
|
参数 |
localhost |
本机地址 |
true |
string |
127.0.0.1
|
参数 |
port |
端口 |
true |
string |
12307
|
参数 |
cmd |
执行动作,手动外呼 |
true |
string |
dial_out
|
参数 |
dial_number |
电话号码 |
true |
string |
无
|
参数 |
jsonpcallback |
回调函数设置,返回的JSON数据所在函数 |
true |
string |
无
|
返回JSON格式数据:{result:返回结果, msg:描述}
result |
msg
|
success |
操作成功
|
ext_offline |
分机未登录
|
client_type_error |
客户端类型错误(不是使用的web插件)
|
一键外呼
接口类型:HTTP请求
接口使用账户:企业账户
接口地址:localhost\127.0.0.1
接口返回值:JSON格式返回结果
Function xxxxx() {
var callAjax =$.ajax({
url: 'http://127.0.0.1:12307?cmd=onekey_dial_out&jsonpcallback=?',
dataType: 'JSONP',
time: 5000,
error:function(json){
},
success:function(json){
if(json.result == ' success '){
}else if(json.result == ' ext_offline '){
}else if(json.result == ' client_type_error '){
}
}
});
}
类型 |
参数名 |
描述 |
是否必填 |
数据类型 |
固定值
|
参数 |
localhost |
本机地址 |
true |
string |
127.0.0.1
|
参数 |
port |
端口 |
true |
string |
12307
|
参数 |
cmd |
执行动作,一键外呼 |
true |
string |
onekey_dial_out
|
参数 |
jsonpcallback |
回调函数设置,返回的JSON数据所在函数 |
true |
string |
无
|
返回JSON格式数据:{result:返回结果, msg:描述}
result |
msg
|
success |
操作成功
|
failed |
操作失败
|
ext_offline |
分机未登录
|
client_type_error |
客户端类型错误(不是使用的web插件)
|
挂断电话
接口类型:HTTP请求
接口使用账户:企业账户
接口地址:localhost\127.0.0.1
接口返回值:JSON格式返回结果
Function xxxxx() {
var callAjax =$.ajax({
url: ' http://127.0.0.1:12307?cmd=huang_up&jsonpcallback=?',
dataType: 'JSONP',
time: 5000,
error:function(json){
},
success:function(json){
if(json.result == ' success '){
}else if(json.result == ' ext_offline '){
}else if(json.result == ' client_type_error '){
}
}
});
}
类型 |
参数名 |
描述 |
是否必填 |
数据类型 |
固定值
|
参数 |
localhost |
本机地址 |
true |
string |
127.0.0.1
|
参数 |
port |
端口 |
true |
string |
12307
|
参数 |
cmd |
执行动作,挂断电话 |
true |
string |
huang_up
|
参数 |
jsonpcallback |
回调函数设置,返回的JSON数据所在函数 |
true |
string |
无
|
返回JSON格式数据:{result:返回结果, msg:描述}
result |
msg
|
success |
操作成功
|
ext_offline |
分机未登录
|
client_type_error |
客户端类型错误(不是使用的web插件)
|
接听电话
接口类型:HTTP请求
接口使用账户:企业账户
接口地址:localhost\127.0.0.1
接口返回值:JSON格式返回结果
Function xxxxx() {
var callAjax =$.ajax({
url: ' http://127.0.0.1:12307?cmd=answer&jsonpcallback=?',
dataType: 'JSONP',
time: 5000,
error:function(json){
},
success:function(json){
if(json.result == ' success '){
}else if(json.result == ' ext_offline '){
}else if(json.result == ' client_type_error '){
}
}
});
}
类型 |
参数名 |
描述 |
是否必填 |
数据类型 |
固定值
|
参数 |
localhost |
本机地址 |
true |
string |
127.0.0.1
|
参数 |
port |
端口 |
true |
string |
12307
|
参数 |
cmd |
执行动作,接听电话 |
true |
string |
answer
|
参数 |
jsonpcallback |
回调函数设置,返回的JSON数据所在函数 |
true |
string |
无
|
返回JSON格式数据:{result:返回结果, msg:描述}
result |
msg
|
success |
操作成功
|
ext_offline |
分机未登录
|
client_type_error |
客户端类型错误(不是使用的web插件)
|
电话转接
接口类型:HTTP请求
接口使用账户:企业账户
接口地址:localhost\127.0.0.1
接口返回值:JSON格式返回结果
Function xxxxx() {
var callAjax =$.ajax({
url: ' http://127.0.0.1:12307?cmd=transfer_to&trans_type=number&trans_ivr=0133xxxxxxxx&jsonpcallback=?',
dataType: 'JSONP',
time: 5000,
error:function(json){
},
success:function(json){
if(json.result == ' success '){
}else if(json.result == ' ext_offline '){
}else if(json.result == ' client_type_error '){
}
}
});
}
类型 |
参数名 |
描述 |
是否必填 |
数据类型 |
固定值
|
参数 |
localhost |
本机地址 |
true |
string |
127.0.0.1
|
参数 |
port |
端口 |
true |
string |
12307
|
参数 |
cmd |
执行动作,电话转接 |
true |
string |
transfer_to
|
参数 |
trans_type |
转接类型 |
true |
string |
trans_number/trans_queue/trans_ext/trans_ivr
|
附加参数 |
trans_queue |
转接队列名称,trans_type值为queue时是附加参数 |
false |
string |
无
|
附加参数 |
trans_ext |
转接分机名称(1001…..),trans_type值为ext时是附加参数 |
true |
string |
无
|
附加参数 |
trans_number |
转接号码,trans_type值为number时是附加参数 |
true |
string |
无
|
附加参数 |
trans_ivr |
转接IVR名称,trans_type值为ivr时是附加参数 |
true |
string |
无
|
参数 |
jsonpcallback |
回调函数设置,返回的JSON数据所在函数 |
true |
string |
无
|
返回JSON格式数据:{result:返回结果, msg:描述}
result |
msg
|
success |
操作成功
|
failed |
操作失败
|
ext_offline |
分机未登录
|
queue_error |
队列错误
|
ext_error |
分机错误
|
ivr_error |
ivr错误
|
发生按键
接口类型:HTTP请求
接口使用账户:企业账户
接口地址:localhost\127.0.0.1
接口返回值:JSON格式返回结果
Function xxxxx() {
var callAjax =$.ajax({
url: ' http://127.0.0.1:12307?cmd=send_dtmf&dtmf=1&jsonpcallback=?',
dataType: 'JSONP',
time: 5000,
error:function(json){
},
success:function(json){
if(json.result == ' success '){
}else if(json.result == ' ext_offline '){
}else if(json.result == ' client_type_error '){
}
}
});
}
类型 |
参数名 |
描述 |
是否必填 |
数据类型 |
固定值
|
参数 |
localhost |
本机地址 |
true |
string |
127.0.0.1
|
参数 |
port |
端口 |
true |
string |
12307
|
参数 |
cmd |
执行动作,发送按键 |
true |
string |
send_dtmf
|
参数 |
dtmf |
按键 |
true |
string |
1,2,3,4,5,6,7,8,9,0,*,#
|
参数 |
jsonpcallback |
回调函数设置,返回的JSON数据所在函数 |
true |
string |
无
|
返回JSON格式数据:{result:返回结果, msg:描述}
result |
msg
|
success |
操作成功
|
ext_offline |
分机未登录
|
client_type_error |
客户端类型错误(不是使用的web插件)
|