Actions and anti-actions
Actions represent the actual steps to take when a Dialplan match has been found. The actions are always present inside an extension
and condition
block.
Actions and anti-actions both tell FreeSWITCH to act upon a call. The difference between the two is simple: actions are executed if the condition is met and anti-actions are executed if the condition is not met. Consider the following example:
<extension name="Action vs. anti-action example"> <condition field="destination_number" expression="^(9101)$"> <action application="log" data="INFO You dialed 9101"/> <anti-action application="log" data="INFO You did NOT dial 9101"/> </condition> </extension>
In the preceding example, <extension>
will log some information to the FreeSWITCH command line depending upon what the user dialed. If the user dials 9101, the action is executed and the log displays, "You dialed 9101". If the user dials anything other than 9101...