cookieLM

Updated 打电话接口 (markdown)

... ... @@ -31,16 +31,25 @@ Response Body:
```
{
"returnCode": 500,
"returnMsg": ""
"returnMsg": "系统内部异常!"
}
```
主叫或被叫未绑定电话号:
用户未绑定手机号:
```
{
"returnCode": 400,
"returnMsg": "账号未绑定手机号,请手动拨打010-56469588!"
"returnMsg": "用户未绑定手机号,请手动拨打010-56469588!"
}
```
客服电话不存在:
```
{
"returnCode": 400,
"returnMsg": "客服电话不存在,请联系管理员!"
}
```
... ... @@ -53,32 +62,201 @@ Response Body:
}
```
用户信息有误:
呼叫请求的参数有误:
```
{
"returnCode": 400,
"returnMsg": "用户信息有误!"
"returnMsg": "呼叫请求的参数有误,请联系管理员!"
}
```
用户信息有误:
### 2. 客服呼叫
接口地址:/v1/app/callService?access_token=token
Request Method:GET
Request params:
|参数名 |是否必须 |说明 |参数类型 |
|--------------|----------|--------|----------|
|access_token |是 |系统当前登录用户的token |String |
Response Body:
成功建立通话连接:
```
{
"data": {
"callSid": "16090510160925480001030600243044"
}
},
"returnCode": 200,
"returnMsg": "success"
}
```
系统异常:
```
{
"returnCode": 500,
"returnMsg": "系统内部异常!"
}
```
用户未绑定手机号:
```
{
"returnCode": 400,
"returnMsg": "用户信息有误!"
"returnMsg": "用户未绑定手机号,请手动拨打010-56469588!"
}
```
用户信息有误
客服电话不存在
```
{
"returnCode": 400,
"returnMsg": "用户信息有误!"
"returnMsg": "客服电话不存在,请联系管理员!"
}
```
无通讯子账户:
```
{
"returnCode": 400,
"returnMsg": "无通讯子账户,请联系管理员!"
}
```
呼叫请求的参数有误:
```
{
"returnCode": 400,
"returnMsg": "呼叫请求的参数有误,请联系管理员!"
}
```
### 2. 客服呼叫
### 3. 取消呼叫
接口地址:/v1/app/callCancel/{callSid}?access_token=token
Request Method:GET
Request params:
|参数名 |是否必须 |说明 |参数类型 |
|--------------|----------|--------|----------|
|callSid |是 |当前通话的唯一标识 |String |
|access_token |是 |系统当前登录用户的token |String |
Response Body:
成功取消呼叫:
```
{
"data": {
"isSuccess": "success"
}
},
"returnCode": 200,
"returnMsg": "success"
}
```
用户信息有误:
```
{
"returnCode": 400,
"returnMsg": "用户信息有误!"
}
```
取消呼叫失败:
```
{
"returnCode": 400,
"returnMsg": "取消呼叫失败!"
}
```
### 4. 获取通话状态
接口地址:/v1/app/callState/{callSid}?access_token=token
Request Method:GET
Request params:
|参数名 |是否必须 |说明 |参数类型 |
|--------------|----------|--------|----------|
|callSid |是 |当前通话的唯一标识 |String |
|access_token |是 |系统当前登录用户的token |String |
Response Body:
请求通话:
```
{
"data": {
"stateType": "1"
}
},
"returnCode": 200,
"returnMsg": "success"
}
```
响铃(等待接听):
```
{
"data": {
"stateType": "2"
}
},
"returnCode": 200,
"returnMsg": "success"
}
```
建立通话(被叫已接听):
```
{
"data": {
"stateType": "3"
}
},
"returnCode": 200,
"returnMsg": "success"
}
```
通话结束:
```
{
"data": {
"stateType": "4"
}
},
"returnCode": 200,
"returnMsg": "success"
}
```
系统异常:
```
{
"returnCode": 500,
"returnMsg": "系统内部异常!"
}
```
\ No newline at end of file
... ...