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.
- Where: a server you control, with a fixed public address and a host name (for example pbx.example.com). You don't have to pick a data center that is geographically close, but if you are on the east coast, probably an east coast data center will work slightly better than a west coast one.
- Software: a current Debian or Ubuntu with automatic security updates, systemd, and Caddy, which obtains the HTTPS certificate.
- Disks: mirror them and encrypt them. The server holds voicemail and the call log.
- Access: SSH by key only, and not from the open internet if you can avoid it. VPN access is usually better.
The server’s own firewall needs three ports open, all TCP:
| Port | From | For |
|---|---|---|
| 443 (TCP) | Anywhere | The web pages, the apps, the desk phones fetching their settings, and Telnyx telling the server about calls. |
| 80 (TCP) | Anywhere | Renewing the HTTPS certificate, and sending browsers on to HTTPS. |
| 5061 (TCP) | Anywhere | The 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.
- Create a DNS record for your PBX, for example pbx.acmebicycles.com would point to the IP address of the host machine.
- Unpack the bundle on the server and run its
setup.shas 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. - Run
setup.sh --caddyto add the site to Caddy, which then gets the certificate. - 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.
- Create the account, verify the business so it leaves trial level, and turn on two-factor sign-in for the portal.
- Buy your numbers there, or start the port of your existing ones. Keep your old service until the port is confirmed.
- 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 destinations | The United States, Canada and the US territories, and nothing else. SlowPBX refuses international calls too. |
|---|---|
| Daily spend limit | A 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 once | Somewhat more than the office ever has at once. Every phone that rings counts as a call while it rings. |
| Balance | Prepaid, 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.
| What | How to set it |
|---|---|
| Outbound voice profile | The limits above. Attach it to the application and the two connections below. |
| Voice API application | Calls 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 connection | A 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 connection | A second credential connection, set the same way, that the apps sign in to. |
| 911 connection | See 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:
- a credential connection with call parking off;
- its emergency caller ID set to your 911 callback number, the one your office address is registered on;
- its outbound voice profile that allows no destinations. Telnyx still connects 911 and 933 on it and refuses every other number, so it can’t be used to get round the calling rules.
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
- 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.
- Press Restart the server.
- 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.
- 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.
- Turn off “SIP ALG” (sometimes “SIP helper”) on your router if it has that feature. It rewrites phone traffic and is the commonest cause of one-way sound and phones that drop off.
- No port forwarding. Nothing needs to reach into the office: the phones keep their own connections open.
- Bandwidth is rarely the limit: a call uses about 100 kbps each way.
- Worth doing: a separate VLAN for the phones, voice traffic given priority if the router can, power over Ethernet, and the router and switch on a battery backup so phones survive a short power cut.
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:
| To | Port | For |
|---|---|---|
| Your server | 443 and 5061, TCP | Settings, firmware, lamps. |
| Telnyx’s SIP addresses | 5061, TCP (TLS) | Registering and setting up calls. |
| Telnyx’s media networks | 16384 to 32768, UDP | The sound of calls. |
| A time server | 123, UDP | The 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:
- Allow both SIP addresses for your region, the primary and the secondary.
- Allow every media network on the list, not only the ones near you. Telnyx moves calls between sites during maintenance, and a rule that names one region then gives one-way sound.
- The list changes, and a stale rule stops calls. Look at it again when calls misbehave after a quiet period.
- Keep them to the phones’ network. The apps reach Telnyx a different way, and these rules would block them.
Desk phones
SlowPBX sets up Yealink T54W and T43U phones. For each phone:
- 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.
- The page shows a provisioning address, a user name and a password. The password is shown once.
- 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.
- 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.
- Firmware: upload a firmware file for a model on the Devices page, try it on one phone, then give it to every phone of that model. A phone is never taken back to an older version.
- The phone’s web page gets a password assigned by SlowPBX; an administrator can see it on the extension’s page.
- A phone that leaves: Unlink it on the extension’s page. Its logins are removed. You probably should factory reset a phone after you decommission it.
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.
| Speech | ElevenLabs speaks typed greetings and phone menu prompts in one office voice. Without it, greetings and prompts are recorded by phone. |
|---|---|
| An 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. | |
| Texts | Twilio sends on-call texts to staff mobiles. Use a key limited to messaging. |
| Push relay | Wakes 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:
- a call in from outside, through the phone menu, to an extension and to a ring group;
- a call out, and a call between extensions;
- hold, transfer and park, from a desk phone and from the app;
- a voicemail message: left, the notice arriving, played, deleted;
- the after-hours menu, a closure, and an on-call message reaching the person on call;
- 933 from a desk phone, and the 911 line key with the server stopped;
- the iPhone app ringing while closed, and the Mac app;
- a backup made, collected and verified.
Then schedule the port with Telnyx, and keep the old service until the day it completes.