rctl command-line tool, register two softphones, and call from one to the other.
What you’ll build
A single Routr server on your machine with:- A Domain named
sip.local. - Two Agents,
1001(John) and1002(Jane), each with its own Credentials. - Two softphones registered to Routr that can call each other.
Prerequisites
- Docker with Docker Compose.
- Node.js 22 or later and npm, to install
rctl. - Two SIP softphones, for example Zoiper or Telephone. You can run them on the same computer or on two devices on the same network.
- The IP address of the machine that runs Docker, as seen by your softphones (for example
192.168.1.3).
Steps
1
Write the configuration
Create a directory named Here’s what each part does:
routr. In it, add a file named routr.yaml with the following content. It is the one file Routr reads: the SIP transports, and the database where the Data API keeps your resources.routr.yaml
externalAddrsis the address the EdgePort advertises in SIP messages.${DOCKER_HOST_ADDRESS}reads it from the container’s environment. Use an address your softphones can reach.transportopens SIP on port5060over UDP and TCP.datastores resources in PostgreSQL.urland the API key come from the container’s environment, so the file holds no secret.apiKeysis required: the Data API returns credentials and takes writes, so it refuses to listen beyond loopback without authentication.rctlsends the key with every request.
2
Start Routr
In the same directory, add a file named Port Then follow the logs until Routr is up:Look for a line with
compose.yaml. It runs a PostgreSQL database, the migrations image, which creates the tables (Routr 2’s schema plus Routr 3’s numbering migrations), and fonoster/routr-one, which runs the EdgePort, Message Dispatcher, Connect processor, Location Service and Data API in one process.compose.yaml
51907 is the Data API, which rctl talks to. Port 5060 is SIP signaling. The db volume keeps the database between restarts.Pick an API key and export it, so both the container and rctl get it. Then start the stack, replacing 192.168.1.3 with your own IP address.msg="starting routr". Press Ctrl+C to stop following the logs; the server keeps running. If Routr stopped instead, its last line names the key of routr.yaml it couldn’t use.Routr is running and listening for SIP on port
5060 and for API calls on port 51907.3
Install rctl
Install the Routr command-line tool globally with npm:Check that it’s installed:Every command in this tutorial passes
--insecure, because this Data API has no TLS. rctl connects to localhost:51907, the Data API’s port, by default, and reads the API key from ROUTR_API_KEY, which you exported in the same shell. To add TLS, see Secure the server.4
Create a Domain
A Domain groups Agents that can call each other. Create one with the SIP URI Answer the prompts as shown. Leave the access control list set to
sip.local:None.5
Create Credentials for both Agents
Credentials hold the username and password a softphone uses to register. Create the first set:Use Run the command again to create
1001 as the username and 1234 as the password:Jane Doe Credentials with username 1002 and password 1234.6
Create two Agents
An Agent is a SIP endpoint, such as a softphone, that belongs to a Domain. Create John:Select the Run the command again to create Jane Doe with username The output looks similar to this:An empty
sip.local Domain and John’s Credentials. Leave Max Contacts empty for no limit, and keep the other defaults.1002 and Jane Doe Credentials.List the Agents to confirm both exist:Max Contacts means no limit. Add -x to also show each Agent’s reference.You have a Domain and two Agents that can register and call each other.
7
Register the softphones
Add an account for 
And the proxy settings point at the Docker host:
1001 in the first softphone and for 1002 in the second. Use these settings:sip.local doesn’t resolve in DNS, so the softphone must send its requests to Routr through the proxy setting. In Telephone, the account looks like this:

Both softphones show the account as registered (or online).
8
Make a call
From John’s softphone (
1001), dial 1002. Jane’s softphone rings. Answer it and talk.To watch the SIP messages as the call happens, run sngrep on the Docker host. The Routr 3 image doesn’t include it.You made an agent-to-agent call through Routr.
Clean up
Stop and remove the containers when you’re done. Add-v to also delete the database volume.
Troubleshooting
- The softphone doesn’t register. Check that
DOCKER_HOST_ADDRESSis an address the softphone can reach, and that the softphone’s proxy setting points at it on port5060. - Registration works, but calls drop or don’t ring after a while on UDP. NAT devices close idle UDP mappings quickly. Lower the softphone’s re-register interval, or use TCP. See EdgePort cooperation for why connection-oriented transports are recommended.
rctlcan’t connect. Make sure port51907is published and that you pass--insecure.rctlreportsauthentication required.ROUTR_API_KEYin your shell isn’t the key the container started with. Export the same value and recreate the container withdocker compose up -d.- The
routrcontainer exits at startup. Rundocker compose logs routr. The last line names the file and the key at fault, such asspec.data.url: secret://env/DATABASE_URL: environment variable DATABASE_URL is not set.
Next steps
Set up a home or office
Add a Trunk and a Number so your Agents can call the PSTN.
Manage resources with rctl
Learn the commands for every Connect resource.
Architecture
See what happens inside Routr when a call arrives.
Deploy with Docker
Run Routr with Docker for a longer-lived setup.