[asterisk-commits] mnick: branch 1.6.2 r233049 - in /branches/1.6.2: ./ main/dsp.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Dec 4 09:57:10 CST 2009
Author: mnick
Date: Fri Dec 4 09:57:05 2009
New Revision: 233049
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=233049
Log:
Merged revisions 233046 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r233046 | mnick | 2009-12-04 09:38:33 -0600 (Fri, 04 Dec 2009) | 17 lines
Merged revisions 233014 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r233014 | mnick | 2009-12-04 09:17:03 -0600 (Fri, 04 Dec 2009) | 11 lines
Warning message gets displayed only once
Added additional field 'int display_inband_dtmf_warning', which when set to '1' displays the warning ('Inband DTMF is not supported on codec %s. Use RFC2833'), and when set to '0' doesn't display the warning. Otherwise you would get hundreds of warnings every second.
(closes issue #15769)
Reported by: falves11
Patches:
patch_15769_14.txt uploaded by mnick (license 874)
Tested by: mnick, falves11
........
................
Modified:
branches/1.6.2/ (props changed)
branches/1.6.2/main/dsp.c
Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.2/main/dsp.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/main/dsp.c?view=diff&rev=233049&r1=233048&r2=233049
==============================================================================
--- branches/1.6.2/main/dsp.c (original)
+++ branches/1.6.2/main/dsp.c Fri Dec 4 09:57:05 2009
@@ -392,6 +392,7 @@
int digitmode;
int faxmode;
int dtmf_began;
+ int display_inband_dtmf_warning;
float genergy;
int mute_fragments;
fragment_t mute_data[5];
@@ -1341,7 +1342,10 @@
}
break;
default:
- ast_log(LOG_WARNING, "Inband DTMF is not supported on codec %s. Use RFC2833\n", ast_getformatname(af->subclass));
+ /*Display warning only once. Otherwise you would get hundreds of warnings every second */
+ if (dsp->display_inband_dtmf_warning)
+ ast_log(LOG_WARNING, "Inband DTMF is not supported on codec %s. Use RFC2833\n", ast_getformatname(af->subclass));
+ dsp->display_inband_dtmf_warning = 0;
return af;
}
@@ -1514,6 +1518,7 @@
dsp->faxmode = DSP_FAXMODE_DETECT_CNG;
/* Initialize digit detector */
ast_digit_detect_init(&dsp->digit_state, dsp->digitmode & DSP_DIGITMODE_MF);
+ dsp->display_inband_dtmf_warning = 1;
/* Initialize initial DSP progress detect parameters */
ast_dsp_prog_reset(dsp);
/* Initialize fax detector */
More information about the asterisk-commits
mailing list