mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-12 20:27:19 +00:00
expose useful internals... thanks jaybinks
This commit is contained in:
parent
c56b73d0be
commit
beb0673f25
@ -1854,6 +1854,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_wait_for_silence(switch_core_session_
|
||||
if (sample_count) {
|
||||
sample_count -= raw_codec.implementation->samples_per_packet;
|
||||
if (sample_count <= 0) {
|
||||
switch_channel_set_variable(channel, "wait_for_silence_timeout", "true");
|
||||
switch_channel_set_variable_printf(channel, "wait_for_silence_listenhits", "%d", listening);
|
||||
switch_channel_set_variable_printf(channel, "wait_for_silence_silence_hits", "%d", silence_hits);
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "switch_ivr_wait_for_silence: TIMEOUT %d\n", countdown);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1874,6 +1878,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_wait_for_silence(switch_core_session_
|
||||
|
||||
if (countdown) {
|
||||
if (!--countdown) {
|
||||
switch_channel_set_variable(channel, "wait_for_silence_timeout", "false");
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "switch_ivr_wait_for_silence: SILENCE DETECTED\n");
|
||||
break;
|
||||
} else {
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user