Skip to main content
Connect mode is Routr running with its built-in Connect processor. Connect implements the PBX portion of the SIP Connect 1.1 specification, so you can register phones, call between them, reach the PSTN through a carrier, and send calls to media servers by creating resources instead of writing code. It’s the most common way to run Routr, and both the routr-one image and the routr-connect Helm chart use it.
Routr isn’t certified under SIP Connect 1.1. The Connect processor follows the PBX portion of the specification and adds features outside it, such as WebRTC support when combined with RTPEngine.

Resources

Connect describes your network with seven kinds of resources. You manage them with rctl, the SDK, or, with the simpledata API Server, YAML files. How Connect resources relate: Agents belong to a Domain and use Credentials; a Domain can reference an ACL and egress policies that point to Numbers; Numbers belong to a Trunk and can link to an Agent or Peer through aorLink; Peers use Credentials; Trunks use Credentials and an ACL How Connect resources relate: Agents belong to a Domain and use Credentials; a Domain can reference an ACL and egress policies that point to Numbers; Numbers belong to a Trunk and can link to an Agent or Peer through aorLink; Peers use Credentials; Trunks use Credentials and an ACL Read Resources overview for every field.

How Connect processes a request

Connect handles each request according to its method:
  • REGISTER: Connect finds the Agent or Peer by the user and host in the From header, checks the digest credentials, and stores the route in the Location Service. Agents register under their own address; Peers register under their aor.
  • INVITE and other new requests: Connect identifies the caller and the callee, picks one of five routing types, runs the access checks for that type, finds the route, and returns the request with the alterations needed to reach the target.
  • ACK and BYE: Connect forwards them along the path already recorded for the dialog.
  • MESSAGE, SUBSCRIBE, NOTIFY, and PUBLISH: Connect answers 405 Method Not Allowed. To handle them, put another Processor in front of Connect in the Dispatcher.
Agents that can’t hold a password, such as browser clients, can authenticate with a signed JWT in the X-Connect-Token header instead. The token carries claims similar to an Agent’s fields: its aor, domain, allowedMethods, and an aorLink to the Peer it may call. See Ephemeral agents in the browser.

When to use Connect and when to write a Processor

Use Connect when your network fits the PBX model:
  • Phones that register and call each other inside a Domain.
  • Calls to and from the PSTN through carrier Trunks and Numbers.
  • A group of Asterisk or FreeSWITCH servers behind Routr, with load balancing and session affinity.
  • WebRTC clients, together with RTPRelay and RTPEngine.
Write your own Processor when your routing doesn’t fit those resources, for example routing by a database lookup, a time of day, or an external API, or handling methods Connect rejects such as MESSAGE. You don’t have to choose one or the other: the Dispatcher can send some requests to your Processor with a matchFunc and the rest to Connect. See Build a processor.

Routing

Learn how Connect picks one of five routing types.

Load balancing

Spread calls across a group of Peers.

Resources overview

See every field of every resource.

Connect processor reference

Configure the Connect service.