查询指定共享中继
查询指定共享中继的详细信息。
请求 URL
GET {base_url}/dm/open_api/v1/shared_trunk/{id}
请求参数
路径参数| 参数 | 是否必填 | 类型 | 说明 |
|---|---|---|---|
| id | 是 | Integer | 共享中继的 ID。 注: 可使用 查询所有共享中继 获取中继
ID。 |
请求头
| 参数 | 是否必填 | 类型 | 说明 |
|---|---|---|---|
| Authorization | 是 | String | 在请求头中传递访问 Token。 格式:Bearer {access_token}。 |
响应参数
| 参数 | 类型 | 说明 |
|---|---|---|
| id | Integer | 共享中继 ID。 |
| regionId | Integer | 共享中继所属区域的 ID。 |
| regionName | String | 共享中继所属区域的名称。 |
| creator | String | 共享中继的创建者。 |
| name | String | 共享中继的名称。 |
| enable | Integer | 共享中继是否启用。
|
| country | String | SIP 运营商所属国家。 |
| itsp | String | SIP 运营商名称。 |
| type | String | 中继类型
|
| hostname | String | SIP 运营商提供的中继域名或 IP 地址。 |
| port | Integer | SIP 运营商提供的 SIP 中继注册端口。 |
| domain | String | SIP 运营商提供的中继域名或 IP 地址。 |
| transport | String | 传输协议。 |
| backupHostname | String | 可选的备用主机名,用于接受来自 ITSP 备用地址 (非主地址) 的SIP信令。 |
| remark | String | 中继的备注信息。 |
| username | String | SIP 运营商提供的注册中继的账号名称。 注: 仅注册中继支持此参数。 |
| password | String | 与注册中继的账号关联的密码。 注: 仅注册中继支持此参数。
|
| authName | String | SIP 运营商提供的中继的认证名称。 注: 仅注册中继支持此参数。
|
| enbOutboundProxy | Integer | 是否启用呼出代理服务器。
|
| outboundProxyServer | String | 呼出代理服务器的域名或 IP 地址。 注: 仅注册中继支持此参数。
|
| outboundProxyPort | Integer | 呼出代理服务器的端口。 注: 仅注册中继支持此参数。
|
| proxyClusterPublicIp | String | SBC Proxy 服务器的公网 IP 地址,可提供给 SIP 运营商用于中继绑定。 注: 仅点对点中继支持此参数。 |
| proxyPort | String | SBC Proxy 服务器的端口。 注: 仅点对点中继支持此参数。
|
| proxyServerName | String | SBC Proxy 服务器的名称。 |
| codecSel | String | 编解码设置。 |
| dtmfMode | String | 发送的 DTMF 模式。
|
| dtmfFmtp | String | DTMF fmtp 的属性值。
|
| enbQualify | Integer | 是否启用 Qualify。
|
| enbSrtp | Integer | 是否启用 SRTP。
|
| enbT38Support | Integer | 是否启用 T.38 支持。
|
| enbInbandProgress | Integer | 是否启用 Inband Progress。
|
| ignore183WithoutSdp | Integer | 是否忽略无 SDP 的 183 消息。
|
| transparentTrans180Msg | Integer | 是否跟随对端消息格式处理 180 消息。
|
| enbDedicate | Integer | 是否启用专线中继。
|
| enbSipauthCache | Integer | 是否启用 SIP 鉴权缓存。 注: 仅注册中继支持此参数。
|
| callRestrictionType | String | 受中继最大并发通话数限制的通话类型。
|
| maxCallChans | Integer | 该中继所允许的最大通话并发数。 注: 若返回的值为
0,则表示无限制。 |
| authErrorSipCode | String | SIP 运营商返回的表示鉴权错误的 SIP 错误码。 注: 仅注册中继支持此参数。
|
| authRegisterAttempt | Integer | PBX 在收到 SIP 运营商返回的 鉴权错误
SIP 码 后重新发送注册请求的尝试次数。 注: 仅注册中继支持此参数。
|
| globalRegisterRetryInterval | Integer | PBX 在收到 SIP 运营商返回的任意SIP 错误码 (即非 200 的状态码) 后重新发送注册请求的间隔时间 (单位:秒)。 注: 仅注册中继支持此参数。
|
| callerIdFrom | String | 中继从哪里获取显示号码 (Caller ID)。
|
| didFrom | String | 中继从哪里获取 DID 号码。
|
| fromUserPart | String | 用于外呼时的主叫号码 (即 SIP From 头域中的用户部分)。
|
| fromUser | String | fromUserPart 参数设置为 custom
时的自定义值。 |
| fromDispNamePart | String | 用于外呼时的主叫名称 (即 SIP From 头域中的显示名称部分)。
|
| fromDispName | String | fromDispNamePart 参数设置为
custom 时的自定义值。 |
| diversionUserPart | String | 用于外呼时在 SIP INVITE 数据包中携带的 Diversion
头域的值。注: 如果此参数返回为空( ""),表示 SIP INVITE
数据包中将不包含此头域。
|
| diversionUser | String | diversionUserPart 参数设置为
custom 时的自定义值。 |
| rpidUserPart | String | 用于外呼时在 SIP INVITE 数据包中携带的 Remote-Party-ID 头域的值。注: 如果此参数返回为空(
""),表示 SIP INVITE
数据包中将不包含此头域。
|
| rpidUser | String | rpidUserPart 参数设置为 custom
时的自定义值。 |
| paiUserPart | String | 用于外呼时在 SIP INVITE 数据包中携带的
P-Asserted-Identity 头域的值。注: 如果此参数返回为空(
""),表示 SIP INVITE
数据包中将不包含此头域。
|
| paiUser | String | paiUserPart 参数设置为 custom
时的自定义值。 |
| paiUserPartUriFormat | String | P-Asserted-Identity 头域的格式。
|
| ppiUserPart | String | 用于外呼时在 SIP INVITE 数据包中携带的
P-Preferred-Identity 头域的值。注: 如果此参数返回为空(
""),表示 SIP INVITE
数据包中将不包含此头域。
|
| ppiUser | String | ppiUserPart 参数设置为 custom
时的自定义值。 |
| userAgent | String | 用于身份验证的用户代理信息。 |
| realm | String | 用于 SIP 认证的域 (Realm)。 |
| enb100Rel | Integer | 中继的 100rel 设置。
|
| maxPtime | String | PBX 发出 INVITE 包时使用的 maxptime 值。 注: 若此参数返回的值为 default,则表示 PBX
会根据呼出通话所使用的语音编码发送对应的 maxptime。 |
| enbPrivacyId | Integer | 是否在 SIP 头域中发送 Privacy ID。
|
| enbUserPhone | Integer | 是否在 INVITE 包的 SIP 头域中增加 user=phone 的参数。
|
| enbApiCallId | Integer | 是否在 SIP INVITE 请求中包含 X-OpenAPI-Call-ID
字段以携带通话的 Call ID。
|
| enbEarlyMedia | Integer | 是否在 SIP INVITE 请求中包含 P-Early-Media 字段。
|
| enbEarlyMediaFor183 | Integer | 是否在通过此中继呼入的通话的 183 消息中包含值为 sendrecv 的
P-Early-Media 字段。
|
| fromDomainPart | String | SIP INVITE 中 From 头域所使用的域名或 IP 地址。注: 仅点对点中继支持此参数。
|
| fromDomainValue | String | fromDomainPart 设置为 custom
时的自定义值。 |
| toDomainPart | String | SIP INVITE 中 To 头域所使用的域名或 IP 地址。注: 仅点对点中继支持此参数。
|
| toDomainValue | String | toDomainPart 设置为 custom
时的自定义值。 |
| failoverServersList | Array <Failover_Server> | 用于故障转移的 SIP 运营商备用服务器信息列表。 |
- Failover_Server
-
参数 类型 说明 host String 备用服务器的域名或 IP 地址。 port Integer 备用服务器的注册端口。 domain String 备用服务器的域名或 IP 地址。
示例
请求示例查询共享中继 (ID: 6688) 的详细信息。
GET /dm/open_api/v1/shared_trunk/6688 HTTP/1.1 Host: ycm.yeastar.com Authorization: Bearer ******响应示例
HTTP/1.1 200 OK { "data": { "id": 6688, "regionId": 20, "regionName": "China (Beijing)", "creator": "Leo Ball", "name": "bandwidth-trunk_F9I8P8", "enable": 1, "country": "United States", "itsp": "Bandwidth", "type": "did_based", "hostname": "sip.bandwidth.com", "port": 5060, "domain": "sip.bandwidth.com", "transport": "udp", "proxyClusterPublicIp": "52.82.120.101", "proxyPort": 5060, "proxyServerName": "cn-beijing-proxy-b", "codecSel": "ulaw,g729", "dtmfMode": "rfc4733", "dtmfFmtp": "0-16", "enbQualify": 0, "enbSrtp": 0, "enbT38Support": 0, "enbInbandProgress": 0, "ignore183WithoutSdp": 0, "enbDedicate": 0, "callRestrictionType": "outbound", "maxCallChans": 0, "transparentTrans180Msg": 0, "callerIdFrom": "follow_system", "didFrom": "follow_system", "fromUserPart": "default", "fromUser": "", "fromDispNamePart": "default", "fromDispName": "", "diversionUserPart": "", "diversionUser": "", "rpidUserPart": "", "rpidUser": "", "paiUserPart": "", "paiUser": "", "paiUserPartUriFormat": "sip", "ppiUserPart": "", "ppiUser": "", "userAgent": "", "enb100Rel": 0, "maxPtime": "default", "enbPrivacyId": 0, "enbUserPhone": 0, "enbApiCallId": 0, "enbEarlyMedia": 0, "enbEarlyMediaFor183": 0, "fromDomainPart": "default", "toDomainPart": "default", "failoverServersList": [ { "host": "67.23.8.195", "port": 5060, "domain": "67.23.8.195" } ] }, "requestId": "41bb65359db6aa3cd3384dd72ef9629e", "status": "Success", "time": 1747120211 }