cleanup
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9496 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
0468d16036
commit
432da6e071
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue