mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-26 14:27:14 +00:00
chan_dahdi: Add dialmode option for FXS lines. (#36)
Currently, both pulse and tone dialing are always enabled
on all FXS lines, with no way of disabling one or the other.
In some circumstances, it is desirable or necessary to
disable one of these, and this behavior can be problematic.
A new "dialmode" option is added which allows setting the
methods to support on a per channel basis for FXS (FXO
signalled lines). The four options are "both", "pulse",
"dtmf"/"tone", and "none".
Additionally, integration with the CHANNEL function is
added so that this setting can be updated for a channel
during a call.
Resolves: #35
ASTERISK-29992
UserNote: A "dialmode" option has been added which allows
specifying, on a per-channel basis, what methods of
subscriber dialing (pulse and/or tone) are permitted.
Additionally, this can be changed on a channel
at any point during a call using the CHANNEL
function.
(cherry picked from commit 5d1dd11143)
This commit is contained in:
committed by
Asterisk Development Team
parent
9a177ddacc
commit
5dbd625bd6
@@ -2775,9 +2775,13 @@ static struct ast_frame *__analog_handle_event(struct analog_pvt *p, struct ast_
|
||||
analog_set_pulsedial(p, (res & ANALOG_EVENT_PULSEDIGIT) ? 1 : 0);
|
||||
ast_debug(1, "Detected %sdigit '%c'\n", (res & ANALOG_EVENT_PULSEDIGIT) ? "pulse ": "", res & 0xff);
|
||||
analog_confmute(p, 0);
|
||||
p->subs[idx].f.frametype = AST_FRAME_DTMF_END;
|
||||
p->subs[idx].f.subclass.integer = res & 0xff;
|
||||
analog_handle_dtmf(p, ast, idx, &f);
|
||||
if (p->dialmode == ANALOG_DIALMODE_BOTH || p->dialmode == ANALOG_DIALMODE_PULSE) {
|
||||
p->subs[idx].f.frametype = AST_FRAME_DTMF_END;
|
||||
p->subs[idx].f.subclass.integer = res & 0xff;
|
||||
analog_handle_dtmf(p, ast, idx, &f);
|
||||
} else {
|
||||
ast_debug(1, "Dropping pulse digit '%c' because pulse dialing disabled on channel %d\n", res & 0xff, p->channel);
|
||||
}
|
||||
return f;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user