[asterisk-commits] file: branch 1.4 r59963 - /branches/1.4/apps/app_speech_utils.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Apr 3 12:41:00 MST 2007


Author: file
Date: Tue Apr  3 14:40:59 2007
New Revision: 59963

URL: http://svn.digium.com/view/asterisk?view=rev&rev=59963
Log:
Don't clash when a person both speaks and uses DTMF.

Modified:
    branches/1.4/apps/app_speech_utils.c

Modified: branches/1.4/apps/app_speech_utils.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_speech_utils.c?view=diff&rev=59963&r1=59962&r2=59963
==============================================================================
--- branches/1.4/apps/app_speech_utils.c (original)
+++ branches/1.4/apps/app_speech_utils.c Tue Apr  3 14:40:59 2007
@@ -590,7 +590,7 @@
                 }
 
 		/* Do timeout check (shared between audio/dtmf) */
-		if (!quieted && started == 1) {
+		if ((!quieted || strlen(dtmf)) && started == 1) {
 			time(&current);
 			if ((current-start) >= timeout) {
 				done = 1;
@@ -677,11 +677,13 @@
 				} else {
 					if (chan->stream != NULL) {
 						ast_stopstream(chan);
+					}
+					if (!started) {
 						/* Change timeout to be 5 seconds for DTMF input */
 						timeout = (chan->pbx && chan->pbx->dtimeout) ? chan->pbx->dtimeout : 5;
-						time(&start);
 						started = 1;
 					}
+					time(&start);
 					snprintf(tmp, sizeof(tmp), "%c", f->subclass);
 					strncat(dtmf, tmp, sizeof(dtmf));
 				}



More information about the asterisk-commits mailing list