Forum: Ruby Sending SMS Messages With Ruby

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
James G. (Guest)
on 2007-01-07 20:09
(Received via mailing list)
I'm going to need to send SMS messages from a Ruby server I am
building currently.  I just thought I would ask if anyone here has
any experience doing that and would recommend a library, web service,
web site I can mechanize, or whatever.  Any tips appreciated.

James Edward G. II
Sean Bryant (Guest)
on 2007-01-07 20:15
(Received via mailing list)
James Edward G. II wrote:
> I'm going to need to send SMS messages from a Ruby server I am building
> currently.  I just thought I would ask if anyone here has any experience
> doing that and would recommend a library, web service, web site I can
> mechanize, or whatever.  Any tips appreciated.
>
> James Edward G. II
>

Most Cellphone providers will let you send SMS via email. Check with the
providers for the email address. I do it all the time.
James G. (Guest)
on 2007-01-07 20:34
(Received via mailing list)
On Jan 7, 2007, at 12:15 PM, Sean Bryant wrote:

> James Edward G. II wrote:
>> I'm going to need to send SMS messages from a Ruby server I am
>> building currently.  I just thought I would ask if anyone here has
>> any experience doing that and would recommend a library, web
>> service, web site I can mechanize, or whatever.  Any tips
>> appreciated.
>> James Edward G. II
>
> Most Cellphone providers will let you send SMS via email. Check
> with the providers for the email address. I do it all the time.

Thanks for the tip.  This did help.

Looking into this means and Google's simple service:

http://www.google.com/sendtophone

it seems I need to know the provider in either case.  Is this always
true?

James Edward G. II
James G. (Guest)
on 2007-01-07 20:47
(Received via mailing list)
On Jan 7, 2007, at 12:32 PM, James Edward G. II wrote:

>> Most Cellphone providers will let you send SMS via email. Check
>> with the providers for the email address. I do it all the time.
>
> Thanks for the tip.  This did help.
>
> Looking into this means and Google's simple service:
>
> http://www.google.com/sendtophone
>
> it seems I need to know the provider in either case.  Is this
> always true?

This service seems to allow me to do it generically:

http://www.teleflip.com/

James Edward G. II
Matt Pelletier (Guest)
on 2007-01-07 20:50
(Received via mailing list)
On 1/7/07, James Edward G. II <removed_email_address@domain.invalid> wrote:
>
> I'm going to need to send SMS messages from a Ruby server I am
> building currently.  I just thought I would ask if anyone here has
> any experience doing that and would recommend a library, web service,
> web site I can mechanize, or whatever.  Any tips appreciated.


Your two basic entry points into the mobile networks are:

1. Email SMS gateways (each carrier hosts their own, Verizon uses
vtext.com).
You send an email to removed_email_address@domain.invalid, an SMS gets sent to 
the end
user. These are free for now, but you get no guaranteed delivery, or
notice
of receipt, and they're a bit unreliable at times. Most phones will let
you
send an SMS to an email address (the phone's software and the carrier
must
support it), so you can do 2 way communication if you need it.

2. You can sign up for an SMS aggregator service. SMS aggregators are
the
formal entities that handle intra-carrier SMS traffic, so they
frequently
offer entry points for third party services. You would get a shortcode
(or
share one) and could send and receive with it.

Clickatell is one noteworthy SMS service provider, but there are more
and
more out there these days:
http://www.clickatell.com/brochure/products/develo...

Wikipedia's SMS Gateway entry is also helpful:
http://en.wikipedia.org/wiki/SMS_gateways

If you want to go the Email to SMS route, there are lists online to show
you
which carriers use which email domain / syntax, so you could brew your
own
lib. This obviously means you'd need to know which carrier a person uses
so
you know where to send the email, so you'd have to ask the end user. I
suspect there are services out there where they handle that bit for you
and
just require the number. Since you can transfer phone numbers between
carriers now it's not as easy to predict which carrier a number is from.

Good luck,
Matt


James Edward G. II
Jan S. (Guest)
on 2007-01-07 21:30
(Received via mailing list)
On 1/7/07, James Edward G. II <removed_email_address@domain.invalid> wrote:
> I'm going to need to send SMS messages from a Ruby server I am
> building currently.  I just thought I would ask if anyone here has
> any experience doing that and would recommend a library, web service,
> web site I can mechanize, or whatever.  Any tips appreciated.

One option is to connect a phone/modem/data card to the server
directly, and use that to send the messages. Most phones provide a
serial port to communicate, and sending SMS is a matter of a few AT
commands (with a few quirks, as usual). It depends on what kind of
messages you want to send (text only/binary/unicode).

Advantages:
- you can send messages to any number your operator is able to send
- you don't need to rely on some third party gateway
- might be more flexible (on some modems you can deliberately set the
sender number even to a text)

Disadvantages:
- may be more expensive compared to email gateways (depending on your
subscription)
- the need for hardware
- more work (though a library/tool for the communication may exist, I
don't know)

Anyway, I would consider this as a last resort, when there is no
sufficient email gw available.
Martin B. (Guest)
on 2007-01-07 21:57
(Received via mailing list)
we are using smstools (http://smstools.meinemullemaus.de/) with a serial
cellphone attached to the server.
It works very well, a daemon (smsd) is periodically checking on an
outbox
folder (/var/spool/smsd/outbox) and my program is simply writing
textfiles
into it. The format of these files is simply:
--------
To: <Phone number>

Message to send
--------

martin
Donald M. (Guest)
on 2007-01-07 23:01
(Received via mailing list)
Choosing an SMS aggregator is definitely what I'd recommend, as they
have
direct binds to most US carriers (and in some cases, international
carriers)
for reliable message delivery. I do technical support for one such
aggregator. I don't want to advertise on this thread, so e-mail me
direct if
you're perhaps interested...

~Myles
Dr. D (Guest)
on 2007-01-08 22:45
(Received via mailing list)
Kannel is a pain to configure, but once it's up it will send to urls,
so you can back end it with your favorite ruby web framework.  It will
communicate over the net via smpp, or over serial/usb/bluetooth/etc
with a phone you've attached to the computer.  Finding a phone that
supports sms over serial correctly is another matter.

http://www.kannel.org/

Kannel is the heavy artillery approach.  If you're just trying to let
yourself know a process crashed, I'd stick to email.
Rob S. (Guest)
on 2007-01-08 23:13
(Received via mailing list)
On 1/7/07, James Edward G. II <removed_email_address@domain.invalid> wrote:
> >>> James Edward G. II
> > it seems I need to know the provider in either case.  Is this
> > always true?
>
> This service seems to allow me to do it generically:
>
> http://www.teleflip.com/
>
> James Edward G. II

I've used teleflip before just to send to friend's cell phones from my
email, when I don't want to figure out what provider they are on.  It
works well enough, though teleflip adds some subject-line type stuff
that may look strange in the recipients cell phone.  They have been
around awhile so it seems to be a service that is going to stick
around for awhile...

- Rob
Erik H. (Guest)
on 2007-01-10 08:36
(Received via mailing list)
On 2007-01-07 11:56:11 -0800, Martin B. <removed_email_address@domain.invalid> 
said:

>
> we are using smstools (http://smstools.meinemullemaus.de/) with a
> serial cellphone attached to the server.

Just to add to this, you are at the complete mercy of the destination
provider if you use their email gateway. For a while I did this w/
nagios, but the latency between send and arrival on my provider was so
high that I was just wasting money (on several levels).

All the ISPs that I know of use the quoted solution (or something very
similar), and if time is critical (which it generally is with these
sorts of things), you may want to seriously explore that option.

-Erik
This topic is locked and can not be replied to.