Get an ITSP Template
Retrieves the configuration of an ITSP template. The response reuses the trunk data structure, so the client can write it into the Add a Trunk request one-to-one.
Request URL
POST {base_url}/uc-cconfig/api/v1/itsp-templates/get
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.x-tenant-code Yes String The tenant name. Note: You can obtain tenant name using the Query Tenants interface.
- Body parameters
-
Parameter Required Type Description id Yes String The ID of the ITSP template. You can obtain the ID using the Search ITSP Templates interface. The value must be greater than 0.
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_Data> | The ITSP template configuration, which uses the trunk data structure. |
- Trunk_Data
-
Parameter Type Description id String The ID of the trunk. The value is 0 for an ITSP template, because a template is a configuration blueprint rather than a persisted trunk. creator String The creator of the trunk. name String The name of the trunk. trunkType String The type of the trunk:
REGISTER: A register trunk.PEER: A peer trunk.ACCOUNT: An account trunk.
enabled Boolean Whether the trunk is enabled.
true: Enabled.false: Disabled.
config Object<Trunk_Config> The network configuration of the trunk. voipConfig Object<VoIP_Config> The VoIP configuration of the trunk. sipInbound Object<SIP_Inbound> The inbound SIP header source configuration. sipOutbound Object<SIP_Outbound> The outbound SIP header configuration. sipCustomHeaders Object<SIP_Custom_Headers> The custom SIP header names. sipOther Object<SIP_Other> The other SIP settings. outboundCallerId Object<Outbound_Caller_ID> The outbound caller ID configuration. allowedSourceAddresses Object<Allowed_Source_Addresses> The additional trusted source addresses. itspTemplateId String The ID of the ITSP template that the trunk was created from. itspTemplateName String The name of the ITSP operator. This value is queried from the associated template and is not persisted. itspTemplateCountry String The country of the ITSP operator. This value is queried from the associated template and is not persisted. remark String The remark of the trunk. createdAt String The time when the trunk was created, in Unix timestamp format (milliseconds). updatedAt String The time when the trunk was last updated, in Unix timestamp format (milliseconds). provider String The name of the line provider, such as Twilioandgeneral.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.
- Trunk_Config
-
Parameter Type Description transport String The transport protocol:
UDPTCPTLSDNS_NAPTR
hostname String The IP address or domain name of the SIP server. The maximum length is 255 characters. port Integer The SIP port, ranging from 0 to 65535. domain String The SIP domain. The maximum length is 255 characters. username String The username for authentication. The maximum length is 255 characters. password String The password for authentication. The value is masked as ******in the response.authName String The authentication name. The maximum length is 255 characters. usernameAsAuth Boolean Whether the authentication name uses the username value. This parameter is used only for account trunks. enableOutboundProxy Boolean Whether the outbound proxy is enabled. This parameter is used only for register trunks. outboundProxyHost String The outbound proxy host. The maximum length is 255 characters. outboundProxyPort Integer The outbound proxy port, ranging from 0 to 65535. secondaryServersList Object<Secondary_Servers_List> The list of secondary servers for failover.
- Secondary_Servers_List
-
Parameter Type Description entries Array<Secondary_Server> The list of secondary servers, supporting up to 10 entries.
- Secondary_Server
-
Parameter Type Description host String The IP address or domain name of the secondary server. The maximum length is 255 characters. port Integer The port of the secondary server, ranging from 0 to 65535. domain String The SIP domain of the secondary server. The maximum length is 255 characters.
- VoIP_Config
-
Parameter Type Description dtmfMode String The DTMF mode:
RFC2833INFOINBANDAUTO
dtmfFmtp String The DTMF FMTP parameter:
RANGE_0_16RANGE_0_15
This parameter is valid only when dtmfMode is
RFC2833.enableQualify Boolean Whether SIP OPTIONS qualify is enabled to detect whether the peer is reachable. enableRtpKeepalive Boolean Whether RTP keep-alive is enabled to establish a UDP connection through RTP CN packets. authErrorCodes String The SIP error codes that are treated as authentication failures, separated by semicolons. The default value is 401;407;403.authRegisterAttempts Integer The number of register attempts when an authentication error occurs, ranging from 1 to 99999. registerRetryInterval Integer The register retry interval in seconds, ranging from 5 to 99999. outboundFailoverResponseCodes String The SIP response codes that trigger outbound failover, separated by semicolons. enableSrtp Boolean Whether SRTP is enabled to encrypt RTP packets.
true: Enabled.false: Disabled.
- SIP_Inbound
-
Parameter Type Description getCallerIdFrom String The SIP header that the caller ID is extracted from:
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 that the DID is extracted from:
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
-
Parameter Type Description fromUserPart String The source of the From user part. Valid values include OUTBOUND_CALLER_ID_SOURCE_DEFAULT,OUTBOUND_CALLER_ID_SOURCE_OUTBOUND_ROUTE,OUTBOUND_CALLER_ID_SOURCE_USER_OUTBOUND,OUTBOUND_CALLER_ID_SOURCE_DEFAULT_OUTBOUND,OUTBOUND_CALLER_ID_SOURCE_TRUNK_USERNAME,OUTBOUND_CALLER_ID_SOURCE_USER_CALLER_ID, andOUTBOUND_CALLER_ID_SOURCE_ORIGINATOR.fromDisplayNamePart String The source of the From display name part. Valid values include OUTBOUND_CALLER_ID_NAME_DEFAULT,OUTBOUND_CALLER_ID_NAME_USER_OUTBOUND,OUTBOUND_CALLER_ID_NAME_DEFAULT_OUTBOUND,OUTBOUND_CALLER_ID_NAME_USER_CALLER_ID, andOUTBOUND_CALLER_ID_NAME_ORIGINATOR.fromHostPart Object<Host_Part> The custom From host, which is used only by peer trunks. toHostPart Object<Host_Part> The custom To host, which is used only by peer trunks. diversion String The source of the Diversion header. Valid values are the same as fromUserPart. remotePartyId String The source of the Remote-Party-ID header. Valid values are the same as fromUserPart. pAssertedIdentity String The source of the P-Asserted-Identity header. Valid values are the same as fromUserPart. pAssertedIdentityUriFormat String The URI format of the P-Asserted-Identity header:
SIP_URI_FORMAT_SIPSIP_URI_FORMAT_TEL
pPreferredIdentity String The source of the P-Preferred-Identity header. Valid values are the same as fromUserPart.
- Host_Part
-
Parameter Type Description source String The source of the host part:
HOST_PART_DEFAULTHOST_PART_CUSTOM
custom String The custom host value. This parameter takes effect only when source is HOST_PART_CUSTOM.
- SIP_Custom_Headers
-
Parameter Type Description headers Array<Custom_SIP_Header> The list of custom SIP headers, supporting up to 5 entries.
- Custom_SIP_Header
-
Parameter Type Description name String The name of the custom SIP header. The maximum length is 64 characters, and the allowed characters are letters, digits, and - . ! % * _ + ~.id String The stable identity of the custom SIP header in UUID format. The value remains unchanged across renames, and an empty string indicates that the ID is generated by the backend.
- SIP_Other
-
Parameter Type Description maxptime String The value of the SDP a=maxptimeattribute. An empty value indicates that the attribute is not included.
- Outbound_Caller_ID
-
Parameter Type Description callerIdNumberFormat String The number format of the outbound caller ID:
CALLER_ID_NUMBER_FORMAT_NATIONALCALLER_ID_NUMBER_FORMAT_E164_WITH_PLUSCALLER_ID_NUMBER_FORMAT_E164_WITHOUT_PLUS
- Allowed_Source_Addresses
-
Parameter Type Description entries Array<Allowed_Source_Address> The list of additional trusted source addresses, supporting up to 30 entries. This parameter is used only for register and peer trunks.
- Allowed_Source_Address
-
Parameter Type Description address String The IP address or FQDN. The maximum length is 255 characters. port Integer The port. The value 0 is valid for both an IP address and an FQDN.
- Codec_Config
-
Parameter Type Description codecs Array<String> The list of codecs, whose order indicates the priority. The supported values are PCMU,PCMA,G729,G722,OPUS,VP8, andH264.enableIntelligentCodecNegotiation Boolean Whether intelligent codec negotiation is enabled. When enabled, the system adjusts the codec priority during call setup to reduce transcoding.
true: Enabled.false: Disabled.
- Concurrent_Call_Limits
-
Parameter Type Description inbound Integer The concurrent inbound call limit. The value -1 indicates no limit, 0 indicates prohibited, and 1 to 999 indicates the upper limit. outbound Integer The concurrent outbound call limit. The value -1 indicates no limit, 0 indicates prohibited, and 1 to 999 indicates the upper limit. total Integer The total concurrent call limit. The value -1 indicates no limit, 0 indicates prohibited, and 1 to 999 indicates the upper limit.
- Trunk_Address
-
Parameter Type Description domain String The domain name of the address. ips Array<String> The list of IP addresses of the address. port Integer The UDP/TCP port of the address. portTls Integer The TLS port of the address.
- SHAKEN_Config
-
Parameter Type Description stirShakenMode String The STIR/SHAKEN working mode:
SHAKEN_MODE_DISABLEDSHAKEN_MODE_OUTBOUND_SIGNINGSHAKEN_MODE_INBOUND_VERIFICATIONSHAKEN_MODE_SIGNING_VERIFICATION
enbUpstreamVerificationResult Boolean Whether to process the upstream verification result.
true: Enabled.false: Disabled.
paiVerstat String The name of the verification status parameter in the PAI header. The maximum length is 31 characters, and only letters are allowed. customAttestHeader String The name of the SHAKEN attestation header. The maximum length is 31 characters, and only letters and hyphens are allowed. enbCallFiltering Boolean Whether to enable inbound call filtering.
true: Enabled.false: Disabled.
dropCallVerificationStatus String The verification result values that are rejected.
Example
Request example
POST /uc-cconfig/api/v1/itsp-templates/get HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIxMDAwQGNvbG9ydGVzdDIiLCJncmFudF90eXBlIjoicGFzc3dvcmQiLCJ1c2VyX25hbWUiOiIxMDAwQGNvbG9ydGVzdDIiLCJzY29wZSI6WyJyZWFkIiwid3JpdGUiXSwiY2xpZW50X2V4dCI6eyJkZXNjcmlwdGlvbiI6IueuoeeQhuWQjuWPsFdlYuW6lOeUqCIsInBsYXRmb3JtIjoid2ViIn0sImV4cCI6MTc5MzYyNDQzMiwiaWF0IjoxNzkzNjAyODMyLCJqdGkiOiJjZDVjN2Q4MC03OTFhLTQyNzUtYWU0OC1mMDk2MGJmODQ3MWEiLCJjbGllbnRfaWQiOiJub3ZvLWFkbWluLXdlYiIsInNpZCI6IjgyZDEwYjFmLTVmZjctNDA0Yy1hNTJjLWMxMGRhNmYwMjMwZSIsInVzZXJfZXh0Ijp7InJvbGVJZHMiOlsxMDJdLCJwdWlkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJ0ZW5hbnRJZCI6MjA3OTUwNDIwNTMwOTE5NDI0MSwicGFyZW50VWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5NiwidGVuYW50Q29kZSI6ImNvbG9ydGVzdDIiLCJ0eXBlIjoiVF9VU0VSIiwidXNlcklkIjoyMDc5NzQ2OTE1Mzg4MDc2MDMzLCJlbWFpbCI6Imxlb0BzYW1wbGUuY29tIiwidXNlcm5hbWUiOiIxMDAwQGNvbG9ydGVzdDIiLCJ1Y0lkIjozMDc2OTEzNjQ0ODkwODMyODk2fX0.mS238_tWj41VCildUy10XC_-XN9PdstqCI_ETD0Zbcmi5offX9kPcQmdEcCWesLgXRqv1X1tinKrWTRRXT6HWSvMTb0vA6bWwoCEQFbEsZqfRWoJjBBV5FHI6VX7_PuxvlYsnk__YDoUU37Z9aqvTzusS9O4cTEf7AKZuM39t3kSxCievsDDSM8FjSM3kmCreQ4AfP39tPgOcTJbsIRNLjSvO-W7anCcCiS4eupUT92E5vZzNfZPV_QlyJlbGM-S0RO-cVhC7G1Mq6W9TchNBjgFx4qbSlOxpnZXTTH23iOzD_uF3ju5KpFy7XrggwjIllfhLg4Rm7j5ElE-VKtrYg
x-tenant-code: jint
Content-Type: application/json
{
"id": "342579787488825344"
}
Response example
HTTP/1.1 200 OK { "requestId": "a1eac3b14a3593d157cc0e31c44a970d", "code": "200", "message": "SUCCESS", "detailMessage": "", "result": { "id": "0", "creator": "", "name": "", "trunkType": "PEER", "enabled": true, "config": { "transport": "TCP", "hostname": "sip.peer.example.com", "port": 5060, "domain": "peer.example.com", "username": "", "password": "", "authName": "", "usernameAsAuth": false, "enableOutboundProxy": false, "outboundProxyHost": "", "secondaryServersList": { "entries": [ { "host": "backup.peer.example.com", "port": 5061, "domain": "peer.example.com" } ] } }, "voipConfig": { "dtmfMode": "RFC2833", "dtmfFmtp": "RANGE_0_15", "enableQualify": true, "enableRtpKeepalive": true, "authErrorCodes": "", "authRegisterAttempts": 0, "registerRetryInterval": 0, "outboundFailoverResponseCodes": "", "enableSrtp": true }, "sipInbound": { "getCallerIdFrom": "INBOUND_HEADER_SOURCE_P_PREFERRED_IDENTITY", "getDidFrom": "DID_SOURCE_P_CALLED_PARTY_ID" }, "sipOutbound": { "fromUserPart": "OUTBOUND_CALLER_ID_SOURCE_DEFAULT", "fromDisplayNamePart": "OUTBOUND_CALLER_ID_NAME_ORIGINATOR", "fromHostPart": { "source": "HOST_PART_CUSTOM", "custom": "from.peer.example.com" }, "toHostPart": { "source": "HOST_PART_CUSTOM", "custom": "to.peer.example.com" }, "diversion": "OUTBOUND_CALLER_ID_SOURCE_DEFAULT", "remotePartyId": "OUTBOUND_CALLER_ID_SOURCE_OUTBOUND_ROUTE", "pAssertedIdentity": "OUTBOUND_CALLER_ID_SOURCE_DEFAULT", "pAssertedIdentityUriFormat": "SIP_URI_FORMAT_TEL", "pPreferredIdentity": "OUTBOUND_CALLER_ID_SOURCE_USER_OUTBOUND" }, "sipCustomHeaders": { "headers": [ { "name": "name", "id": "" } ] }, "sipOther": { "maxptime": "2345" }, "outboundCallerId": { "callerIdNumberFormat": "CALLER_ID_NUMBER_FORMAT_E164_WITHOUT_PLUS" }, "allowedSourceAddresses": { "entries": [ { "address": "203.0.113.11", "port": 5060 }, { "address": "peer-source.e2e.example.com", "port": 5061 } ] }, "itspTemplateId": "342579787488825344", "itspTemplateName": "E2E Full Peer3456", "itspTemplateCountry": "GB", "remark": "", "createdAt": "0", "updatedAt": "0", "provider": "", "codecConfig": { "codecs": [ "PCMU", "PCMA", "G729", "G722", "OPUS", "VP8", "H264" ], "enableIntelligentCodecNegotiation": true }, "concurrentCallLimits": null, "bindingAddress": null, "registrationAddress": null, "shakenConfig": { "paiVerstat": "Verstat", "customAttestHeader": "X-Attest" } } }
The response is condensed. For the full list of fields, refer to the tables above.