2-way SMS projects

Introduction

A service has been developed to enable students and staff to send text messages to a CEMS faculty server and for the server to respond with a text message back to the originating phone. The service is based on a GSM number rented from Clickatell in South Africa and a few simple services have been developed so far.  The number is actually a MANX Telecom number! Others will be developed by students and staff during the year.  

 

This document describes the basic service and some ideas for future projects.

 

Multiplexing

To enable a number of applications to run from the same mobile phone number, incoming messages are received by a script which finds the first word in the message (the CODE), delimited by a space, ‘.’ or other punctuation, and uses this word to look up an index of URLs’.  If the CODE is found, the remaining text and the originating mobile number is appended as CGI parameters to the matched URL, and the URL invoked. If the keyword is not found, the message is send to the default URL (keyword ‘.DEFAULT’) if it is defined. Otherwise the incoming text will be ignored.

 

The called application is expected to reply.  If the reply begins with ‘Reply’, the remainder of the reply is sent back to the originating mobile number. All messages are logged for later analysis.

 

The CODE/URL table can be edited online under password control.  The table is held in a simple text file for speed of loading.

 

Note that the same URL can have multiple associated keywords.  Note also that since the originating mobile number is passed to the application, the response can vary depending on that number, for example by only responding to registered numbers or by mapping the number to a student registration number to retrieve relevant information.

 

Interface definition

From mo.php to target application:

            Protocol: cgi / http

            Parameters:      code – the initial code word detected

                                    text  - the remainder of the incoming message, after the code and its separator

                                    from – the originating mobile number – as an international number

            example:   http://www.cems.uwe.ac.uk/~astud/myapp.php?code=astud&text=test&from=44789645534

 

To mo.php from target application:

            Protocol: mime/txt / http

            A single line of text If the first characters are ‘Reply:’ , the remainder of the line is sent back to the originating mobile

 

Issues:

            Return interface does not allow for alternative destinations, or for alternative types of messages.

            Interface should use SOAP, or at least an XML format reply

         
Example System Interaction

 

This sequence diagram illustrates a user texting our GSM number for the time of the next departure of a 70 bus.  The communication is by GSM network and Internet. 


Implemented Services

 

See the index for all current services.

 

We have recently put in a system for the UWE Careers Service.

Suggestions for new or enhanced services

 

Bus Service

This needs timetables to be checked, especially for rundates.

Email

At present, email can be sent to a mobile, and it is sent in conversational mode, allow the mobile to simply reply.  However, all un-matched input comes only to me, so there needs to be a dynamic routing table to associate an incoming SMS with the originating email address.  Doesn’t look to difficult, but it would fail if two people were texting the same phone at the same time. In this case, we could send to both, but there is a loss of privacy.

Exam time service

Implemented for the January 2005 exams only

Enhancements

The new codes do not exactly trip off the tongue, so they are not very memorable – modules often have a nickname (ISD3) and this should be able to be used instead.

 

The exam schedule is prepared as a .CSV file for use with Excel. His file must be used to initialize the database.

 

Some exams are scheduled for several rooms: if a very large number of students is involved or there are special needs students. Handle these as well.

Car Registration number

 

Enhancements

Extend to post 2000 numbers – a student exercise

Make and Model information seems to be readily available – could even scrape an application like Netcars2000 to get it  - tried but not possible – would they be amenable to a request for a service for this, or where do they get it from?

 

Other info by retrieval from a list of hot numbers e.g. stolen cars – I wonder where we could get this information from.

 

Delayed Message service

Scenario: A woman has been invited out by a man who she is a little unsure of.  She doesn’t want to alarm anyone, but she wants a friend to be informed of her whereabouts if anything should happen. She texts a message, a mobile phone number and a number of hours to the service. After a delay of the specified number of hours, the service forwards the text message to the specified mobile number.  However, f all goes well she texts again sometime later to cancel the service.  Perhaps a password would be necessary as well. 

 

Send:DMS 078546434 muggle 12  I’ve gone to 34 Northville Road, BS8

 

After 12 hours: message is forwarded to 078546434 with the original phone number for identification, or the forwarding can be cancelled:

 

Send: DMC muggle

 

Ref – this is a real service I think

Speed Texting Competition

An event is arranged – entrants will text to register for the event.  At a prearranged time, a sentence will be sent to all registered entrants at the same time.  The winner will be the first to text back the exact sentence. 

Quiz master

Quiz questions are often of a simple structure and a restricted number of categories of facts cover a significant number of questions.  ‘What’s the birthstone for May?’, ‘What’s Bristol Rovers home ground?’ ‘Alliumphobia is the fear of what?’  Perhaps a database of these facts could be collated, one topic at a time by students, and queried by a common message using nearest matching:

 

Send: Q alliumophobia

Send: Q Birthstone May

Send: Q Bristol Rovers

Collaborative writing

This idea is based on a game in the Comedy Game show run by Humphrey Lyttleton. 

 

1  students join

    Send:  JOIN nickname

 

2: when at least 3 have joined:

 

    Repeat:

Select next author (NEXT) randomly

Send last line of text to NEXT

NEXT replies with his/her next line of the story:

    Send: ADD  line of text

Line is added to the growing story

 

3  A new story can be started by the message :

            Send: NEW <password>

Which terminates the current story and starts a NEW story

 

4. The Event is terminated by the message:

            Send: FINISH

 

5  At any time the current and past stories can be seen on an internet page. This version is annotated with the writer’s nickname.

 

Note

1.  Would this just descend into foul language which would get me into trouble?

 

2.  There are some complications which arise in this application, including:

            lines can be accepted only from the mobile last requested

            the random choice may be constrained so that everyone is asked for the first line before anyone is asked for a second

            a set of first lines might be used to start the stories off

            if no reply is received from the NEXT person after a specified period, another should be chosen instead.

Alternative SMS formats

Mobile phones can also receive ring tones (a monophonic tune) and operator logos (monochrome 14*72) via SMS.  Could these formats be used as alternative ways of presenting information?

 

Resources

School Papers

 

Information

Trade organisations

GSM providers

Free SMS services

        http://sms.lycos.co.uk

SMS Providers

GSM Modems

http://www.omniinstruments.co.uk/

  • companies delivering mobile content

Mobile SMS