Hacker News new | past | comments | ask | show | jobs | submit login
An ‘SMS Center’ with Python, Kannel and a GSM Modem (medium.com)
121 points by babayega2 on Jan 11, 2016 | hide | past | web | favorite | 33 comments



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.


There are some techs which are heavily used in Africa to bring out innovative solutions, like Kannel used in RapidPro [1]

[1]: http://knowledge.rapidpro.io/knowledgebase/articles/603507-a...


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


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


Man, thank you for Kannel. It's amazing.


Cool to see a codebase live that long and still be used in new solutions.


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... Senior role: http://fenixintl.applytojob.com/apply/r5rViV/Senior-Software...)


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/...


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?


I use this modem - 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.


Obviously a GSM modems are unstable.

The best way to do is put Kannel on a stand alone server with VPN to the telcos or to an SMS-aggregators. That way, it's stable.

[update]: fixed typos


Yes, however serial seems to have communication issues ones in a blue moon, just one char missing. We run on Siemens MC35. O yes and custom software stack to talk 'AT' to them directly. To be fair it should be rewritten to handle event's like unexpected DIAL :) But that doesn't happen often to warrant this.


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?


I haven't really bench-marked the trafic on RasPi. Only just sent and received some messages. I know it works.

The only problem is when in your RapidSMS (Django framework for SMS) app you need to perform some calculations on each incoming message,... Celery will have to be used to schedule tasks and that can take much RAM ,...including the RAM used by Kannel.

For us working in third-word countries where even Visa cards are not well available, using Kannel is an alternative to Twilio.


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


do you know how reliable pvlio is compared to twilio?


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


There are also several Android apps that act as SMS gateways.

http://stackoverflow.com/questions/11291196/android-as-an-sm...


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.


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.


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


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.


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


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!


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


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.


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.


At least in France, they limit the numbers of different correspondents you can text in a single month. It's usually around 200 if you read the fine print.


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?


To reach Twilio or Nexmo, you need Internet right ? In fact, there is a rapidsms-twilio app [1], so you can use any backend you want.

But in Burundi, Internet service providers sucks. They can spend 1 day with downtime, without excuse and communicating anything.

Beside an SMS in Burundi cost ~$0.02. So...

Also Kannel is also used by telcos. So it's a good tutorial about using Kannel ...

[1]: https://github.com/caktus/rapidsms-twilio


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)


That's the point.


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.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: