[asterisk-commits] jdixon: branch 1.4 r77845 - in /branches/1.4: channels/chan_zap.c main/dsp.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 31 16:00:08 CDT 2007


Author: jdixon
Date: Tue Jul 31 16:00:08 2007
New Revision: 77845

URL: http://svn.digium.com/view/asterisk?view=rev&rev=77845
Log:
Made VAST improvements in DTMF receiver in RADIO_RELAX mode (thanx Steve
W9SH), and oversight in logic in TONE_VERIFY/RELAX mode in chan_zap.

Modified:
    branches/1.4/channels/chan_zap.c
    branches/1.4/main/dsp.c

Modified: branches/1.4/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_zap.c?view=diff&rev=77845&r1=77844&r2=77845
==============================================================================
--- branches/1.4/channels/chan_zap.c (original)
+++ branches/1.4/channels/chan_zap.c Tue Jul 31 16:00:08 2007
@@ -2956,7 +2956,9 @@
 		cp = (char *) data;
 		ast_log(LOG_DEBUG, "Set option RELAX DTMF, value: %s(%d) on %s\n",
 			*cp ? "ON" : "OFF", (int) *cp, chan->name);
-		ast_dsp_digitmode(p->dsp, ((*cp) ? DSP_DIGITMODE_RELAXDTMF : DSP_DIGITMODE_DTMF) | p->dtmfrelax);
+                p->dtmfrelax = 0;
+                if (*cp) p->dtmfrelax = DSP_DIGITMODE_RELAXDTMF;
+                ast_dsp_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax);
 		break;
 	case AST_OPTION_AUDIO_MODE:  /* Set AUDIO mode (or not) */
 		cp = (char *) data;

Modified: branches/1.4/main/dsp.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/dsp.c?view=diff&rev=77845&r1=77844&r2=77845
==============================================================================
--- branches/1.4/main/dsp.c (original)
+++ branches/1.4/main/dsp.c Tue Jul 31 16:00:08 2007
@@ -153,22 +153,28 @@
  * Frequency tolerance +- 1.5% will detect, +-3.5% will reject
  */
 
-#define DTMF_THRESHOLD		8.0e7
-#define FAX_THRESHOLD		8.0e7
-#define FAX_2ND_HARMONIC	2.0     /* 4dB */
-#define DTMF_NORMAL_TWIST	6.3     /* 8dB */
-#ifdef	RADIO_RELAX
-#define DTMF_REVERSE_TWIST          ((digitmode & DSP_DIGITMODE_RELAXDTMF) ? 6.5 : 2.5)     /* 4dB normal */
+#define DTMF_THRESHOLD          8.0e7
+#define FAX_THRESHOLD           8.0e7
+#define FAX_2ND_HARMONIC        2.0     /* 4dB */
+
+#ifdef  RADIO_RELAX
+#define DTMF_NORMAL_TWIST               ((digitmode & DSP_DIGITMODE_RELAXDTMF) ? 11.3 : 6.3)    /* 8dB sph 12.3 was 6.3 */
+#define DTMF_REVERSE_TWIST              ((digitmode & DSP_DIGITMODE_RELAXDTMF) ? 9.5  : 2.5)    /* 4dB normal sph 12.5 : 5.5 was 6.5 : 2.5 */
+#define DTMF_RELATIVE_PEAK_ROW  ((digitmode & DSP_DIGITMODE_RELAXDTMF) ? 3.3  : 6.3)    /* 8dB sph was 6.3 */
+#define DTMF_RELATIVE_PEAK_COL  ((digitmode & DSP_DIGITMODE_RELAXDTMF) ? 3.3  : 6.3)    /* 8dB sph was 6.3 */
+#define DTMF_TO_TOTAL_ENERGY    ((digitmode & DSP_DIGITMODE_RELAXDTMF) ? 26.0 : 42.0)
 #else
-#define DTMF_REVERSE_TWIST          ((digitmode & DSP_DIGITMODE_RELAXDTMF) ? 4.0 : 2.5)     /* 4dB normal */
-#endif
-#define DTMF_RELATIVE_PEAK_ROW	6.3     /* 8dB */
-#define DTMF_RELATIVE_PEAK_COL	6.3     /* 8dB */
+#define DTMF_NORMAL_TWIST               6.3
+#define DTMF_REVERSE_TWIST              ((digitmode & DSP_DIGITMODE_RELAXDTMF) ? 4.0  : 2.5)    /* 4dB normal */
+#define DTMF_RELATIVE_PEAK_ROW  6.3     /* 8dB */
+#define DTMF_RELATIVE_PEAK_COL  6.3     /* 8dB */
+#define DTMF_TO_TOTAL_ENERGY    42.0
+#endif
+
+#ifdef OLD_DSP_ROUTINES
 #define DTMF_2ND_HARMONIC_ROW       ((digitmode & DSP_DIGITMODE_RELAXDTMF) ? 1.7 : 2.5)     /* 4dB normal */
 #define DTMF_2ND_HARMONIC_COL	63.1    /* 18dB */
-#define DTMF_TO_TOTAL_ENERGY	42.0
-
-#ifdef OLD_DSP_ROUTINES
+
 #define MF_THRESHOLD		8.0e7
 #define MF_NORMAL_TWIST		5.3     /* 8dB */
 #define MF_REVERSE_TWIST	4.0     /* was 2.5 */




More information about the asterisk-commits mailing list