From: Anthony Minessale Date: Fri, 16 Sep 2011 22:07:48 +0000 (-0500) Subject: fix messup in dtmf change X-Git-Tag: v1.2-rc1~51^2~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7b40140bb83c33418664fcbdc64fed597b3f4f0;p=thirdparty%2Ffreeswitch.git fix messup in dtmf change --- diff --git a/libs/freetdm/src/ftdm_io.c b/libs/freetdm/src/ftdm_io.c index a472ca1694..52dc1c49ba 100644 --- a/libs/freetdm/src/ftdm_io.c +++ b/libs/freetdm/src/ftdm_io.c @@ -3963,9 +3963,9 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_process_media(ftdm_channel_t *ftdmchan, v char digit_char; uint32_t dur; - teletone_dtmf_detect(&ftdmchan->dtmf_detect, sln, (int)slen); - - if ((hit = teletone_dtmf_get(&ftdmchan->dtmf_detect, &digit_char, &dur)) == TT_HIT_BEGIN) { + if ((hit = teletone_dtmf_detect(&ftdmchan->dtmf_detect, sln, (int)slen)) == TT_HIT_BEGIN) { + teletone_dtmf_get(&ftdmchan->dtmf_detect, &digit_char, &dur); + if (ftdmchan->state == FTDM_CHANNEL_STATE_CALLWAITING && (digit_char == 'D' || digit_char == 'A')) { ftdmchan->detected_tones[FTDM_TONEMAP_CALLWAITING_ACK]++; } else {