Adding an elevator phone
Well, I have a residential elevator, and it's important to be able to call for help if you ever get stuck in it, it's also a part of the fire codes. For the curious, the requirements are codified in ASME A17.1-2019/CSA B44-19
section 2.27 Car Emergency Signaling Devices
. That's why my elevator has a good old hardwired phone headset inside its cabin.
Unfortunately, I don't have a hardwired phone line anymore, and I don't want to get one either. It's a pretty steam-punky, that just a pair of wires can connect you to the central phone office, and provide you with a trickle of power even in the event of a complete outage. But in reality, hardwired phone lines are pretty susceptible to damage. They are also an annoyance to maintain, and they are pretty expensive.
So for a long while, I've just been using a trusty Yeastar S20 PBX with an S2 FXS module. This module provides the “station” part of the phone interface, allowing the handset inside the elevator to place calls. The call was then routed through a VoIP provider (1-Voip in my case).
To safeguard against electricity outages, my Internet router is powered through a large UPS, good enough for 3–4 hours, it also feeds power into the network via a PoE-capable switch. The Yeastar box in turn is powered through it.
This works fine... But I have never trusted this system completely, because of a huge number of “moving parts”. In an event of a power outage, my ISP can go offline, or maybe my UPS can malfunction, or my VoIP provider can randomly block my account.
Finding a better solution: LTE
My first idea: 1. Add an LTE module to the PBX. 2. Sign up for a voice-only line. 3. Add a backup battery to power the PBX box in case of an outage.
Well, first I bought an LTE module on eBay for $400 (ouch!): Next, I tried to set up a cheapest-possible voice-only line with T-Mobile or AT&T. It turned out, that it would cost me more than $65 a month because “I'm on the unlimited plan”. Really, guys?
So I ordered a SIM card from Tello, an MVNO. They have really nice plans for exactly this use-case, for around $10 a month I can get a phone line with per-minute billing. I also got a backup 12V battery So I installed everything, and quickly set up the call routing via the LTE gateway.
It didn't work. The PBX couldn't place a phone call via that LTE module. I tried various permutations of options, and they all failed.
The module worked fine in data mode, though. I was able to set it up as a backup connectivity option for the PBX box. Yealink has really nice support for that, see the Failover Mode in their docs.
I could live with that, but this solution had still a bit too many “moving parts” for my liking. I still depended on the SIP provider for outbound access, I still needed the battery to hold, and I needed the LTE failover to work properly.
An even better solution: FXO+FXS
My attempts at setting up the connectivity highlighted that I'm really spending too much money on cellular lines that I barely use.
I have several tablets and phones, and they all have AT&T phone lines, and I even have two entirely unused lines for devices that I no longer have. I tried cancelling them, and AT&T kept me waiting for 40 minutes, offering various inane “deals” instead. This was the last straw, and I decided to move my secondary phones to an MVNO.
So I started browsing for options, and I stumbled on this: It's a phone gateway offered by US Mobile as a home phone replacement. It has a backup battery and it only costs $10 a month. So I ordered it, and also got one of the FXO+FXS modules from eBay: These modules have both a “station” port that allows connecting a phone headset, and an “office” port that allows it to connect to the PSTN (or a phone gateway).
I connected everything, and while in the process of testing the backup battery, I let it run out completely, resulting in the PBX box going offline. But to my surprise, when I tried to pick up the elevator phone, I got a dial tone! It turns out, that the FXO+FXS module ties both of its inputs together if it's offline. So a phone connected to its FXS input gets directly connected to the gateway on the FXO input.
This is perfect for me!
This allowed me to immediately simplify my setup, I no longer need a backup battery for the PBX box. So here's the final result:
TODO:
Here are some items I'd love to do eventually: 1. Add a periodic test call to verify that the gateway and SIP providers work correctly, and raise an alarm if the call fails.