Skip to main content
A new install names every trunk and domain under fonoster.local, which works only on your own network. Use this page to put your SIP names under a domain you own, so carriers can send calls to your trunks and softphones can register from anywhere. Two rows. Carriers: a carrier sends a call to acme.pstn.example.com, the wildcard record *.pstn.example.com points it at your machine, and it reaches the Acme trunk on SIP port 5060. Phones: a softphone registers at acme.sip.example.com, the wildcard record *.sip.example.com points it at your machine, and it signs in to the Acme domain. Call audio uses UDP ports 10000 to 11999. Two rows. Carriers: a carrier sends a call to acme.pstn.example.com, the wildcard record *.pstn.example.com points it at your machine, and it reaches the Acme trunk on SIP port 5060. Phones: a softphone registers at acme.sip.example.com, the wildcard record *.sip.example.com points it at your machine, and it signs in to the Acme domain. Call audio uses UDP ports 10000 to 11999. Fonoster names SIP addresses after one setting, domain, the way Twilio does: The dashboard asks only for the label and adds the rest. The API rejects any other name.

Before you begin

You need:
  • Fonoster 0.31.1 or later, installed with Docker Compose. See Install with Docker Compose.
  • A domain whose DNS you can edit, such as example.com.
  • HOST_IP in .env set to the address carriers and phones reach this machine at. ./init.sh detects it; run ./init.sh again to print it.
Run the commands on this page from your fonoster folder.

Set your domain

1

Edit the domain

In config/fonoster.yaml, replace fonoster.local with your domain:
config/fonoster.yaml
When you upgrade, carry this edit over to the new release’s file (see Upgrade).
2

Apply it

Recreate the API server, which reads the domain when it starts:
New trunks in the dashboard now end in .pstn.example.com, and new domains in .sip.example.com.
Trunks and domains you created before keep their old names. Edit each one to the new form, for example acme.pstn.fonoster.local to acme.pstn.example.com. You don’t need to recreate them.

Point your names at this machine

Add two wildcard records in your DNS, so every new trunk and domain resolves without a new record: Check that a name under each one resolves:

Open the ports

Carriers and phones need these ports open in any firewall in front of this machine, such as your cloud provider’s: Port 5061 is off by default; SIP over TLS turns it on. Trunks reached over TLS negotiate SRTP with AES_CM_128_HMAC_SHA1_80, the one suite Routr offers. With ufw on the machine itself:
To link Twilio numbers, the API server also needs outbound HTTPS to api.twilio.com and trunking.twilio.com. The SIP address Twilio allows comes from your install’s public signaling addresses (regions.public[].endpoints.signalingAddresses), so list this machine’s public IPv4 address there. To link WhatsApp numbers, the install must accept SIP over TLS on 5061 with a certificate covering *.pstn.<domain> (one hostname per linked WhatsApp number, all one label under pstn.; see SIP over TLS), and Routr needs outbound TLS to wa.meta.vc:5061. The TLS endpoint must be listed in regions.public[].endpoints.sip with transport: tls and a DNS name as host: that entry, the tls transport in config/routr-edgeport.yaml and the port in compose.tls.yaml are declared together, and the API server checks only the first.
On Linux, turn off Docker’s userland proxy, or the 2,000 published audio ports exhaust the machine’s memory. See Before you begin in the install guide.

More options

If your carriers and phones reach you by IP address, or you can’t add wildcard records, accept any name instead. In config/fonoster.yaml, under features, change sip: { names: domain } to this line, then recreate the API server (docker compose up -d --force-recreate apiserver):
config/fonoster.yaml
The dashboard then asks for the full name instead of a label.
To accept SIP over TLS on port 5061, see SIP over TLS.