[asterisk-commits] trunk r27523 - in /trunk: channels/chan_zap.c include/asterisk/frame.h

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue May 16 14:43:21 MST 2006


Author: mattf
Date: Tue May 16 16:43:20 2006
New Revision: 27523

URL: http://svn.digium.com/view/asterisk?rev=27523&view=rev
Log:
Add option for enabling and disabling echo cancellation

Modified:
    trunk/channels/chan_zap.c
    trunk/include/asterisk/frame.h

Modified: trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_zap.c?rev=27523&r1=27522&r2=27523&view=diff
==============================================================================
--- trunk/channels/chan_zap.c (original)
+++ trunk/channels/chan_zap.c Tue May 16 16:43:20 2006
@@ -2899,6 +2899,16 @@
 		}
 		ast_log(LOG_DEBUG, "Set Operator Services mode, value: %d on %s/%s\n",
 			oprmode->mode, chan->name,oprmode->peer->name);;
+		break;
+	case AST_OPTION_ECHOCAN:
+		cp = (char *) data;
+		if (*cp) {
+			ast_log(LOG_DEBUG, "Enabling echo cancelation on %s\n", chan->name);
+			zt_enable_ec(p);
+		} else {
+			ast_log(LOG_DEBUG, "Disabling echo cancelation on %s\n", chan->name);
+			zt_disable_ec(p);
+		}
 		break;
 	}
 	errno = 0;

Modified: trunk/include/asterisk/frame.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/frame.h?rev=27523&r1=27522&r2=27523&view=diff
==============================================================================
--- trunk/include/asterisk/frame.h (original)
+++ trunk/include/asterisk/frame.h Tue May 16 16:43:20 2006
@@ -303,6 +303,9 @@
 /* set channel into "Operator Services" mode */
 #define	AST_OPTION_OPRMODE		7
 
+/*! Explicitly enable or disable echo cancelation for the given channel */
+#define	AST_OPTION_ECHOCAN		8
+
 struct oprmode {
 	struct ast_channel *peer;
 	int mode;



More information about the asterisk-commits mailing list