diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-09-25 21:35:37 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-09-25 21:35:37 +0000 |
commit | cf09488f3260fc252ac1ea402ea31b6c9d33d07b (patch) | |
tree | 82821c91b4ff1526c41e38d584af4629c3d06140 | |
parent | ec2f9974a3acf3795da36ecf0ee7f46b4d524148 (diff) |
ensure that idle audio channels transmit silence (issue #5186, slightly different fix)
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@773 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-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; |