<extension name="YLE"> <condition field="destination_number" expression="^\*1105$" break="on-false"/> <--if this is false, FreeSWITCH skips to the next extension. <condition wday="6" break="never"/> <--The default "on-false" would make FreeSWITCH move to the next extension, rather than evaluating the next condition set. <condition hour="8-12" break="on-true"> <--Don't evaluate the next condition set if this is true. <action application="transfer" data="1105 XML default"/> </condition> <condition wday="1-5" break="never"/> <condition hour="8-21" break="on-true"> <action application="transfer" data="1105 XML default"/> </condition> <condition> <-- this is a catch all. If they didn't dial *1105, they aren't here anymore. <action application="voicemail" data="default ${domain} 1105"/> </condition> </extension> On Mon, Mar 21, 2011 at 11:40 AM, Dmitry Bely <dmitry.bely@gmail.com> wrote:
On Mon, Mar 21, 2011 at 11:18 AM, Avi Marcus <avi@avimarcus.net> wrote:
NOTE: break "on-true, on-false, never" don't change the *condition*, merely the *hunting*.
If wday=1 and hour=9, will transfer to 1105 be executed in your example? If you think it won't, why?
It will go to 1105 - from the second condition-group. But the first condition-group fails. I'm pretty sure I've seen it in the logs work as I'm describing..
You need ALL the conditions to match for freeswitch to do the action, and you can't change that!
I don't think so. If some condition evaluates to true, its nested actions are always executed no matter what preceded it. But of course the condition should be evaluated first, that's where various break values come into play.
No way - the dialplan is always run on a "match all conditions" to do the actions! How else would multiple conditions EVER work? This is a slight edge-case though - the on-true, on-fail, never.. they only matter when you want MULTIPLE condition-groups within ONE extension. If you specify your settings as multiple serial extensions, then this stuff doesn't really matter... -Avi
The break is how to handle failure - "Does 1 failure to match a condition mean should move on to the next condition extension (on-false) or keep evaluating this extension? (never)" -Avi
On Mon, Mar 21, 2011 at 10:13 AM, Avi Marcus <avi@avimarcus.net> wrote:
We have two items going on - extensions, and condition-groups within the extension. For wday=1, if it was set to on-false - the default - it would end evaluating this extension and move on to the next. However, since it says "break=never" it moves to evaluate the *next* *condition-group* rather than executing or skipping the extension
entirely.
-Avi
On Mon, Mar 21, 2011 at 8:59 AM, Dmitry Bely <dmitry.bely@gmail.com> wrote:
On Sun, Mar 20, 2011 at 10:45 PM, Avi Marcus <avi@avimarcus.net>
wrote:
No, I'm pretty sure that example works as intended.. I created it
Really? Correct me if I'm wrong but for wday=1 and hour=9 an action in
<condition wday="6" break="never"/> <condition hour="8-12" break="on-true"> <action application="transfer" data="1105 XML default"/> </condition>
will be executed and further processing will be stopped. Actually the first condition is a sort of (misleading) comment here.
- Dmitry Bely
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org