提交 11ca1a2b authored 作者: Travis Cross's avatar Travis Cross

Fix handling of send_silence_when_idle==0 in switch_ivr_sleep

When the channel variable send_silence_when_idle was set to zero,
switch_ivr_sleep was calling SWITCH_IVR_VERIFY_SILENCE_DIVISOR on it
anyway, causing it to be set to 400.  The only way to get the behavior
of not sending silence when idle was to unset the variable completely.

This corrects the behavior such that setting the value to zero has the
same effect as leaving it unset.
上级 3dd36873
......@@ -166,9 +166,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_sleep(switch_core_session_t *session,
switch_goto_status(SWITCH_STATUS_SUCCESS, end);
}
var = switch_channel_get_variable(channel, SWITCH_SEND_SILENCE_WHEN_IDLE_VARIABLE);
if (var) {
sval = atoi(var);
if ((var = switch_channel_get_variable(channel, SWITCH_SEND_SILENCE_WHEN_IDLE_VARIABLE))
&& (sval = atoi(var))) {
SWITCH_IVR_VERIFY_SILENCE_DIVISOR(sval);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论