List origination trunks
const url = 'https://api.siprtc.io/v1/Accounts/example/Trunks/Origination';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/Origination \ --header 'Authorization: Basic <credentials>'Lists your origination (inbound) trunks: carriers and PBXs allowed to send calls in to your numbers, either from whitelisted addresses or by authenticating with a username and password. Trunks are listed oldest first and the list is not paged. The answer also gives auth_domain, the SIP domain authenticating trunks send their calls to. Each trunk carries whether a device is registered with its login and whether its single whitelisted addresses answer SIP OPTIONS (ranges are not pinged). Passwords are never returned.
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 SIP domain (realm) that origination trunk usernames and passwords belong to; carriers and PBXs that authenticate send their calls to it.
The account’s origination trunks, oldest first.
object
SIP domain (realm) the username belongs to. Present only when username is set.
Addresses calls are accepted from, as CIDRs (a single IP is shown as /32 or /128).
When the trunk was created, RFC 3339.
Whether a password is saved. The password itself is never returned.
Trunk ID, unique across the platform.
Display name.
Whether the whitelisted single addresses 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).
Whether the carrier or PBX holds a registration with this login.
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).
Active: calls are accepted; inactive: the addresses and login are removed from the SIP proxy.
When the trunk was last changed, RFC 3339.
Username the carrier or PBX authenticates with (lower case). Empty for an IP-only trunk.
Example
{ "auth_domain": "trunk.siprtc.io", "trunks": [ { "auth_domain": "trunk.siprtc.io", "cidrs": [ "198.51.100.20/32", "198.51.100.64/27" ], "created": "2026-11-20T09:30:00Z", "has_password": true, "id": 7, "name": "Office PBX", "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" }, "status": "active", "updated": "2026-11-21T14:05:00Z", "username": "officepbx01" } ]}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"}