[Freeswitch-users] Understanding break="never" in condition-tag

Dmitry Bely dmitry.bely at gmail.com
Mon Mar 21 12:40:34 MSK 2011


On Mon, Mar 21, 2011 at 11:18 AM, Avi Marcus <avi at 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?

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

> 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 at 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 at gmail.com>
>> wrote:
>>>
>>> On Sun, Mar 20, 2011 at 10:45 PM, Avi Marcus <avi at 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



More information about the FreeSWITCH-users mailing list