
An ‘SMS Center’ with Python, Kannel and a GSM Modem - babayega2
https://medium.com/@iMitwe/build-an-sms-center-with-python-kannel-and-a-gsm-modem-9c0d29560d82
======
liw
I architected and co-implemented Kannel, 15 years ago, at the now-defunct
Wapit Ltd. I'm very glad that it's still being used, specially for something
as awesome as this.

~~~
threeio
I need to thank you for making my time running SMS much easier. :)

~~~
babayega2
Thanks. I'll update shortly with a complete platform of SMS flows/tree.

------
samskeller
Really awesome to see this on Hacker News. I work for a company that does pay-
as-you-go solar power in Uganda and we rely on SMS messages to allow our
customers to pay off their solar devices over time, and we too use a Django
backend to control that communication. It may not be 'flashy' but SMS
technology is so widespread in sub-saharan Africa so it's incredibly useful.

(PS we're hiring software engineers if anyone's interested! Mid-level role:
[http://fenixintl.theresumator.com/apply/Rfr3xP/Software-
Engi...](http://fenixintl.theresumator.com/apply/Rfr3xP/Software-
Engineer.html) Senior role:
[http://fenixintl.applytojob.com/apply/r5rViV/Senior-
Software...](http://fenixintl.applytojob.com/apply/r5rViV/Senior-Software-
Engineer.html))

------
kevan
Another way to cut down on costs is to use email-to-SMS gateways. Emails are
usually way cheaper to send than SMS ($0.0005 per email with Mailgun vs
$0.0075 per SMS through Twilio). The biggest downside is that these gateways
can be a bit flakey, but I had good results with CorpScores[1].

[1]
[https://github.com/kevana/corpscores/blob/master/dci_notify/...](https://github.com/kevana/corpscores/blob/master/dci_notify/sms.py)

------
wiradikusuma
In my experience, this kind of "SMS gateway" GSM modems are unstable (at least
the ones we had). When we deploy these to data center, we annoyed the admin
guy for occasionally calling him to go into server room to press the reset
button.

Just curious, anyone had better setup?

~~~
mgpetkov
I use this modem -
[https://store.comet.bg/en/Catalogue/Product/9056](https://store.comet.bg/en/Catalogue/Product/9056).
I have written my own software in Delphi and it's running for years without a
need to restart it.

------
an4rchy
I always wondered if this was doable with standard tech, something like Twilio
for the DIY person. This is awesome! I'm guessing the main reason for that
much RAM is traffic, can you approximate how much traffic a Pi can handle?

~~~
pbreit
Also check out Plivo. A bit more "open" and a lot cheaper.

~~~
fernandotakai
do you know how reliable pvlio is compared to twilio?

~~~
pbreit
I would be more comfortable on Twilio but Plivo is legit.

------
rcarmo
Funny to think that way back in 2004, when we were deploying Kannel at a telco
to do value-added services, we did a little chat service that worked a lot
like... Twitter.

------
kiproping
Nice article, I am also a dev working in health related projects in Kenya.
This will be invaluable as we just got a project for improving maternal
healthcare in rural Kenya.

On another note, hope you are safe in Burundi, I hear its chaotic over there.

~~~
babayega2
We try to innovate in hard time. Thanks for the support.

------
pbreit
How does Kannel compare to Twilio and Plivo? GMS-only sounds like it would be
a problem since that's not nearly everyone, right? I can't really tell from a
skim of kannel.org how the message get inserted into the telecom system.

Edit: oh, wow, I see, it routes message through an actual phone.

~~~
babayega2
It routes the SMS trough the GSM modem (containing a sim card), mimicking a
dumb phone.

~~~
voltagex_
I wonder how many messages you can send before your carrier gets annoyed (or
auto-anti-spam protection kicks in). This is a cool project - well done!

~~~
markdown
Why would they get annoyed? They're being paid per SMS, aren't they?

~~~
hatchoo
I do not know if telcos in other countries also have this but here in the
Philippines, there are promotions where you can use a prepaid SIM and pay a
fixed amount per day/week/month which allows you to send unlimited SMS.

While this is beneficial to consumers, SMS spammers equipped with gsm modems
and this promowls to send text blasts. Prepaid SIM cards are also not
regulated here (no need for ids to buy one) and you can get one for about $1.

~~~
markdown
Ahh, I see how there is a potential for abuse in those cases. Here in Fiji,
you'd pay for every SMS sent, and (since around 2010) prepaid SIM cards
require registration with ID at point of purchase.

------
lucaspiller
What advantage do you get of using your own GSM modem as a gateway vs a big
provider like Twilio or Nexmo? Nexmo says their pricing is ~$0.07/message in
Burundi, is it cheaper if you do it yourself?

~~~
jmakaa
Good point, it might be easier to use Twilio, Plivo or Nexmo. However 7 US
cents is ~109 Burundian Francs. I can't speak on Burundi SMS costs but as a
comparative, in Kenya the local per SMS cost is KES1.00 or KES2.00 and pricing
for Twilio and Plivo is USD0.02 and USD0.0154 respectively, which translates
to ~KES2.05 and ~KES1.58... so I'm assuming Twilio, Plivo or Nexmo price close
to the cost of an SMS sent from a local number.

In short, the prices are probably comparable to sending a normal SMS in each
country, meaning it might be cheaper to just use an SMS provider. Though in
either case you have a fixed cost (and maintenance) of an internet facing
server to "talk" to that SMS provider, so it might just make sense to do
everything in one place (i.e. you still need to build the application that
manages communication and sends SMSs either way)

~~~
babayega2
That's the point.

------
pinkunicorn
With onx.ms I built an engine that would allow my GF to set a timer and then
receive a call automatically at that time. The only time she loved me for
being a computer programmer.

