Toggle navigation
Toggle navigation
This project
Loading...
Sign in
liuming
/
developer-docs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
cookieLM
2016-09-06 19:41:56 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b7dbb18872d6c6b62e59f1fe0877f2e50d7f4dfd
b7dbb188
1 parent
fb2c5e7a
Updated 打电话接口 (markdown)
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
188 additions
and
10 deletions
打电话接口.md
打电话接口.md
View file @
b7dbb18
...
...
@@ -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
...
...
Please
register
or
login
to post a comment