提交 01c4dbcf authored 作者: Anthony Minessale's avatar Anthony Minessale

make continue_on_fail trigger explicit matching and only do default behaviour when it's not set

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14972 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 019ee964
...@@ -2122,11 +2122,6 @@ SWITCH_STANDARD_APP(audio_bridge_function) ...@@ -2122,11 +2122,6 @@ SWITCH_STANDARD_APP(audio_bridge_function)
if (switch_ivr_originate(session, &peer_session, &cause, data, timelimit, NULL, NULL, NULL, NULL, NULL, SOF_NONE) != SWITCH_STATUS_SUCCESS) { if (switch_ivr_originate(session, &peer_session, &cause, data, timelimit, NULL, NULL, NULL, NULL, NULL, SOF_NONE) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Originate Failed. Cause: %s\n", switch_channel_cause2str(cause)); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Originate Failed. Cause: %s\n", switch_channel_cause2str(cause));
/* no answer is *always* a reason to continue */
if (cause == SWITCH_CAUSE_NO_ANSWER || cause == SWITCH_CAUSE_NO_USER_RESPONSE || cause == SWITCH_CAUSE_ORIGINATOR_CANCEL) {
return;
}
/* /*
if the variable continue_on_fail is set it can be: if the variable continue_on_fail is set it can be:
'true' to continue on all failures. 'true' to continue on all failures.
...@@ -2150,7 +2145,13 @@ SWITCH_STANDARD_APP(audio_bridge_function) ...@@ -2150,7 +2145,13 @@ SWITCH_STANDARD_APP(audio_bridge_function)
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Continue on fail [%s]: Cause: %s\n", continue_on_fail, cause_str); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Continue on fail [%s]: Cause: %s\n", continue_on_fail, cause_str);
return; return;
} }
} else {
/* no answer is *always* a reason to continue */
if (cause == SWITCH_CAUSE_NO_ANSWER || cause == SWITCH_CAUSE_NO_USER_RESPONSE || cause == SWITCH_CAUSE_ORIGINATOR_CANCEL) {
return;
}
} }
if (!switch_channel_test_flag(caller_channel, CF_TRANSFER) && switch_channel_get_state(caller_channel) != CS_ROUTING) { if (!switch_channel_test_flag(caller_channel, CF_TRANSFER) && switch_channel_get_state(caller_channel) != CS_ROUTING) {
switch_channel_hangup(caller_channel, cause); switch_channel_hangup(caller_channel, cause);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论