Siprtpua: A SIP User Agent with a Low Latency Audio Interface.

Alpa Shah
Columbia University
Computer Science Department
New York, NY 10027
USA
ajs248@cs.columbia.edu
Edouard Khoukaz
Electrical Department
New York, NY 10027
USA
ek528@columbia.edu

I - Abstract
Siprtpua is a SIP user agent. It allows you to make as well as receive SIP calls. It uses the RTP library to transmit audio media over the Internet. A low latency audio interface is permitted through the integration of Packet FEC Algorithms and Adaptive Voice Playout Buffer Algorithms . Siprtpua supports linear 16 as well as G722 audio formats.

II - Introduction
Transport of real-time voice traffic on the internet is difficult due to packet loss and jitter. Packet loss is handled priimarly through different forward error correction algorithms and local repair at the receiver. Jitter is compensated for by means of adaptive playout buffer algorithms at the receiver. In Siprtpua we couple both FEC and Adaptive Playout delay to provide a low latency audio interface. We also use G722 encoding to reduce the size of our media packets. This is useful in a wireless environment where network conditions are not always reliable. An application to this could be a wireless microphone.

III - Background

SIP
SIP, the Session Initiation Protocol, is a simple signaling protocol for Internet conferencing and telephony. SIP features are provided through the LIBSIP++ library.

RTP
RTP, A transport Protocol for Real-Time Applications. RTP provides end-to-end network transport functions suitable for applications transmitting real-time data. RTP features are provided through the LIBRTP library.

G722
CCITT G.722 ADPCM standard speech compression/decompression algorithm. It is a 64 kbit/s audio coding system which has been made a standard by the CCITT G.722. The technique takes a 16 kHz (14 bit or 16 bit) input signal with a bandwidth 7kHz and encodes it to 64 kbits/s.
The code wich consists of two functions: code and decode, was originally written by BELLCORE, then been modified by Carnegie Mellon University, and finally by us.

Adaptive Playout Mechanism
Necessary at the receiver to compensate for Jitter. Four different adaptation algortithms have been proposed by Ramjee et. al. All four algorithms maintain a running estimate of the mean network delay and a variation measure in this delay, updated for each packet. The four algorithms compute the variance in th same fashion, but they differ in their computation of the delay. The playout delay is then adjusted at the biginning of each talkspurt in accordance with the delay/variation measures.

FEC
Forward Error Correction. A simple Reed Solomon (3,4) scheme is applied, where every consecutive 3 media packets generate an fec packet. FEC is implemented with RTP as described in RFC 2733.

IV - Related Work
Simulations have been done to demonstrate the effectiveness of coupling playout delay buffer algorithms with FEC.

V - Architecture
Siprtpua consists of a main program consisting of two threads, and 3 additional modules.
The two threads are the send and receive threads. The modules are the Audio Device Module, the Audio Buffering module and the FEC module.

VI - Program Documentation
1-Authors
see above

2-Abstract
see above

3-System Reqirements
Linux operating system, with linear short 16 audio format support.

4-Installation
N/A (same as sipua)

5-Configuration
N/A (same as sipua)

6-User Manual
Same as Sipua

7-Program Internal operation

Siprtpua consists of a main program consisting of two threads, and 3 additional modules.

The main takes care of:
- Initiating the SIP session
- Opening the audio device
- Establishong 2 RTP sessions: one for the media and one for the fec.

The two threads are:
-The send thread: Every 20 ms it takes care of:
+ Reading from the Audio Device.
+ Compressing the audio (S16 -> G722)
+ Packetizing the audio and sending it
+ Performing FEC computation after every 3 media packet and sending the resulting FEC packets in a seperate stream
+ Reading from the audio buffer and playing the audio to the speakers

-The receive thread: Every 20ms it takes care of:
+ Receiving the media and fec packets from seperate streams.
+ Storing the media and the FEC packets apprpriately
+ Calling the FEC module to check if any packet need recovery

The 3 modules are:
-The audio device module that takes care of:
+ Audio device access.
+ Silence supression.
+ G722 Coding/decoding.

-The audio buffering module that takes care of:
+ Applying the Delay/variance calculation.
+ The adaptive playout algorithm.
+ Storing the media packets in a circular buffer.

-The FEC module that takes care of:
+ Checking if a packet is missing.
+ Recovers missing packets
+ Keeps a pending list of FEC packets that could be useful later
+ Keeps a circular array of compressed media packet useful to recover lost packets
+ A packet is stored in the main Circular buffer only if it hasnt arrived yet/ only if it hasn t been recovered yet.

VII - Enhancements
- Testing with some packet dropping emulators
- AGC: automatic Gain Control
- OS: Windows + Solaris
- configureable codec utomatic Gain Control

VII - Acknowledgements
We would like to thank:
Kundan Singh for his support with the SIP and RTP libraries as well as for being our mentor throughout this project.
The Speech Group of the School of Computer Science at Carnegie Mellon University for the G722 codec program.

VIII - Task List
Integrating SIPUA and RTP Library
Linux Audio Device
Audio buffering and Adaptive Playout Algorithms
G722 coding/decoding
Forward Error Correction

IX - References
-RFC 1889: RTP: A Transport Protocol For Real_Time Applications By: H. Schulzrinne, S. Casner, R. Frederick, V. Jacobson.
-RFC 2733: An RTP Payload Format for Generic Forward Error Correction. By : J. Rosenberg and H. Schulzrinne
-Adaptive Playout Mechanisms for Packetized Audiop Applications in Wide Area Networks. By: H. Schulzrinne, R. Ramjee, J. Kurose, D. Towsley
-Integrating Packet FEC into Adaptive Voice Playout Buffer Algoritms on the Internet. By: J. Rosenberg, L. Qiu, H. Schulzrinne
-http://www.4front-tech.com/pguide/audio.html: