Smshelper
THE lib for SMS-MT / HLR-Lookups.
One day i was asked to connect a crm to correspond in SMS with call center customers. Chose at random one of the operators, wrote a few lines of code and there it was - SMS inbound/outbound.
"Some of our messages aren't being delivered on time, some are being lost altogether, some arrive multiple times, some arrive after more then 24 hours from being sent"
--Your faithful customer
I kept adding operators and here are the results...
Currently supported:
- Unicode: across all operators
Operator #send_message #get_balance #get_status #get_callback_response #hlr_lookup Aql X X X Bulksms X X X X Clickatell X X X Esendex X X X X Mediaburst X X X Mycoolsms X X X X Nexmo X X X Routomessaging X X X X** Smstrade X X X Textmagic X X X Traitel X X Vianett X X X X Webtext X X _
** Does NOT provide handset network status, so you can't check if a subscriber is in reception zone with a switched-on handset.
Installation
gem install smshelper
Usage
require 'smshelper'
config = Smshelper::Config.new(
:webtext => {:uname => '', :passwd => ''},
:bulksms => {:uname => '', :passwd => ''},
:clickatell => {:api_key => '',:uname => '', :passwd => ''},
:textmagic => {:uname => '', :passwd => ''},
:smstrade => {:api_key => ''},
:esendex => {:uname => '', :passwd => '', :acc => ''},
:mediaburst => {:uname => '', :passwd => ''},
:nexmo => {:uname => '', :passwd => ''}
)
service0 = Smshelper::Api::Bulksms.new config
service1 = Smshelper::Api::Webtext.new config
service2 = Smshelper::Api::Clickatell.new config
service3 = Smshelper::Api::Textmagic.new config
service4 = Smshelper::Api::Smstrade.new config, :route => 'gold'
service5 = Smshelper::Api::Esendex.new config, 'com:validityperiod' => '1'
service6 = Smshelper::Api::MediaBurst.new config
service7 = Smshelper::Api::Nexmo.new config, :ttl => '60000'
= Smshelper::Message.new(
:recipient => '14128765432',
:text => "The balance on
#{serviceX.class.name} is
#{serviceX.get_balance}",
:sender => '33765432132')
serviceX.
Is It "Production Ready™"?
Most likely not, there are no tests yet and the API is going to change a bit until v1.0.0 release
TODO:
- TESTs
- introduce plugins
- handle sms of any size (currently smshelper tries to use concat setts, operator permitting)
- add support for www.totext.net, www.world-text.com, www.mpulse.eu, www.clicksms.co.uk, www.tellustalk.com, www.tm4b.com, www.txtnation.com, www.smsextrapro.com, www.truesenses.com