Switch to audio mode when enabling echo cancellation

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer 2003-04-23 23:00:29 +00:00
parent ddf2e8a342
commit b3543499f0
1 changed files with 6 additions and 0 deletions

View File

@ -907,6 +907,12 @@ static void zt_enable_ec(struct zt_pvt *p)
return;
}
if (p && p->echocancel) {
if (p->sig == SIG_PRI) {
x = 1;
res = ioctl(p->subs[SUB_REAL].zfd, ZT_AUDIOMODE, &x);
if (res)
ast_log(LOG_WARNING, "Unable to enable echo cancellation on channel %d\n", p->channel);
}
x = p->echocancel;
res = ioctl(p->subs[SUB_REAL].zfd, ZT_ECHOCANCEL, &x);
if (res)