查询单个中继信息
查询单个 SIP 中继的详细信息。
请求 URL
GET { base_url}/{api_path}/trunk/get?access_token={access_token}
请求参数
| 参数 | 是否必填 | 类型 | 说明 |
|---|---|---|---|
| id | 是 | Integer | 中继的唯一 ID。 注: 可使用 搜索特定中继 接口查询中继的 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> 中继详细信息。
示例
请求示例
查询 SIP 中继 (ID: "8") 的详细信息。
GET /openapi/v1.0/trunk/get?id=8&access_token=lLWhMzGKmWFQ4gNztelxaRq9voCj9PaU HTTP/1.1
Host: 192.168.5.150:8088
响应示例
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, "enb_sbc_routing": 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, "setting_of_sip_and_sdp_ip": "default", "sip_and_sdp_ip_addr": "", , "force_dod_from": 1, "enb_send_302_on_cf_external": 0 } }