From f767fe5ed657fac4b802ded23318bd92faceb5c6 Mon Sep 17 00:00:00 2001 From: andywang1988 Date: Tue, 7 Jul 2015 15:10:13 +0800 Subject: [PATCH] Fixed Bug/FS-7754 --- libs/freetdm/src/ftmod/ftmod_analog/ftmod_analog.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/freetdm/src/ftmod/ftmod_analog/ftmod_analog.c b/libs/freetdm/src/ftmod/ftmod_analog/ftmod_analog.c index 0d6caec400..065e12a0d0 100644 --- a/libs/freetdm/src/ftmod/ftmod_analog/ftmod_analog.c +++ b/libs/freetdm/src/ftmod/ftmod_analog/ftmod_analog.c @@ -847,6 +847,9 @@ static void *ftdm_analog_channel_run(ftdm_thread_t *me, void *obj) if (last_digit && (!collecting || ((elapsed - last_digit > analog_data->digit_timeout) || strlen(dtmf) >= analog_data->max_dialstr))) { ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Number obtained [%s]\n", dtmf); + if (ftdmchan->state == FTDM_CHANNEL_STATE_COLLECT && ftdmchan->state_status != FTDM_STATE_STATUS_COMPLETED) { + ftdm_channel_complete_state(ftdmchan); + } ftdm_set_state_locked(ftdmchan, FTDM_CHANNEL_STATE_RING); last_digit = 0; collecting = 0;