]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix ivr
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 30 Jan 2006 16:11:21 +0000 (16:11 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 30 Jan 2006 16:11:21 +0000 (16:11 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@497 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr.c

index 9073d80a19d59e7faf2b19d2c39ed5ca12224cda..e4ab972c3300268b095c399193892fe51803ba9b 100644 (file)
@@ -87,9 +87,17 @@ SWITCH_DECLARE(switch_status) switch_ivr_collect_digits_count(switch_core_sessio
     assert(channel != NULL);
 
        *terminator = '\0';
+
+       for (i = 0 ; i < x; i++) {
+               if (strchr(terminators, buf[i])) {
+                       *terminator = buf[i];
+                       return SWITCH_STATUS_SUCCESS;
+               }
+       }
+
        while (switch_channel_get_state(channel) == CS_EXECUTE) {
                switch_frame *read_frame;
-               
+
                if (switch_channel_has_dtmf(channel)) {
                        char dtmf[128];
                        switch_channel_dequeue_dtmf(channel, dtmf, sizeof(dtmf));