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
| Name | Description |
|---|---|
--body-file | Read the JSON request body from this file; "-" reads stdin |
--example | Print a complete example request body, then exit |
--dry-run | Print the resolved request without sending it, then exit |
--idempotency-key | Deduplication key; a retry with the same key won't act twice |
Options
| Name | Description |
|---|---|
--sip-uri | SIP 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-format | How 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-format | How 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-schema | Print the fields this command returns, then exit |
Related
| Name | Description |
|---|---|
bird voice trunks gateways delete | Delete a SIP trunk gateway |
bird voice trunks gateways get | Get a SIP trunk gateway |
bird voice trunks gateways list | List a SIP trunk's gateways |
bird voice trunks gateways update | Update a SIP trunk gateway |
Related resources
Continue with the documentation, guides and examples for this topic.