List termination trunks
const url = 'https://api.siprtc.io/v1/Accounts/example/Trunks/Termination';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.siprtc.io/v1/Accounts/example/Trunks/Termination \ --header 'Authorization: Basic <credentials>'Lists your termination (outbound) trunks: your own carriers that outbound calls to the destinations they support are sent through, ahead of the platform’s routes. Trunks are ordered by priority, highest first, and the list is not paged. Each trunk carries its live registration state with the carrier (for trunks with a username and password; otherwise not_required) and whether the carrier’s hosts answer SIP OPTIONS. Passwords are never returned, only has_password.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Your account Auth ID (20 characters). The request always acts on the authenticated account.
Responses
Section titled “ Responses ”OK
object
The account’s termination trunks, highest priority first.
object
Comma-separated codec names offered to the carrier, in order of preference. Empty means the platform default.
When the trunk was created, RFC 3339.
ISO 3166-1 alpha-2 country codes this trunk never carries, even when supported_cc is ALL.
Leading characters stripped from the caller ID (after its +) on calls sent to this trunk; “+” sends the bare number.
Whether a password is saved. The password itself is never returned.
Trunk ID, unique across the platform.
Display name.
Carrier SIP host calls are sent to: IP address or hostname, optionally with :port.
0 to 100. When several of the account’s trunks carry a destination, the highest priority is tried first.
Whether the carrier’s hosts answer SIP OPTIONS.
object
Explanation, when there is one.
Each pinged host.
object
The pinged host, as saved on the trunk.
Round-trip time of the last OPTIONS answer, in milliseconds.
Reachable, unreachable or checking (added, no answer or time-out yet).
Overall state: reachable, unreachable, checking, not_checked (nothing to ping: an address range, a login-only or an inactive trunk) or unknown (the status could not be read).
Live state of the trunk’s registration with its carrier.
object
Origination trunks: number of registered contacts for the login.
Explanation, when there is one.
Termination trunks: seconds until the registration with the carrier expires.
Registered, registering, unregistered, disabled, not_required (the trunk authenticates by IP address, nothing registers) or unknown (the SIP proxy could not be asked; the trunk itself is fine).
Leading digits stripped from the dialled number before trunk_prefix is added.
Fallback carrier SIP host, used when the primary does not answer. Empty when not set.
ISO 3166-1 alpha-2 country codes of destinations this trunk carries, or [“ALL”].
Digits prepended to the dialled number before it is sent to the carrier (digits, +, *, #).
When the trunk was last changed, RFC 3339.
Digest username for the carrier. Empty for a trunk the carrier authenticates by IP address.
Example
{ "trunks": [ { "codecs": "PCMU,PCMA", "created": "2026-11-20T09:30:00Z", "except_cc": [ "CU" ], "from_remove_prefix": "+", "has_password": true, "id": 42, "name": "Acme Carrier EU", "primary_ip": "203.0.113.10:5060", "priority": 10, "reachability": { "detail": "address ranges cannot be pinged", "hosts": [ { "host": "203.0.113.10:5060", "latency_ms": 23.4, "state": "reachable" } ], "state": "reachable" }, "registration": { "contacts": 1, "detail": "the carrier has not accepted the registration; check the username and password. It is retried every few minutes", "expires_in": 3540, "state": "registered" }, "remove_prefix": "00", "secondary_ip": "203.0.113.11", "supported_cc": [ "GB", "IE" ], "trunk_prefix": "9", "updated": "2026-11-21T14:05:00Z", "username": "acme-trunk-01" } ]}The account ID is too short to be valid
object
What went wrong, in plain words.
Always “failed”.
Example
{ "message": "trunk not found", "status": "failed"}Missing or wrong Auth ID / Auth Secret (answered by the API gateway)
Example generated
exampleThe trunks could not be read
object
What went wrong, in plain words.
Always “failed”.
Example
{ "message": "trunk not found", "status": "failed"}