I Built an SMS Gateway with a $20 Android Phone – Jonno.nz (jonno.nz)

by jonnonz 43 comments 96 points
Read article View on HN

43 comments

[−] pnm45678 42d ago
As others have pointed out, this kind of automated business use is very much against the T&Cs of carriers, so if you do this heavily you can expect to run into issues.

They can and do detect this kind of thing. In a similar vein there is also a whole industry in "sim boxes". Effectively a box of SIM cards / radio equipment that acts as a server. These can similarly be set up as servers to send SMS through carriers ( https://en.wikipedia.org/wiki/SIM_box ), though seemingly the popular use is to bridge VOIP calls to local destinations and sell "minutes" to others. There is also apparently a whole industry in software to manage them. These days that management software allegedly includes measures to have the SIMs behave like humans to evade detection (the sims text each other, browse around, sleep for hours of the day, and so on).

[−] skrtskrt 42d ago
Starting with > Twilio charges around $0.05–0.06 per SMS round-trip

Well - use an dedicated telecom API provider that doesn't squeeze you on pricing uselessly: https://telnyx.com/pricing/messaging

Twilio is the DataDog / Microsoft of telecom APIs. The only reason you buy them is because it's the biggest name, or you have already integrated them so deeply that you're unwilling to rip it out. Their price structure also has a huge floor because they're not a carrier so they have to buy everything from real carriers.

Telnyx is actually a registered carrier so other carriers are forced by law to peer with them at lower prices.

There are other low-cost SMS API providers but AFAIK none are actual carriers and they maintain the cost by only doing messaging and relying on enormous volume to make up for tiny margins - their profitability and therefore longevity are tenuous IMO.

[−] toast0 42d ago

> Telnyx is actually a registered carrier so other carriers are forced by law to peer with them at lower prices.

> There are other low-cost SMS API providers but AFAIK none are actual carriers and they maintain the cost by only doing messaging and relying on enormous volume to make up for tiny margins - their profitability and therefore longevity are tenuous IMO.

Depending on what you're doing, chances are you're better off ignoring everything an aggregator tells you. Measure delivery through actual user measures and cost keep active accounts with multiple providers and shift traffic where the cost/success is best for a given group of users (country/carrier/etc).

All the aggregators will tell you they have global coverage and that they use 100% direct routes, and they're all lieing.

[−] skrtskrt 38d ago
While this is somewhat true, the point of being a registered carrier is that most countries regulate that registered carriers must peer with each other at much lower costs. It is nearly-impossible to get "direct routes" everywhere, mostly because of the logistics of signing all those agreements.

But you will generally be much better off with an actual registered carrier because they have better access to direct agreements with regulated pricing.

[−] dwedge 41d ago
After what twilio did to authy and almost locked me out of my 2fa (and for what benefit to them?) I wouldn't use them if they were the only option
[−] sumedh 42d ago
Is it US only?
[−] skrtskrt 39d ago
nope!
[−] thunderbong 43d ago
There are so many interesting things that can be done with an Android phone. Tomorrow, if the Google Play store decides not to publish this app, I can still install it via the APK file. I wonder how many of these apps will be usable after Google's new rules about sideloading.
[−] TGower 42d ago
All of them, you can still sideload after the changes.
[−] dddw 42d ago
You might have to wait a day :(
[−] kotaKat 42d ago
I can feel the 10DLC violations in the US already running through my blood. You will be eviscerated by the carriers for doing this for anything longer than a single day.

I hope your disaster recovery (or 'didn't realize') strategy includes a drawer full of additional burner Android phones and SIM cards.

[−] elevation 42d ago
I had a client once who used a USB SIM modem as an out of band alert system set to text IT staff if certain monitoring thresholds were detected connected —useful if the Internet post were damaged. At the time, 10DLC wasn’t a concern in the system was reliable (but low volume.)

Would such a system be untenable these days? Is it possible to provision a physical SIM that cannot legally be shut off, but is whitelisted to only 10 consenting numbers at a time?

[−] inhumantsar 43d ago
definitely a great setup for development, tho probably a good idea to have the Twilio integration ready to go.

legitimate messages or not, this will look like spam if you get a surprise burst of traffic. and providers will nuke your SIM, maybe blacklist your phone's IMEI, if they suspect you're using it for spam.

also is it weird that "That's its whole life now." made feel a bit sorry for the phone? might be spending too much time in opencode...

[−] vladsanchez 42d ago
* FreeSwitch Messaging API - https://signalwire.com/pricing/messaging

Can/will do the trick for fractions of a penny... B)

Check their UseCases... * https://signalwire.com/products/cloud-messaging#message-use-...

Also, if you're a real PBX nerd, check Asterisk.org which pre-dates and may have sparked if/not powered early-Twilio.

[−] ajsnigrutin 42d ago
Easier to just use a usb/minipcie modem and operate directly from the 'server' - no batteries, no OS to crash, no nothing, simple AT commands on linux "middleware" (modemmanager etc.)
[−] jqpabc123 43d ago
Unlimited texts.

Nope. Sorry, it is unlimited texts for *personal* use --- as defined by the carrier.

Send "too many" and your account can be suspended.

Some carriers offer an email to SMS gateway so if you can send email, you can skip the $20 Android phone.

https://20somethingfinance.com/how-to-send-text-messages-sms...

[−] baconomatic 42d ago
I used to work at a place about 10 years ago where we had a cluster of six Android devices that we had used for our SMS gateway. At the time it worked fantastic, we eventually rolled off it to a different service. Somehow, we never ran into issues with carrier.
[−] loloquwowndueo 42d ago
Nice ai-written article but what I missed among all the slop is : where do I get a $20 phone?

EDIT: it’s a lie. At the bottom of the page : Dedicated device: Use a cheap Android phone ($100–200) with a prepaid SIM.

[−] tjpnz 42d ago
I worked with a guy (also in NZ) who did something very similar in the 2000s. A Nokia 5180 I believe, on the Telecom Ten Dollar Text plan which was theoretically unlimited (and predictably didn't last long).
[−] dwedge 41d ago
I considered doing something like this, but unless you're running it on your main phone, you also need to factor in the monthly price for a second sim
[−] flemhans 42d ago
Brings back memories of Gammu hooked up to a Nokia 6150 over serial. It was already questionable back then but never got caught by the telco
[−] peter_d_sherman 41d ago
Brilliant idea!

Heck, a brilliant potential bootstrapped-from-virtually-nothing-except-a-cell-phone business idea!

[−] snvzz 43d ago
Maybe next he'll learn about sim900 and derivatives.

$20 and full android stack seems a massive waste for this, nevermind unreliable.

[−] mindo 42d ago
I've done this on symbian phone many many moons ago, for sms and mms messages. We all been there :)
[−] kanehorikawa 42d ago
[dead]