# 遍历对讲分组 ## 接口描述 按照一定条件遍历当前账号(AccessKey 所属公司)的对讲分组。 **对讲分组说明**:对讲分组用于隔离设备分机、坐席分机和呼叫中心。每个分组对应独立的 SIP 域名: - 公司级(默认分组):`<公司ID>.<对讲策略>.sip`,如 `2.voip1.sip` - 分组级:`<公司ID>.<分组标识>.<对讲策略>.sip`,如 `2.xiaoqu-a.voip1.sip` 分组标识(tag)在创建时指定,创建后不可修改。分机号码的唯一性按域名判定,不同分组可以使用相同的分机号。设备分机、坐席分机、呼叫中心的创建/修改接口通过 `voip_group_id` 指定所属分组,不传或传 `0` 表示公司级默认分组。 ## 请求说明 | 接口ID | 协议 | 方法 | PATH | | --- | --- | --- | --- | | 96 | HTTPS | GET | /openapi/v1/voip/groups | ### PATH参数 无 ### URL参数 | 参数 | 类型 | 必填 | 说明 | | --- | --- | --- | --- | | page | int | 否 | 页码,默认 1 | | size | int | 否 | 每页条数,默认 10000 | | wheres | string | 否 | 参见[WHERES参数](/WHERES参数.md) | | accesskey_id | string | 是 | 参见[签名认证](/签名认证.md) | | expires | int | 是 | 参见[签名认证](/签名认证.md) | | signature | string | 是 | 参见[签名认证](/签名认证.md) | *wheres允许填入的k:* | 参数 | 类型 | 说明 | | --- | --- | --- | | id | int | 分组ID | | tag | string | 分组标识 | | name | string | 分组名称 | ### 请求示例 ``` GET https://open.vzicloud.com/openapi/v1/voip/groups?page=1&size=10&accesskey_id=8d9EsDAD2115Q5PM8tuP6g1IdAglkayp&expires=1619022787&signature=G29eTBjMm0gZF7cpXNLX7Hrn0yM%3D HTTP/1.1 ``` ## 返回说明 ### 返回参数 | 参数 | 类型 | 说明 | | --- | --- | --- | | page | int | 当前页码 | | size | int | 当前分页大小 | | total | int | 符合条件的分组总数 | | items | array | 分组列表 | | items[].id | int | 分组ID | | items[].tag | string | 分组标识(域名段,创建后不可修改) | | items[].name | string | 分组名称 | | items[].device_count | int | 分组下设备分机数量(统计失败时为 -1) | | items[].agent_count | int | 分组下坐席分机数量(统计失败时为 -1) | | items[].call_center_count | int | 分组下呼叫中心数量(统计失败时为 -1) | **注:返回参数里可能还包含其他信息但未在上面的表格内列出,请勿使用!** ### 返回示例 ```json { "page": 1, "size": 10, "total": 2, "items": [ { "id": 12, "tag": "xiaoqu-a", "name": "小区A", "device_count": 5, "agent_count": 2, "call_center_count": 1 }, { "id": 13, "tag": "xiaoqu-b", "name": "小区B", "device_count": 0, "agent_count": 0, "call_center_count": 0 } ] } ```