[Freeswitch-users] Nested Condition

Mimiko vbvbrj at gmail.com
Fri Jan 18 17:58:49 MSK 2013


Hi.

There is scenario:
Calling "pref1"-"ext" must redirect (transfer) to "ext" if "ext" exists 
in xml directory, ie user_exists(id ext domain). If user does not 
exists, dialplan processing must continue. In the same extension also 
calling "pref2"-"ext" must be processed same way. But it is all to $1 
scope. 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>

I know this is incorrect. But how to do this?

-- 
Mimiko desu.



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