Integrating SMS Messaging With Your Rails Application
Integrating SMS Messaging With Your Rails Application
Why SMS?
Oldest most reliable means to communicate with mobile users
Cell phone agnostic
Everybody is doing it
Great way to receive emergency messages at the bar
SERVER IS DOWN
SPARKS ARE UP
Black Box of
Your application &
gateway &
other
Mobile
Terminated
(MT)
Black Box of
Your application &
gateway &
other
MT
MO
ROCK
storage considerations
No delivery confirmation
SMSC
SMSC
SMSC
GSM Modem
SMSC
GSM
Modem
(Cell Phone)
AT Commands
Super
App
SMSC
SMSC
Awesome
App
SMSC
SMSC
SMSC
SMS Gateway
Rockstar
App
SMSC
SMS Gateways
Free Open Source Gateways
Kannel - written in C supports many SMSCs and also acts as a WAP
gateway
Must setup/configure on a server yourself
Bulk discounts
Create an account
http.request_get(url_string)}
/^OPT(\s*[-_]?\s*)OUT|STOP|END|QUIT|
UNSUBSCRIBE|EXIT|HALT|
FUCK(\s*[-_]?\s*)OFF|REMOVE|CANCEL)/i
Chewing on a Cactus
Sms gateway service providers(connection aggregators) will help with
this process or you can go directly through the CSCA in the US
1.
2.
3.
4.
5.
6.
7.
Implement yourself
-
Tracking
Outbound
Status
Time Sent
Service Provider UID
Sender/User
Username
Password
Favorite beer
PhoneNumber
Number
WhiteList?
DoNotSend?
PhoneCarrier
Name
Email gateway
NOT_PROCESSED
SUCCESS
Cron/Background
Task
Consumer
NOT_PROCESSED
PROCESSING
FAILED
Use batch API call to send multiple phone numbers the same msg
restrict access
Can make a distinction between opt out, opt in, and bounce, abuse
Useful References
General SMS: http://www.developershome.com/sms/
Provider Gateway addresses: http://en.wikipedia.org/wiki/SMS_gateway
Sms On Rails Engine: http://github.com/blythedunham/smsonrails
Clickatell Gem: http://clickatell.rubyforge.org/
Exception Notification Plugin:
http://github.com/rails/exception_notification/tree/master
Kannel: http://www.kannel.org/
RapidSms http://mobileactive.org/tagging/rapid-sms
RubyGSM http://mobilehacking.org/index.php/RubyGSM
More Mobile Tools: http://mobilehacking.org/index.php/Main_Page
Common Short Code Admin(CSCA) http://www.usshortcodes.com/
Questions?
Photos
Trash can http://www.flickr.com/photos/knittingskwerlgurl/396165625/
Flowers http://www.flickr.com/photos/blondepowers/2722511769/
Timepiece: http://www.flickr.com/photos/lebron/223223725/
Bear http://www.flickr.com/photos/guenterleitenbauer/697065143/
Email http://www.flickr.com/photos/charuca/2448685976/
Golden gate: http://www.flickr.com/photos/h2orange/63606734/
Beetles: http://www.flickr.com/photos/lhtang2006/3490285407/
Computer Cat: http://www.flickr.com/photos/sammrowe/3491788169/
Giant: http://www.flickr.com/photos/andreatallone/2841979961/