Problem Statement:
Using our SIP library and a web-based calendaring application (using iCal), write an IM/event client that reminds a user of an upcoming appointment with a SIP MESSAGE or makes a call, with an announcement. This can also be used as wake-up call system.
- Which software are we extending? cinema environment
- Features to be supported and priorities? Should be able to send event reminder using email, SIP MESSAGE, and SIP INVITE (with pre-recorded announcement as media). Use sql database for storing events, web interface for creating and managing calendar, and SIP Java library for SIP interface.
- Existing libraries or modules? cinema database, SIP Java library, cinema web interface.
- Programming language? Java, Tcl (for cgi scripts)
- Operating system? Solaris and Linux
- GUI tool kit? web cgi.
- Component testing? No testing tool. Tested by running the application under manipulated database
- Error logging? TBD.
- Installation mechanism? integrated into cinema for web interface and databases. Shell script build.sh for UNIX environment for building the Java notification application.
- Milestones?
- November 5th: Setting up MySQL, Coding notification application (notifying method is e-mail and SIP IM) Documentation (including javadoc)
- December 17th: Learning Tcl/Tk, Providing Web interface for calendar, Documentation.
- Optional: Notify using SIP INVITE with a prerecorded announcement as media.
Columbia InterNet Extensible Multimedia Architecture (CINEMA) provides a test bed for different multimedia and Internet telephony applications. We have implemented some of the basic components like Internet telephony clients and servers, conferencing server, voice mail system, etc. An important component missing in the current system is the automatic notification of the events, e.g., notify all the conference participants two hours before the schedule time by sending emails.
Session Initiation Protocol (SIP) is used for Internet telephony signaling. Apart from basic call establishment and teardown, it can also be used for sending instant messages and conveying presence information, or other event notification. Our SIP Java library provides an API to the core SIP stack and gives example applications for call setup and instant messaging.
Part-1: Java IM clientWe store all the event information in a SQL database. Following fields can be considered in an events table.Write a command line based Java Instant message client that can send and receive SIP MESSAGE using the Java SIP Library.
The command line is shown below.
java imclient localuser@localdomain [ localserver ]
localuser@localdomain is the address with which the client should register with the SIP server. The server address is specified by localdomain. If the localserver parameter instead if present. For testing please use localuser=tk515, localdomain=cs.columbia.edu and localserver=erlang.cs.columbia.edu.
| Field name | type | description |
| event_id | int | every event is identified, by a unique id. |
| event_group | for recurring events, e.g., weekly meeting. | |
| creator | varchar | user id of the creater, e.g., tk515@columbia.edu. This is also index in primary user table (put). |
| start_time | datetime | start time of the event |
| end_time | datetime | end time of the event |
| notify_time | datetime | notify time of the event |
| notify | text | target to send notification to, e.g., mailto:tk515@columbia.edu, or sip:tk515@columbia.edu. |
| access | enum | access privileges for this event record, e.g., only creator, group or public. |
| description | text | textual description of the event. This is used when sending notification. |
| room | varchar | any conference room requirement |
| resource | text | additional resources, e.g., an overhead projector. |
| call_priority | varchar | priority of the call |
Instead of using iCal data format we will use our database to store the information. Jonathan Lennox has written a piece of software, Cal-Code in Java that allows you to determine whether an event falls within a given timerange. Instead of storing the repeat indicator for events we will expand the repeated events to a list of one-shot events in the database and then create a shorted list, which is then used to schedule the next notification. (This does not work well if events are inserted, but we can check for those separately.) It should be possible to avoid checking all the events every time (every, minute or so).
An initial algorithm as follows may work only for one-time events.
Every K minutes, the program connect to the database with SQL,
SELECT * FROM calendar
WHERE current_time < notify_time < current_time + K
We need to modify the code to search for all events where the time
range falls between the event's start_time and end_time.
Part-2: Event notification code using email due Nov 5
- Create a MySQL database with the above table format.
- Write a Java application that sends email notification based on the event table.
- Test the system using some example events like meeting schedule, seminar schedule, or phone call appointment.
Part-3: Event notification code using SIP MESSAGE due Nov 20For a more sophisticated calendaring system a user should be able to change the event and edit calendar appointments from the web interface. We have developed a nice web interface using Tcl cgi scripts to control and manage other parts of the communication portal environment.Use the Java SIP library to implement the Instant messaging using SIP MESSAGE method. Use sipc and sipd to test the system.
Now we should be able to integrate the event manager into the web interface.
Part-4: Web interface for calendar due Dec 10
- Learn Cgi-tcl. We will organize an informal tutorial describing our installation, web interface and database.
- Install the existing web interface on your computer and test it to get a feeling of how it works.
- Add a new user page for calendar events. Integrate this into the conferencing page also. The interface can be similar to your calendar tool on Unix.
- Integrate the database table into our existing system. Modify install.tcl, createdb, createsip.sql and altersip.sql files. Test the system with our installation.
Part-5: (Optional) Notification using SIP INVITEConsider writing a technical report describing your project. This is optional.It would be nice to have the notification system inform the user by inviting him in to a SIP call and playing out a pre-recorded announcement. Initially we will use rtpplay tool to playout the announcement. In future it should be possible to use Text-to-speech convertor and external RTSP media server to generate the media packets.
This will allow us to use the system with the existing telephones using the PSTN/SIP gateway, e.g., you can send a voice notification to sip:9397063@cs.columbia.edu to reach the phone number 9397063.