SAP/SDP Listener

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

Abstract

Over the last years the Internet has been experiencing an extraordinary development not only in what refers the number of users but also with the respect to the increasing diversity of services that started being deployed over this global network infrastructure. Multimedia multicast sessions, such as videoconferencing, are a perfect example of how Internet is currently used to support functionalities that go well beyond the single HTML page retrieval. 

The proliferation of these multimedia sessions, which by definition involve more than one participant, revealed the need of specifying a standard mean to distribute session information to prospective participants. Session Announcement Protocol (SAP) and Session Description Protocol (SDP) are two complementary protocols that were designed for this purpose. 

The project here described aimed to develop a software module capable of receiving session announcements, extracting the data contained in a session description and presenting this information in a understandable way to a end user. By making use of external applications to handle multimedia content this module also offers the possibility of joining to a particular announced session.

Introduction

The expansion of the Internet in geographical scope has been accompanied by a growth in the diversity and complexity of services supported over it. From a single text-based approach the users have been progressively using the Internet as a powerful infrastructure to exchange richer types of data. The generation of multimedia content in multiple formats and the need of distributing this information led to the creation of multicast multimedia sessions. In order to join and participate in multimedia sessions a potential participant needs in first place to discover what sessions are taking (or will take) place and after he needs to know the relevant details about a particular session. The project here described deals with two complementary protocols, Session Announcement Protocol [1] and Session Description Protocol [2] , that are used to distribute and convey the necessary information about multimedia sessions.

The project consisted of developing a software module capable of receiving session announcements, extracting the data contained in a session description and presenting this information in a understandable way to a end user. By making use of external applications to handle multimedia content this module also offers the possibility of joining to a particular announced session.

The remaining part of this document is organized as follows. First I provide some background on SAP and SDP protocols. The section on the program documentation provides a link to another page containing the details of the software usage and some information about the development process. The related work section highlights the difference between this project and other available solutions and the task list presents in a succinct way the several components of the work carried on. 

Session Announcement Protocol (SAP)

SAP is a simple protocol designed to be used to distribute information about multimedia sessions. A session is advertised by means of a multicast packet sent to a well known address/port. SAP defines the format that these multicast packets must conform to in order to be identified as SAP announcements. Global session announcements should be sent to the multicast address 224.2.127.254 and to the port number 9875.

SAP imposes that each announcement must take place in a periodically fashion. It's therefore responsibility of each announcer to send periodic repetitions of SAP announcements for session that is advertising. SAP defines a mechanism to convey a session description to potential participants but it does not define itself a format the descriptions should obey to. Therefore it is commonly used with SDP in order to provide the necessary details about the session. Each SAP packet contains a header and a single session description as payload. The format of a SAP packet is shown next:

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
V=1 A R T E C Authentication length Message ID Hash
Originating source (32 or 128 bits)
Optional Authentication Data
Optional Payload Type 0 Payload
Payload ...

V= version; A=Address type; R=Reserved; T=Message type; E=Encryption bit; C=Compression bit

Session Description Protocol (SDP)

SDP defines a format intended to be used for describing multimedia sessions where session is defined in RFC 2327 as "a set of multimedia senders and receivers and the data streams flowing from senders to receivers". The information conveyed by each SDP description must be enough to enable joining and participating in the session. The descriptions are exclusively textual using UTF-8 encoding. 

Each description may be divided into two main sections. The first of these sections provides session-level information including among other things  the session name, the creator of the session and the time(s) the session is active. The second section consists of one or more media-level descriptions. Each media description applies only to a single media and provides details about the media type, the transport protocol used (RTP, UDP, ...) the port number and eventually the multicast address if not defined yet at the session level. 

A SDP description is formed by a set of lines of text each of them of the form <type>=<value>, where type is always a single character and it serves to make a distinction between the different kinds of information contained in a description. Each session starts with a "v=" line and a "m=" line identifies the beginning of a media description. The general "template" as well as an example, both extracted from RFC 2327 document, of an SDP description are listed next:

Template Example
v= (protocol version)
o= (owner/creator and session identifier).
s= (session name)
i=* (session information)
u=* (URI of description)
e=* (email address)
p=* (phone number)
c=* (connection information - not required if included in all media)
b=* (bandwidth information)
One or more time descriptions (see below)
z=* (time zone adjustments)
k=* (encryption key)
a=* (zero or more session attribute lines)
Zero or more media descriptions 

Time description
t= (time the session is active)
r=* (zero or more repeat times)

Media description
m= (media name and transport address)
i=* (media title)
c=* (connection information - optional if included at session-level)
b=* (bandwidth information)
k=* (encryption key)
a=* (zero or more media attribute lines)
v=0
o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4
s=SDP Seminar
i=A Seminar on the session description protocol
u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps
e=mjh@isi.edu (Mark Handley)
c=IN IP4 224.2.17.12/127
t=2873397496 2873404696
a=recvonly
m=audio 49170 RTP/AVP 0
m=video 51372 RTP/AVP 31
m=application 32416 udp wb
a=orient:portrait

Program Documentation

The documentation for the software developed can be found here.

Related Work

There are several existent tools capable of receiving SAP announcements and presenting the session information through a user graphical interface. The most well-known of these available tools is sdr developed at University College of London (UCL). 

In this project I have tried to design a simpler but more intuitive user interface than those that are typically seen in other available tools. Moreover, the this project was developed with the main intuit of being integrated in the existing sipc application.    

Task List

The code I developed for this project consisted of:

References

1
Handley, Perkins and Whelan, "Session Announcement Protocol", RFC 2974, October 2000.
2
Handley, Jacobson, "Session Description Protocol", RFC 2327, April 1998.
3
Welch, "Practical Programming in Tcl and Tk - Third Edition", Prentice Hall, 2000..