Skip to main content
A Trunk is a connection to a SIP provider. It defines how the provider reaches Routr (inbound) and how Routr reaches the provider (outbound).

Fields

The API response also includes accessControlList, inboundCredentials, and outboundCredentials, the objects the refs point to.

Constraints

  • name is required and must be 1 to 60 characters.
  • inboundUri is required, must be an FQDN or IP address, and must be unique across Trunks in pgdata.
  • Each outbound URI needs a valid host. port, when set, must be a valid port.
  • Connect sends outbound calls to the first entry in uris. A Trunk with no uris can’t carry outbound calls.
  • For a call from the PSTN to be accepted, the Request-URI host must match a Trunk’s inboundUri, and the dialed Number must belong to that Trunk.
  • Connect checks only the ACL allow list, against the top Via received address (or the Via host when received is absent).
  • On outbound calls, Connect passes the outbound credentials to EdgePort in the X-Gateway-Auth header, so EdgePort can answer the provider’s authentication challenge. EdgePort removes the header before it sends the request.

YAML example

The following Trunk accepts calls at trunk01.acme.com and sends calls to sip.provider.net.

rctl equivalent

Run the interactive create command and answer the prompts. rctl offers UDP, TCP, and TLS as transports.
See rctl trunks for the prompts and the other actions.

SDK equivalent

The following call creates the same Trunk through the API.