GSoC 2008 Messaging Module

Author: Ajay Kumar [ajuonline at gmail dot com]
Mentor: Fran Boon
GSoC Link:
Proposal Link: Initial Proposal

This page is intended as a place to jot down the progress, post queries and document research findings as I make progress on my work and to post findings as a result of communication with the main-dev. This document is always work in progress and parts of this document will/can be moved on to the main documentation pages from time to time upon maturation as needed.

Project Plans

Progress Updates

Development Environment

  1. Linux
    1. Distro - Fedora 9 []
    2. Apache - Version 2.2.8
    3. mySQL - Version 5.0.51a
    4. PHP - Version 5.2.5
  2. Windows
    1. Distro - XP Professional with SP2 [Version 5.1 Build 2600 SP2 RTM]
    2. Apache - Version 2.2.2
    3. mySQL - Version 5.0.21-community
    4. PHP - Version 5.1.4
    5. Using XAMPP for Windows Version 1.5.3a


  1. Login to Sahana via SMS
  2. Ability to Access Sahana Menu via SMS
  3. Focus on implementing on SMSTools for now (for Win32 access on Portable App version)

Logical Brainstorming for Deliverable

  1. Existing system Analysis:
    1. Ability to log incoming/outgoing SMS into the DB for Both Kannel/SMSTools
      • See mod/msg/inst/dbcreate.sql
      • SQL files do give a lot of information.
      • Incoming message storing is fine. But messages sent from the system using SEND Console are not logged in a proper way
      • Solution is to have detailed logging. Possible use of tables like “msg_smstools_log” whose current usage is unclear. Is it unused ?
    2. How do Pre-Registered Cell numbers get ACL Role assigned for Alerts? | Pointers Needed |
      • Assign a cell# to a Sahana username, Role assigned to username as per normal
      • Done by creating 2 additional fields in the “users” tables for 2 mobile numbers. Since they act as a password & keeping security framework in mind, it is being kept aside of the normal messaging table.
      • Admin configurable in case 1==mod_msg
    3. Analyse existing SMS Handler code/functioning
      1. Surveying: Receive responses as survey reports - Is this done by reading incoming SMS ?| Pointers Needed |
        • SMSTools plugin receives SMS via smsfwd.c which POSTs results to
        • Kannel plugin receives SMS via Kannel which POSTs results to
      2. Auto-refreshing SM receiving interface - Has this anything to do with getting the SM updates via SMS?| Pointers Needed |
    4. If incoming SMS is processed as Input, Any special format followed for such input ? Dont think so
    5. Check ACL Done Ignoring AUTH at the moment.
    6. Check SQL Done
    7. Check Session handling/Current Login architecture | Pointers Needed
      • SMS Login takes place in CURL sessions.
      • Emulate Session handling by Cookies for each “senders caller id” as a “key” and store in DB
      • Also store last menu accessed by each “sender_id”
    1. Write a sample script to read incoming message and parse the input properly, something like “login <user> <pass>” – DONE
    2. Invoke a script to do that, and separate each input item, encrypt the password.– Small Prototype DONE
    3. Invoke DB transaction to check if user exists and return true or false. Small Prototype DONE
    4. Doing this will help achieve a running prototype of the main idea behind any login system
    5. Upon success, extend its implementation on to Sahana login system.
    6. Temporary mapping in DB of Login Name & Caller ID i.e. Cellphone number of user should be created –
    7. Above helps in keeping track of last accessed menu/menu option by this cellphone
    8. Maintaining a session cookie with Caller ID for session handling/expiration of Login session
    9. In theory getting this deliverable helps materialize:
      1. DB Interaction through SMS
      2. Reading the SMS and triggering execution of separate script/function to perform a task based on input
      3. Sending the acknowledgment/output via SMS to user

Additional Device Compatibility List [to be verified]

In order to have our application communicate over SMS and take it as an input too we need both incoming and outgoing SMS transmission capabilities on the GSM Phone to be used. Hence, I am compiling this list to assist in further documentation.

List goes here:

QR Code
QR Code dev:gsoc2008_msg_plans (generated for current page)