Docs Start here

Overview

RelayDock connects your phone carrier or PBX to your voice agents on LiveKit or ElevenLabs. It holds the SIP registration or receives the carrier's trunk, sets up the trunks and the dispatch rule in LiveKit for you, and shows you what happened on every call.

What RelayDock does

  • Connects your carrier. RelayDock registers with your carrier account or PBX extension, or receives calls that your carrier sends to a fixed address.
  • Sets up LiveKit. For every endpoint, RelayDock creates the trunks and the dispatch rule in your LiveKit project and keeps them in sync.
  • Or sends calls to ElevenLabs. An endpoint can send its calls to an ElevenLabs agent instead: you import the number in ElevenLabs, and RelayDock carries the calls without touching LiveKit. See ElevenLabs.
  • Carries the call. Signaling goes through RelayDock's edge; audio goes directly between your carrier and your agent platform, or through RelayDock when it has to. See Audio modes.
  • Shows what happened. Test calls, inbound checks, a timeline for every call, registration diagnosis and email alerts tell you where a call stopped and why.

Your agent code doesn't change: it runs in LiveKit or ElevenLabs and receives calls like any other SIP call. You build agents there; RelayDock handles the phone side.

How an inbound call flows

  1. Someone calls your number. Your carrier sends the call to RelayDock: to the registration RelayDock holds, or, for a trunk, to your team's SIP address.
  2. RelayDock finds the endpoint and checks the call: for a trunk, the carrier's IP address or digest user name; for every call, that your team is active and within its plan's concurrent call limit.
  3. RelayDock forwards the call to your LiveKit project's SIP address over TLS, with SIP credentials it created for this endpoint. It adds the number the caller dialed as the participant attribute relaydock.called.
  4. The endpoint's dispatch rule creates a room and dispatches the agent named on the endpoint. Your agent answers.

How an outbound call flows

  1. Your agent creates a SIP participant on the endpoint's outbound trunk in LiveKit, named rd-<SIP ID>-out.
  2. LiveKit sends the call to your team's SIP address and authenticates with the endpoint's credentials.
  3. RelayDock checks that the caller number is one of the endpoint's outbound caller numbers, then applies the fraud safeguards: no emergency numbers, blocked premium prefixes and a daily outbound limit.
  4. RelayDock sends the call to your carrier: through the registration, with your account's credentials, or to the trunk's carrier SIP address.

Code and rules for this direction are in Calling out from your agent.

Key concepts

Team
Your RelayDock account. Owners manage the team, API keys, billing and the LiveKit connection; members manage endpoints and see everything else. API keys act with member rights.
LiveKit project
The LiveKit project your agents run in. You connect one per team with its SIP address and an API key; RelayDock uses the key to create and repair its objects and to place test calls.
Endpoint
One connection to a carrier or PBX, answered by one agent. Each endpoint has a SIP ID such as ep-7k2m9x4q1z that names its objects in LiveKit.
Registration
An endpoint type: RelayDock registers with a SIP user name and password, like a desk phone would. Use it for a carrier number or a PBX extension.
Trunk
An endpoint type: your carrier sends calls to your SIP address from fixed IP addresses, optionally with digest authentication, for the numbers you list. Outbound calls go to the carrier's SIP address.
Static IP and SIP address
The address carriers send calls to and see calls from. The SIP address has the form <team>.sip.relaydock.io; the static IP is shared by all teams except on Enterprise, where it is dedicated. Both are in the strip at the top of the panel's Overview.
Platform
Where an endpoint's calls go: LiveKit, the default, or ElevenLabs. You choose it when you create the endpoint; it can't be changed later.
Agent
The agent_name of the LiveKit agent that answers the endpoint's calls. Empty means a room opens without an agent. On an ElevenLabs endpoint, you assign the agent to the number in ElevenLabs.
Outbound caller numbers
The numbers your agents may call out with on an endpoint. Calls with any other caller number are rejected.
Audio mode
Where the audio flows: Automatic, Always Relay or Direct only. Relayed and direct minutes have different prices.

What RelayDock creates in LiveKit

For each endpoint, RelayDock creates these objects in your LiveKit project. Don't edit them in LiveKit: RelayDock checks them regularly and puts back what it expects. Change the endpoint in RelayDock instead.

Object Name What it does
Inbound trunk rd-<SIP ID>-inAccepts calls from RelayDock for this endpoint, with credentials RelayDock generated.
Dispatch rule rd-<SIP ID>-rule Puts each call in its own room, named with the prefix rd-<SIP ID>-, and dispatches the endpoint's agent.
Outbound trunk rd-<SIP ID>-out Sends your agent's calls to RelayDock with the endpoint's outbound caller numbers. Only created when the endpoint has at least one.

The panel's LiveKit project page lists these objects with their state, and Resync sets them up again.

Where to go next