查看“插件http接口”的源代码
←
插件http接口
跳转至:
导航
、
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看并复制此页面的源代码:
== 手动外呼 == === 说明 === 接口类型:HTTP请求<br /> 接口使用账户:企业账户<br /> 接口地址:localhost\127.0.0.1<br /> 接口返回值:JSON格式返回结果<br /> === 示例及代码 === 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 '){ } } }); } === 参数说明 === {| class="wikitable" |- ! 类型 !! 参数名 !! 描述 !! 是否必填 !! 数据类型 !! 固定值 |- | 参数 || 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:描述} {| class="wikitable" |- ! result !! msg |- | success || 操作成功 |- | ext_offline || 分机未登录 |- | client_type_error || 客户端类型错误(不是使用的web插件) |} == 一键外呼 == === 说明 === 接口类型:HTTP请求<br /> 接口使用账户:企业账户<br /> 接口地址:localhost\127.0.0.1<br /> 接口返回值:JSON格式返回结果<br /> === 示例及代码 === 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 '){ } } }); } === 参数说明 === {| class="wikitable" |- ! 类型 !! 参数名 !! 描述 !! 是否必填 !! 数据类型 !! 固定值 |- | 参数 || localhost || 本机地址 || true || string || 127.0.0.1 |- | 参数 || port || 端口 || true || string || 12307 |- | 参数 || cmd || 执行动作,一键外呼 || true || string || onekey_dial_out |- | 参数 || jsonpcallback || 回调函数设置,返回的JSON数据所在函数 || true || string || 无 |} === 响应 === 返回JSON格式数据:{result:返回结果, msg:描述} {| class="wikitable" |- ! result !! msg |- | success || 操作成功 |- | failed || 操作失败 |- | ext_offline || 分机未登录 |- | client_type_error || 客户端类型错误(不是使用的web插件) |} == 挂断电话 == === 说明 === 接口类型:HTTP请求<br /> 接口使用账户:企业账户<br /> 接口地址:localhost\127.0.0.1<br /> 接口返回值:JSON格式返回结果<br /> === 示例及代码 === 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 '){ } } }); } === 参数说明 === {| class="wikitable" |- ! 类型 !! 参数名 !! 描述 !! 是否必填 !! 数据类型 !! 固定值 |- | 参数 || localhost || 本机地址 || true || string || 127.0.0.1 |- | 参数 || port || 端口 || true || string || 12307 |- | 参数 || cmd || 执行动作,挂断电话 || true || string || huang_up |- | 参数 || jsonpcallback || 回调函数设置,返回的JSON数据所在函数 || true || string || 无 |} === 响应 === 返回JSON格式数据:{result:返回结果, msg:描述} {| class="wikitable" |- ! result !! msg |- | success || 操作成功 |- | ext_offline || 分机未登录 |- | client_type_error || 客户端类型错误(不是使用的web插件) |} == 接听电话 == === 说明 === 接口类型:HTTP请求<br /> 接口使用账户:企业账户<br /> 接口地址:localhost\127.0.0.1<br /> 接口返回值:JSON格式返回结果<br /> === 示例及代码 === 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 '){ } } }); } === 参数说明 === {| class="wikitable" |- ! 类型 !! 参数名 !! 描述 !! 是否必填 !! 数据类型 !! 固定值 |- | 参数 || localhost || 本机地址 || true || string || 127.0.0.1 |- | 参数 || port || 端口 || true || string || 12307 |- | 参数 || cmd || 执行动作,接听电话 || true || string || answer |- | 参数 || jsonpcallback || 回调函数设置,返回的JSON数据所在函数 || true || string || 无 |} === 响应 === 返回JSON格式数据:{result:返回结果, msg:描述} {| class="wikitable" |- ! result !! msg |- | success || 操作成功 |- | ext_offline || 分机未登录 |- | client_type_error || 客户端类型错误(不是使用的web插件) |} == 电话转接 == === 说明 === 接口类型:HTTP请求<br /> 接口使用账户:企业账户<br /> 接口地址:localhost\127.0.0.1<br /> 接口返回值:JSON格式返回结果<br /> === 示例及代码 === 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 '){ } } }); } === 参数说明 === {| class="wikitable" |- ! 类型 !! 参数名 !! 描述 !! 是否必填 !! 数据类型 !! 固定值 |- | 参数 || 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 || 无 |} === 响应 === == 发生按键 == === 说明 === 接口类型:HTTP请求<br /> 接口使用账户:企业账户<br /> 接口地址:localhost\127.0.0.1<br /> 接口返回值:JSON格式返回结果<br /> === 示例及代码 === === 参数说明 === === 响应 ===
返回至
插件http接口
。
导航菜单
个人工具
登录
命名空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
test
接口指南
接口说明
注意事项
CTI模块
IVR语音导航
外呼任务
分机/队列管理
通话记录
接口拨号模块
密保拨号秘钥
二维码拨号
外呼、回拨
查询、记录
语音插件模块
插件加载
插件js接口
插件http接口
CRM模块
CRM查询
客户资料
业务记录
帐号权限管理
角色及权限
子账号及权限
账户信息
账户充值
扣费账单
文件管理
文件管理
工具
链入页面
相关更改
特殊页面
页面信息