diff options
-rwxr-xr-x | zaptel.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1545,8 +1545,9 @@ static void zt_chan_unreg(struct zt_chan *chan) chans[x]->master = chans[x]; } if ((chans[x]->confna == chan->channo) && - (chans[x]->confmode >= ZT_CONF_MONITOR) && - (chans[x]->confmode <= ZT_CONF_MONITORBOTH)) { + (((chans[x]->confmode >= ZT_CONF_MONITOR) && + (chans[x]->confmode <= ZT_CONF_MONITORBOTH)) || + (chans[x]->confmode == ZT_CONF_DIGITALMON))) { /* Take them out of conference with us */ /* release conference resource if any */ if (chans[x]->confna) @@ -4613,6 +4614,8 @@ static inline void __zt_process_getaudio_chunk(struct zt_chan *ss, unsigned char break; case ZT_CONF_DIGITALMON: /* Real digital monitoring, but still echo cancel if desired */ + if (!chans[ms->confna]) + break; if (chans[ms->confna]->flags & ZT_FLAG_PSEUDO) { if (ms->ec) { for (x=0;x<ZT_CHUNKSIZE;x++) |