Show HN: Baby's first international landline
Nice project! Another route you might consider is flashing a small custom firmware on the Grandstream HT80x so the logic runs directly on the ATA instead of on the Pi/Asterisk side.
I wrote a tool that can extract and repack Grandstream firmware (https://github.com/BigNerd95/Grandstream-Firmware-HT802/tree...).
For example, I made a simple ARM patch that intercepts incoming caller IDs and triggers a bash script to decide what to do, in my case it checks a spam-lookup service and returns 0 or 1 so the ATA either rings or rejects the call.
One sidenote is that the Twilio part is harder than it looks. Not because of technical factors, but because of the paid requirement. Twilio refused to take my money and upgrade me to a paid account, even though they forced me to go to their confusing KYC procedure, where they asked me many times to provide the same set of documents. Support was useless, it looked like an AI bot repeating the same thing, but this was before the widespread usage of AI bots.
Eventually I gave up and went to Telnyx, which had a better KYC process and actual humans behind support that could resolve any quirks with KYC. Apparently not being born where you live breaks a lot of the automation behind some of these processes, go figure.
This is using Twilio, but given there's an Asterisk server behind, you can actually use any VoIP provider that allows outgoing calls over SIP right? Depending on the country you live in and/or where you want to call, you might get simpler & cheaper options (although for emergency service if you want to have it, which I think is important unless there's an alternative way to call emergencies around, it's more complicated).
For some reason I thought it was for toddlers to call other toddlers. I think if you were looking for a feature to add, it would be to let kids call their friends. Could lead to some cute moments :)
I’ve also been looking at setting up a dumb phone for my kids, but haven’t thought to go the rPi Twilio route.
There’s an existing product that seems to have some mindshare in the space: https://tincan.kids/
Basically $100 for the phone, plus $10/mo to call arbitrary numbers. My main concern here is the company goes belly-up and you’re left with a phone-shaped brick.
Another option I considered was a cheap unlimited SIM coupled with a GSM “desk phone” e.g. https://www.amazon.com/Generic-Wireless-Telephone-Cordless-8...
The problem here is there’s no way to filter inbound calls. The last thing I want is spammers ringing the house phone in the middle of the night.
This is a great project writeup, I did something _very_ similar for my son. (HT802, asterisk, twilio, calling relatives) With all of the NAT involved I could never get sjsip to work properly so I ended up having to use the old sip module, but looking at yours makes me want to revisit it.
Once you have asterisk set up and running, it becomes easy to also set up all sorts of other extensions like "check the weather" / "tell a joke" / "check the train statuses". I put up some code for it here: https://github.com/mnutt/rotary
If you want this as a ready to go product - https://tincan.kids/ and disable 911 if international.
Odd use of Twilio for just a SIP Trunk provider. They also offer programmable voice SIP, a product that is a distinct offering from the Elastic SIP trunking used here. With PV SIP you can directly register the Grandstream HT801 ATA to a programmable SIP endpoint on Twilio and move all the programming logic, including text to speech, to a Twilio serverless "function" and completely cut out the need for a RasPi and Asterisk.
Also FYI for those who do want to use Asterisk behind CGNAT and cannot open ports - if you use PV SIP you can also register it as a Trunk in Asterisk and it can then receive inbound calls over the connection established by the outbound registration with simple a simple Twiml bin that routes whatever Twilio numbers you want to the SIP user you used to register the Asterisk's SIP Trunk. Asterisks can can then use inbound number plan to further route the inbound call as needed.
Very interesting.
I had a similar problem a few years back with a technophobe Grandma who wouldn't use whatsapp and a stingy aunt who'd moved to the states.
Used a Fritz!Box as it'll act as a DECT<->SIP server so my grandma could keep picking up her usual handset. Had a rule which matched the aunt's phone number so it got bounced via my FreeSwitch server rather than her PSTN, and some least-cost routing rules to pick a US based provider SIP provider with a +01 PSTN number so my aunt saw the incoming call looking local and could ring back if necessary at a cheap rate.
Honestly, the weird technical abominations we come up with to try and serve family members. The same Grandma went through a phase of falling, not being able to get up and then waiting hours for an ambulance to arrive. Would she tell the family? Would she sod. Was her regional ambulance service still dispatching jobs via pager message? You betcha. Did this end up with an SDR, POCSAG decoder and a regx looking for her postcode? Absolutely not; why would you ask such a thing?
I love everything about this. I've often thought families that wanted to extend their network between trusted friends could set up a literal private branch exchange (aka PBX) with only their friends as fellow members.You have a way for people to call each other without handing kids a smart phone and can also avoid the inevitable costs and unwanted calls associated with real land lines.
I love this idea as I grew up with ancient dial up phones, and I miss actually holding a handset and dialing a number to make calls. However, gen alpha has grown up in completely digital era, and most interaction occurs on FaceTime (or other video chat), and I don't think we can ever go back even if we wanted to. My kids' grandparents WANT to see their precious little grandkids so we always use video calls, if it involves kids and grandparents.
I, on the other hand, want this to communicate with friends who want to do the same.
I couldn't help but smile when I read about building an international landline system with the patience of "raising a child"! This analogy of complex technology to the process of raising a life is so resonant - from the first "cry" (dial tone) to the first toddler steps (stable communication), every troubleshooting is like soothing a fussy baby. If all technical documentation were written with such warmth, the world would have many more happy engineers
I just setup the same HT801 but I used SIP-domains and twilio services/functions instead of SIP trunk and asterisk. I'll make sure to reply again once I have a write up.
Nice work!
Found a post from Twilio using the same tech stack in 2013! What a trip. Cool project!
Great work! Thank you for sharing this. I'm looking forward to making one just like this too.
I would love a way to make an IP phone that just lets my kids call their friends on their phones, and no-one else. I will take a look!
This is awesome!
Would it be possible to ditch Twilio and build it as a peer-to-peer system though? Or does that always require a coordination server?
Hardest part of this is getting a twilio account that actually works.
One of the worst service providers ive ever had to work with.
This is so cool! Mine is too young but I was planning to hack on something similar when they’re of age. Thanks for the inspiration!
>only permit calls to be made to an adult-controlled set of numbers timezones and “awake/asleep” schedules, to avoid calling Europe at their 1am prevent inbound calls entirely
This is interesting. Was there a serious issue while using a regular landline?
As a former toddler myself, I think that the worst I got up to was calling the radio station and giving bad traffic tips.
My overseas family had such a long number, stored in a book in my grandmothers handwriting, that theres little chance I would have connected and woken them up.
Is this designed to counter a specific threat model?
uhmm...
>>> As a weekend project, I hacked together a physical phone, a Raspberry Pi running Asterisk and Twilio, to let toddlers safely make international calls.
how often do toddlers make international calls???
[dead]
[dead]
I really like this... except you should add a special case for 911. I strongly believe that all phones, and anything that looks like phones, should be able to dial out in an emergency.
Obviously, this can raise its own problems -- you'll have to train the kids not to randomly dial 911! -- but you never know what circumstances might exist where someone in a panic reaches for the nearest phone.