t e k t o n i c a Web Development | Mobile Computing | Embedded Systems
Projects | Company | Partners
-

- - -

iSMS - sms application server


INTRODUCTION

This is a package based upon the GSM::SMS package. It allows to implement a webservice based on SMS messages. It can be thought of a piece of middleware that implements a HTTP<->SMS gateway.

There is support for:

  • rule based bidirectional SMS messages.
    • SMS messages get translated to a HTTP request. A WEB frontent allows for easy configuration of rules. You can define ACL ( Access Control Lists ). POST/GET, Basic authentication, standard queries ...
  • XMLRPC based SMS gateway.
    • This allows for easy integration of corporate level applications into the iSMS suite. Almost all application servers or groupware products have XMLRPC support ( www.xmlrpc.com). With this support you can easily deploy a corporate wide SMSC.
  • Remote SMS nodes.
    • iSMS is build around a HTTPd ( apache ) as an event-based application server. To support serial nodes ( responsible for reception of SMS messages ) I had to use a seperate 'node-process'. This also allows to build a distributed SMSC. You can have different nodes ( one for each operator ) and they all communicate back to the main server. The node uses XMLRPC as it's messaging protocol. This way it is easy to use it through a corporate firewall or proxy.
    • A node does not need to run on the same machine as the iSMS server.

PREREQUISITES

  • GSM::SMS package (CPAN)
  • HTML::Mason
  • Apache::Session
  • DBI
  • DBD::Pg
  • Apache
  • mod_perl
  • postgresql >= 7.0

INSTALLATION

iSMS SERVER

You must have installed the latest GSM::SMS package:

	>perl -MCPAN -e shell
	CPAN>install GSM::SMS

A system with a node also needs to have the GSM::SMS package.

Also you will need to have apache with mod_perl support, and you will need to have a functional installation of HTML::Mason (http://www.masonhq.com).

iSMS uses postgres as its database. Normally the latest version will work. http://www.postgresql.org

Create the database 'isms' in postgres. See that the user 'isms' has full access rights to the database. Leave the password blank. You can always change the user in the file './lib/Tektonica/iSMS/Admin/Config.pm'.

Untar the package into the directory you want it to be installed, e.g. '/opt/isms':

	>mkdir /opt/isms
	>cd	/opt/isms
	>tar zxvf isms-xx.tgz 

Run the install script. This will adapt some of the paths in the files to reflect the install directory. It will also create the necessary tables in the database.

	>sh install.sh

Instruct apache to configure a portion of you website as the iSMS suite. Look into the example for the httpd.conf file in the './conf/httpd_example.conf' file.

Restart the httpd and point your browser to the newly created website.

iSMS node

To install the node you need to have a functional installation of GSM::SMS.

	>perl -MCPAN -e shell
	CPAN>install GSM::SMS

Please try to get the examples running before trying to install the node software.

Make sure you can access the node url, as defined in the httpd.conf file from the machine that will be acting as a node. Note that this can be trough a proxy. Next untar the iSMS archive and copy the node directory to the directory in which you want to install the node.

	>mkdir /opt/node
	>cd /tmp
	>tar zxvf isms-xx.tgz
	>cp -R isms/node/* /opt/node/
	>cd /opt/node

Edit the config file on the iSMS server, especially the section about the XMLRPC node example. Edit the node.conf file and see that both have the same passsentence. Now try to run the node software and if all went fine, you will see the node appear in the management console.

Developing SMS services

You are now ready to develop bidirectional SMS services.

A short introduction to develop tour own SMS services.

  1. Create a new rule
    name: name of the 'service'.
    mrl: mobile resource locator
    • keyword
    • regular expression e.g. ^\.qo\s+(.+)
      -> start with '.qo' then some spaces then the rest of the message.
    regular expression : check the box when a regular expression.
    method: get or post
    add standard query: When checked a std query string ( post parameters ) are appended to the url.
    url?msisdn=<msisdn>&msg=<msg>&timestamp=<timestamp>
    With <msisdn>,<msg> and <timestamp> filled in You can also opt for not using the standard query ...
    $msisdn, $msg and $timestamp will get replaced by their respective values ... e.g.
    http://www.webservice.biz?phonenumber=$msisdn& message=$msg&timeofsendage=$timestamp
    Save ...

  2. Create an acl entry
    Nobody has access to the rule yet ... you will have to make an entry in the acl:
    name: name of the acl entry
    regexp: regular expression of the regexp

    e.g.
    name: everyone
    regexp .*
    This will allow everyone ...
-

-

Valid HTML 4.0!