Sign inGet Started

bird voice trunks gateways update

Usage

Code example
bird voice trunks gateways update <trunk-id> <gateway-id> [flags]

Description

Update a SIP trunk gateway

Change an inbound gateway address, priority, or number formats. Omitted fields stay unchanged; an empty format restores E.164. Requires inbound calling enabled.

Build the request from flags, a JSON VoiceTrunkGatewayUpdate body via --body-file ("-" reads stdin), or both — a flag overrides the matching body field. Run --example to print a ready-to-edit body, or --dry-run to print the resolved request without sending it.

Examples

Code example
# print the body shape (no credentials needed)
bird voice trunks gateways update --example

# the body it prints:
Code example
{
  "destination_format": "1234#{number}",
  "origination_format": "+{number}",
  "priority": 0,
  "sip_uri": "sip:pbx.example.com:5060"
}

Options

Request

NameDescription
--body-fileRead the JSON request body from this file; "-" reads stdin
--examplePrint a complete example request body, then exit
--dry-runPrint the resolved request without sending it, then exit
--idempotency-keyDeduplication key; a retry with the same key won't act twice

Options

NameDescription
--sip-uriSIP URI an inbound call to this trunk should be forwarded to. Give the host only, with an optional port: which number is dialed there comes from destination_format, so a URI carrying a user part is rejected.
--priority <n>The order gateways are tried in, lowest first. Give two gateways the same priority to share calls between them evenly.
--origination-formatHow this gateway wants the calling number spelled, as a template whose {number} stands for the number without its leading +. The result is stated in the P-Asserted-Identity header of the delivered call. Send an empty string to go back to E.164, which is +{number}. The template may add digits, letters and the characters -_.!~*'()&=+$,;?/%# around {number}, which may appear at most once, and anything else in braces is rejected so a misspelled placeholder cannot reach a call. A format with no {number} at all states the same identity on every call, which is what a peer that only accepts one authorized number wants. The call then carries nothing about who really called.
--destination-formatHow this gateway formats the dialed number. In the template, {number} represents the number without its leading +. The result is placed before the sip_uri host. For example, 1234#{number} formats +31201234567 as sip:1234#31201234567@pbx.example.com:5060. Send an empty string to go back to E.164, which is +{number}. A format with no {number} at all sends every number this trunk answers to one fixed number, so 777000447973 reaches sip:777000447973@pbx.example.com:5060 whatever was dialed. The same rules as origination_format apply to what the template may contain.
--response-schemaPrint the fields this command returns, then exit
NameDescription
bird voice trunks gateways createCreate a gateway on a SIP trunk
bird voice trunks gateways deleteDelete a SIP trunk gateway
bird voice trunks gateways getGet a SIP trunk gateway
bird voice trunks gateways listList a SIP trunk's gateways

Continue with the documentation, guides and examples for this topic.