From: Mark Spencer Date: Mon, 11 Mar 2002 14:30:21 +0000 (+0000) Subject: Version 0.1.11 from FTP X-Git-Tag: 0.1.11~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bc1141dfff3f78a0fce3bbf02a2b99c3f9f7ec16;p=thirdparty%2Fasterisk.git Version 0.1.11 from FTP git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@426 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_adsi.c b/res/res_adsi.c index c7aad7b481..e464c01516 100755 --- a/res/res_adsi.c +++ b/res/res_adsi.c @@ -207,6 +207,7 @@ static int __adsi_transmit_messages(struct ast_channel *chan, unsigned char **ms int waittime; struct ast_frame *f; int rem = 0; + int def; if (chan->adsicpe == AST_ADSI_UNAVAILABLE) { /* Don't bother if we know they don't support ADSI */ @@ -266,7 +267,7 @@ static int __adsi_transmit_messages(struct ast_channel *chan, unsigned char **ms x = 0; pos = 0; -#if 0 +#if 1 def= ast_channel_defer_dtmf(chan); #endif while((x < 6) && msg[x]) { @@ -283,14 +284,17 @@ static int __adsi_transmit_messages(struct ast_channel *chan, unsigned char **ms rem = 0; - if (adsi_careful_send(chan, buf, pos, &rem)) + res = adsi_careful_send(chan, buf, pos, &rem); + if (!def) + ast_channel_undefer_dtmf(chan); + if (res) return -1; ast_log(LOG_DEBUG, "Sent total spill of %d bytes\n", pos); memset(ack, 0, sizeof(ack)); /* Get real result */ - res = ast_readstring(chan, ack, 3, 1000, 1000, ""); + res = ast_readstring(chan, ack, 2, 1000, 1000, ""); /* Check for hangup */ if (res < 0) return -1; @@ -893,6 +897,7 @@ static int str2align(char *s) static void init_state(void) { int x; + for (x=0;x