Skip to main content
A Number is a phone number on a Trunk. It tells Routr where to send calls that arrive for it, and it is the caller ID for outbound calls that use it.

Fields

The API response also includes trunk, the object that trunkRef points to.

Constraints

  • name is required and must be 1 to 60 characters.
  • telUrl must start with tel:. In pgdata it must be unique and up to 60 characters.
  • When the API server runs with ENFORCE_E164=true, telUrl must be a valid E.164 number for countryIsoCode. ENFORCE_E164_WITH_MOBILE_PREFIX=true also validates the mobile prefix.
  • aorLink must start with sip: or backend:.
  • sessionAffinityHeader and each extraHeaders[].name may contain only letters, digits, and dashes, and can’t end with a dash. Each extraHeaders[].value must be non-empty.
  • In YAML, metadata.geoInfo must be present. The loader reads it for every Number.
  • When extended.accessKeyId is set, a Peer can use this Number for peer-to-pstn calls only if its request carries the same value in X-Access-Key-Id.

How Connect uses a Number

  • from-pstn: a call from the Trunk to telUrl goes to the endpoints registered under aorLink, with extraHeaders added.
  • agent-to-pstn: a Domain egress policy selects the Number. Its Trunk carries the call, and its telUrl becomes the caller ID in P-Asserted-Identity and Remote-Party-ID.
  • peer-to-pstn: the Peer names the Number in the X-DOD-Number header, as the telUrl without tel:.

YAML example

The following Number routes calls to a Peer and keeps calls with the same X-Room-Id on one instance.

rctl equivalent

Run the interactive create command and answer the prompts. Enter extra headers as comma-separated Name:value pairs.
See rctl numbers for the prompts and the other actions.

SDK equivalent

The following call creates the same Number through the API.