]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix messup in dtmf change
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 16 Sep 2011 22:07:48 +0000 (17:07 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 16 Sep 2011 22:07:48 +0000 (17:07 -0500)
libs/freetdm/src/ftdm_io.c

index a472ca1694a16a6a3de8feba965369a12d1fabe1..52dc1c49ba4cbf5b70deaf6cd742f95ffe6e48e8 100644 (file)
@@ -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 {