[Freeswitch-users] Playing with conditions

Avi Marcus avi at avimarcus.net
Tue Sep 1 14:30:00 MSD 2015


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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150901/147987c7/attachment-0001.html 


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