2022-09-14

Replacing the The Phone Company, for my parents

I replaced my parents' wireline telephone service with a VoIP service, got rid of the telemarketers who were constantly pestering them, and cut the bill from over $70/month to less than $3/month, which I am now paying myself. My parents will never see or pay a landline phone bill again. Here is how I did it, for the curious, and for anyone who wants to do something like it themselves.

We did not want to lose the phone number. We have had that number since 1982. Everyone in the extended family knows that number, many of us have memorized it, it is in multiple directories in my parents religious congregations records, it’s in the service accounts for many medical, financial, and social services, and we did not want to confuse elderly extended family members. And I especially did not want to confuse my parents.


The thing that made this doable is my parents house has pretty good cable internet. If their internet came via DSL from The Phone Company, this would have to be done a bit differently.

The VoIP Provider

First, the VoIP provider. I use VoIP.ms [ https://voip.ms/ ] because they are a good value, they are mostly It Just Works, and they have a useful set of composable telephony services I can configure via their web console. If I had had to write code, or mess around with some integrated “business solution provider”, or a raw SIP trunking service, this would not have been nearly as easy. And using an off-the-shelf “easy to use” consumer grade VoIP gadget would have cost more, and not given me the features I wanted.


I already had a VoIP.ms account, billed to my credit card. Of course, I have 2FA turned on for it.


A VoIP.ms main account id is a six digit number. For the sake of example I will say mine is “100000”.


There are docs and examples at [ https://wiki.voip.ms/ ].

Service and Gadgets Used

The VoIP.ms telephony services I need are a SIP subaccount, a voicemail, a set of forwards, a ported DID, and an IVR.

SIP subaccount

First, I created a SIP subaccount. I named it “parents”. A subaccount is a SIP endpoint that a SIP client can login to. This will be the interface to the SIP gadget, called an “ATA”, and which is in turn the connection to the classic antique POTS phones in the house.


A subaccount has a POP Point of Presence, the name of a city. All sorts of things don’t work correctly if this is not the same everywhere in a configuration. For the sake of example, I will say I am using the POP at metropolis2.voip.ms


From all this VoIP.ms creates a URI of [ sip:100000_parents@metropolis2.voip.ms ]. If someone had a SIP URI enabled voip client or good enough VTC client, they could connect to that URI, and ring my parents’ house phones. I think Zoom and Chime can do that, but I’ve not tried it.


I then created a random long (at least 16 random characters) password. People who pick passwords like “password”, “secret”, or “letmein”, or someone’s birthday, are idiots, and deserve all the misery they are about to experience. Random. Passwords. I used my Bitwarden password vault to generate and store that password. I will need it later when configuring the ATA.

Voicemail

Next, a voicemail. Again I named it “parents”. I created it, and then set a PIN code on it. I literally rolled a d10 4 times to generate the random PIN.


VoIP.ms has a feature where voicemails get transcribed to text, and also a feature to email the audio file and the text transcription to someone. I turned that on, with the email going to my parents. The transcription service costs a little bit per minute, but I think it’s well worth it.


The VoIP.ms voicemail service is exactly like every other telephone company voicemail service. The access code is *97. When this is all set up, my parents can call the DID from their mobile and then enter that code, or pick up a house handset and dial that code when they hear dialtone, then dial the PIN, and be in the voicemail service.

Forwards

Next, the forwards. I want to be able to forward calls to my parents' mobile phones, and also to my own. VoIP.ms requires that I predeclare forwarding destinations. I already had a forward declared for my own personal mobile. I added ones for each of my parents' mobiles, plus ones for each of my siblings’ mobiles.

Ported DID

Next, the ported DID. A “port” is telling the origin phone company “I’m leaving you, give control of my phone number to my next phone company”. A “DID” is a “direct inward dial”. What that really means is it’s a phone number, plus all the hidden glue so that the public telephone network knows what to do with it when someone dials it. VoIP.ms manages the port process for gratis, and then charges less than a dollar per month for a US DID, which is what the telephone network itself charges them.


To port a number, I needed permission from the account holder, and a bunch of information that is on the phone bill, and a scan/copy of the most recent phone bill. So, I called up my parents, had them find their most recent paper bill, had the account holder write “Port Approved” and a signature near the service address, and then they postal mailed it all to me. In theory they could have just scanned it themselves, but it was just easier if I did that myself.


The VoIP.ms porting team needs the telephone number, the account number, and a bunch of other information off the bill, and the scan of the bill. It takes a week or so for the port to process. It can take longer if the origin phone company is obstinate, but that’s pretty rare now.  VoIP.ms sends an email as each stage happens, and when it’s done.


Soon after the port process started, VoIP.ms created the DID entry for it in their web UI. It won’t work until the port is completed, but in the meantime, it is there to connect the other services to.


I then linked the DID and the SIP subaccount to the voicemail. This is so if someone calls the DID and then dials *97, they will go into the voicemail service into the correct voicemail box. And if there is a busy, timeout, or network failure, the call can go to the correct voicemail box.


I enabled 911 service on the DID. This costs $1.50/month, which is what the 911 system charges VoIP.ms. When setting up 911 service, I had to provide the physical address of where the service endpoint is, e.g. my parents’ home address. Do not be funny here and do not skip this step, this is how the PSAP emergency operator knows where to send an ambulance or the fire department.

IVR greeting, made with Amazon Polly

Next, I created the IVR greeting recording. I used the Amazon Polly Text-to-Speech service, in part because I work for Amazon, and in part because I could use a console to play around with it. Technically, Amazon Polly costs money, but it provides several hundred minutes for gratis on initial use, which is all I needed.


To use Amazon Polly, I logged into my AWS console, and enabled Polly. And then went to the Polly console, and played around a bunch, reading docs, and learning SSML (Speech Synthesis Markup Language) markup, and listening to the various voices available.


I finally picked “Joanna, Female, Standard, English” as the voice, and the following text as SSML markup text to turn into speech:


<speak>

<prosody volume="loud">

You have reached <say-as interpret-as="telephone">3165550199</say-as>.

The Kent residence in Smallville.

<prosody rate="fast">If you are a telemarketer, hang up put this on Do Not Call.</prosody>

If you can, please hang up and call Jonathan’s or Martha's personal mobile directly.

Otherwise,

<prosody rate="slow">

press 1 to leave a message,

press 2 to ring the house phone,

press 3 to forward to Martha's mobile,

press 4 to forward to Jonathan's mobile.

</prosody>

Thank you.

</prosody>

</speak>


I had Amazon Polly render that marked up text to a MP3 file, which can be used by VoIP.ms. Otherwise I would have had to mess around with ulaw pcm settings, and I didn’t want to. Voice grade MP3 is good enough.

IVR Interactive Voice Response

Then I created the IVR. IVR means “Interactive Voice Response”, and is the phone tree thing we are now all used to dealing with when calling a corporation. Again, I named the IVR “parents”.


I was expecting configuring the IVR to be harder than it actually turned out to be. First I uploaded the mp3 greeting file, then I configured the mappings from DTMF digit strings to VoIP.ms services. So I mapped “1” to the voicemail, “2” to the SIP subaccount, “3” to forward to my mother’s mobile, “4” to forward to my father’s mobile. As an undocumented feature, “51” forwards to my mobile, and “52”, “53”, “54”, and “55” each forward to each of my sibling’s mobiles.


Then I connected the DID to the IVR. So when someone dials the number, it picks up, the greeting audio gets played to the caller, then the caller can press DTMF digits. Well actually, the IVR has “early interrupt”. Someone who knows about it can call in, and when the recording starts, they just immediately press “2”, and immediately ring the house phones.

Bypassing the IVR, depending on who is calling

A neat feature that the IVR has is “caller id bypass”. An incoming call that has a specific CID can bypass the IVR, and be connected directly to some other VoIP.ms service. I have the bypassed numbers just directly ring the house phone. For example, my mother’s sister regularly calls to talk to my mother, and does not need to be confused by the IVR. My parents have given me a list of numbers that need the bypass, and I add them as they request them.


Some of them are for elderly relatives, and some of them are for the notification robots from their medical providers.

Making the existing house phones still work, using an ATA

My parents have several classic Bell System Western Electric Trimline handsets [ https://en.wikipedia.org/wiki/Trimline_telephone ] , and have had them since 1982 when they moved into the house. They probably don’t even realize those handsets are now antiques, somewhat in demand. I want them to keep working just as they always have.


I bought a “Grandstream HT801 Single-Port Analog Telephone Adapter” [ https://www.amazon.com/dp/B06XW1BQHC ], for $35. As near as I can tell, someone at Grandstream sat down and said “Let’s make a residential grade ATA that Just Works and Does Not Suck, and then sell it for cheap”, and created the HT801. Good on you, Grandstream, thank you.


An ATA is a device that interfaces a classic handset to the internet. It has an RJ11 port that provides dial tone, ring tones, ringer voltage, and understands when you press the DTMF buttons on the handset. And it has an RJ45 ethernet port, that really wants to connect to a home router, and then connect out to a voip provider, such as to VoIP.ms.


I bought that ATA, and then set it up on my own workbench to program it. It was pretty easy. I configured it to connect to the SIP subaccount “parents”, and to generate the necessary powered ringer voltage and ringer frequency. Then I reshipped it to my parents, with careful installation instructions.


Usually, you connect a single classic handset directly to an ATA. But I wanted as few changes as possible for my parents, and the HT801 is mighty enough to provide sufficient dialtone power and ringer voltage to an entire house telephone wiring network and several classic “dumb” handsets, so I did something more awesome. I’m told that the HT801’s bigger brother the HT802 cannot do this, so, be warned.


We disconnected the house entirely from the old wireline company! My brother and my father went outside, found and opened the demarc where the phone line came to the house, brushed away decades of cobwebs and dust, and physically disconnected the little RJ11 bridge cable, and put a piece of tape over the demarc RJ11 jack. And with that, all the phones in the house went dead.


They then took the configured ATA, plugged it to wall power, to an open RJ45 ethernet port on the home router, and to an open nearby RJ11 walljack. And with that, all the phones in the house were again alive, and had light and dialtone when picked up. If there had been any “smarts” or filters inside the house phone wiring, we would have had to go chase that down and remove them, but there were not, so we did not.


If the ATA didn’t have enough power to light up the house wiring and all the phone ringers, I would have had to buy a “Ring Booster”device. But it was able to drive them, so I didn’t have to. 

Details on programming the ATA:

Here is the guidance from VoIP.ms to programming a Grandstream HT80X ATA: https://wiki.voip.ms/article/Grandstream_HandyTone_802_-_HT802


Here is the administration and programming manual for the HT80X:

http://www.grandstream.com/sites/default/files/Resources/ht80x_administration_guide.pdf


Configure the local networking stuff, DHCP, etc for the local internet router. The defaults are fine.


Configure the SIP/VOIP settings as follows:


Primary SIP Server: metropolis2.voip.ms

Failover SIP Server: <blank>

Outbound Proxy: <blank>

NAT Traversal: Keep-Alive

SIP User ID: 100000_parents

Authenticate ID: 100000_parents

Authenticate Password: <SIP PASSWORD>

Name: KENT

DNS Mode: A Record

SIP Registration: Yes

Unregister On Reboot: No

Outgoing Call Without Registration: Yes

Register Expiration: 5

Preferred DTMF method: In-audio, RFC2833

Use P-Access-Network-Info Header: No

Use P-Emergency-info Header: No

Enable Call Features: No

Dial Plan: {[x*]+}

Preferred Vocoder: PCMU, PCMA, G729

Check SIP User ID for incoming INVITE: Yes

Allow Incoming SIP Messages from SIP Proxy Only: Yes


Here is the bit to make it able to drive the house wiring instead of just one handset:


Ring Frequency: 20

Enable High Ring Power: Yes

Recording and Transcribing calls, make sure that is off

VoIP.ms can record and transcribe incoming and outgoing calls, on a per subaccount basis and on a per DID basis. I turned that on while I was programming and debugging, and turned it off after I verified that everything was working. Listening in on people’s phone calls is creepy. Especially your parents. Make sure that is turned off for that DID and for that subaccount.

If no answer, busy, timeout, or fail: fallback to voicemail

I’ve configured both the DID and the subaccount so that if it rings for 15 seconds with no answer, it falls back to voicemail.


VoIP.ms also has “failure handling”. If the ATA says the house phone is busy or off-hook, or if the internet links fail, or even if large portions of VoIP.ms own infrastructure fail, or if “too many” people try to call in all at the same time, the call will get routed to the voicemail, for later handling.

Telemarketers, begone!

Telemarketers. Scum. My parents said they got several a day. As I reviewed the CDR Call Detail Records, I was able to confirm they were getting at least half dozen a day, most of them from forged CIDs. Those calls from those scammers are still coming in, but now they no longer interrupt my parents.


Some of the scammy ones hang up immediately when they hear the robot voice. The legally compliant ones hang up when they hear “Do Not Call”. Some wait for “press 1 to leave a message”, and leave their message, where they are much less of an interruption. The stupid ones just listen to the IVR message loop three times, then it hangs up on them. But so far, none of them have rung the house phone to bother my parents.


I considered setting up an integration with the Jolly Roger Telephone Company telemarketer trap [ https://jollyrogertelephone.com/ ] [ https://wiki.voip.ms/article/Using_ring_groups_with_a_third-party_spamfilter_service ], to time waste the scammers, but I’ve not yet bothered, and it might confuse my parents. 

Firing the old phone company, easier than I expected

Now, at last to fire the old phone company. When I initially tried to cancel the original wireline ILEC account, I got a runaround that I had to call the account termination services between certain business hours. I tried again a few weeks later, only to discover that the phone company had already closed the account and were sending my parents a final statement. I guess they decided that a successful port-out meant that it was not worth it to them to pay a salesman CSR to try to talk me out of it.

Some ideas for the future:

I can receive a notification if someone dials 911 from the house phone. I think I will set something up so that I and my siblings all get an SMS when that happens.


I can install SIP clients on my parent’s mobiles and tablets, and create additional SIP subaccounts for them to connect to. Then my parents can make outgoing calls from their mobiles, especially on wifi, and it will look like they are calling from the house phone.


I can gift them a wifi cordless phone (Grandstream makes some nice ones, such as the WP810), preconfigure it to yet another SIP subaccount, and they would have a nice cordless phone that works within the house’s wifi.


I can enable SMS on that DID, and then with a little more programming on my part, they can send and receive SMSs on that number.


I may get around to adding the Jolly Roger Telephone Company telemarketer trap.


If I ever set up smarthome home automation stuff in their house, I can link it together, so that the house can call 911 if the fire alarms go off, or the house can call someone in the family if there is some minor emergency, or my parents can dial a magic code on the IVR to remotely turn on the house porch lights or open the garage door.

Finale

In conclusion, an incumbent wireline telephone company charging an elderly couple over $70/month for phone service is corporate elder abuse. I cut the bill to $3/month, gifted to my parents paying it myself, got rid of the telemarketer scum who were disturbing them multiple times a day, learned how to set up IVRs, and learned how to use Amazon Polly and Speech Synthesis Markup Language.