Query all the Shared Trunks
Query the detailed information of all the shared trunks.
Request URL
GET {base_url}/dm/open_api/v1/shared_trunk
Request parameters
Headers
Parameter | Required | Type | Description |
---|---|---|---|
Authorization | Yes | String | Pass the access token in the header. Format: Bearer {access_token}. |
Response parameters
Parameter | Type | Description |
---|---|---|
data | Object <Details> | The detailed information. |
requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
status | String | Request result:
|
time | Long | The response time. Note: The YCM API response returns a
timestamp, you can convert the timestamp to detailed
date and time as needed. For more information, see Convert Timestamp to Local Date and Time.
|
Details
Parameter | Type | Description |
---|---|---|
id | Integer | The ID of the shared trunk. |
regionId | Integer | The ID of the region where the shared trunk is created. |
regionName | String | The name of the region where the shared trunk is created. |
creator | String | The creator of the shared trunk. |
name | String | The name of the shared trunk. |
enable | Integer | Whether the shared trunk is enabled or not.
|
country | String | The country of the ITSP. |
itsp | String | The name of the ITSP. |
type | String | Trunk type.
|
hostname | String | The domain or IP address of the ITSP. |
port | Integer | The registration port of the SIP trunk. |
domain | String | The domain or IP address of the ITSP. |
transport | String | Transport protocol. |
backupHostname | String | An optional backup hostname to accept SIP signaling from alternative ITSP addresses (other than the main host). |
remark | String | Remark for the trunk. |
username | String | The username of the SIP account that is provided by the
ITSP. Note: This parameter is only for
register trunk. |
password | String | The password of the SIP account. Note: This parameter is only for
register trunk.
|
authName | String | The authentication name that is provided by the ITSP. Note: This parameter is only for
register trunk.
|
enbOutboundProxy | Integer | Whether an outbound proxy server is enabled.
|
outboundProxyServer | String | The domain name or IP address of the outbound proxy server. Note: This parameter is only for
register trunk.
|
outboundProxyPort | Integer | The port of the outbound proxy server. Note: This parameter is only for
register trunk.
|
proxyClusterPublicIp | String | The public IP address of the SBC Proxy Server, which can be
provided to the ITSP for trunk binding. Note: This parameter is only for peer
trunk. |
proxyPort | String | The port of the SBC Proxy Server. Note: This parameter is only for peer
trunk.
|
proxyServerName | String | The name of the SBC Proxy Server. |
codecSel | String | Codec settings. |
dtmfMode | String | The mode for sending DTMF tones.
|
dtmfFmtp | String | DTMF fmtp.
|
enbQualify | Integer | Whether Qualify is enabled or not.
|
enbSrtp | Integer | Whether SRTP is enabled or not.
|
enbT38Support | Integer | Whether T.38 fax is enabled or not.
|
enbInbandProgress | Integer | Whether Inband Progress is enabled or not.
|
ignore183WithoutSdp | Integer | Whether 183 messages without SDP will be ignored or not.
|
transparentTrans180Msg | Integer | Whether 180 messages with SDP will be forwarded when the 180
message received from the other party contains SDP.
|
enbDedicate | Integer | Whether dedicated trunk is enabled.
|
callRestrictionType | String | The type of calls included in the calculation of the trunk's
maximum concurrent call limit.
|
maxCallChans | Integer | The maximum number of concurrent calls allowed in this
trunk. Note: If the value is
0 , it indicates that the concurrent
calls in this trunk is unlimited. |
authErrorSipCode | String | The SIP error code returned by the ITSP to indicate an
authentication error. Note: This parameter is only for
register trunk.
|
authRegisterAttempt | Integer | The number of registration attempts after receiving the authentication error SIP code from the ITSP. Note: This parameter is only for
register trunk.
|
globalRegisterRetryInterval | Integer | The global interval time (in seconds) for retrying
registration after receiving any SIP error code (non-200 status
code) from ITSP. Note: This parameter is only for
register trunk.
|
callerIdFrom | String | From which SIP header field will the trunk retrieve caller
ID.
|
didFrom | String | From which SIP header field will the trunk retrieve DID.
|
fromUserPart | String | The caller ID (user part of the SIP From
header) to be used
for outbound calls.
|
fromUser | String | The custom value when fromUserPart is set to
custom . |
fromDispNamePart | String | The caller ID name (display name part of the SIP
From header) to be used for outbound calls.
|
fromDispName | String | The custom value when fromDispNamePart is
set to custom . |
diversionUserPart | String | The value to be carried in the Diversion
header field of the SIP INVITE packet for outbound calls.Note: If this parameter is returned
empty( "" ), it indicates that the header
field will not be included in the SIP INVITE
packet.
|
diversionUser | String | The custom value when diversionUserPart is
set to custom . |
rpidUserPart | String | The value to be carried in the
Remote-Party-ID header field of the SIP
INVITE packet for outbound calls.Note: If this parameter is returned
empty(
"" ), it indicates that the header
field will not be included in the SIP INVITE
packet.
|
rpidUser | String | The custom value when rpidUserPart is set to
custom . |
paiUserPart | String | The value to be carried in the
P-Asserted-Identity header field of the SIP
INVITE packet for outbound calls.Note: If this parameter is returned
empty(
"" ), it indicates that the header
field will not be included in the SIP INVITE
packet.
|
paiUser | String | The custom value when paiUserPart is set to
custom . |
paiUserPartUriFormat | String | The format of the P-Asserted-Identity header
field.
|
ppiUserPart | String | The value to be carried in the
P-Preferred-Identity header field of the
SIP INVITE packet for outbound calls.Note: If this parameter is returned
empty(
"" ), it indicates that the header
field will not be included in the SIP INVITE
packet.
|
ppiUser | String | The custom value when ppiUserPart is set to
custom . |
userAgent | String | User Agent information for authentication. |
realm | String | Realm for SIP authentication. |
enb100Rel | Integer | The 100rel setting for this trunk.
|
maxPtime | String | The value of the maxptime used when the PBX sends the INVITE
packet. Note: If this parameter returns
default , it indicates that PBX will
send a corresponding maxptime value according to the codec
that is used for the outbound call. |
enbPrivacyId | Integer | Whether Privacy ID will be included in SIP header or not.
|
enbUserPhone | Integer | Whether a user=phone parameter will be
included in the header field of the SIP INVITE packet.
|
enbApiCallId | Integer | Whether a X-OpenAPI-Call-ID field will be
included in the SIP INVITE packet.
|
enbEarlyMedia | Integer | Whether a P-Early-Media field will be
included in the SIP INVITE packet.
|
enbEarlyMediaFor183 | Integer | Whether a P-Early-Media field with the value
of sendrecv will be included in the 183 message
for inbound calls routed through the trunk.
|
fromDomainPart | String | The domain or IP address that will be used in the
From field of a SIP INVITE header.Note: This parameter is only for peer
trunk.
|
fromDomainValue | String | The custom value when fromDomainPart is set
to custom . |
toDomainPart | String | The domain or IP address that will be used in the
To field of a SIP INVITE header.Note: This parameter is only for peer
trunk.
|
toDomainValue | String | The custom value when toDomainPart is set to
custom . |
failoverServersList | Array <Failover_Server> | The information list of the ITSP's secondary server for failover. |
- Failover_Server
-
Parameter Type Description host String The domain or IP address of the secondary server. port Integer The registration port of the secondary server. domain String The domain or IP address of the secondary server.
Example
Request example
GET /dm/open_api/v1/shared_trunk HTTP/1.1
Host: ycm.yeastar.com
Authorization: Bearer ******
Response exampleHTTP/1.1 200 OK
{
"data": [
{
"id": 2,
"regionId": 20,
"regionName": "China (Shanghai)",
"creator": "Leo Ball",
"name": "trunk-shanghai-01",
"enable": 1,
"country": "China",
"itsp": "China Telecom",
"type": "register",
"hostname": "sip.chinatelecom.com",
"port": 5060,
"domain": "sip.chinatelecom.com",
"transport": "udp",
"username": "ct_username_001",
"password": "encrypted_CTpass123",
"authName": "",
"enbOutboundProxy": 0,
"outboundProxyServer": "",
"outboundProxyPort": 0,
"proxyServerName": "cn-shanghai-proxy-a",
"codecSel": "ulaw,alaw,g729",
"dtmfMode": "rfc4733",
"dtmfFmtp": "0-16",
"enbQualify": 0,
"enbSrtp": 0,
"enbT38Support": 0,
"enbInbandProgress": 0,
"ignore183WithoutSdp": 0,
"enbDedicate": 0,
"callRestrictionType": "outbound",
"maxCallChans": 0,
"transparentTrans180Msg": 0,
"authErrorSipCode": "401;407;403",
"authRegisterAttempt": 3,
"globalRegisterRetryInterval": 20,
"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,
"realm": "",
"enbEarlyMedia": 0,
"enbEarlyMediaFor183": 0
},
... ...
{
"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
}