]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
DP-11
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 28 Dec 2009 16:40:50 +0000 (16:40 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 28 Dec 2009 16:40:50 +0000 (16:40 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16063 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_originate.c

index 209f59883ebff60314bf02cd4da2c065be63521c..eaf751f14511dc435edfd22f8da5eaf22e9772d7 100644 (file)
@@ -198,7 +198,10 @@ static void *SWITCH_THREAD_FUNC collect_thread_run(switch_thread_t *thread, void
                        switch_input_args_t args = { 0 };
                        args.buf = buf;
                        args.buflen = sizeof(buf);
-                       switch_ivr_play_file(collect->session, NULL, collect->file, &args);
+                       if (switch_ivr_play_file(collect->session, NULL, collect->file, &args) != SWITCH_STATUS_SUCCESS) {
+                               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(collect->session), SWITCH_LOG_ERROR, "%s Error Playing File!", switch_channel_get_name(channel));
+                               switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+                       }
                } else {
                        switch_ivr_collect_digits_count(collect->session, buf, sizeof(buf), 1, SWITCH_BLANK_STRING, &term, 0, 0, 0);
                }