[Freeswitch-users] Logical OR in conditions
Anthony Minessale
anthony.minessale at gmail.com
Thu Jun 9 19:53:17 MSD 2011
the easy way would be to put the OR in the REGEX sep with |
^1234$|^5678$
On Thu, Jun 9, 2011 at 10:20 AM, Matthew Ralston
<freeswitch at mralston.com> wrote:
> Hi,
>
> What is the correct condition->break value to use in order to create a logical OR with conditions?
>
> I have two extensions which I'd like to merge into one. I'd like the actions to be run if either of the conditions matches:
>
> <extension name="call_forward_enable">
> <condition field="destination_number" expression="^\*21\*([0-9]+)#$">
> <action application="javascript" data="callForwardEnable.js"/>
> <action application="hangup"/>
> </condition>
> </extension>
>
> <!-- For phones that won't dial *# numbers, *=7, #=9 -->
> <extension name="call_forward_enable">
> <condition field="destination_number" expression="^7217([0-9]+)9$">
> <action application="javascript" data="callForwardEnable.js"/>
> <action application="hangup"/>
> </condition>
> </extension>
>
> So the result would be something like:
>
> <extension name="call_forward_enable">
> <condition field="destination_number" expression="^\*21\*([0-9]+)#$" break="on-true" />
> <condition field="destination_number" expression="^7217([0-9]+)9$">
> <action application="javascript" data="callForwardEnable.js"/>
> <action application="hangup"/>
> </condition>
> </extension>
>
> I can't seem to get it to work and my brain is melting trying to wrap my head around the different break values.
>
> Cheers,
>
> Matt
>
>
> _______________________________________________
> 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
>
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900
More information about the FreeSWITCH-users
mailing list