Project

smshelper

0.0
No commit activity in last 3 years
No release in over 3 years
send sms with multiple gateways, like esendex, bulksms, clickatell etc..
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
>= 0

Runtime

 Project Readme

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'

message = Smshelper::Message.new(
                                 :recipient => '14128765432',
                                 :text => "The balance on
                                 #{serviceX.class.name} is
                                 #{serviceX.get_balance}",
                                 :sender => '33765432132')

serviceX.send_message message

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:

I welcome pull requests!