diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index fce8e12a9b..dba6507121 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -4372,6 +4372,9 @@ SWITCH_STANDARD_APP(conference_function) buf, sizeof(pin_buf) - strlen(pin_buf), strlen(conference->pin) - strlen(pin_buf), "#", &term, 10000, 0, 0); + if (status == SWITCH_STATUS_TIMEOUT) { + status = SWITCH_STATUS_SUCCESS; + } } pin_valid = (status == SWITCH_STATUS_SUCCESS && strcmp(pin_buf, conference->pin) == 0); diff --git a/src/mod/applications/mod_voicemail/mod_voicemail.c b/src/mod/applications/mod_voicemail/mod_voicemail.c index eefc1d0259..75f1ba56df 100644 --- a/src/mod/applications/mod_voicemail/mod_voicemail.c +++ b/src/mod/applications/mod_voicemail/mod_voicemail.c @@ -929,8 +929,12 @@ static switch_status_t vm_macro_get(switch_core_session_t *session, if (maxlen == 0 || maxlen > buflen - 1) { maxlen = buflen - 1; } + if (bslen < maxlen) { status = switch_ivr_collect_digits_count(session, buf + bslen, buflen, maxlen - bslen, term_chars, terminator_key, timeout, 0, 0); + if (status == SWITCH_STATUS_TIMEOUT) { + status = SWITCH_STATUS_SUCCESS; + } } return status; diff --git a/src/switch_channel.c b/src/switch_channel.c index e4ca19c76a..f8a83a56d0 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -1482,6 +1482,7 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_pre_answer(switch_channel if (status == SWITCH_STATUS_SUCCESS) { switch_channel_perform_mark_pre_answered(channel, file, func, line); + status = switch_ivr_sleep(channel->session, 250, NULL); } else { switch_channel_hangup(channel, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION); } @@ -1598,10 +1599,13 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_answer(switch_channel_t * if (status == SWITCH_STATUS_SUCCESS) { switch_channel_perform_mark_answered(channel, file, func, line); + status = switch_ivr_sleep(channel->session, 250, NULL); } else { switch_channel_hangup(channel, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION); } + + return status; } diff --git a/src/switch_ivr_play_say.c b/src/switch_ivr_play_say.c index 8c5b0e4342..bf925e8347 100644 --- a/src/switch_ivr_play_say.c +++ b/src/switch_ivr_play_say.c @@ -101,6 +101,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *s switch_channel_t *channel = switch_core_session_get_channel(session); uint8_t done = 0; int matches = 0; + const char *pause_val; + int pause = 100; if (!macro_name) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No phrase macro specified.\n"); @@ -182,7 +184,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *s old_sound_prefix = p; switch_channel_set_variable(channel, "sound_prefix", sound_path); } - + if (!(macro = switch_xml_child(language, "macro"))) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "can't find any macro tags.\n"); goto done; @@ -200,6 +202,13 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *s goto done; } + if ((pause_val = switch_xml_attr(macro, "pause"))) { + int tmp = atoi(pause_val); + if (tmp >= 0) { + pause = tmp; + } + } + if (!(input = switch_xml_child(macro, "input"))) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "can't find any input tags.\n"); goto done; @@ -316,6 +325,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *s status = switch_ivr_speak_text(session, my_tts_engine, my_tts_voice, odata, args); } } + + switch_ivr_sleep(session, pause, NULL); } } @@ -1497,7 +1508,10 @@ SWITCH_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t /* Try to grab some more digits for the timeout period */ status = switch_ivr_collect_digits_count(session, digit_buffer, digit_buffer_length, max_digits, valid_terminators, &terminator, timeout, 0, 0); - + if (status == SWITCH_STATUS_TIMEOUT) { + status = SWITCH_STATUS_SUCCESS; + } + /* Make sure we made it out alive */ if (status != SWITCH_STATUS_SUCCESS) { /* Bail */