查询呼出路由列表
查询呼出路由列表信息。
请求 URL
GET {base_url}/{api_path}/outbound_route/list?access_token={access_token}
请求参数
| 参数 | 是否必填 | 类型 | 说明 |
|---|---|---|---|
| page | 否 | Integer | 定义显示第几个页面。 |
| page_size | 否 | Integer | 定义每页显示几项查询结果。 |
| sort_by | 否 | String | 定义排序字段。 取值范围:
|
| order_by | 否 | String | 定义显示顺序。 取值范围:
|
响应参数
| 参数 | 类型 | 说明 |
|---|---|---|
| errcode | Integer | 返回错误码。
注: 更多错误码和错误信息说明,请参见 错误码 & 错误信息。
|
| errmsg | String | 返回信息。
|
| total_number | Integer | 呼出路由总数。 |
| last_pos | Integer | 呼出路由列表排序最大值。 |
| data | Array<Outroute_Info> | 呼出路由基本信息。 |
- Outroute_Info
-
表 3. 参数 类型 说明 id Integer 呼出路由的唯一 ID。 name String 呼出路由名称。 dial_pattern Array<String> 呼出路由呼出号码匹配规则。 trunk Array<Trunk_List> 呼出路由选择的中继列表。 pos Integer 呼出路由在列表中的当前位置。
- Trunk_List
-
表 4. 参数 类型 说明 id Integer 中继唯一 ID。 name String 中继名称。
示例
请求示例
GET /openapi/v1.0/outbound_route/list?page=1&page_size=20&sort_by=outb_cid&order_by=asc&access_token=nIAuSgDUim0uZgrNuha8hfzwbvY41NWR HTTP/1.1
Host: 192.168.5.150:8088
响应示例
HTTP/1.1 200 OK { "errcode": 0, "errmsg": "SUCCESS", "total_number": 4, "last_pos": 4, "data": [ { "id": 21, "name": "outbound_to_34", "dial_pattern": [ "X." ], "trunk": [ { "id": 35, "name": "peer-to-34" } ], "pos": 1 }, { "id": 9, "name": "to-41", "dial_pattern": [ "X." ], "trunk": [ { "id": 27, "name": "test-peer-trunking" } ], "pos": 2 }, { "id": 13, "name": "outbound_to_cloud", "dial_pattern": [ "9X." ], "trunk": [ { "id": 27, "name": "test-peer-trunking" } ], "pos": 3 }, { "id": 11, "name": "shared-trunk", "dial_pattern": [ "55033X.", "123X." ], "trunk": [ { "id": 27, "name": "test-peer-trunking" } ], "pos": 4 } ] }