[asterisk-commits] file: trunk r83114 - /trunk/apps/app_disa.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 19 10:08:44 CDT 2007


Author: file
Date: Wed Sep 19 10:08:43 2007
New Revision: 83114

URL: http://svn.digium.com/view/asterisk?view=rev&rev=83114
Log:
DISA only needs to know about the end of DTMF, not the beginning/duration.

Modified:
    trunk/apps/app_disa.c

Modified: trunk/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_disa.c?view=diff&rev=83114&r1=83113&r2=83114
==============================================================================
--- trunk/apps/app_disa.c (original)
+++ trunk/apps/app_disa.c Wed Sep 19 10:08:43 2007
@@ -179,6 +179,8 @@
 
 	play_dialtone(chan, args.mailbox);
 
+	ast_set_flag(chan, AST_FLAG_END_DTMF_ONLY);
+
 	for (;;) {
 		  /* if outa time, give em reorder */
 		if (ast_tvdiff_ms(ast_tvnow(), lastdigittime) > ((k&2) ? digittimeout : firstdigittimeout)) {
@@ -192,11 +194,14 @@
 			continue;
 		}
 
-		if (!(f = ast_read(chan)))
+		if (!(f = ast_read(chan))) {
+			ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY);
 			return -1;
+		}
 
 		if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP)) {
 			ast_frfree(f);
+			ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY);
 			return -1;
 		}
 
@@ -225,6 +230,7 @@
 						fp = fopen(args.passcode,"r");
 						if (!fp) {
 							ast_log(LOG_WARNING,"DISA password file %s not found on chan %s\n",args.passcode,chan->name);
+							ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY);
 							return -1;
 						}
 						pwline[0] = 0;
@@ -307,6 +313,8 @@
 		}
 	}
 
+	ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY);
+
 	if (k == 3) {
 		int recheck = 0;
 		struct ast_flags flags = { AST_CDR_FLAG_POSTED };




More information about the asterisk-commits mailing list