<div dir="ltr"><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px; "><pre style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); color: black; background-color: rgb(249, 249, 249); line-height: 1.1em; ">
<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>
<br></pre><pre style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); color: black; background-color: rgb(249, 249, 249); line-height: 1.1em; ">
        <condition wday="1-5" break="never"/>
        <condition hour="8-21" break="on-true">
                <action application="transfer" data="1105 XML default"/>
        </condition>
<br></pre><pre style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); color: black; background-color: rgb(249, 249, 249); line-height: 1.1em; ">
        <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></pre></span><br><div class="gmail_quote">On Mon, Mar 21, 2011 at 11:40 AM, Dmitry Bely <span dir="ltr"><<a href="mailto:dmitry.bely@gmail.com">dmitry.bely@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Mon, Mar 21, 2011 at 11:18 AM, Avi Marcus <<a href="mailto:avi@avimarcus.net">avi@avimarcus.net</a>> wrote:<br>
> NOTE: break "on-true, on-false, never" don't change the *condition*, merely<br>
> the *hunting*.<br>
<br>
</div>If wday=1 and hour=9, will transfer to 1105 be executed in your<br>
example? If you think it won't, why?<br></blockquote><div>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..</div>
<div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
> You need ALL the conditions to match for freeswitch to do the action, and you can't<br>
> change that!<br>
<br>
</div>I don't think so. If some condition evaluates to true, its nested<br>
actions are always executed no matter what preceded it. But of course<br>
the condition should be evaluated first, that's where various break<br>
values come into play.<br></blockquote><div>No way - the dialplan is always run on a "match all conditions" to do the actions! How else would multiple conditions EVER work?</div><div><br></div><div>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...</div>
<div><br></div><div>-Avi</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5"><br>
> The break is how to handle failure - "Does 1 failure to match<br>
> a condition mean should move on to the next condition extension (on-false)<br>
> or keep evaluating this extension? (never)"<br>
> -Avi<br>
><br>
> On Mon, Mar 21, 2011 at 10:13 AM, Avi Marcus <<a href="mailto:avi@avimarcus.net">avi@avimarcus.net</a>> wrote:<br>
>><br>
>> We have two items going on - extensions, and condition-groups within the<br>
>> extension.<br>
>> For wday=1, if it was set to on-false - the default - it would end<br>
>> evaluating this extension and move on to the next.<br>
>> However, since it says "break=never" it moves to evaluate the *next*<br>
>> *condition-group* rather than executing or skipping the extension entirely.<br>
>> -Avi<br>
>><br>
>> On Mon, Mar 21, 2011 at 8:59 AM, Dmitry Bely <<a href="mailto:dmitry.bely@gmail.com">dmitry.bely@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> On Sun, Mar 20, 2011 at 10:45 PM, Avi Marcus <<a href="mailto:avi@avimarcus.net">avi@avimarcus.net</a>> wrote:<br>
>>> > No, I'm pretty sure that example works as intended.. I created it<br>
>>><br>
>>> Really? Correct me if I'm wrong but for wday=1 and hour=9 an action in<br>
>>><br>
>>> <condition wday="6" break="never"/><br>
>>> <condition hour="8-12" break="on-true"><br>
>>> <action application="transfer" data="1105 XML default"/><br>
>>> </condition><br>
>>><br>
>>> will be executed and further processing will be stopped. Actually the<br>
>>> first condition is a sort of (misleading) comment here.<br>
<br>
- Dmitry Bely<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br></div>