[asterisk-commits] dvossel: branch dvossel/fixtheworld_phase2 r307272 - /team/dvossel/fixtheworl...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 9 15:01:35 CST 2011


Author: dvossel
Date: Wed Feb  9 15:01:30 2011
New Revision: 307272

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=307272
Log:
Fixes error in appending SILK attributes in chan_sip

Modified:
    team/dvossel/fixtheworld_phase2/channels/chan_sip.c

Modified: team/dvossel/fixtheworld_phase2/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase2/channels/chan_sip.c?view=diff&rev=307272&r1=307271&r2=307272
==============================================================================
--- team/dvossel/fixtheworld_phase2/channels/chan_sip.c (original)
+++ team/dvossel/fixtheworld_phase2/channels/chan_sip.c Wed Feb  9 15:01:30 2011
@@ -9134,10 +9134,10 @@
 				{
 					int val = 0;
 					if (sscanf(fmtp_string, "maxaveragebitrate=%30u", &val) == 1) {
-						ast_format_append(&payload.format, SILK_ATTR_KEY_MAX_BITRATE, val);
+						ast_format_append(&payload.format, SILK_ATTR_KEY_MAX_BITRATE, val, AST_FORMAT_ATTR_END);
 					}
 					if (sscanf(fmtp_string, "usedtx=%30u", &val) == 1) {
-						ast_format_append(&payload.format, SILK_ATTR_KEY_DTX, val ? 1 : 0);
+						ast_format_append(&payload.format, SILK_ATTR_KEY_DTX, val ? 1 : 0, AST_FORMAT_ATTR_END);
 					}
 					break;
 				}
@@ -10504,7 +10504,7 @@
 	case AST_FORMAT_SILK:
 		{
 			int val = 0;
-			if (!ast_format_get_value(format, SILK_ATTR_KEY_MAX_BITRATE, &val)) {
+			if (!ast_format_get_value(format, SILK_ATTR_KEY_MAX_BITRATE, &val) && val > 5000 && val < 40000) {
 				ast_str_append(a_buf, 0, "a=fmtp:%d maxaveragebitrate=%u\r\n", rtp_code, val);
 			}
 			if (!ast_format_get_value(format, SILK_ATTR_KEY_DTX, &val)) {




More information about the asterisk-commits mailing list