Index: channels/chan_zap.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v retrieving revision 1.473 diff -u -r1.473 chan_zap.c --- channels/chan_zap.c 13 Jul 2005 15:13:12 -0000 1.473 +++ channels/chan_zap.c 14 Jul 2005 19:57:48 -0000 @@ -163,8 +163,6 @@ #define DCHAN_AVAILABLE (DCHAN_PROVISIONED | DCHAN_NOTINALARM | DCHAN_UP) -static int cur_emdigitwait = 250; /* Wait time in ms for digits on EM channel */ - static char context[AST_MAX_CONTEXT] = "default"; static char cid_num[256] = ""; static char cid_name[256] = ""; @@ -626,7 +624,6 @@ int cidrings; /* Which ring to deliver CID on */ int dtmfrelax; /* whether to run in relaxed DTMF mode */ int fake_event; - int emdigitwait; int polarityonanswerdelay; struct timeval polaritydelaytv; int sendcalleridafter; @@ -5086,8 +5083,23 @@ if (res < 1) ast_dsp_digitreset(p->dsp); break; default: - /* If we got it, get the rest */ - res = my_getsigstr(chan,dtmfbuf + 1,' ', p->emdigitwait); + /* If we got the first digit, get the rest */ + len = 1; + while((len < AST_MAX_EXTENSION-1) && ast_matchmore_extension(chan, chan->context, dtmfbuf, 1, p->cid_num)) { + if (ast_exists_extension(chan, chan->context, dtmfbuf, 1, p->cid_num)) + timeout = matchdigittimeout; + else + timeout = gendigittimeout; + res = ast_waitfordigit(chan, timeout); + if (res < 0) { + ast_log(LOG_DEBUG, "waitfordigit returned < 0...\n"); + ast_hangup(chan); + return NULL; + } else if (res) { + dtmfbuf[len++] = res; + } else + break; + } break; } } @@ -6852,7 +6864,6 @@ tmp->restrictcid = restrictcid; tmp->use_callingpres = use_callingpres; tmp->priindication_oob = priindication_oob; - tmp->emdigitwait = cur_emdigitwait; if (tmp->usedistinctiveringdetection) { if (!tmp->use_callerid) { ast_log(LOG_NOTICE, "Distinctive Ring detect requires 'usecallerid' be on\n"); @@ -10492,8 +10503,6 @@ cur_rxflash = atoi(v->value); } else if (!strcasecmp(v->name, "debounce")) { cur_debounce = atoi(v->value); - } else if (!strcasecmp(v->name, "emdigitwait")) { - cur_emdigitwait = atoi(v->value); } else if (!strcasecmp(v->name, "polarityonanswerdelay")) { polarityonanswerdelay = atoi(v->value); } else if (!strcasecmp(v->name, "answeronpolarityswitch")) { Index: configs/zapata.conf.sample =================================================================== RCS file: /usr/cvsroot/asterisk/configs/zapata.conf.sample,v retrieving revision 1.48 diff -u -r1.48 zapata.conf.sample --- configs/zapata.conf.sample 23 Jun 2005 14:51:52 -0000 1.48 +++ configs/zapata.conf.sample 14 Jul 2005 19:58:06 -0000 @@ -190,8 +190,6 @@ ; rxwink: Receiver wink time (default 300ms) ; rxflash: Receiver flashtime (default 1250ms) ; debounce: Debounce timing (default 600ms) -; emdigitwait: Time to wait for DID digits on E&M links (default 250ms) (Increase to 500 -; or so if you are not getting all DID digits on your E&M link) ; rxwink=300 ; Atlas seems to use long (250ms) winks ;