freetdm: fix for enabling DTMF detection on d-channel
This commit is contained in:
parent
e42c423c92
commit
21f8605d68
|
@ -2923,23 +2923,27 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_command(ftdm_channel_t *ftdmchan, ftdm_co
|
|||
case FTDM_COMMAND_ENABLE_DTMF_DETECT:
|
||||
{
|
||||
/* if they don't have thier own, use ours */
|
||||
if (!ftdm_channel_test_feature(ftdmchan, FTDM_CHANNEL_FEATURE_DTMF_DETECT)) {
|
||||
teletone_dtmf_detect_init (&ftdmchan->dtmf_detect, ftdmchan->rate);
|
||||
ftdm_set_flag(ftdmchan, FTDM_CHANNEL_DTMF_DETECT);
|
||||
ftdm_set_flag(ftdmchan, FTDM_CHANNEL_SUPRESS_DTMF);
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "Enabled software DTMF detector\n");
|
||||
GOTO_STATUS(done, FTDM_SUCCESS);
|
||||
if (FTDM_IS_VOICE_CHANNEL(ftdmchan)) {
|
||||
if (!ftdm_channel_test_feature(ftdmchan, FTDM_CHANNEL_FEATURE_DTMF_DETECT)) {
|
||||
teletone_dtmf_detect_init (&ftdmchan->dtmf_detect, ftdmchan->rate);
|
||||
ftdm_set_flag(ftdmchan, FTDM_CHANNEL_DTMF_DETECT);
|
||||
ftdm_set_flag(ftdmchan, FTDM_CHANNEL_SUPRESS_DTMF);
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "Enabled software DTMF detector\n");
|
||||
GOTO_STATUS(done, FTDM_SUCCESS);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case FTDM_COMMAND_DISABLE_DTMF_DETECT:
|
||||
{
|
||||
if (!ftdm_channel_test_feature(ftdmchan, FTDM_CHANNEL_FEATURE_DTMF_DETECT)) {
|
||||
teletone_dtmf_detect_init (&ftdmchan->dtmf_detect, ftdmchan->rate);
|
||||
ftdm_clear_flag(ftdmchan, FTDM_CHANNEL_DTMF_DETECT);
|
||||
ftdm_clear_flag(ftdmchan, FTDM_CHANNEL_SUPRESS_DTMF);
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "Disabled software DTMF detector\n");
|
||||
GOTO_STATUS(done, FTDM_SUCCESS);
|
||||
if (FTDM_IS_VOICE_CHANNEL(ftdmchan)) {
|
||||
if (!ftdm_channel_test_feature(ftdmchan, FTDM_CHANNEL_FEATURE_DTMF_DETECT)) {
|
||||
teletone_dtmf_detect_init (&ftdmchan->dtmf_detect, ftdmchan->rate);
|
||||
ftdm_clear_flag(ftdmchan, FTDM_CHANNEL_DTMF_DETECT);
|
||||
ftdm_clear_flag(ftdmchan, FTDM_CHANNEL_SUPRESS_DTMF);
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "Disabled software DTMF detector\n");
|
||||
GOTO_STATUS(done, FTDM_SUCCESS);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue