System guide

Setting up

The server, the Telnyx account, the office network and the phones, in the order to do them.

The server

SlowPBX runs on one Linux x86-64 server. A small one is plenty for an office of up to about a hundred phones, because the server never carries the sound of a call.

The server’s own firewall needs three ports open, all TCP:

PortFromFor
443 (TCP)AnywhereThe web pages, the apps, the desk phones fetching their settings, and Telnyx telling the server about calls.
80 (TCP)AnywhereRenewing the HTTPS certificate, and sending browsers on to HTTPS.
5061 (TCP)AnywhereThe desk phones’ lamps and message lights. If every desk phone stays at the office, you can open it to the office’s address alone; leave it open if people take a desk phone home.

That is all. The server never carries the sound of a call, so it needs no media (UDP) ports open, and Telnyx never connects to it for SIP: Telnyx reaches it only on 443.

Install

The software comes as one bundle that unpacks into the directory where it will live.

  1. Create a DNS record for your PBX, for example pbx.acmebicycles.com would point to the IP address of the host machine.
  2. Unpack the bundle on the server and run its setup.sh as root. It asks for the host name and for the first owner’s username, name and password, creates the database, and installs and starts the service.
  3. Run setup.sh --caddy to add the site to Caddy, which then gets the certificate.
  4. Open the pbx site you configured and sign in with the owner user and password you just made, and set up two-factor sign in, using an app like Google Authenticator, Authy or 1Password.

Copy slowpbx.env somewhere safe, away from the server. Setup writes it, and it holds the master key that every stored secret and voicemail file is locked with. Without it a backup can’t be read. See backups.

Upgrading is the same two steps: unpack the newer bundle over the directory and run setup.sh. Your configuration and data are never in the bundle, the database brings itself up to date, and the restart waits for calls in progress to end.

The Telnyx account

Telnyx is the phone company. The account is yours, in your business name, and you pay Telnyx directly for numbers and minutes.

  1. Create the account, verify the business so it leaves trial level, and turn on two-factor sign-in for the portal.
  2. Buy your numbers there, or start the port of your existing ones. Keep your old service until the port is confirmed.
  3. Register your office’s street address for 911 on the number you will use as the 911 callback number.

Leave Telnyx’s call features off: its voicemail, call recording, transcription and any feature that listens to calls. SlowPBX does these itself, so that what callers say is kept on your server and not at the phone company.

Limits at Telnyx

A phone system on the internet is a target for toll fraud: someone who gets in places expensive calls on your bill. SlowPBX has its own rules for every outside call, and Telnyx’s limits are a second layer of defense. Set them once, in the outbound voice profile:

Allowed destinationsThe United States, Canada and the US territories, and nothing else. SlowPBX refuses international calls too.
Daily spend limitA few times a normal day’s calling. When it is reached, calls stop until the next day. You'll also get a notification if this happens so you can look at the call log and see what is going on.
Calls at onceSomewhat more than the office ever has at once. Every phone that rings counts as a call while it rings.
BalancePrepaid, with automatic top-up capped or off, so the most you can lose is the balance.

What to create at Telnyx

SlowPBX uses five things in the account. The names are yours to choose.

WhatHow to set it
Outbound voice profileThe limits above. Attach it to the application and the two connections below.
Voice API applicationCalls to your numbers arrive on it. Webhook version 2, webhook address https://pbx.example.com/hooks/telnyx with your host name. Turn on caller ID verification (STIR/SHAKEN) for inbound calls.
Desk phone connectionA credential connection the desk phones register to: TLS with encrypted media (SRTP), call parking on, SIP address calling limited to your own account, webhooks to the same address.
Softphone connectionA second credential connection, set the same way, that the apps sign in to.
911 connectionSee the 911 line.

Call parking is what puts SlowPBX in charge: every call a phone places waits at Telnyx until your server says where it may go. You don’t create logins for the phones or apps; SlowPBX makes one for each as you add it.

You also need two keys from the portal: an API key, and the account’s webhook public key, which lets the server check that a message about a call really came from Telnyx.

The 911 line

911 must work when everything else is broken, so desk phones place it on a connection of its own that doesn’t wait for your server:

With this in place, each desk phone gets a 911 line key that works even when your server can’t be reached, and 911 dialed on the keypad is placed on the same line. Until the 911 connection is entered on the Settings page, a desk phone that dials 911 only plays a warning, so don’t put phones on desks before this is done and tested.

Test with 933, never with 911: dial 933 from a desk phone and a recording reads back the address 911 would see. Do it at setup, after any change of address, and a few times a year.

Every desk phone reports the office’s address to 911, wherever it is. A desk phone works from anywhere, so one may be taken home, and its 911 call would still send help to the office. Tell anyone who takes one home to call 911 from a mobile phone, and mark the phone: on its extension’s page, under Desk phones, press Away from the office. Its 911 key then reads “911 use cell”, and the alert owners and administrators get when 911 is dialed on it says the phone is away. Press Back at the office when it returns.

From the iPhone app, 911 is best dialed with the iPhone’s phone app, which knows where it is.

Connect SlowPBX to Telnyx

  1. Sign in as an owner and open Settings, then Telnyx (calls). Enter the API key, the webhook public key, the IDs of the application and the three connections, your caller ID number and your 911 callback number. Each field.
  2. Press Restart the server.
  3. Open Numbers. Your account’s numbers are listed under “Other numbers on the provider account”: add each one you want this system to answer, and send its calls here.
  4. Open Blocking: it says whether Telnyx is sending the caller ID check’s result.

The office network

Desk phones talk to Telnyx for calls and to your server for their settings and lamps. All of it is outbound from the office, encrypted, over the ordinary internet connection.

Firewall rules

For most offices there are none to add. The phones only make outbound connections, and an ordinary router lets those out and their replies back in. Don’t open or forward any port toward the phones.

If your office firewall limits outbound traffic, this is what the phones’ network must be allowed to reach:

ToPortFor
Your server443 and 5061, TCPSettings, firmware, lamps.
Telnyx’s SIP addresses5061, TCP (TLS)Registering and setting up calls.
Telnyx’s media networks16384 to 32768, UDPThe sound of calls.
A time server123, UDPThe phones’ clocks.

Telnyx publishes its current addresses at https://sip.telnyx.com/voice.json: the SIP addresses for each region and the media networks. SlowPBX doesn’t read that list or set any rule from it; rules like these are yours to keep. If you write them:

Desk phones

SlowPBX sets up Yealink T54W and T43U phones. For each phone:

  1. As an administrator, open the person’s extension and choose Add a desk phone. Enter the phone’s MAC address (on its label) and its model.
  2. The page shows a provisioning address, a user name and a password. The password is shown once.
  3. Plug the phone in at the office, open its web page, and enter those three on its Auto Provision page. The desk phone will show it's IP address on the status screen. The web server address for the desk phone is https://[IP ADDRESS]/ and the default factory username/password is usually admin/admin. SlowPBX will assign each phone a random secure password after initial setup.
  4. The phone fetches its settings, restarts, and comes up with the extension, its keys and its lamps. From now on it fetches changes by itself each night, when it starts, or when you press Push settings now.

Each person then chooses their own lamp keys, and links the app to their extension themselves. See the user guide.

Other services

Each is optional and uses an account of your own, entered on the Settings page.

SpeechElevenLabs speaks typed greetings and phone menu prompts in one office voice. Without it, greetings and prompts are recorded by phone.
EmailAn SMTP relay sends the “you have a new message” notices and lockout warnings. The notices never say who called. Get this information from your email provider. Tested and verified with Gmail. With Gmail, you need to configure your Gmail settings and add the IP address of the SlowPBX server, so it will accept email from SlowPBX. Other email services may have other configuration requirements.
TextsTwilio sends on-call texts to staff mobiles. Use a key limited to messaging.
Push relayWakes the iPhone app for a call. The key comes from whoever supplies your iPhone app. Nothing about a caller passes through it.

Before you switch

Set everything up on a test number first, and try each of these before your main number moves:

Then schedule the port with Telnyx, and keep the old service until the day it completes.

← System guideThe Settings page →