Sign inGet Started

List a SIP trunk's gateways

GET
/v1/voice/trunks/{trunk_id}/gateways
const gateways = await bird.voice.trunks.gateways.list("TRUNK_ID");
for (const gateway of gateways.data) {
  console.log(gateway.id, gateway.priority);
}
Odpowiedź200
{
  "data": [
    {
      "id": "vtg_01krdgeqcxet5s7t44vh8rt9mg",
      "trunk_id": "spt_01krdgeqcxet5s7t44vh8rt9mg",
      "sip_uri": "sip:pbx.example.com:5060",
      "priority": 0,
      "origination_format": "+{number}",
      "destination_format": "+{number}",
      "created_at": "2026-05-20T09:14:52Z",
      "updated_at": "2026-05-25T16:42:01Z"
    }
  ]
}

Returns the gateway addresses used to forward inbound calls to this trunk, ordered by priority. A trunk with no gateway refuses inbound calls. Returns a 404 Not Found error if the trunk does not exist in the workspace.

Returns the complete collection without pagination, including any pre-existing gateways above the current limit of 20. Reads are available when inbound calling is disabled.

Parametry

trunk_idstring

ID of the SIP trunk whose gateways to list or create.

Treść odpowiedzi

data
array of object
wymagane

The trunk's gateways, in priority order.

Pokaż atrybuty podrzędne

Przejdź do dokumentacji, przewodników i przykładów dotyczących tego tematu.