SAP/SDP Listener - Program Documentation

Daniel Veiga
Columbia University
New York, NY 
USA
dlv2001@columbia.edu

Overview

The project document described was developed with the purpose of building a software module capable of: 

Finally this module was designed in a way that could be easily integrated within sipc.

System Requirements

Operating system: Linux (kernel 2.2) and support for X11 window system 

Multimedia Devices: Sound card 

Installation Instructions

This source files created or modified during the development process were added or updated to the CVS repository under sipc module.

In order to be successfully used this module requires that the following external applications have been properly installed:

Operation

The integration in this software module in sipc was performed simply by adding a new option (Session Announcement Listener) to the Tools menu. 

Integration within sipc

 

The list of the sessions received by the program is presented to the user through the Session directory interface. For each session it is displayed its current status (active or inactive), its name, and the time interval, identified by start and stop times, the session will be active. For the cases where both  start time and stop time are shown as "-" this means the session is permanent, i.e., it is always active. If the start time is displayed as a particular fixed time but the stop time appears instead as "-" the session is said to be unbounded. 

The two image buttons shown in the bottom part of the interface indicate the media types present in the session. In the example shown since the audio button is disabled this fact informs the user that the session selected supports video but not audio. This list can be sorted on any of its four attributes. The presence of an arrow on a particular heading gives the indication the table is sorted on that particular field. The sorting order is given by the arrow direction. In the example depicted the sessions are sorted by their names in direct alphabetical order.

 

Directory of Sessions Announced

 

By clicking on the right button of the mouse over a particular entry of the session directory a popup menu will be displayed. If the SDP description received for the session currently selected has included in it the specification of an URL then the Url option of the menu will become active. If the user decides to invoke this option, a web browser will be launched and the page associated with the session will be retrieved. 

The second option of the menu creates a new dialog box where more detailed information about the session selected is provided. 

The third option allows to see the session description as it was originally received, i.e., in its SDP format. 

The last option of the menu should be used when the user wants to send an SIP invitation to another SIP agent by transmitting the session description within the message body. A new dialog box is displayed where the invitation destination address should be specified as well the media types that should be included in the description sent. It is possible, for instance, to send an invitation containing only the audio description even if the original session contained both audio and video descriptions.    

 

Right click over a session

 

Session Information

 

SDP Description

 

Invite for a session

 

When a user decides to join a particular session by selecting the media types that he intends to receive and pressing the Join Session button after this selection, external application(s) capable of handling media formats for the current session are instantiated. MPEG audio and video formats are handled by mim while all the other supported formats are handled by ratmedia or vic

The user can always see the sessions he joined through the extended main interface. Besides the session name and the time the session will get inactive it is also shown for each of the sessions the user joined the media types he has selected to received. This lower part of the interface is displayed only if  the user is participating in one or more sessions.     

 

Extended session directory

 

Internal Operation

When the SAP listener is launched it creates an UDP socket and starts listening for multicast packets that are sent to the global session announcements address 224.2.127.254 on port 9875. For each packet received the SAP header is parsed according to the version 2 of the SAP protocol specification (RFC 2974). This means the SAP packets with version number different from 1 will be discarded. The current software implementation does not provide support for encrypted, compressed or packets with authentication data. If this parsing process is successful the packet is then passed to the SDP parser. 

The SDP parser receives a SDP description and during the parsing procedure it stores in some internal data structures the information fields that will need to be accessed later. This operation, if successful, returns a unique identifier for the session just parsed. A new entry in the session directory is created. The status of the session (active or inactive) is determined by the time and repeat information, contained in the SDP description. This sequence of operations represent the main loop of the program which is beyond the control of the user. For all the other types of operations it is the user that will determine how the program will respond. Therefore great part of the code was written to build the graphical interface and to deal with the user interaction. The code is structured in several procedures that implement the functionalities described in the previous section.   

Known problems

The most common problem encountered during this project had to do with the large number of sessions announced and from which it is not possible to receive any kind of multimedia data.

mim application does not work correctly when both "-a" and "-v" options are passed as command line arguments. To get around this problem whenever I want to start mim for both audio and video I need to create a file containing a SDP description an pass its name as the argument of the "-f" option. 

Acknowledgments

I would like to thank to Xiaotao Wu and Prof. Henning Schulzrinne for their valuable ideas and suggestions. I would like to thank to Xiaotao Wu for his constant and indispensable help during the all phases of this project.