Review Board 1.7.16

Add basic (passthrough, playback, record) support for ITU G.722.1 and G.722.1C (also known as Siren7 and Siren14)

Review Request #158 - Created Feb. 12, 2009 and submitted

Kevin Fleming
This patch adds passthrough, file recording and file playback support for the codecs listed above, with negotiation over SIP/SDP supported. Due to Asterisk's current limitation of treating a codec/bitrate combination as a unique codec, only G.722.1 at 32 kbps and G.722.1C at 48 kbps are supported.

Along the way, some related work was done:

1) The rtpPayloadType structure definition, used as a return result for an API call in rtp.h, was moved from rtp.c to rtp.h so that the API call was actually usable. The only previous used of the API all was chan_h323.c, which had a duplicate of the structure definition instead of doing it the right way.

2) The hardcoded SDP sample rates for various codecs in chan_sip.c were removed, in favor of storing these sample rates in rtp.c along with the codec definitions there. A new API call was added to allow retrieval of the sample rate for a given codec.

3) Some basic 'a=fmtp' parsing for SDP was added to chan_sip, because chan_sip *must* decline any media streams offered for these codecs that are not at the bitrates that we support (otherwise Bad Things (TM) would result).
Compiled, installed, tested with Polycom IP6000 and IP7000 phones in Siren7 and Siren14 mode.
Review request changed
Updated (Feb. 12, 2009, 11:28 a.m.)
Addressed Russell's second set of comments.
Ship it!
Posted (Feb. 12, 2009, 3:11 p.m.)
The only comments I have left are ones that I already made (differences in byte/sample conversion macros, and some error checking).  I'm not sure if they were left out on purpose or not.

Aside from those things, this looks good to me.  Nice work! runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to