From: Anthony Minessale Date: Thu, 4 May 2006 00:07:20 +0000 (+0000) Subject: update X-Git-Tag: v1.0-beta1~2734 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de338c319d18d82240673033bcae6fb3972a92ac;p=thirdparty%2Ffreeswitch.git update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1336 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/switch_channel.c b/src/switch_channel.c index f42b80c58a..7a709459de 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -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;