adds support for slin16 in sip

(closes issue #16153)
Reported by: kfister
Patches:
      16153-1.6.2.0-rc5.patch uploaded by kfister (license 912)
      slin16.sip.patch.1 uploaded by malcolmd (license 924)
Tested by: kfister, malcolmd


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@271261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
David Vossel
2010-06-17 18:36:06 +00:00
parent b00f58da25
commit ba3d1ad680
3 changed files with 7 additions and 4 deletions

View File

@@ -68,6 +68,7 @@ SIP Changes
* Added the 'snom_aoc_enabled' option to turn on support for sending Advice of * Added the 'snom_aoc_enabled' option to turn on support for sending Advice of
Charge messages to snom phones. Charge messages to snom phones.
* Added support for G.719 media streams. * Added support for G.719 media streams.
* Added support for 16khz signed linear media streams.
IAX2 Changes IAX2 Changes
----------- -----------

View File

@@ -97,6 +97,7 @@ static const struct ast_rtp_mime_type {
{{1, AST_FORMAT_G726}, "audio", "G726-32", 8000}, {{1, AST_FORMAT_G726}, "audio", "G726-32", 8000},
{{1, AST_FORMAT_ADPCM}, "audio", "DVI4", 8000}, {{1, AST_FORMAT_ADPCM}, "audio", "DVI4", 8000},
{{1, AST_FORMAT_SLINEAR}, "audio", "L16", 8000}, {{1, AST_FORMAT_SLINEAR}, "audio", "L16", 8000},
{{1, AST_FORMAT_SLINEAR16}, "audio", "L16", 16000},
{{1, AST_FORMAT_LPC10}, "audio", "LPC", 8000}, {{1, AST_FORMAT_LPC10}, "audio", "LPC", 8000},
{{1, AST_FORMAT_G729A}, "audio", "G729", 8000}, {{1, AST_FORMAT_G729A}, "audio", "G729", 8000},
{{1, AST_FORMAT_G729A}, "audio", "G729A", 8000}, {{1, AST_FORMAT_G729A}, "audio", "G729A", 8000},
@@ -173,6 +174,7 @@ static const struct ast_rtp_payload_type static_RTP_PT[AST_RTP_MAX_PT] = {
[115] = {1, AST_FORMAT_SIREN14}, [115] = {1, AST_FORMAT_SIREN14},
[116] = {1, AST_FORMAT_G719}, [116] = {1, AST_FORMAT_G719},
[117] = {1, AST_FORMAT_SPEEX16}, [117] = {1, AST_FORMAT_SPEEX16},
[118] = {1, AST_FORMAT_SLINEAR16}, /* 16 Khz signed linear */
[121] = {0, AST_RTP_CISCO_DTMF}, /* Must be type 121 */ [121] = {0, AST_RTP_CISCO_DTMF}, /* Must be type 121 */
}; };

View File

@@ -2230,7 +2230,7 @@ static struct ast_frame *ast_rtp_read(struct ast_rtp_instance *instance, int rtc
if (rtp->f.subclass.codec & AST_FORMAT_AUDIO_MASK) { if (rtp->f.subclass.codec & AST_FORMAT_AUDIO_MASK) {
rtp->f.samples = ast_codec_get_samples(&rtp->f); rtp->f.samples = ast_codec_get_samples(&rtp->f);
if (rtp->f.subclass.codec == AST_FORMAT_SLINEAR) if (rtp->f.subclass.codec == AST_FORMAT_SLINEAR || AST_FORMAT_SLINEAR16)
ast_frame_byteswap_be(&rtp->f); ast_frame_byteswap_be(&rtp->f);
calc_rxstamp(&rtp->f.delivery, rtp, timestamp, mark); calc_rxstamp(&rtp->f.delivery, rtp, timestamp, mark);
/* Add timing data to let ast_generic_bridge() put the frame into a jitterbuf */ /* Add timing data to let ast_generic_bridge() put the frame into a jitterbuf */