[Freeswitch-users] Nested Condition
Steven Schoch
schoch+freeswitch.org at xwin32.com
Fri Jan 25 03:10:55 MSK 2013
On Fri, Jan 18, 2013 at 6:58 AM, Mimiko <vbvbrj at gmail.com> wrote:
> I try:
>
> <extension name="Loopback Call">
> <condition field="destination_number"
> expression="^${pref1}([5-8]\d\d)$" require-nested="true">
> <condition field="${user_exists(id $1 $${domain})" expression="^true$">
> <action application="transfer" data="$1 XML default"/>
> </condition>
> </condition>
> <condition field="destination_number"
> expression="^${pref2}([6-8]\d\d)$" require-nested="true">
> <condition field="${user_exists(id $1 $${domain})" expression="^true$">
> <action application="transfer" data="$1 XML default"/>
> </condition>
> </condition>
> </extension>
>
How about:
<extension name="Loopback Call">
<condition field="destination_number"
expression="^(${pref1}|${pref2})([5-8]\d\d)$"/>
<condition field="${user_exists(id $2 $${domain})" expression="^true$">
<action application="transfer" data="$2 XML default"/>
</condition>
</extension>
I think that does pretty much the same thing, but I'm not sure of your
exact requirements.
--
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130124/c897bb2f/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list