[Freeswitch-users] Playing with conditions

Brian West brian at freeswitch.org
Tue Sep 1 17:32:42 MSD 2015


https://wiki.freeswitch.org/wiki/Dialplan_XML#Nested_Condition_Caveats_and_Notes

This isn't moved over yet, or I can't find it on confluence.

On Tue, Sep 1, 2015 at 5:30 AM, Avi Marcus <avi at avimarcus.net> wrote:

> Short answer: Each extension only has 1 set of conditions.
> The condition evaluating foobar is run *before* it gets set.
> After the play_and_get_digits you should transfer/execute_extension to a
> new extension that will evaluate ${foobar}
>
> -Avi Marcus
> BestFone
>
> On Tue, Sep 1, 2015 at 11:56 AM, Dmitry Mordovin <d.mordovin at dwide.com>
> wrote:
>
>> Hello
>>
>> <section name="dialplan" description="Local call">
>>      <context name="public">
>>        <extension name="local_1">
>>
>>      <condition field="destination_number" expression="^(\d{4})$">
>>        <action application="answer"/>
>>
>>        <action application="play_and_get_digits" data="1 1 3 7000 #
>> $${base_dir}/sounds/en/us/callie/conference/8000/conf-pin.wav
>> /invalid.wav foobar \d+"/>
>>        <action application="log" data="CRIT ${foobar}"/>
>>
>>        <condition field="${foobar}" expression="1$">
>>              <action application="log" data="CRIT
>> --------------1------------------"/>
>>              <anti-action application="log" data="CRIT --------------not
>> 1------------------"/>
>>        </condition>
>>
>>        <action application="log" data="CRIT ---- last ${foobar}"/>
>>      </condition>
>>
>>        </extension>
>>      </context>
>>    </section>
>>
>> Why inner condition not works?
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>



-- 

*Brian West*
brian at freeswitch.org


*Twitter: @FreeSWITCH , @briankwest*
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com

Got Bugs? Report them here <https://freeswitch.org/jira>! | Reddit:
/r/freeswitch <https://www.reddit.com/r/freeswitch>

*T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378)
*iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150901/54bd9245/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list