mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-03 22:26:51 +00:00
expose useful internals... thanks jaybinks
This commit is contained in:
parent
c56b73d0be
commit
beb0673f25
@ -1122,9 +1122,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
|
|||||||
fh->samples = sample_start = 0;
|
fh->samples = sample_start = 0;
|
||||||
if (sleep_val_i) {
|
if (sleep_val_i) {
|
||||||
status = switch_ivr_sleep(session, sleep_val_i, SWITCH_FALSE, args);
|
status = switch_ivr_sleep(session, sleep_val_i, SWITCH_FALSE, args);
|
||||||
if(status != SWITCH_STATUS_SUCCESS) {
|
if(status != SWITCH_STATUS_SUCCESS) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1854,6 +1854,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_wait_for_silence(switch_core_session_
|
|||||||
if (sample_count) {
|
if (sample_count) {
|
||||||
sample_count -= raw_codec.implementation->samples_per_packet;
|
sample_count -= raw_codec.implementation->samples_per_packet;
|
||||||
if (sample_count <= 0) {
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1874,6 +1878,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_wait_for_silence(switch_core_session_
|
|||||||
|
|
||||||
if (countdown) {
|
if (countdown) {
|
||||||
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;
|
break;
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user