查询多个中继信息
查询多个 SIP 中继的详细信息。
请求 URL
GET {base_url}/{api_path}/trunk/query?access_token={access_token}
请求参数
| 参数 | 是否必填 | 类型 | 说明 |
|---|---|---|---|
| ids | 是 | String | 中继的唯一 ID。 注:
|
响应参数
- 注册中继
-
表 2. 参数 是否必填 说明 errcode Integer 返回错误码。 0:请求成功。- 非零值:请求失败。
注: 更多错误码和错误信息说明,请参见 错误码 & 错误信息。errmsg String 返回信息。 SUCCESS:请求成功。FAILURE:请求失败。
data Array <Trunk_Info> 中继详细信息。 - 点对点中继
-
参数 类型 说明 errcode Integer 返回错误码。 0:请求成功。- 非零值:请求失败。
注: 更多错误码和错误信息说明,请参见 错误码 & 错误信息。errmsg String 返回信息。 SUCCESS:请求成功。FAILURE:请求失败。
data Array <Trunk_Info> 中继详细信息。
- 账号中继
-
表 11. 参数 类型 说明 errcode Integer 返回错误码。 0:请求成功。- 非零值:请求失败。
注: 更多错误码和错误信息说明,请参见 错误码 & 错误信息。errmsg String 返回信息。 SUCCESS:请求成功。FAILURE:请求失败。
data Array <Trunk_Info> 中继详细信息。
示例
请求示例
GET /openapi/v1.0/trunk/query?ids=8,12&access_token=47I1W4RwMGyDYlXfdymHUqFesJF6QIwi HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
响应示例
HTTP/1.1 200 OK { "errcode": 0, "errmsg": "SUCCESS", "data": [ { "id": 8, "name": "Local_Calls", "enable": 1, "country": "general", "type": "register", "transport": "udp", "hostname": "abc.provider.com", "port": 5060, "domain": "abc.provider.com", "username": "6701", "password": "0T9crrZ0gx", "auth_name": "mubJwYEWs9", "enb_outbound_proxy": 0, "outbound_proxy_server": "", "outbound_proxy_port": 0, "codec_sel": "ulaw,alaw,g729", "def_outbound_cid": "", "def_outbound_cid_name": "", "outbound_cid_list": [ { "id": 11, "outbound_cid_option": "shared", "outbound_cid": "5503302", "outbound_cid_name": "Sales", "ext_list": [ { "ext_number": "Sales", "ext_name": "Sales", "type": "ext_group", "id": 7 } ], "outbound_cid_label": "Yeastar Sales", "outbound_cid_short_code": "123" } ], "did_list": [ { "id": 8, "did": "5503300", "did_name": "Sales" } ], "transparent_trans_180_msg": 0, , "enb_sipauth_cache": 1, "force_dod_from": 1, "enb_send_302_on_cf_external": 1 }, { "id": 12, "name": "ToPAE", "enable": 1, "country": "general", "type": "account", "transport": "udp", "hostname": "", "port": 0, "domain": "", "username": "6700", "password": "HSkQfXVg5V", "auth_name": "y7H9V8oFv1", "enb_outbound_proxy": 0, "outbound_proxy_server": "", "outbound_proxy_port": 0, "codec_sel": "ulaw,alaw,g729", "def_outbound_cid": "5502200", "def_outbound_cid_name": "Hotline", "transparent_trans_180_msg": 0, "outbound_cid_list": [ { "id": 13, "outbound_cid_option": "shared", "outbound_cid": "5502201", "outbound_cid_name": "Test", "ext_list": [ { "ext_number": "Default_All_Extensions", "ext_name": "Default_All_Extensions", "type": "ext_group", "id": 1 } ], "outbound_cid_label": "Tech support", "outbound_cid_short_code": "124" }, { "id": 15, "outbound_cid_option": "range", "outbound_cid": "5503301-5503302", "outbound_cid_name": "", "outbound_cid_to_ext_range": "1001-1002", "outbound_cid_label": "", "outbound_cid_short_code": "" } ], "force_dod_from": 1, "enb_send_302_on_cf_external": 0 } ] }