Skip to main content
Routr uses a set of extension headers to pass routing data between its own services and to and from your endpoints. This page lists each one: who sets it, who reads it, its value format, and whether Connect strips it from untrusted sources. Header names are case-insensitive.

Summary

Untrusted sources

Before it forwards a routed request, Connect removes platform headers that a caller could have forged. Routr then adds its own values. The default strip list is:
Set UNTRUSTED_HEADERS_TO_STRIP on the Connect processor to a comma-separated list to replace it. Set it to an empty string to turn stripping off.

X-Edgeport-Ref

Marks a request that one EdgePort forwards to another. See EdgePort cooperation. A request with this header skips routing and access checks: Connect rebuilds its route from the message. Connect honors the header only when the request comes from a trusted peer EdgePort:
  • TRUSTED_EDGEPORT_ADDRESSES: comma-separated IPs or CIDRs of peer EdgePorts. Connect matches it against the top Via received value, or the Via host when received is absent. Empty (the default) trusts no peer EdgePort.
  • TRUSTED_EDGEPORTS: optional comma-separated list of accepted header values. Empty accepts any value from a trusted address.
From any other source, Connect logs a warning, removes the header, and routes the request normally.
In a deployment with more than one EdgePort, set TRUSTED_EDGEPORT_ADDRESSES on the Connect processor. Without it, requests forwarded between EdgePorts are routed again from scratch instead of taking the fast path.

X-Connect-Token

Carries a JWT that authorizes a client without SIP digest credentials, such as a browser-based ephemeral Agent. Connect verifies the token with the public key at CONNECT_VERIFIER_PUBLIC_KEY_PATH or with the verifier service at CONNECT_VERIFIER_ADDR. Set only one of them. A REGISTER needs REGISTER in allowedMethods, and an INVITE needs INVITE; otherwise Connect answers 403 Forbidden. Requests with a valid token skip the digest access check.

X-Call-Direction

Tells the next hop how Connect routed the call.

X-DOD-Number

Picks the Number a Peer calls the PSTN from (direct outward dialing). Connect looks up the Number with telUrl equal to tel:<value> and sends the call through its Trunk. A missing or empty header gets 400 Bad Request. An unknown number gets 404 Not Found.

X-DOD-Privacy

Requests caller ID privacy on a peer-to-pstn call.

X-Access-Key-Id

Binds a Number to a tenant, so only that tenant’s Peers can call from it. When the Number selected by X-DOD-Number has extended.accessKeyId, the request must carry the same value in this header. Otherwise Connect answers 403 Forbidden.

X-Gateway-Auth

Carries a Trunk’s outbound credentials from Routr’s services to EdgePort.

X-Session-Count

Reports how busy a Peer instance is, for the least-sessions algorithm. When the header is absent, the Location Service stores -1. See Load balancing.

Session affinity header

Keeps related calls on the same Peer instance. The header name is not fixed: you choose it per Number. Set the name in the Number’s sessionAffinityHeader, such as X-Room-Id. Affinity applies when the Number’s aorLink is a Peer with withSessionAffinity enabled. See Numbers and Peers.

Number extra headers

The headers in a Number’s extraHeaders list are added by Connect to from-pstn calls it routes to the Number’s aorLink. Names and values are your choice.

Platform headers

X-App-Ref, X-Call-Ref, X-Is-Api-Originated-Type, and X-Request-Uri are reserved for platforms built on Routr, such as Fonoster. Routr doesn’t read them. Connect strips them from untrusted sources so a caller can’t forge them. A client with a verified X-Connect-Token keeps its X-App-Ref.

Standard headers Routr adds

On agent-to-pstn and peer-to-pstn calls, Connect also sets these standard headers toward the provider.

Alterations API

Functions that add and remove these headers.

Secure the server

Lock down signaling and the API server.