Sign inGet Started

bird voice trunks gateways create

Usage

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

Description

Create a gateway on a SIP trunk

Add an address for inbound call delivery. Enable inbound calling on the trunk first; a trunk supports up to 20 gateways.

Build the request from flags, a JSON VoiceTrunkGatewayCreate 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 create --example

# the body it prints:
Code example
{
  "destination_format": "1234#{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. (required; or in --body-file)
--priority <n>The order gateways are tried in, lowest first. Give two gateways the same priority to share calls between them evenly. (required; or in --body-file)
--origination-formatHow this gateway wants the calling number spelled. Write 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. Omit it for 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. Omit it for 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 deleteDelete a SIP trunk gateway
bird voice trunks gateways getGet a SIP trunk gateway
bird voice trunks gateways listList a SIP trunk's gateways
bird voice trunks gateways updateUpdate a SIP trunk gateway

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