diff --git a/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c b/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c index 71908b36f0..b4af4a3579 100644 --- a/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c +++ b/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c @@ -197,16 +197,6 @@ static int parse_exten(switch_core_session_t *session, switch_caller_profile_t * do_break_a = NULL; } } - - - if (switch_xml_child(xcond, "condition")) { - if (!(proceed = parse_exten(session, caller_profile, xcond, extension, orig_exten_name, recur + 1))) { - if (do_break_i == BREAK_NEVER) { - continue; - } - goto done; - } - } if (time_match == 1) { if ( switch_core_test_flag(SCF_DIALPLAN_TIMESTAMPS) ) { @@ -584,6 +574,17 @@ static int parse_exten(switch_core_session_t *session, switch_caller_profile_t * (anti_action == SWITCH_TRUE && do_break_i == BREAK_ON_FALSE)) || do_break_i == BREAK_ALWAYS) { break; } + + if (proceed) { + if (switch_xml_child(xcond, "condition")) { + if (!(proceed = parse_exten(session, caller_profile, xcond, extension, orig_exten_name, recur + 1))) { + if (do_break_i == BREAK_NEVER) { + continue; + } + goto done; + } + } + } } done: