Skip to content
TriedDocs
Phone numbers

Get SIP trunk

Read one workspace SIP trunk and the numbers attached to it.

GEThttps://api.tried.com.au/get-sip-trunk/{id}

Returns one SIP trunk in your workspace with its attached numbers and LiveKit IDs.

Request#

Path parameter Type Required Description
id string Yes The trunk ID, for example sip_trunk_5c1e8a92d4f70b36a1e9c4d2.

This endpoint takes no query or body parameters.

Example request#

curl https://api.tried.com.au/get-sip-trunk/sip_trunk_5c1e8a92d4f70b36a1e9c4d2 \
  -H "Authorization: Bearer $TRIED_API_KEY"
const res = await fetch(
  "https://api.tried.com.au/get-sip-trunk/sip_trunk_5c1e8a92d4f70b36a1e9c4d2",
  { headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` } },
);
const trunk = await res.json();
import os, requests

res = requests.get(
    "https://api.tried.com.au/get-sip-trunk/sip_trunk_5c1e8a92d4f70b36a1e9c4d2",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)
trunk = res.json()

Response#

200 OK

See Create SIP trunk for the fields.

{
  "sip_trunk_id": "sip_trunk_5c1e8a92d4f70b36a1e9c4d2",
  "name": "Melbourne PBX",
  "termination_uri": "pbx.example.com:5061",
  "sip_trunk_auth_username": "tried",
  "transport": "TLS",
  "media_encryption": "allowed",
  "allowed_inbound_addresses": ["203.0.113.10/32"],
  "inbound_auth_username": null,
  "phone_numbers": ["+61390001234", "+61390005678"],
  "livekit_inbound_trunk_id": "ST_8fNc2kRw6HpA",
  "livekit_outbound_trunk_id": "ST_1dVs7qMe3LtG",
  "livekit_dispatch_rule_id": "SDR_5bXh9jTy4WnE",
  "last_modification_timestamp": 1792400400000
}

Errors#

Status When
401 Missing or invalid API key.
403 The key's IP allowlist or scopes reject the request. This route needs the numbers scope.
404 SIP trunk sip_trunk_... not found in this workspace.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.