diff options
-rwxr-xr-x | zaptel.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -4970,10 +4970,15 @@ out in the later versions, and is put back now. */ } bytes = 0; } else if (ms->flags & ZT_FLAG_CLEAR) { - /* Clear channels should idle with 0xff for the sake - of silly PRI's that care about idle B channels */ - memset(txb, 0xff, bytes); - bytes = 0; + /* Clear channels that are idle in audio mode need + to send silence; in non-audio mode, always send 0xff + so stupid switches won't consider the channel active + */ + if (ms->flags & ZT_FLAG_AUDIO) { + memset(txb, ZT_LIN2X(0, ms), bytes); + } else { + memset(txb, 0xff, bytes); + } } else { memset(txb, ZT_LIN2X(0, ms), bytes); /* Lastly we use silence on telephony channels */ bytes = 0; |