<span style>Hi,</span><div style><br></div><div style>I've noticed that when I have an extension containing only an absolute condition, the proceed variable in mod_dialplan_xml.c:parse_exten(...) is not changed and the next extension is also executed, thus ignoring the first extension's "continue" attribute, which was set to "false".</div>
<div style><br></div><div style>I'm referring to this code: (mod_dialplan.c:221 in today's GIT)</div><div style><span style="white-space:pre-wrap">        </span>...</div><div style><div><span style="white-space:pre-wrap">        </span>} else if (time_match == -1) {</div>
<div><span style="white-space:pre-wrap">                </span>switch_log_printf(SWITCH_CHANNEL_SESSION_LOG_CLEAN(session), SWITCH_LOG_DEBUG,</div><div><span style="white-space:pre-wrap">                                                </span> "Dialplan: %s Absolute Condition [%s] match=%s\n", switch_channel_get_name(channel), exten_name, all ? "all" : "any");</div>
<div><span style="white-space:pre-wrap">                </span>pass++;</div><div><span style="white-space:pre-wrap">                </span>if (!all && !xor) break;</div><div><span style="white-space:pre-wrap">        </span>} else if (time_match == 1) {</div>
</div><div style><div><span style="white-space:pre-wrap">        </span>...</div><div><br></div></div><div style>Shouldn't this set the proceed variable to 1, just like the regex condition a few lines above (line 208 in today's GIT)?</div>
<div style><br></div><div style>I just made a quick test and it worked as (I) expected.</div><div style><br></div><div style>What I'm proposing is to change the code above to the following: </div><div style><br></div>
<div style><div><span style="white-space:pre-wrap">        </span>...</div><div><span style="white-space:pre-wrap">        </span>} else if (time_match == -1) {</div><div><span style="white-space:pre-wrap">                </span>switch_log_printf(SWITCH_CHANNEL_SESSION_LOG_CLEAN(session), SWITCH_LOG_DEBUG,</div>
<div><span style="white-space:pre-wrap">                                                </span> "Dialplan: %s Absolute Condition [%s] match=%s\n", switch_channel_get_name(channel), exten_name, all ? "all" : "any");</div><div><span style="white-space:pre-wrap">        </span><span style="white-space:pre-wrap">        </span>proceed = 1;</div>
<div><span style="white-space:pre-wrap">                </span>pass++;</div><div><span style="white-space:pre-wrap">                </span>if (!all && !xor) break;</div><div><span style="white-space:pre-wrap">        </span>} else if (time_match == 1) {</div>
</div><div style><div><span style="white-space:pre-wrap">        </span>...</div><div><br></div></div><div style>Sorry if this was already discussed, I've searched this list and the users list to no avail...</div><div style>
<br></div><div style>Best regards,</div><div style><br></div>Rafael Scheffer Vargas<br>desenvolvimento KHOMP - 15 Anos<br><br>R. Joe Collaço, 253 <a href="http://www.khomp.com.br" target="_blank">www.khomp.com.br</a><br>
Florianópolis | SC<br>+55 48 3722-2916 | 9612-0276 | USA: +1 213-943-1535<br><a href="mailto:vargas@khomp.com.br" target="_blank">vargas@khomp.com.br</a><br><br>