[Freeswitch-users] Break&condition

Michael Collins msc at freeswitch.org
Fri Mar 23 18:33:24 MSK 2012


Miha,

It might help if you show us a bit more of your dialplan. It may be that
you need to break some of these out into separate extensions. Also, what is
your "big picture" application? What is the problem that you are attempting
to solve?

-MC


On Fri, Mar 23, 2012 at 6:04 AM, Miha <miha at softnet.si> wrote:

>  Hi,
>
> In same extension a have multiple conditions. Problem is if the first
> condition is false, dialplan will go further as I have set on-true.
> How can I prevent that dialplan will go after break="on-true" on second
> condition and will not go looking condition inside condition.
>
> So if the variable mobilne is not set, in this dialplan FS will go looking
> to <condition field="destination_number"
> expression="^(051|041|031|030|040|070|071)(\d{6})|^(0038651|0038641|0038631|0038630|0038640|0038670|0038671)(\d{6})"
> break="on-true"> and reject call instead of goint to second condtion which
> is <condition field="${toll_allow}" expression="tuje"/>.
>
> I hope I make it clear:D
>
>  <condition field="${toll_allow}" expression="mobilne"  break="on-true" />
>         <condition field="destination_number"
> expression="^(051|041|031|030|040|070|071)(\d{6})|^(0038651|0038641|0038631|0038630|0038640|0038670|0038671)(\d{6})"
> break="on-true">
>         <action application="respond" data="403"/>
> </condition>
>
>
>
> <condition field="${toll_allow}" expression="tuje"/>
>         <condition field="destination_number" expression="^00\d+">
>         <action application="respond" data="403"/>
> </condition>
>
>
> <condition field="${toll_allow}" expression="vroce"/>
>         <condition field="destination_number"
> expression="^(090)(\d{4})|^(090)(\d{6})">
>         <action application="respond" data="403"/>
> </condition>
>
>
> Regards and thank you for your help!
>
> Miha
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.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/20120323/cf468590/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list