首页 - 2. 呼叫接口
最后修改者: admin 2021-03-14 14:00:05
1. 点击拨号
编号 : 1
GET/POST - /index.php?m=Api&c=Exten&a=clickcallout
参考URL:
/index.php?m=Api&c=Exten&a=clickcallout&src=5060&dst=1008610000&shield_cid=1&token=xxxxxxxxx48bit-tokenxxxxxxxx
请求类型 application/x-www-form-urlencoded
请求参数
参数名 | 参数类型 | 必传 | 缺省值 | 描述 |
---|---|---|---|---|
src | string | Y | 接口发起者坐席的分机号 | |
dst | string | Y | 被叫号码 | |
shield_cid | string | N | 控制电话设备是否遮挡被叫号码,参数含义如下:空串(不传此参数)-由系统全局控制,0-不屏蔽,1-用星号屏蔽dst号码中间4位,还可设置其它【电话号码串】 | |
token | string | N | token | |
trunk_valid_cid | string | N | 呼出中继合法主叫号码 |
返回类型 application/json
返回值
1)失败结果: token失效 {"result":"error","code":403,"msg":"发起呼叫失败,Token不合法或者已经失效!请刷新token后再试"} 2)呼叫成功 {"result":"success","code":200,"msg":"发起呼叫成功!","ActionID":"A1878134424"} 3)呼叫失败 {"result":"error","code":500,"msg":"发起呼叫失败!"} {"result":"error","code":404,"msg":"发起呼叫失败:被叫号码不能为空!"} {"result":"error","code":403,"msg":"发起呼叫失败:被叫号码不合格!"} {"result":"error","code":403,"msg":"发起呼叫失败:坐席分机未就绪!"}
备注
1) shield_cid 参数: 用于电话设备上星号屏蔽显示号码。参数含义如下:空串(不传此参数)-由点星系统后台全局控制,0-不屏蔽,1-用星号屏蔽dst号码中间4位,比如 188****3451,其它【电话号码串】-设备显示此处设置的【电话号码串】 2)呼出中继合法主叫号码(trunk_valid_cid):此参数如果不传,线路呼出主叫默认为分机号,但是有些中继线路需要有合法的主叫号码, 比如E1线路中继必须采用运营商分配的主叫CID号码,否则呼叫会被拒绝,如果点击呼叫通过E1线路呼出,那么建议传递此参数。
最后修改者: admin 2020-09-21 09:22:07
2. 挂断自己通话
编号 : 2
GET/POST - /index.php?m=Api&c=Exten&a=hangup
请求类型 application/x-www-form-urlencoded
请求参数
参数名 | 参数类型 | 必传 | 缺省值 | 描述 |
---|---|---|---|---|
exten | string | Y | 坐席分机号 | |
token | string | N | token |
返回类型 application/json
返回值
挂机成功: {"result":"success","code":200,"msg":"挂断成功!"} 挂机失败: {"result":"error","code":404,"msg":"挂断失败:通话不存在!"}
最后修改者: admin 2020-09-21 09:22:39
3. 转接当前通话
编号 : 3
GET/POST - /index.php?m=Api&c=Exten&a=transfer
请求类型 application/x-www-form-urlencoded
请求参数
参数名 | 参数类型 | 必传 | 缺省值 | 描述 |
---|---|---|---|---|
exten | string | Y | 坐席自己的分机号 | |
phone | string | Y | 要转接到的坐席分机、手机号、座机、队列(技能组)号码 | |
token | string | N | token |
返回类型 application/json
返回值
成功: {"result":"success","code":200,"msg":"转接成功!"} 失败: {"result":"error","code":404,"msg":"转接失败:通话不存在!"} {"result":"error","code":500,"msg":"转接失败!"} {"result":"error","code":403,"msg":"转接失败:目标坐席已经被手动置忙!"} {"result":"error","code":403,"msg":"转接失败:坐席当前处于会议通话模式,不能转接!"}
最后修改者: admin 2020-09-21 09:22:54
4. 邀请多方通话
编号 : 4
GET/POST - /index.php?m=Api&c=Exten&a=multicall
请求类型 application/x-www-form-urlencoded
请求参数
参数名 | 参数类型 | 必传 | 缺省值 | 描述 |
---|---|---|---|---|
token | string | N | token | |
exten | string | Y | 发起邀请的坐席分机 | |
phone | string | Y | 被邀请的坐席分机、座机、手机 |
返回类型 application/json
返回值
成功: {"result":"success","code":200,"msg":"邀请成功!","roomNum":"9914"} 失败: {"result":"error","code":403,"msg":"邀请失败,Token不合法或者已经失效!请刷新token后再试"} {"result":"error","code":404,"msg":"邀请失败:号码不能为空!"} {"result":"error","code":404,"msg":"邀请失败:通话不存在!"} {"result":"error","code":500,"msg":"邀请失败:目标坐席未就绪!"} {"result":"error","code":500,"msg":"邀请失败:目标坐席未就绪!"}
最后修改者: admin 2020-09-21 09:23:04
5. 保持通话
编号 : 5
GET/POST - /index.php?m=Api&c=Exten&a=holdon
请求类型 application/x-www-form-urlencoded
请求参数
参数名 | 参数类型 | 必传 | 缺省值 | 描述 |
---|---|---|---|---|
token | string | N | token | |
exten | string | Y | 坐席自己的分机号 |
返回类型 application/json
返回值
成功: {"result":"success","code":200,"msg":"保持成功!"} 失败: {"result":"error","code":404,"msg":"保持失败:坐席分机号不存在!"} {"result":"error","code":403,"msg":"保持失败,Token不合法或者已经失效!请刷新token后再试"} {"result":"error","code":404,"msg":"保持失败:通话不存在!"}
最后修改者: admin 2020-09-21 09:23:12
6. 恢复通话
编号 : 6
GET/POST - /index.php?m=Api&c=Exten&a=restore
请求类型 application/x-www-form-urlencoded
请求参数
参数名 | 参数类型 | 必传 | 缺省值 | 描述 |
---|---|---|---|---|
token | string | N | token | |
exten | string | Y | 坐席自己的分机号 |
返回类型 application/json
返回值
成功: {"result":"success","code":200,"msg":"恢复成功!"} 失败: {"result":"error","code":404,"msg":"恢复失败:坐席分机号不存在!"} {"result":"error","code":403,"msg":"恢复失败,Token不合法或者已经失效!请刷新token后再试"} {"result":"error","code":403,"msg":"恢复失败:坐席分机未就绪!"} {"result":"error","code":500,"msg":"恢复失败!"}
最后修改者: admin 2020-09-21 09:23:21
7. 拦截呼入通话并将号码添加到呼入黑名单
编号 : 7
GET/POST - /index.php?m=Api&c=Exten&a=block
请求类型 application/x-www-form-urlencoded
请求参数
参数名 | 参数类型 | 必传 | 缺省值 | 描述 |
---|---|---|---|---|
token | string | N | token | |
exten | string | Y | 坐席分机号 |
返回类型 application/json
返回值
拦截成功: {"result":"success","code":200,"msg":"拦截成功!"} 拦截失败: {"result":"error","code":403,"msg":"拦截失败,Token不合法或者已经失效!请刷新token后再试"} {"result":"error","code":404,"msg":"拦截失败:通话不存在!"}
最后修改者: admin 2020-09-21 09:23:40
8. 服务评分
编号 : 8
GET/POST - /index.php?m=Api&c=Exten&a=score
请求类型 application/x-www-form-urlencoded
请求参数
参数名 | 参数类型 | 必传 | 缺省值 | 描述 |
---|---|---|---|---|
token | string | N | token | |
exten | string | Y | 坐席自己的分机号 |
返回类型 application/json
返回值
成功: {"result":"success","code":200,"msg":"操作成功!"} 失败: {"result":"error","code":510,"msg":"评分失败!"}
最后修改者: admin 2019-08-15 00:00:00
9. 禁音
编号 : 9
GET/POST - /index.php?m=Api&c=Exten&a=volume_off
禁用坐席分机声音流
请求类型 application/x-www-form-urlencoded
请求参数
参数名 | 参数类型 | 必传 | 缺省值 | 描述 |
---|---|---|---|---|
exten | string | Y | 坐席分机号 | |
token | string | N | token |
返回类型 application/json
返回值
禁音成功: {"result":"success","code":200,"msg":"禁音成功!"}
最后修改者: admin 2019-08-15 00:00:00
10. 发声(取消禁音)
编号 : 10
GET/POST - /index.php?m=Api&c=Exten&a=volume_on
取消坐席分机禁音
请求类型 application/x-www-form-urlencoded
请求参数
参数名 | 参数类型 | 必传 | 缺省值 | 描述 |
---|---|---|---|---|
exten | string | Y | 坐席分机号 | |
token | string | N | token |
返回类型 application/json
返回值
发声成功: {"result":"success","code":200,"msg":"发声成功!"}