Showing
1 changed file
with
107 additions
and
14 deletions
| 1 | -### 1. 通话接口 | 1 | +### 1. 通话请求接口 |
| 2 | 2 | ||
| 3 | -接口地址:/v1/app/call/{targetId}?access_token=token | 3 | +接口地址:/callcenter/app/call/{targetId}/{fishcardId}?access_token=token |
| 4 | 4 | ||
| 5 | Request Method:GET | 5 | Request Method:GET |
| 6 | 6 | ||
| @@ -9,6 +9,7 @@ Request params: | @@ -9,6 +9,7 @@ Request params: | ||
| 9 | |参数名 |是否必须 |说明 |参数类型 | | 9 | |参数名 |是否必须 |说明 |参数类型 | |
| 10 | |--------------|----------|--------|----------| | 10 | |--------------|----------|--------|----------| |
| 11 | |targetId |是 |被叫的用户id |Long | | 11 | |targetId |是 |被叫的用户id |Long | |
| 12 | +|fishcardId |是 |鱼卡id |Long | | ||
| 12 | |access_token |是 |系统当前登录用户的token |String | | 13 | |access_token |是 |系统当前登录用户的token |String | |
| 13 | 14 | ||
| 14 | Response Body: | 15 | Response Body: |
| @@ -18,7 +19,8 @@ Response Body: | @@ -18,7 +19,8 @@ Response Body: | ||
| 18 | ``` | 19 | ``` |
| 19 | { | 20 | { |
| 20 | "data": { | 21 | "data": { |
| 21 | - "callSid": "16090510160925480001030600243044" | 22 | + "callSid": "16090510160925480001030600243044", |
| 23 | + "telephoneNum":"010-xxxxx" | ||
| 22 | } | 24 | } |
| 23 | }, | 25 | }, |
| 24 | "returnCode": 200, | 26 | "returnCode": 200, |
| @@ -35,21 +37,39 @@ Response Body: | @@ -35,21 +37,39 @@ Response Body: | ||
| 35 | } | 37 | } |
| 36 | ``` | 38 | ``` |
| 37 | 39 | ||
| 38 | -用户未绑定手机号: | 40 | +用户信息有误: |
| 39 | 41 | ||
| 40 | ``` | 42 | ``` |
| 41 | { | 43 | { |
| 42 | "returnCode": 400, | 44 | "returnCode": 400, |
| 43 | - "returnMsg": "用户未绑定手机号,请手动拨打010-56469588!" | 45 | + "returnMsg": "用户信息有误!" |
| 44 | } | 46 | } |
| 45 | ``` | 47 | ``` |
| 46 | 48 | ||
| 47 | -客服电话不存在: | 49 | +非上课时间,无法使用通话功能: |
| 48 | 50 | ||
| 49 | ``` | 51 | ``` |
| 50 | { | 52 | { |
| 51 | "returnCode": 400, | 53 | "returnCode": 400, |
| 52 | - "returnMsg": "客服电话不存在,请联系管理员!" | 54 | + "returnMsg": "非上课时间,无法使用通话功能!" |
| 55 | +} | ||
| 56 | +``` | ||
| 57 | + | ||
| 58 | +老师未绑定手机号: | ||
| 59 | + | ||
| 60 | +``` | ||
| 61 | +{ | ||
| 62 | + "returnCode": 400, | ||
| 63 | + "returnMsg": "您还未绑定手机号,无法电话联系学生,请继续视频呼叫!" | ||
| 64 | +} | ||
| 65 | +``` | ||
| 66 | + | ||
| 67 | +学生未绑定手机号: | ||
| 68 | + | ||
| 69 | +``` | ||
| 70 | +{ | ||
| 71 | + "returnCode": 400, | ||
| 72 | + "returnMsg": "学生未绑定手机号,无法电话联系学生,请继续视频呼叫!" | ||
| 53 | } | 73 | } |
| 54 | ``` | 74 | ``` |
| 55 | 75 | ||
| @@ -72,7 +92,7 @@ Response Body: | @@ -72,7 +92,7 @@ Response Body: | ||
| 72 | ``` | 92 | ``` |
| 73 | 93 | ||
| 74 | ### 2. 客服呼叫 | 94 | ### 2. 客服呼叫 |
| 75 | -接口地址:/v1/app/callService?access_token=token | 95 | +接口地址:/callcenter/app/callService?access_token=token |
| 76 | 96 | ||
| 77 | Request Method:GET | 97 | Request Method:GET |
| 78 | 98 | ||
| @@ -89,7 +109,8 @@ Response Body: | @@ -89,7 +109,8 @@ Response Body: | ||
| 89 | ``` | 109 | ``` |
| 90 | { | 110 | { |
| 91 | "data": { | 111 | "data": { |
| 92 | - "callSid": "16090510160925480001030600243044" | 112 | + "callSid": "16090510160925480001030600243044", |
| 113 | + "telephoneNum":"010-xxxxx" | ||
| 93 | } | 114 | } |
| 94 | }, | 115 | }, |
| 95 | "returnCode": 200, | 116 | "returnCode": 200, |
| @@ -106,21 +127,30 @@ Response Body: | @@ -106,21 +127,30 @@ Response Body: | ||
| 106 | } | 127 | } |
| 107 | ``` | 128 | ``` |
| 108 | 129 | ||
| 130 | +用户信息有误: | ||
| 131 | + | ||
| 132 | +``` | ||
| 133 | +{ | ||
| 134 | + "returnCode": 400, | ||
| 135 | + "returnMsg": "用户信息有误!" | ||
| 136 | +} | ||
| 137 | +``` | ||
| 138 | + | ||
| 109 | 用户未绑定手机号: | 139 | 用户未绑定手机号: |
| 110 | 140 | ||
| 111 | ``` | 141 | ``` |
| 112 | { | 142 | { |
| 113 | "returnCode": 400, | 143 | "returnCode": 400, |
| 114 | - "returnMsg": "用户未绑定手机号,请手动拨打010-56469588!" | 144 | + "returnMsg": "您还未绑定手机号,请用手机拨打客服电话!" |
| 115 | } | 145 | } |
| 116 | ``` | 146 | ``` |
| 117 | 147 | ||
| 118 | -客服电话不存在: | 148 | +获取不到客服电话: |
| 119 | 149 | ||
| 120 | ``` | 150 | ``` |
| 121 | { | 151 | { |
| 122 | "returnCode": 400, | 152 | "returnCode": 400, |
| 123 | - "returnMsg": "客服电话不存在,请联系管理员!" | 153 | + "returnMsg": "无法获取电话号码,请用手机拨打客服电话!" |
| 124 | } | 154 | } |
| 125 | ``` | 155 | ``` |
| 126 | 156 | ||
| @@ -141,8 +171,9 @@ Response Body: | @@ -141,8 +171,9 @@ Response Body: | ||
| 141 | "returnMsg": "呼叫请求的参数有误,请联系管理员!" | 171 | "returnMsg": "呼叫请求的参数有误,请联系管理员!" |
| 142 | } | 172 | } |
| 143 | ``` | 173 | ``` |
| 174 | + | ||
| 144 | ### 3. 取消呼叫 | 175 | ### 3. 取消呼叫 |
| 145 | -接口地址:/v1/app/callCancel/{callSid}?access_token=token | 176 | +接口地址:/callcenter/app/callCancel/{callSid}?access_token=token |
| 146 | 177 | ||
| 147 | Request Method:GET | 178 | Request Method:GET |
| 148 | 179 | ||
| @@ -168,6 +199,15 @@ Response Body: | @@ -168,6 +199,15 @@ Response Body: | ||
| 168 | } | 199 | } |
| 169 | ``` | 200 | ``` |
| 170 | 201 | ||
| 202 | +系统异常: | ||
| 203 | + | ||
| 204 | +``` | ||
| 205 | +{ | ||
| 206 | + "returnCode": 500, | ||
| 207 | + "returnMsg": "系统内部异常!" | ||
| 208 | +} | ||
| 209 | +``` | ||
| 210 | + | ||
| 171 | 用户信息有误: | 211 | 用户信息有误: |
| 172 | 212 | ||
| 173 | ``` | 213 | ``` |
| @@ -187,7 +227,7 @@ Response Body: | @@ -187,7 +227,7 @@ Response Body: | ||
| 187 | ``` | 227 | ``` |
| 188 | 228 | ||
| 189 | ### 4. 获取通话状态 | 229 | ### 4. 获取通话状态 |
| 190 | -接口地址:/v1/app/callState/{callSid}?access_token=token | 230 | +接口地址:/callcenter/app/callState/{callSid}?access_token=token |
| 191 | 231 | ||
| 192 | Request Method:GET | 232 | Request Method:GET |
| 193 | 233 | ||
| @@ -260,3 +300,56 @@ Response Body: | @@ -260,3 +300,56 @@ Response Body: | ||
| 260 | "returnMsg": "系统内部异常!" | 300 | "returnMsg": "系统内部异常!" |
| 261 | } | 301 | } |
| 262 | ``` | 302 | ``` |
| 303 | + | ||
| 304 | +### 5. 获取客服电话 | ||
| 305 | +接口地址:/callcenter/app/calledPhoneNum?access_token=token | ||
| 306 | + | ||
| 307 | +Request Method:GET | ||
| 308 | + | ||
| 309 | +Request params: | ||
| 310 | + | ||
| 311 | +|参数名 |是否必须 |说明 |参数类型 | | ||
| 312 | +|--------------|----------|--------|----------| | ||
| 313 | +|access_token |是 |系统当前登录用户的token |String | | ||
| 314 | + | ||
| 315 | +Response Body: | ||
| 316 | + | ||
| 317 | +获取到客服电话号码: | ||
| 318 | + | ||
| 319 | +``` | ||
| 320 | +{ | ||
| 321 | + "data": { | ||
| 322 | + "calledPhoneNum": "010-xxxx" | ||
| 323 | + } | ||
| 324 | + }, | ||
| 325 | + "returnCode": 200, | ||
| 326 | + "returnMsg": "success" | ||
| 327 | +} | ||
| 328 | +``` | ||
| 329 | + | ||
| 330 | +用户信息有误: | ||
| 331 | + | ||
| 332 | +``` | ||
| 333 | +{ | ||
| 334 | + "returnCode": 400, | ||
| 335 | + "returnMsg": "用户信息有误!" | ||
| 336 | +} | ||
| 337 | +``` | ||
| 338 | + | ||
| 339 | +无法获取电话号码: | ||
| 340 | + | ||
| 341 | +``` | ||
| 342 | +{ | ||
| 343 | + "returnCode": 400, | ||
| 344 | + "returnMsg": "无法获取电话号码,请用手机拨打客服电话!" | ||
| 345 | +} | ||
| 346 | +``` | ||
| 347 | + | ||
| 348 | +系统异常: | ||
| 349 | + | ||
| 350 | +``` | ||
| 351 | +{ | ||
| 352 | + "returnCode": 500, | ||
| 353 | + "returnMsg": "系统内部异常!" | ||
| 354 | +} | ||
| 355 | +``` |
-
Please register or login to post a comment