The SMS daemon takes care of sending alerts queued for SMS dispatch.
The daemon will regularly check the smsq database table via a generalized queue module. Any new messages are dispatched via one or more dispatchers with a generic interface. Support for multiple dispatchers are handled by a dispatcher handler layer.
For more help on usage, run smsd.py --help
and see the smsd.conf
config
file.
Message queues are generic producers of SMS messages in smsd. At the
moment, only the nav.smsd.navdbqueue.NAVDBQueue
implementation is
available, which will produce SMS messages from the smsq
table in the NAV
database.
Other message queue implementations can be written using the same interface as
implemented by nav.smsd.navdbqueue.NAVDBQueue
.
smsd delegates the actual dispatch of messages to dispatcher plugins. Plugins
can be configured in prioritized order in smsd.conf
.
description: | The Gammu dispatcher uses Gammu to send SMS messages via a cell phone connected to the server with a serial cable, USB cable, IR or Bluetooth. See http://www.gammu.org/ for more information. |
---|---|
depends: | Depends on the gammu Python binding. As a prerequisite, the
navcron user must have write privileges to the device where the
Gammu-configured mobile phone is connected. |
pros: | Works as long as the mobile carrier is up and running, independent of your own network. |
cons: | You will need a dedicated mobile phone or other GSM device. |
description: | Originally contributed by USIT, University of Oslo for use with their HTTP-to-SMS gateway. Generalized to be useful for similar gateways without UiO’s exact URL syntax. Supports both HTTP and HTTPS. |
---|---|
depends: | Depends on urllib and urllib2 , which both are parts of core
Python. |
pros: | Does not need a dedicated mobile phone. |
cons: | Depends on a working network connection between you and your HTTP-to-SMS gateway. Does not support POST or HTTP Basic Auth. |
description: | This dispatcher sends SMS via Boost Communications’ WebService (SOAP). See http://www.boostcom.no/ for more information. Note The dispatcher is provided as a proof-of-concept only; it seems it no longer conforms to Boost’s newest APIs. |
---|---|
depends: | Depends on |
pros: | Does not need a dedicated mobile phone. |
cons: | Depends on a working network connection between you and Boost Communcations. |
description: | This dispatcher sends SMS via Uninett’s email-to-SMS gateway.
Uninett’s gateway only works internally, but this plugin can serve as
a proof-of-concept for someone implementing a similar service. The
e-mail adress is configurable in smsd.conf . |
---|---|
depends: | Only depends on smtplib , which is a part of core Python (of
course, a working SMTP server is required also). |
pros: | If you have an email-to-SMS gateway that accepts e-mails where the subjects is a phone number and the body is an SMS text message, there is no extra setup cost to get the daemon sending SMS messages. |
cons: | Unless you have a similar email-to-SMS gatway, this only works for Uninett. |
Write your own dispatcher by extending the
nav.smsd.dispatcher.Dispatcher
class. You can also implement your
own message queue by implementing the same interface as the
nav.smsd.navdbqueue.NAVDBQueue
class.