This commit is contained in:
Ahron Greenberg (agree) 2025-01-17 16:41:26 +00:00 committed by GitHub
commit f44b32d72c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 15 additions and 3 deletions

View File

@ -573,9 +573,15 @@ static int parse_exten(switch_core_session_t *session, switch_caller_profile_t *
}
switch_regex_safe_free(re);
if (((anti_action == SWITCH_FALSE && do_break_i == BREAK_ON_TRUE) ||
(anti_action == SWITCH_TRUE && do_break_i == BREAK_ON_FALSE)) || do_break_i == BREAK_ALWAYS) {
break;
if (switch_xml_child(xcond, "condition") && switch_xml_attr(xexten, "break-from-nested") && switch_false(switch_xml_attr(xexten, "break-from-nested"))) {
if ((anti_action == SWITCH_TRUE && do_break_i == BREAK_ON_FALSE)) {
break;
}
} else {
if (((anti_action == SWITCH_FALSE && do_break_i == BREAK_ON_TRUE) ||
(anti_action == SWITCH_TRUE && do_break_i == BREAK_ON_FALSE)) || do_break_i == BREAK_ALWAYS) {
break;
}
}
if (proceed) {
@ -588,6 +594,12 @@ static int parse_exten(switch_core_session_t *session, switch_caller_profile_t *
}
}
}
/* need to recheck this if we didn't break ealier because of break-from-nested */
if (((anti_action == SWITCH_FALSE && do_break_i == BREAK_ON_TRUE) ||
(anti_action == SWITCH_TRUE && do_break_i == BREAK_ON_FALSE)) || do_break_i == BREAK_ALWAYS) {
break;
}
}
done: