]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
answer channel on record to ensure media
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 29 Oct 2009 05:11:54 +0000 (05:11 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 29 Oct 2009 05:11:54 +0000 (05:11 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15265 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_play_say.c

index 2819995147fd5692a52fa676d1d44a962613db08..57161bfb36f5a28236a098491e97e7f01b61f8d4 100644 (file)
@@ -404,7 +404,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
                return SWITCH_STATUS_FALSE;
        }
 
-       if (switch_channel_pre_answer(channel) != SWITCH_STATUS_SUCCESS) {
+       if (switch_channel_answer(channel) != SWITCH_STATUS_SUCCESS) {
                return SWITCH_STATUS_FALSE;
        }
        
@@ -513,10 +513,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
                asis = 1;
        }
 
-       if (switch_channel_pre_answer(channel) != SWITCH_STATUS_SUCCESS) {
-               return SWITCH_STATUS_FALSE;
-       }
-
        if ((p = switch_channel_get_variable(channel, "RECORD_TITLE"))) {
                vval = switch_core_session_strdup(session, p);
                switch_core_file_set_string(fh, SWITCH_AUDIO_COL_STR_TITLE, vval);