获取网页协同的连接信息
接口功能
获取网页协同的连接信息。
接口原型
|
请求方法 |
POST |
|
|---|---|---|
|
请求URL |
https://ip:port/service-cloud/rest/webadapter/v1/connectionInfo/getConnectionInfo |
其中,ip:port为对外暴露的nslb的ip和port |
|
参数名称 |
选取原则 |
参数类型 |
默认值 |
说明 |
|---|---|---|---|---|
|
Content-Type |
必选 |
String |
无 |
固定填 application/json; charset=UTF-8。 |
|
Cookie |
必选 |
String |
无 |
集成页面的时候,ccmessaging通过请求响应,将ccmessaging-token写到集成页面浏览器的Cookie中。单独调用时需确保请求头的Cookie中含有ccmessaging-token=xxx,xxx为ccmessaging-token值。 |
请求参数
|
参数名称 |
选取原则 |
参数类型 |
说明 |
|---|---|---|---|
|
roomId |
必选 |
String |
房间ID,传递为多媒体呼叫callid。 |
|
userId |
必选 |
String |
用户标识 |
|
userName |
必选 |
String |
用户名称 |
|
role |
必选 |
String |
角色类型,recorder :记录者 replayer:观察者 |
响应参数
|
参数名称 |
选取原则 |
参数类型 |
说明 |
|---|---|---|---|
|
retCode |
必选 |
String |
接口响应码,0:成功 |
|
retMsg |
可选 |
String |
接口描述 |
|
data |
可选 |
Object |
网页协同的连接信息 |
|
参数名称 |
选取原则 |
参数类型 |
说明 |
|---|---|---|---|
|
roomId |
可选 |
String |
房间ID。 |
|
wssUrl |
可选 |
String |
内部websocket连接地址 ,多节点的IP地址注册在zookeeper(或redis),需要到zookeeper(或redis)上查询 |
|
wssUrlOut |
可选 |
String |
外部websocket连接地址,IP地址保存在ccp,需调用ccp接口查询 |
|
signature |
可选 |
String |
- |
接口示例
- 请求示例
POST /service-cloud/rest/webadapter/v1/connectionInfo/getConnectionInfo host: 10.10.10.2:18446 connection: Keep-Alive x-forwarded-for: 10.10.10.3, 10.10.10.4 x-real-ip: 10.10.10.5 content-length: 401 remote-host: 10.10.10.6 user-agent: java/socket content-type: application/json; charset=utf-8 cookie: JSESSION*****#*#*****3 ccmessaging-token:******** accept: */* {"roomId":"xx","userId":"xx","userName":"xx","role":"xx"} - 响应示例
{ "retCode":"0", "data":{ "roomId":"xx", "wssUrl":"xx", "wssUrlOut":"xx", "signature":"xx" } }