summaryrefslogtreecommitdiff
path: root/channels/chan_zap.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_zap.c')
-rwxr-xr-xchannels/chan_zap.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 4644bf095..2a8b95d74 100755
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -1213,11 +1213,17 @@ static void zt_enable_ec(struct zt_pvt *p)
{
int x;
int res;
+ if (!p)
+ return;
if (p->echocanon) {
ast_log(LOG_DEBUG, "Echo cancellation already on\n");
return;
}
- if (p && p->echocancel) {
+ if (p->digital) {
+ ast_log(LOG_DEBUG, "Echo cancellation isn't required on digital connection\n");
+ return;
+ }
+ if (p->echocancel) {
if (p->sig == SIG_PRI) {
x = 1;
res = ioctl(p->subs[SUB_REAL].zfd, ZT_AUDIOMODE, &x);