Eva NautiyalManica Piputbundit
en107@columbia.edump466@columbia.edu
Columbia University, New York, NY 10027
Winter 2002


Instant Message Logging For CINEMA



Abstract

SIPD is a SIP redirect, proxy, and registration server. SIPC is SIP user agent that can be used to send instant messages. It can communicate with a proxy server such as SIPD and other user agents. Both are part of CINEMA (Columbia InterNet Extensible Multimedia Architecture). This project involves integrating all these components in order to log IMs and view them over the CINEMA web interface.


Introduction

SIPC can operate via a proxy server- instead of sending a message directly, it can send it to a server such as SIPD, and SIPD can forward the message on to the recipient. Additionally, SIPD has the capability to log messages into files or databases. As IMs are sent, they are logged into the sip database. Tcl cgi scripts can be written to pull these messages via an SQL query and display them on a web page for the user.


Program Architecture

The architecture is illustrated in then diagram below:

Basically, when SIPD is run and SIPC has the server which SIPD is running on set as its outbound proxy server, any IMs exchanged between two users are routed to SIPD. As SIPD routes those requests to the respective SIPC recipient, information about the messages being exchanged are logged into the SIP database. This information includes the sender, the intended recipient, the timestamp of the message, the status of the message, and of course, the actual contents of the message. When a user logs into the CINEMA web page with his login name and ID, under the "Messages" tab of his profile, in the Instant Messaging section, he is able to view logs of all the IMs he has ever exchanged. He is able to sort and view them by date as well as by correspondent.


Implementation Details

A number of changes had to be made to the SIPD in order to be able to log correctly. The SQL logger in SIPD had to be modified to enbable the logging of requests having the 'MESSAGE' method. Most of these modifications were made to the log.h, log.cpp, log_internal.h, and log_internal.cpp. In addition, the 'requestlog' table containing SQL log entries made by SIPD in the SIP database was altered. An attribute called request_body to contain the contents of a MESSAGE request was added to this table.

Two tcl cgi scripts (IMLog.cgi and IMThread.cgi) were added to the CINEMA web interface in order to enable users to view their logged IMs. IMLog.cgi will display for the current user a top level list of their IMs, initially sorted by date. It will display the first message in a particular IM exchange. If the user chooses to view the rest of a particular conversation, she can click the link for that message and IMThread.cgi will show the threaded IM conversation. IMLogging was added as an additional feature in Message option.


Testing

To test this project, we ran sipd and opened two sipc user agents to initiate a conversation between the two parties. We checked to make sure sipd logged the messages into the database correctly. After the IMs were exchanged, the sip database was checked using MySQL client.

Related Documents


Documentation
User Manual
SIPD Man Page
SIPC Documentation
SIPUA Documentation
Cinema Literature
Project Description
Progress Journal




References

"CINEMA: Columbia InterNet Extensible Multimedia Architecture"
Kundan Singh, Wenyu Jiang, Jonathan Lennox, Sankaran Narayanan, & Henning Schulzrinne