sms Namespace Reference

setup and use the SMS workflow More...


Functions

string Send (type mobile, type message)
 send out SMS

Variables

string SMSGWY = UNKNOWN
 variable used as the smtp eMail address of the mail2sms gateway
string SMSDB = UNKNOWN
 variable used as the smtp eMail address of the BID server on the SMS database host


Detailed Description

setup and use the SMS workflow

Attention:
The doxygen documentation builder was primary developted for the C, C++, JAVA, ... language documentation and does not support the Tcl syntax.
The following translation rules have to be applied:
variable string NAME = DEFAULT set NAME DEFAULT
variable array NAME = DEFAULT array set NAME DEFAULT
procedure string NAME ( type ARG1, ... ) proc NAME {ARG1 ...}
procedure string NAME ( optional ARG1=DEF1, ... ) proc NAME {{ARG1 DEF1} ...}
The sms package from file lib/libSMS.tcl is available with:
package require sms ?1.0?

The SMS workflow was designed as a filter between the SMS sending application and the mail2sms gateway to provide a mobile-number lookup service. The mail2sms gateway is not part of the workflow and have to be already available. The format of the mail2sms gateway eMail requires the mobile-number as the subject and the sms-message as the body. The interface to your local mail2sms gateway can be customized by modifying the file lib/libSMS.tcl .
The SMS workflow has the following components relative to the root directory of the BID server:
location type description
lib/libSMS.tcl package main config file with the definition of the SMS sending procedure sms::Send and the configuration parameter sms::SMSDB and sms::SMSGWY .
plugins/sms/db-write.tcl service write name key and mobile value into the database on sms::SMSDB host. If the current host is not sms::SMSDB host than forward the service to the sms::SMSDB host.
plugins/sms/db-delete.tcl service delete name key from the database. If the current host is not sms::SMSDB host than forward the service to the sms::SMSDB host.
plugins/sms/db-read.tcl service read name key from the database and call the sms::Send procedure to send out message. This service can only be called on sms::SMSDB host.
tests/sms.test test-unit quality test-unit used to perform various tests on the sms-workflow. This file is only available in the distribution directory of the BID server.
plugins/test/sms.tcl test-service quality test-service used together with tests/sms.test to perform various tests on the sms-workflow. This file is only available in the distribution directory of the BID server.

In addition two public services are available to add and delete mobile numbers from the database:
sms/db-write name mobile write the name key with mobile value into the database on the host sms::SMSDB
sms/db-delete name delete the name key from the database on the host sms::SMSDB

a service is called using the my-service@other data subject of the mime header and the arguments encoded using the ParseBody body syntax.

example:

  1. call the sms/db-write service using the UNIX command-line tool mailx.
    mailx -s sms/db-write@mail bid@server <<EOF
    ><name:support-mobile
    ><mobile:123-456-789
    EOF
    
  2. send a SMS from any service in the BID server using the database lookup defined above:
    sms::Send lookup@support-mobile "ALARM: the main server is down"
    


Function Documentation

string sms::Send ( type  mobile,
type  message 
)

send out SMS

Parameters:
mobile the mobile number or a text to do the database lookup
message the SMS message to send
If the mobile has a lookup@ prefix than forward the service to the sms::SMSDB host to do a mobile-number lookup first otherwise the service will be directly forwarded to the email2sms server


Variable Documentation

string sms::SMSGWY = UNKNOWN

variable used as the smtp eMail address of the mail2sms gateway

Attention:
the variable can be redefined in the plugin code to customize the behaviour
The smtp eMail address have to look like:
user@hostname
and can be verified using your local eMail client.

string sms::SMSDB = UNKNOWN

variable used as the smtp eMail address of the BID server on the SMS database host

Attention:
the variable can be redefined in the plugin code to customize the behaviour


Generated on Thu Sep 13 21:19:10 2007 for bid by  doxygen 1.5.0