Get a Trunk
Retrieves the details of a trunk, including the connection configuration, VoIP settings, and secondary server list. The password field is masked.
Request URL
GET {base_url}/uc-cconfig/api/v1/trunks/{id}
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.
- Path parameters
-
Parameter Required Type Description id Yes String The ID of the trunk to query. You can obtain the ID using the Search Trunks interface.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| code | String | The HTTP status code of the request.
|
| message | String | The status message of the request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| result | Object<Trunk_Detail> | The details of the trunk. The password field is masked as ******. |
- Trunk_Detail
-
Parameter Type Description id String The ID of the trunk. creator String The user ID of the user who created the trunk. name String The name of the trunk. trunkType String The type of the trunk.
REGISTERPEERACCOUNT
enabled Boolean Whether the trunk is enabled.
true: Enabled.false: Disabled.
config Object<Trunk_Config> The connection configuration of the trunk. The value of passwordis masked as******.voipConfig Object<VoIP_Config> The VoIP configuration of the trunk. sipInbound Object<SIP_Inbound_Params> The inbound call parameter settings. sipOutbound Object<SIP_Outbound_Params> The outbound call parameter settings. sipCustomHeaders Object<SIP_Custom_Headers> The custom SIP header names of the trunk. sipOther Object<SIP_Other_Settings> The other SIP settings. outboundCallerId Object<Outbound_Caller_ID> The outbound caller ID configuration. userAgentAuth Object<User_Agent_Auth> The SIP User Agent authentication settings. ipRestriction Object<IP_Restriction> The IP restriction settings. allowedSourceAddresses Object<Allowed_Source_Addresses> The additional trusted source addresses. This parameter applies to register and peer trunks. inboundCallerIdReformattingRules Object<Inbound_Caller_ID_Reformatting_Rules> The inbound caller ID reformatting rules. itspTemplateId String The ID of the ITSP template. itspTemplateName String The name of the ITSP template. This parameter is queried in real time and is not persisted. itspTemplateCountry String The country or region of the ITSP template. This parameter is queried in real time and is not persisted. remark String The remark of the trunk. createdAt String The time when the trunk was created, in millisecond timestamp format. updatedAt String The time when the trunk was last updated, in millisecond timestamp format. provider String The name of the line provider, such as Twilio,general.codecConfig Object<Codec_Config> The codec configuration. concurrentCallLimits Object<Concurrent_Call_Limits> The concurrent call limits. bindingAddress Object<Trunk_Address> The binding address of the trunk. registrationAddress Object<Trunk_Address> The registration address of the trunk. shakenConfig Object<Shaken_Config> The STIR/SHAKEN configuration. This parameter applies only to shared trunks.
- Trunk_Config
-
Parameter Type Description transport String The transport protocol.
UDPTCPTLSDNS_NAPTR
hostname String The hostname or IP address of the SIP server. port Integer The SIP port of the server. domain String The SIP domain. username String The username for authentication. password String The password for authentication. The value is masked as ******.authName String The authentication name. usernameAsAuth Boolean Whether the username is used as the authentication name.
truefalse
enableOutboundProxy Boolean Whether the outbound proxy is enabled.
truefalse
outboundProxyHost String The hostname or IP address of the outbound proxy. outboundProxyPort Integer The port of the outbound proxy. secondaryServersList Object<Secondary_Servers_List> The secondary server list for failover.
- Secondary_Servers_List
-
Parameter Type Description entries Array<Server_Entry> The list of secondary server entries. Up to 10 entries are supported.
- Server_Entry
-
Parameter Type Description host String The hostname or IP address of the secondary server. port Integer The SIP port of the secondary server. domain String The SIP domain of the secondary server.
- VoIP_Config
-
Parameter Type Description dtmfMode String The DTMF mode.
RFC2833INFOINBANDAUTO
dtmfFmtp String The FMTP attribute for DTMF.
RANGE_0_16RANGE_0_15
enableQualify Boolean Whether qualify (SIP OPTIONS keep-alive) is enabled. This parameter is used to detect whether the peer is reachable.
truefalse
enableRtpKeepalive Boolean Whether RTP keep-alive is enabled.
truefalse
authErrorCodes String The SIP error codes that trigger re-registration, separated by semicolons, such as 401;407;403. This parameter applies mainly to register trunks.authRegisterAttempts Integer The number of authentication registration attempts. This parameter applies mainly to register trunks. registerRetryInterval Integer The global registration retry interval, in seconds. outboundFailoverResponseCodes String The SIP response codes that trigger outbound failover, separated by semicolons. enableSrtp Boolean Whether SRTP is enabled. When enabled, RTP packets are encrypted.
truefalse
- SIP_Inbound_Params
-
Parameter Type Description getCallerIdFrom String The SIP header from which the caller number is obtained.
INBOUND_HEADER_SOURCE_FROMINBOUND_HEADER_SOURCE_CONTACTINBOUND_HEADER_SOURCE_REMOTE_PARTY_IDINBOUND_HEADER_SOURCE_P_ASSERTED_IDENTITYINBOUND_HEADER_SOURCE_P_PREFERRED_IDENTITY
getDidFrom String The SIP header or URI part from which the DID number is obtained.
DID_SOURCE_INVITEDID_SOURCE_TODID_SOURCE_DIVERSIONDID_SOURCE_REMOTE_PARTY_IDDID_SOURCE_P_ASSERTED_IDENTITYDID_SOURCE_P_PREFERRED_IDENTITYDID_SOURCE_P_CALLED_PARTY_ID
- SIP_Outbound_Params
-
Parameter Type Description fromUserPart String The source of the caller number.
OUTBOUND_CALLER_ID_SOURCE_DEFAULT: The default value, which falls back level by level along the 6-level priority chain.OUTBOUND_CALLER_ID_SOURCE_OUTBOUND_ROUTE: The outbound caller ID of the outbound route (highest priority).OUTBOUND_CALLER_ID_SOURCE_USER_OUTBOUND: The user outbound caller ID.OUTBOUND_CALLER_ID_SOURCE_DEFAULT_OUTBOUND: The system default outbound caller ID.OUTBOUND_CALLER_ID_SOURCE_TRUNK_USERNAME: The trunk username (only available for register trunks).OUTBOUND_CALLER_ID_SOURCE_USER_CALLER_ID: The Caller ID of the user.OUTBOUND_CALLER_ID_SOURCE_ORIGINATOR: The caller ID of the call originator (lowest priority).
fromDisplayNamePart String The source of the caller name.
OUTBOUND_CALLER_ID_NAME_DEFAULT: The default value, which falls back level by level along the priority chain.OUTBOUND_CALLER_ID_NAME_USER_OUTBOUND: The caller name of the user outbound call.OUTBOUND_CALLER_ID_NAME_DEFAULT_OUTBOUND: The system default outbound caller name.OUTBOUND_CALLER_ID_NAME_USER_CALLER_ID: The caller name of the user Caller ID.OUTBOUND_CALLER_ID_NAME_ORIGINATOR: The caller name of the call originator.
fromHostPart Object<Host_Part> The custom From host part. This parameter applies only to peer trunks. toHostPart Object<Host_Part> The custom To host part. This parameter applies only to peer trunks. diversion String Whether and how the header is generated.
OUTBOUND_CALLER_ID_SOURCE_NONE: The header is not generated (only available for identity headers).OUTBOUND_CALLER_ID_SOURCE_DEFAULT: The default value, which falls back level by level along the 6-level priority chain.OUTBOUND_CALLER_ID_SOURCE_OUTBOUND_ROUTE: The outbound caller ID of the outbound route (highest priority).OUTBOUND_CALLER_ID_SOURCE_USER_OUTBOUND: The user outbound caller ID.OUTBOUND_CALLER_ID_SOURCE_DEFAULT_OUTBOUND: The system default outbound caller ID.OUTBOUND_CALLER_ID_SOURCE_TRUNK_USERNAME: The trunk username (only available for register trunks).OUTBOUND_CALLER_ID_SOURCE_USER_CALLER_ID: The Caller ID of the user.OUTBOUND_CALLER_ID_SOURCE_ORIGINATOR: The caller ID of the call originator (lowest priority).
remotePartyId String Whether and how the header is generated.
OUTBOUND_CALLER_ID_SOURCE_NONE: The header is not generated (only available for identity headers).OUTBOUND_CALLER_ID_SOURCE_DEFAULT: The default value, which falls back level by level along the 6-level priority chain.OUTBOUND_CALLER_ID_SOURCE_OUTBOUND_ROUTE: The outbound caller ID of the outbound route (highest priority).OUTBOUND_CALLER_ID_SOURCE_USER_OUTBOUND: The user outbound caller ID.OUTBOUND_CALLER_ID_SOURCE_DEFAULT_OUTBOUND: The system default outbound caller ID.OUTBOUND_CALLER_ID_SOURCE_TRUNK_USERNAME: The trunk username (only available for register trunks).OUTBOUND_CALLER_ID_SOURCE_USER_CALLER_ID: The Caller ID of the user.OUTBOUND_CALLER_ID_SOURCE_ORIGINATOR: The caller ID of the call originator (lowest priority).
pAssertedIdentity String Whether and how the header is generated.
OUTBOUND_CALLER_ID_SOURCE_NONE: The header is not generated (only available for identity headers).OUTBOUND_CALLER_ID_SOURCE_DEFAULT: The default value, which falls back level by level along the 6-level priority chain.OUTBOUND_CALLER_ID_SOURCE_OUTBOUND_ROUTE: The outbound caller ID of the outbound route (highest priority).OUTBOUND_CALLER_ID_SOURCE_USER_OUTBOUND: The user outbound caller ID.OUTBOUND_CALLER_ID_SOURCE_DEFAULT_OUTBOUND: The system default outbound caller ID.OUTBOUND_CALLER_ID_SOURCE_TRUNK_USERNAME: The trunk username (only available for register trunks).OUTBOUND_CALLER_ID_SOURCE_USER_CALLER_ID: The Caller ID of the user.OUTBOUND_CALLER_ID_SOURCE_ORIGINATOR: The caller ID of the call originator (lowest priority).
pAssertedIdentityUriFormat String The URI format of the P-Asserted-Identity header.
SIP_URI_FORMAT_SIP: Thesip:format.SIP_URI_FORMAT_TEL: Thetel:format.
pPreferredIdentity String Whether and how the header is generated.
OUTBOUND_CALLER_ID_SOURCE_NONE: The header is not generated (only available for identity headers).OUTBOUND_CALLER_ID_SOURCE_DEFAULT: The default value, which falls back level by level along the 6-level priority chain.OUTBOUND_CALLER_ID_SOURCE_OUTBOUND_ROUTE: The outbound caller ID of the outbound route (highest priority).OUTBOUND_CALLER_ID_SOURCE_USER_OUTBOUND: The user outbound caller ID.OUTBOUND_CALLER_ID_SOURCE_DEFAULT_OUTBOUND: The system default outbound caller ID.OUTBOUND_CALLER_ID_SOURCE_TRUNK_USERNAME: The trunk username (only available for register trunks).OUTBOUND_CALLER_ID_SOURCE_USER_CALLER_ID: The Caller ID of the user.OUTBOUND_CALLER_ID_SOURCE_ORIGINATOR: The caller ID of the call originator (lowest priority).
- Host_Part
-
Parameter Type Description source String The source of the host part.
HOST_PART_DEFAULT: The default host part.HOST_PART_CUSTOM: The custom host part specified bycustom.
custom String The custom host part. This parameter takes effect only when the value of sourceisHOST_PART_CUSTOM.
- SIP_Other_Settings
-
Parameter Type Description maxptime String The maximum packetization time carried in the SDP a=maxptimeattribute. An empty value indicates that the attribute is not carried.
- Outbound_Caller_ID
-
Parameter Type Description callerIdNumberFormat String The number format of the outbound caller ID.
CALLER_ID_NUMBER_FORMAT_NATIONAL: The national format.CALLER_ID_NUMBER_FORMAT_E164_WITH_PLUS: The E.164 format with a plus sign.CALLER_ID_NUMBER_FORMAT_E164_WITHOUT_PLUS: The E.164 format without a plus sign.
- SIP_Custom_Headers
-
Parameter Type Description headers Array<Custom_SIP_Header> The list of custom SIP header names. Up to 5 headers are supported.
- Custom_SIP_Header
-
Parameter Type Description name String The header name, up to 64 characters. Letters, digits, and -,.,!,%,,_,+,~are allowed.id String The stable identifier of the header (UUID). The identifier remains unchanged when the header is renamed and is generated by the server when left empty on creation.
- User_Agent_Auth
-
Parameter Type Description enabled Boolean Whether SIP User Agent authentication is enabled. When enabled and
userAgentsis empty, all registrations are rejected.truefalse
userAgents Array<String> The list of User-Agent prefixes for matching. Up to 20 entries are supported, and each entry is up to 255 characters.
- IP_Restriction
-
Parameter Type Description enabled Boolean Whether IP restriction is enabled. When enabled and
entriesis empty, all access is rejected.truefalse
entries Array<IP_Restriction_Entry> The list of IP restriction entries. Up to 20 entries are supported.
- IP_Restriction_Entry
-
Parameter Type Description ip String The IPv4 address. mask String The subnet mask in dotted-decimal notation, such as 255.255.255.0.
- Allowed_Source_Addresses
-
Parameter Type Description entries Array<Allowed_Source_Address> The list of additional trusted source addresses. Up to 30 entries are supported.
- Allowed_Source_Address
-
Parameter Type Description address String The IP address or FQDN, up to 255 characters. port Integer The port. The value 0is valid for both IP addresses and FQDNs.
- Inbound_Caller_ID_Reformatting_Rules
-
Parameter Type Description rules Array<Inbound_Caller_ID_Reformatting_Rule> The list of inbound caller ID reformatting rules, in order. Up to 500 rules are supported.
- Inbound_Caller_ID_Reformatting_Rule
-
Parameter Type Description pattern String The matching pattern of the caller number, using wildcard characters X,Z,N,[],.,!, up to 31 characters.strip String The number of digits to strip from the caller number. An empty value or a value from 0 to 16. prepend String The prefix to prepend to the caller number, up to 31 characters.
- Codec_Config
-
Parameter Type Description codecs Array<String> The list of codecs, in priority order. Valid values: PCMU,PCMA,G729,G722,OPUS,VP8,H264.enableIntelligentCodecNegotiation Boolean Whether intelligent codec negotiation is enabled. When enabled, the system intelligently adjusts the codec priority during call establishment.
truefalse
- Concurrent_Call_Limits
-
Parameter Type Description inbound Integer The inbound concurrent call limit. The value -1indicates unlimited.outbound Integer The outbound concurrent call limit. The value -1indicates unlimited.total Integer The total concurrent call limit. The value -1indicates unlimited.
- Trunk_Address
-
Parameter Type Description domain String The domain name, such as edge1.us.novoone.com.ips Array<String> The list of IP addresses. port Integer The UDP/TCP port. portTls Integer The TLS port.
- Shaken_Config
-
Parameter Type Description stirShakenMode String The STIR/SHAKEN mode.
SHAKEN_MODE_DISABLEDSHAKEN_MODE_OUTBOUND_SIGNINGSHAKEN_MODE_INBOUND_VERIFICATIONSHAKEN_MODE_SIGNING_VERIFICATION
enbUpstreamVerificationResult Boolean Whether to process the upstream verification result.
truefalse
paiVerstat String The verification status parameter name in the PAI header, up to 31 characters, letters only. customAttestHeader String The trust level header field of SHAKEN, up to 31 characters, letters and -only.enbCallFiltering Boolean Whether to filter incoming calls based on the verification result.
truefalse
dropCallVerificationStatus String The verification result value for which calls are rejected.
Example
Request example
GET /uc-cconfig/api/v1/trunks/367177966216302592 HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJhcHBfa2V5Ijoic2xOdnQzaHc1NXB2Vm5HRlNhR2ZOVTNmMWxYQ3lpa08iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MzYxMjE2OSwiaWF0IjoxNzkzNTkwNTY5LCJqdGkiOiJhODQ5ZTIwZS1mMTNjLTQyNjEtYWQ1ZS05MjU5MTJmYTFiNDgiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.K9aZBSRYSw7sSaHgcl98sZYs1cLsZiBMFzX8TGnDieUhoSgHxj1I0b1Z1uvdS-klZlrJiD4eDBZ9YAT7Vz1fObZoQMutkWLCjOx0YsOXoMEknii3_ZMz_wCzCAAonhFL8wI9GOr_6HqA7Z3rXMw4TA1wlujndK7qKWFD-fIH5Woa9cvYrGE8p6Q66Gj_x3FwAddVj1Xoca-3xV7kPvbw47CPlNfInsNOMlVNksHz3gZPX-DKCZVRRCqbQ9WA0bs4OFD2j0J-5M8K8dw7E-BBN4PwJkEg6a_fyrc0gm11DlE2tJgZ8ag5mFRc8DN3PP62OGOSJBWYOkauhZkuZhQ8_w
Response example
HTTP/1.1 200 OK { "requestId": "429acf1b7b2c4b1895ef07f162765f2c", "code": "200", "message": "SUCCESS", "detailMessage": "", "result": { "id": "367177966216302592", "creator": "3076913644915998720", "name": "ccctest", "trunkType": "ACCOUNT", "enabled": true, "config": { "transport": "UDP", "hostname": "", "port": 0, "domain": "", "username": "Pq4NkU65m4", "password": "******", "authName": "1SHNmqFixD", "usernameAsAuth": false, "enableOutboundProxy": false, "outboundProxyHost": "", "outboundProxyPort": 0 }, "voipConfig": { "dtmfMode": "RFC2833", "dtmfFmtp": "RANGE_0_16", "enableQualify": true, "enableRtpKeepalive": false, "authErrorCodes": "401;407;403", "authRegisterAttempts": 3, "registerRetryInterval": 20, "outboundFailoverResponseCodes": "", "enableSrtp": false }, "sipInbound": { "getCallerIdFrom": "INBOUND_HEADER_SOURCE_FROM", "getDidFrom": "DID_SOURCE_INVITE" }, "sipOutbound": { "fromUserPart": "OUTBOUND_CALLER_ID_SOURCE_DEFAULT", "fromDisplayNamePart": "OUTBOUND_CALLER_ID_NAME_DEFAULT", "fromHostPart": null, "toHostPart": null, "diversion": "OUTBOUND_CALLER_ID_SOURCE_NONE", "remotePartyId": "OUTBOUND_CALLER_ID_SOURCE_NONE", "pAssertedIdentity": "OUTBOUND_CALLER_ID_SOURCE_NONE", "pAssertedIdentityUriFormat": "SIP_URI_FORMAT_SIP", "pPreferredIdentity": "OUTBOUND_CALLER_ID_SOURCE_NONE" }, "sipOther": { "maxptime": "" }, "outboundCallerId": { "callerIdNumberFormat": "CALLER_ID_NUMBER_FORMAT_E164_WITH_PLUS" }, "userAgentAuth": { "enabled": false, "userAgents": [] }, "ipRestriction": { "enabled": false, "entries": [] }, "inboundCallerIdReformattingRules": { "rules": [] }, "remark": "", "createdAt": "1791609248982", "updatedAt": "1792553294035", "provider": "general", "codecConfig": { "codecs": [ "PCMU", "PCMA", "G729" ], "enableIntelligentCodecNegotiation": true }, "concurrentCallLimits": { "inbound": -1, "outbound": -1, "total": -1 }, "bindingAddress": null, "registrationAddress": { "domain": "account.cn-0.test.novo-one.com", "ips": [], "port": 5092, "portTls": 5093 }, "shakenConfig": null } }