dect
/
asterisk
Archived
13
0
Fork 0

Add option for enabling and disabling echo cancellation

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@27523 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
mattf 2006-05-16 21:43:20 +00:00
parent ca4fd89b4e
commit 48b9e5d13a
2 changed files with 13 additions and 0 deletions

View File

@ -2900,6 +2900,16 @@ static int zt_setoption(struct ast_channel *chan, int option, void *data, int da
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;

View File

@ -303,6 +303,9 @@ enum ast_control_frame_type {
/* 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;