[asterisk-commits] file: trunk r369838 - /trunk/channels/chan_motif.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jul 9 14:05:29 CDT 2012
Author: file
Date: Mon Jul 9 14:05:25 2012
New Revision: 369838
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=369838
Log:
Force the clock rate of G.722 to be 16000 when using the Google transports as it is 8000 elsewhere.
(closes issue ASTERISK-20105)
Reported by: Malcolm Davenport
Modified:
trunk/channels/chan_motif.c
Modified: trunk/channels/chan_motif.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_motif.c?view=diff&rev=369838&r1=369837&r2=369838
==============================================================================
--- trunk/channels/chan_motif.c (original)
+++ trunk/channels/chan_motif.c Mon Jul 9 14:05:25 2012
@@ -1142,8 +1142,13 @@
iks_insert_attrib(payload, "id", tmp);
iks_insert_attrib(payload, "name", ast_rtp_lookup_mime_subtype2(1, &format, 0, 0));
iks_insert_attrib(payload, "channels", "1");
- snprintf(tmp, sizeof(tmp), "%d", ast_rtp_lookup_sample_rate2(1, &format, 0));
- iks_insert_attrib(payload, "clockrate", tmp);
+
+ if ((format.id == AST_FORMAT_G722) && ((session->transport == JINGLE_TRANSPORT_GOOGLE_V1) || (session->transport == JINGLE_TRANSPORT_GOOGLE_V2))) {
+ iks_insert_attrib(payload, "clockrate", "16000");
+ } else {
+ snprintf(tmp, sizeof(tmp), "%d", ast_rtp_lookup_sample_rate2(1, &format, 0));
+ iks_insert_attrib(payload, "clockrate", tmp);
+ }
iks_insert_node(description, payload);
payloads[i++] = payload;
More information about the asterisk-commits
mailing list