[svn-commits] alecdavis: branch 1.6.1 r249843 - /branches/1.6.1/apps/app_echo.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Mar 2 03:05:28 CST 2010


Author: alecdavis
Date: Tue Mar  2 03:05:23 2010
New Revision: 249843

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=249843
Log:
fixes ability to exit echo app

when called from a ISDN channel, null frames prevent '#' exit.
Now only echo back VOICE and DTMF frames

(issue #16880)
Reported by: alecdavis
Patches: 
      echo_exit_1-6-1.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis


Modified:
    branches/1.6.1/apps/app_echo.c

Modified: branches/1.6.1/apps/app_echo.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.1/apps/app_echo.c?view=diff&rev=249843&r1=249842&r2=249843
==============================================================================
--- branches/1.6.1/apps/app_echo.c (original)
+++ branches/1.6.1/apps/app_echo.c Tue Mar  2 03:05:23 2010
@@ -57,16 +57,23 @@
 		if (!f) {
 			break;
 		}
-		f->delivery.tv_sec = 0;
-		f->delivery.tv_usec = 0;
-		if (ast_write(chan, f)) {
-			ast_frfree(f);
-			goto end;
-		}
-		if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == '#')) {
-			res = 0;
-			ast_frfree(f);
-			goto end;
+		switch (f->frametype) {
+		case AST_FRAME_VOICE:
+		case AST_FRAME_DTMF:
+			f->delivery.tv_sec = 0;
+			f->delivery.tv_usec = 0;
+			if (ast_write(chan, f)) {
+				ast_frfree(f);
+				goto end;
+			}
+			if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == '#')) {
+				res = 0;
+				ast_frfree(f);
+				goto end;
+			}
+			break;
+		default:
+			break;
 		}
 		ast_frfree(f);
 	}




More information about the svn-commits mailing list