[Freeswitch-users] Logical OR in conditions
Matthew Ralston
freeswitch at mralston.com
Thu Jun 9 19:20:44 MSD 2011
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
More information about the FreeSWITCH-users
mailing list