Hi, Ah ok, that'll do me. Thank you. Kind regards, Matthew Ralston Web Developer & IT Consultant matt@mralston.co.uk www.mralston.com On 9 Jun 2011, at 16:53, Anthony Minessale wrote:
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@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@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@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org