“插件js接口”的版本间的差异
来自uucall
第1行: | 第1行: | ||
== 分机签入 == | == 分机签入 == | ||
− | + | * <big>说明</big> | |
接口类型:js函数请求(默认工作状态为不可回接模式)<br /> | 接口类型:js函数请求(默认工作状态为不可回接模式)<br /> | ||
插件接口函数:Check_InOut(const FB::JSObjectPtr sCallback, std::string sParmer)<br /> | 插件接口函数:Check_InOut(const FB::JSObjectPtr sCallback, std::string sParmer)<br /> | ||
第6行: | 第6行: | ||
接口返回值:JSON格式返回结果<br /> | 接口返回值:JSON格式返回结果<br /> | ||
− | + | * <big>示例</big> | |
Function xxxxx() { | Function xxxxx() { | ||
var param = '{"functionsname": "checkin", "domain": "myservice.uucall.cn", "user_name": "zhangsan", "account": "admin", "password": "123456"}'; | var param = '{"functionsname": "checkin", "domain": "myservice.uucall.cn", "user_name": "zhangsan", "account": "admin", "password": "123456"}'; | ||
第12行: | 第12行: | ||
} | } | ||
− | + | * <big>参数说明</big> | |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
第30行: | 第30行: | ||
|} | |} | ||
− | + | * <big>响应</big> | |
同步请求响应: | 同步请求响应: | ||
{ state:返回执行状态, error_code:结果代码,msg:描述} | { state:返回执行状态, error_code:结果代码,msg:描述} | ||
第76行: | 第76行: | ||
== 分机签出 == | == 分机签出 == | ||
− | + | * <big>说明</big> | |
接口类型:js函数请求 | 接口类型:js函数请求 | ||
插件接口函数:Check_InOut | 插件接口函数:Check_InOut | ||
第82行: | 第82行: | ||
接口返回值:JSON格式返回结果 | 接口返回值:JSON格式返回结果 | ||
− | + | * <big>示例</big> | |
Function xxxxx() { | Function xxxxx() { | ||
var param = '{"functionsname": "checkout"}'; | var param = '{"functionsname": "checkout"}'; | ||
第88行: | 第88行: | ||
} | } | ||
− | + | * <big>参数说明</big> | |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
第98行: | 第98行: | ||
|} | |} | ||
− | + | * <big>响应</big> | |
同步请求响应:{ state:返回执行状态, error_code:结果代码,msg:描述} | 同步请求响应:{ state:返回执行状态, error_code:结果代码,msg:描述} | ||
{| class="wikitable" | {| class="wikitable" | ||
第108行: | 第108行: | ||
== 改变工作状态 == | == 改变工作状态 == | ||
− | + | * <big>说明</big> | |
接口类型:js函数请求 | 接口类型:js函数请求 | ||
插件接口函数:Work_State | 插件接口函数:Work_State | ||
第114行: | 第114行: | ||
接口返回值:JSON格式返回结果 | 接口返回值:JSON格式返回结果 | ||
− | + | * <big>示例</big> | |
Function xxxxx() { | Function xxxxx() { | ||
var param = '{"exttype": "away"}'; | var param = '{"exttype": "away"}'; | ||
第120行: | 第120行: | ||
} | } | ||
− | + | * <big>参数说明</big> | |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
第134行: | 第134行: | ||
|} | |} | ||
− | + | * <big>响应</big> | |
同步请求响应:{mark:标志 typeNotify:返回执行状态, msg:描述} | 同步请求响应:{mark:标志 typeNotify:返回执行状态, msg:描述} | ||
{| class="wikitable" | {| class="wikitable" |
2016年4月25日 (一) 16:20的版本
分机签入
- 说明
接口类型:js函数请求(默认工作状态为不可回接模式)
插件接口函数:Check_InOut(const FB::JSObjectPtr sCallback, std::string sParmer)
接口参数:签入标签,服务器IP或域名,企业用户名,账号,密码,回调函数名称
接口返回值:JSON格式返回结果
- 示例
Function xxxxx() { var param = '{"functionsname": "checkin", "domain": "myservice.uucall.cn", "user_name": "zhangsan", "account": "admin", "password": "123456"}'; plugin().Check_InOut(check_inout_result, param); }
- 参数说明
类型 | 参数名 | 描述 | 是否必填 | 数据类型 | 默认值 |
---|---|---|---|---|---|
参数 | functionsname | 功能标签 | true | string | checkin |
参数 | domain | 服务器IP或域名 | true | string | |
参数 | user_name | 企业用户名 | true | string | |
参数 | account | 账号 | true | string | |
参数 | password | 密码 | true | string | |
参数 | sCallback | 当前API回调函数 | true | string |
- 响应
同步请求响应: { state:返回执行状态, error_code:结果代码,msg:描述}
state | error_code | msg |
---|---|---|
operation_failed | 110 | 操作失败 |
operation_success | 200 | 操作成功 |
异步签入结果全局回调函数响应: {mark:标志 state:返回执行状态, error_code:结果代码,msg:描述}
mark | state | client_type | error_code | msg |
---|---|---|---|---|
login_notify | loging_success | web_client | 无 | 签入成功,客户端是web插件 |
login_notify | loging_success | sip_client | 无 | 签入成功,客户端是sip话机 |
login_notify | loging_success | other_client | 无 | 签入成功,客户端是固话/手机 |
login_notify | need_relogin | 无 | 无 | 需要重新登录 |
login_notify | domain_failed | 无 | 无 | 域名解析失败 |
login_notify | connect_failed | 无 | 无 | 系统连接失败 |
login_notify | transport_failed | 无 | 无 | 系统传输失败 |
login_notify | system_error | 无 | 101 | 系统错误,无此账号 |
login_notify | system_error | 无 | 102 | 系统错误,密码错误 |
login_notify | system_error | 无 | 103、104、105 | 系统错误,不可用账号 |
login_notify | system_error | 无 | 107 | 系统错误,未绑定分机 |
login_notify | reg_ext_failed | 无 | 无 | 注册分机失败 |
分机签出
- 说明
接口类型:js函数请求 插件接口函数:Check_InOut 接口参数:签出标签,回调函数名称 接口返回值:JSON格式返回结果
- 示例
Function xxxxx() { var param = '{"functionsname": "checkout"}'; plugin().Check_InOut(check_inout_result, param); }
- 参数说明
类型 | 参数名 | 描述 | 是否必填 | 数据类型 | 默认值 |
---|---|---|---|---|---|
参数 | functionsname | 签出 | true | string | checkout |
参数 | sCallback | 当前API回调函数 | true | JSObjectPtr | 示例 |
- 响应
同步请求响应:{ state:返回执行状态, error_code:结果代码,msg:描述}
state | error_code | msg |
---|---|---|
logout_success | 200 | 操作成功 |
改变工作状态
- 说明
接口类型:js函数请求 插件接口函数:Work_State 接口参数:工作状态(离开--away 小休--rest 可回接--forecast 不可回接--onekey) 接口返回值:JSON格式返回结果
- 示例
Function xxxxx() { var param = '{"exttype": "away"}'; plugin().Work_State(param); }
- 参数说明
类型 | 参数名 | 描述 | 是否必填 | 数据类型 | 默认值 |
---|---|---|---|---|---|
参数 | exttype | 工作状态,离开模式 | true | string | away |
参数 | exttype | 工作状态,小休模式 | true | string | rest |
参数 | exttype | 工作状态,可回接模式 | true | string | forecast |
参数 | exttype | 工作状态,不可回接模式 | true | string | onekey |
- 响应
同步请求响应:{mark:标志 typeNotify:返回执行状态, msg:描述}
mark | typeNotify | msg |
---|---|---|
change_state | true | 改变状态成功 |
change_state | false | 改变状态失败 |