# Sending SMS messages without knowing the user's carrier

**URL:** <https://www.ruby-forum.com/t/sending-sms-messages-without-knowing-the-users-carrier/168433>\
**Category:** Rails\
**Created:** [May 20, 2009, 7:47pm UTC](https://www.ruby-forum.com/t/sending-sms-messages-without-knowing-the-users-carrier/168433 "2009-05-20T19:47:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wemagor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/8edcca/32.png) [@wemagor](https://www.ruby-forum.com/u/wemagor)\
**Post date:** [May 20, 2009, 7:47pm UTC](https://www.ruby-forum.com/t/sending-sms-messages-without-knowing-the-users-carrier/168433/1 "2009-05-20T19:47:18Z")

</div>

I have an idea for a new web-based application that involves the use  
of SMS notifications, however I can’t assume a particular carrier.  
Most of the plugins I’ve seen like sms\_fu require you to know the  
carrier in order to send a message; is there any way around this, or  
would I have to use an SMS gateway like CellTrust to handle this? I’m  
going to need to both send and receive SMS messages (in case the users  
want to opt-out of notiifications)

The app is still in the brainstorming stage, so I’m trying to gather  
information on it first to determine how complex it will be.

---

<div class="post-metadata">

**Author:** ![wemagor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/8edcca/32.png) [@wemagor](https://www.ruby-forum.com/u/wemagor)\
**Post date:** [May 20, 2009, 8:23pm UTC](https://www.ruby-forum.com/t/sending-sms-messages-without-knowing-the-users-carrier/168433/2 "2009-05-20T20:23:34Z")

</div>

Both of your requirements (accepting inbound SMS, and sending without  
knowing the carrier) imply that you need a real SMS service provider.  
I’ve personally had experience only with Clickatell and that experience  
has been a good one.

To send, you’ll need to use one of their APIs- I use their HTTP API, via  
the Clickatell gem ([GitHub - lukeredpath/clickatell: NO LONGER SUPPORTED - Ruby interface to the Clickatell SMS Gateway API](http://github.com/lukeredpath/clickatell)), and it’s  
simple. Outbound cost is around 2.9c per text in the US.

On the receive side, Clickatell will accept the inbound texts for you,  
then route to a URL you provide- so you just write a normal action  
handler in Rails and, voila, your inbound text start arriving on that  
URL.

The bad part is the inbound cost- while the actual per-message cost is  
cheap (about 1c per inbound text, I think), you’ll also need to rent a  
shortcode, so your outbound message will appear to be from that code  
(Twitter uses 40404, for example), and your users will send you messages  
by texting to your shortcode (or replying to your outbound texts).

The process to rent a shortcode is an asinine ball of shit, thanks to  
the carriers. It takes 2-3 months to complete the process, the carrier  
actually DICTATE to you what words you have to include in the texts to  
your users, then, as if that weren’t insulting enough, you have to pay  
$1600/mo for the privilege of renting the shortcode, after they’ve  
wasted 2-3 months of your time just acquiring it. Prepare for  
frustration in that process is all I can say.

The good news is, if you can afford the monthly charge, and the  
heartburn of getting the shortcode, once you’ve got one, the actual  
day-to-day operation using Clickatell’s API for outbound and inbound  
works great. In my experience they have been exceptionally reliable.

Best,

Danny

---

<div class="post-metadata">

**Author:** ![wemagor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/8edcca/32.png) [@wemagor](https://www.ruby-forum.com/u/wemagor)\
**Post date:** [May 22, 2009, 2:03am UTC](https://www.ruby-forum.com/t/sending-sms-messages-without-knowing-the-users-carrier/168433/3 "2009-05-22T02:03:16Z")

</div>

Wayne,

Clickatell rocks, go for it!

Cheers, Sazima

---

<div class="post-metadata">

**Author:** ![wemagor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/8edcca/32.png) [@wemagor](https://www.ruby-forum.com/u/wemagor)\
**Post date:** [May 20, 2009, 8:34pm UTC](https://www.ruby-forum.com/t/sending-sms-messages-without-knowing-the-users-carrier/168433/4 "2009-05-20T20:34:04Z")

</div>

There is always the option of connecting a mobile phone to your computer  
and send/receive SMS through the phone. It’s slow though ~4 messages a  
minute.

Its not practical if your app is hosted but I was able to run using a  
server called Kylix (which polls and updates your DB) as well as using  
gnokia (command line) running on Windows.

* * *

From: Danny B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: removed\_email\_address@domain.invalid  
Sent: Wednesday, May 20, 2009 2:23:34 PM  
Subject: [Rails] Re: Sending SMS messages without knowing the user’s  
carrier

Both of your requirements (accepting inbound SMS, and sending without  
knowing the carrier) imply that you need a real SMS service provider.  
I’ve personally had experience only with Clickatell and that experience  
has been a good one.

To send, you’ll need to use one of their APIs- I use their HTTP API, via  
the Clickatell gem ([GitHub - lukeredpath/clickatell: NO LONGER SUPPORTED - Ruby interface to the Clickatell SMS Gateway API](http://github.com/lukeredpath/clickatell)), and it’s  
simple. Outbound cost is around 2.9c per text in the US.

On the receive side, Clickatell will accept the inbound texts for you,  
then route to a URL you provide- so you just write a normal action  
handler in Rails and, voila, your inbound text start arriving on that  
URL.

The bad part is the inbound cost- while the actual per-message cost is  
cheap (about 1c per inbound text, I think), you’ll also need to rent a  
shortcode, so your outbound message will appear to be from that code  
(Twitter uses 40404, for example), and your users will send you messages  
by texting to your shortcode (or replying to your outbound texts).

The process to rent a shortcode is an asinine ball of shit, thanks to  
the carriers. It takes 2-3 months to complete the process, the carrier  
actually DICTATE to you what words you have to include in the texts to  
your users, then, as if that weren’t insulting enough, you have to pay  
$1600/mo for the privilege of renting the shortcode, after they’ve  
wasted 2-3 months of your time just acquiring it. Prepare for  
frustration in that process is all I can say.

The good news is, if you can afford the monthly charge, and the  
heartburn of getting the shortcode, once you’ve got one, the actual  
day-to-day operation using Clickatell’s API for outbound and inbound  
works great. In my experience they have been exceptionally reliable.

Best,

## Danny

Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
