]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 4 May 2006 00:07:20 +0000 (00:07 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 4 May 2006 00:07:20 +0000 (00:07 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1336 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_channel.c

index f42b80c58afbc267d1ca341e265381fb3eb6c74c..7a709459deb83dd8b175771d141c3457327f4c93 100644 (file)
@@ -222,6 +222,8 @@ SWITCH_DECLARE(switch_status_t) switch_channel_queue_dtmf(switch_channel_t *chan
 {
        switch_status_t status;
        register switch_size_t len, inuse;
+       switch_size_t wr = 0;
+       char *p;
 
        assert(channel != NULL);
 
@@ -234,7 +236,16 @@ SWITCH_DECLARE(switch_status_t) switch_channel_queue_dtmf(switch_channel_t *chan
                switch_buffer_toss(channel->dtmf_buffer, strlen(dtmf));
        }
 
-       status = switch_buffer_write(channel->dtmf_buffer, dtmf, len) ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_MEMERR;
+       p = dtmf;
+       while(wr < len && p) {
+               if (*p > 47 && *p < 58) {
+                       wr++;
+               } else {
+                       break;
+               }
+       }
+
+       status = switch_buffer_write(channel->dtmf_buffer, dtmf, wr) ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_MEMERR;
        switch_mutex_unlock(channel->dtmf_mutex);
 
        return status;