[Freeswitch-users] Nested conditions and anti-actions

Ken Rice krice at freeswitch.org
Thu Jan 19 20:13:27 MSK 2017


This is buy design...

<condition><action/></anti-action></condition>

Is the if CONDITION then ACTION else ANTI-ACTION

And keep in mind the dialplan is not a programming language... once you
reach a certain point that's what things like lua xml_curl and just
replacing the dialplan with a custom C module are for


-----Original Message-----
From: freeswitch-users-bounces at lists.freeswitch.org
[mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Mimiko
Sent: Thursday, January 19, 2017 8:36 AM
To: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org>
Subject: [Freeswitch-users] Nested conditions and anti-actions

Hello.

This is a snipped:

<condition field="destination_number" expression="^(1001|1002)$"
require-nested="false">
  <condition field="${effective_caller_id_name}" expression="^.+$"
break="never">
   <action application="export"
data="caller_id_name=${effective_caller_id_name} > ${destination_number}"/>
   <action application="export"
data="effective_caller_id_name=${effective_caller_id_name} >
${destination_number}"/>
   <anti-action application="export" data="caller_id_name=${caller_id_name}
> ${destination_number}"/>
   <anti-action application="export"
data="effective_caller_id_name=${caller_id_name} > ${destination_number}"/>
  </condition>
<action .... />
</condition>

The problem I'm facing is that anti-actions are evaluated even if
destination_number is not equal to 1001 or 1002. But I need that ant-actions
will evaluate only when parent condition is true.

Is this a bug or it is by design?

--
Mimiko desu.

_________________________________________________________________________
Professional FreeSWITCH Consulting Services: 
consulting at freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

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




Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list