[asterisk-commits] kmoore: branch 10 r360034 - in /branches/10: ./ apps/app_echo.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Mar 20 15:37:51 CDT 2012


Author: kmoore
Date: Tue Mar 20 15:37:46 2012
New Revision: 360034

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=360034
Log:
Prevent Echo() from relaying control, null, and modem frames

Echo()'s description states that it echoes audio, video, and DTMF except for #
while it actually echoes any frame that it receives other than DTMF #.  This
was causing frame storms in the test suite in some circumstances where Echo()
was attached to both ends of a pair of local channels and control frames
were being periodically generated.  Echo()'s behavior and description have
been modifed so that it only echoes media and non-# DTMF frames.
........

Merged revisions 360033 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/10/   (props changed)
    branches/10/apps/app_echo.c

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/apps/app_echo.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/apps/app_echo.c?view=diff&rev=360034&r1=360033&r2=360034
==============================================================================
--- branches/10/apps/app_echo.c (original)
+++ branches/10/apps/app_echo.c Tue Mar 20 15:37:46 2012
@@ -40,12 +40,13 @@
 /*** DOCUMENTATION
 	<application name="Echo" language="en_US">
 		<synopsis>
-			Echo audio, video, DTMF back to the calling party
+			Echo media, DTMF back to the calling party
 		</synopsis>
 		<syntax />
 		<description>
-			<para>Echos back any audio, video or DTMF frames read from the calling 
-			channel back to itself. Note: If '#' detected application exits</para>
+			<para>Echos back any media or DTMF frames read from the calling 
+			channel back to itself. This will not echo CONTROL, MODEM, or NULL
+			frames. Note: If '#' detected application exits.</para>
 			<para>This application does not automatically answer and should be
 			preceeded by an application such as Answer() or Progress().</para>
 		</description>
@@ -70,7 +71,10 @@
 		}
 		f->delivery.tv_sec = 0;
 		f->delivery.tv_usec = 0;
-		if (ast_write(chan, f)) {
+		if (f->frametype != AST_FRAME_CONTROL
+			&& f->frametype != AST_FRAME_MODEM
+			&& f->frametype != AST_FRAME_NULL
+			&& ast_write(chan, f)) {
 			ast_frfree(f);
 			goto end;
 		}




More information about the asterisk-commits mailing list