[Freeswitch-dev] Absolute conditions are not changing the proceed variable... (mod_dialplan_xml.c)

Rafael Vargas vargas at khomp.com.br
Tue Jan 31 23:31:40 MSK 2012


Hi,

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".

I'm referring to this code: (mod_dialplan.c:221 in today's GIT)
...
} else if (time_match == -1) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG_CLEAN(session),
SWITCH_LOG_DEBUG,
  "Dialplan: %s Absolute Condition [%s] match=%s\n",
switch_channel_get_name(channel), exten_name, all ? "all" : "any");
pass++;
if (!all && !xor) break;
} else if (time_match == 1) {
...

Shouldn't this set the proceed variable to 1, just like the regex condition
a few lines above (line 208 in today's GIT)?

I just made a quick test and it worked as (I) expected.

What I'm proposing is to change the code above to the following:

...
} else if (time_match == -1) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG_CLEAN(session),
SWITCH_LOG_DEBUG,
  "Dialplan: %s Absolute Condition [%s] match=%s\n",
switch_channel_get_name(channel), exten_name, all ? "all" : "any");
 proceed = 1;
pass++;
if (!all && !xor) break;
} else if (time_match == 1) {
...

Sorry if this was already discussed, I've searched this list and the users
list to no avail...

Best regards,

Rafael Scheffer Vargas
desenvolvimento                         KHOMP - 15 Anos

R. Joe Collaço, 253                    www.khomp.com.br
Florianópolis | SC
+55 48 3722-2916 | 9612-0276 | USA: +1 213-943-1535
vargas at khomp.com.br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20120131/09771cb6/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev mailing list