diff options
-rwxr-xr-x | zaptel.c | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -4190,11 +4190,21 @@ static inline void __zt_process_getaudio_chunk(struct zt_chan *ss, unsigned char txb[x] = ZT_LIN2X(getlin[x], ms); break; case ZT_CONF_DIGITALMON: - /* Add monitored channel */ + /* Real digital monitoring, but still echo cancel if desired */ if (chans[ms->confna]->flags & ZT_FLAG_PSEUDO) { - memcpy(txb, chans[ms->confna]->getraw, ZT_CHUNKSIZE); + if (ms->ec) { + for (x=0;x<ZT_CHUNKSIZE;x++) + txb[x] = ZT_LIN2X(chans[ms->confna]->getlin[x], ms); + } else { + memcpy(txb, chans[ms->confna]->getraw, ZT_CHUNKSIZE); + } } else { - memcpy(txb, chans[ms->confna]->putraw, ZT_CHUNKSIZE); + if (ms->ec) { + for (x=0;x<ZT_CHUNKSIZE;x++) + txb[x] = ZT_LIN2X(chans[ms->confna]->putlin[x], ms); + } else { + memcpy(txb, chans[ms->confna]->putraw, ZT_CHUNKSIZE); + } } break; } |