]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
cleanup
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 9 Sep 2008 18:24:13 +0000 (18:24 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 9 Sep 2008 18:24:13 +0000 (18:24 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9496 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_conference/mod_conference.c
src/mod/applications/mod_voicemail/mod_voicemail.c
src/switch_channel.c
src/switch_ivr_play_say.c

index fce8e12a9bdd67184bdf426d6b24c81c373391af..dba65071210add7055fa9434d27fa36b6f5fd1d0 100644 (file)
@@ -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);
index eefc1d0259c1b7d576c3a22b74f262f872d94dcd..75f1ba56df1cba9064862c129c35d7e99aecce6e 100644 (file)
@@ -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;
index e4ca19c76aa30d0a8d0e7de521f744d948b32081..f8a83a56d06460883ab6a785002a6a1ed3120391 100644 (file)
@@ -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;
 }
 
index 8c5b0e43420d7aefbd24fb3b2d10aba9490feee6..bf925e834794346085850bc2bcf0c3ba91e89be4 100644 (file)
@@ -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 */