[asterisk-commits] rmudgett: trunk r291542 - in /trunk: ./ channels/chan_dahdi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Oct 13 15:24:56 CDT 2010
Author: rmudgett
Date: Wed Oct 13 15:24:51 2010
New Revision: 291542
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=291542
Log:
Merged revisions 291541 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r291541 | rmudgett | 2010-10-13 15:21:02 -0500 (Wed, 13 Oct 2010) | 26 lines
The chan_dahdi faxdetect option only works for the first FAX call.
The chan_dahdi faxdetect option only works for the first call. After that
the option no longer works. The struct dahdi_pvt.callprogress member is
the encoded user config setting for the callprogress and faxdetect config
options. Changing this value alters the configuration for all following
calls until the chan_dahdi.conf file is reloaded.
* Fixed the chan_dahdi ast_channel_setoption callback to not change the
users faxdetect config setting except for the current call.
* Fixed the chan_dahdi ast_channel_queryoption callback to read the active
DSP setting of the faxdetect option.
* Made actually disable the active faxdetect DSP setting for the current
call on the analog port. my_handle_dtmfup() is used for normal analog
ports. dahdi_handle_dtmfup() is the legacy code and is no longer used
unless in a radio mode.
(closes issue #18116)
Reported by: seandarcy
Patches:
issue18116_v1.8.patch uploaded by rmudgett (license 664)
Review: https://reviewboard.asterisk.org/r/972/
........
Modified:
trunk/ (props changed)
trunk/channels/chan_dahdi.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=291542&r1=291541&r2=291542
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Wed Oct 13 15:24:51 2010
@@ -2005,6 +2005,11 @@
}
}
p->faxhandled = 1;
+ if (p->dsp) {
+ p->dsp_features &= ~DSP_FEATURE_FAX_DETECT;
+ ast_dsp_set_features(p->dsp, p->dsp_features);
+ ast_debug(1, "Disabling FAX tone detection on %s after tone received\n", ast->name);
+ }
if (strcmp(ast->exten, "fax")) {
const char *target_context = S_OR(ast->macrocontext, ast->context);
@@ -6418,7 +6423,7 @@
break;
case AST_OPTION_FAX_DETECT:
cp = (char *) data;
- *cp = (p->callprogress & CALLPROGRESS_FAX) ? 0 : 1;
+ *cp = (p->dsp_features & DSP_FEATURE_FAX_DETECT) ? 0 : 1;
ast_debug(1, "Reporting fax tone detection %sabled on %s\n", *cp ? "en" : "dis", chan->name);
break;
case AST_OPTION_CC_AGENT_TYPE:
@@ -6644,10 +6649,8 @@
if (p->dsp) {
ast_debug(1, "%sabling fax tone detection on %s\n", *cp ? "En" : "Dis", chan->name);
if (*cp) {
- p->callprogress |= CALLPROGRESS_FAX;
p->dsp_features |= DSP_FEATURE_FAX_DETECT;
} else {
- p->callprogress &= ~CALLPROGRESS_FAX;
p->dsp_features &= ~DSP_FEATURE_FAX_DETECT;
}
ast_dsp_set_features(p->dsp, p->dsp_features);
@@ -7457,10 +7460,11 @@
}
}
p->faxhandled = 1;
- p->callprogress &= ~CALLPROGRESS_FAX;
- p->dsp_features &= ~DSP_FEATURE_FAX_DETECT;
- ast_dsp_set_features(p->dsp, p->dsp_features);
- ast_debug(1, "Disabling FAX tone detection on %s after tone received\n", ast->name);
+ if (p->dsp) {
+ p->dsp_features &= ~DSP_FEATURE_FAX_DETECT;
+ ast_dsp_set_features(p->dsp, p->dsp_features);
+ ast_debug(1, "Disabling FAX tone detection on %s after tone received\n", ast->name);
+ }
if (strcmp(ast->exten, "fax")) {
const char *target_context = S_OR(ast->macrocontext, ast->context);
More information about the asterisk-commits
mailing list