[asterisk-commits] crichter: branch 1.4 r83023 - in /branches/1.4/channels: ./ misdn/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 19 04:31:56 CDT 2007


Author: crichter
Date: Wed Sep 19 04:31:55 2007
New Revision: 83023

URL: http://svn.digium.com/view/asterisk?view=rev&rev=83023
Log:
added 'astdtmf' option to allow configuring the asterisk dtmf detector instead of the mISDN_dsp ones. also added the patch from irroot #10190, so that dtmf tones detected by the asterisk detector are passed outofband to asterisk, to make any use of dtmf tones at all.

Modified:
    branches/1.4/channels/chan_misdn.c
    branches/1.4/channels/misdn/chan_misdn_config.h
    branches/1.4/channels/misdn_config.c

Modified: branches/1.4/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_misdn.c?view=diff&rev=83023&r1=83022&r2=83023
==============================================================================
--- branches/1.4/channels/chan_misdn.c (original)
+++ branches/1.4/channels/chan_misdn.c Wed Sep 19 04:31:55 2007
@@ -1764,6 +1764,7 @@
 	
 	port=bc->port;
 	
+
 	chan_misdn_log(1,port,"read_config: Getting Config\n");
 
 	misdn_cfg_get( port, MISDN_CFG_LANGUAGE, lang, BUFFERSIZE);
@@ -1779,6 +1780,12 @@
 	misdn_cfg_get( port, MISDN_CFG_INCOMING_EARLY_AUDIO, &ch->incoming_early_audio, sizeof(int));
 	
 	misdn_cfg_get( port, MISDN_CFG_SENDDTMF, &bc->send_dtmf, sizeof(int));
+
+	misdn_cfg_get( port, MISDN_CFG_ASTDTMF, &ch->ast_dsp, sizeof(int));
+
+	if (ch->ast_dsp) {
+		ch->ignore_dtmf=1;
+	}
 
 	misdn_cfg_get( port, MISDN_CFG_NEED_MORE_INFOS, &bc->need_more_infos, sizeof(int));
 	misdn_cfg_get( port, MISDN_CFG_NTTIMEOUT, &ch->nttimeout, sizeof(int));
@@ -1954,12 +1961,16 @@
 
 	ch->overlap_dial_task = -1;
 	
-	if (ch->faxdetect) {
+	if (ch->faxdetect  || ch->ast_dsp) {
 		misdn_cfg_get( port, MISDN_CFG_FAXDETECT_TIMEOUT, &ch->faxdetect_timeout, sizeof(ch->faxdetect_timeout));
 		if (!ch->dsp)
 			ch->dsp = ast_dsp_new();
-		if (ch->dsp)
-			ast_dsp_set_features(ch->dsp, DSP_FEATURE_DTMF_DETECT | DSP_FEATURE_FAX_DETECT);
+		if (ch->dsp) {
+			if (ch->faxdetect) 
+				ast_dsp_set_features(ch->dsp, DSP_FEATURE_DTMF_DETECT | DSP_FEATURE_FAX_DETECT);
+			else 
+				ast_dsp_set_features(ch->dsp, DSP_FEATURE_DTMF_DETECT );
+		}
 		if (!ch->trans)
 			ch->trans=ast_translator_build_path(AST_FORMAT_SLINEAR, AST_FORMAT_ALAW);
 	}
@@ -2649,9 +2660,10 @@
  	
  	if (tmp->ast_dsp && (f->subclass != 'f')) {
  		chan_misdn_log(2, tmp->bc->port, " --> * SEND: DTMF (AST_DSP) :%c\n", f->subclass);
+		//ast_queue_frame(tmp->ast, f);
  	}
 
-	return frame;
+	return f;
 }
 
 

Modified: branches/1.4/channels/misdn/chan_misdn_config.h
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/misdn/chan_misdn_config.h?view=diff&rev=83023&r1=83022&r2=83023
==============================================================================
--- branches/1.4/channels/misdn/chan_misdn_config.h (original)
+++ branches/1.4/channels/misdn/chan_misdn_config.h Wed Sep 19 04:31:55 2007
@@ -48,6 +48,7 @@
 	MISDN_CFG_NODIALTONE,    /* int (bool) */
 	MISDN_CFG_IMMEDIATE,           /* int (bool) */
 	MISDN_CFG_SENDDTMF,           /* int (bool) */
+	MISDN_CFG_ASTDTMF,            /* int (bool) */
 	MISDN_CFG_HOLD_ALLOWED,        /* int (bool) */
 	MISDN_CFG_EARLY_BCONNECT,      /* int (bool) */
 	MISDN_CFG_INCOMING_EARLY_AUDIO,      /* int (bool) */

Modified: branches/1.4/channels/misdn_config.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/misdn_config.c?view=diff&rev=83023&r1=83022&r2=83023
==============================================================================
--- branches/1.4/channels/misdn_config.c (original)
+++ branches/1.4/channels/misdn_config.c Wed Sep 19 04:31:55 2007
@@ -220,6 +220,10 @@
 		"\tinstead." },
 	{ "senddtmf", MISDN_CFG_SENDDTMF, MISDN_CTYPE_BOOL, "no", NONE,
 		"Enable this if we should produce DTMF Tones ourselves." },
+	{ "astdtmf", MISDN_CFG_ASTDTMF, MISDN_CTYPE_BOOL, "no", NONE,
+		"Enable this if you want to use the Asterisk dtmf detector\n"
+		"instead of the mISDN_dsp/hfcmulti one."
+		},
 	{ "hold_allowed", MISDN_CFG_HOLD_ALLOWED, MISDN_CTYPE_BOOL, "no", NONE,
 		"Enable this to have support for hold and retrieve." },
 	{ "early_bconnect", MISDN_CFG_EARLY_BCONNECT, MISDN_CTYPE_BOOL, "yes", NONE,




More information about the asterisk-commits mailing list