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.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@83023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Christian Richter
2007-09-19 09:31:55 +00:00
parent 0728297127
commit 63122bb677
3 changed files with 21 additions and 4 deletions

View File

@@ -1764,6 +1764,7 @@ static int read_config(struct chan_list *ch, int orig)
port=bc->port;
chan_misdn_log(1,port,"read_config: Getting Config\n");
misdn_cfg_get( port, MISDN_CFG_LANGUAGE, lang, BUFFERSIZE);
@@ -1780,6 +1781,12 @@ static int read_config(struct chan_list *ch, int orig)
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 @@ static int read_config(struct chan_list *ch, int orig)
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 @@ static struct ast_frame *process_ast_dsp(struct chan_list *tmp, struct ast_frame
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;
}