More about conditions
Conditions are the control elements in XML dialplan. Inside each extension there is at least one "condition" tag where the characteristics of the configuration/system/incoming call, represented by variables, are checked against a (regular) expression. If the condition is evaluated as true, the actions inside the condition are added to the call's TODO list. If evaluated as false, anti-actions (if present) are added to the TODO list. The general format is:
<extension name="is_looking_for_2900" continue="true"> <condition field="destination_number" expression="^2900$" break="on-true"> <action application="log" data="WARNING first TRUE"/> <anti-action application="log" data="ERR first FALSE"/> </condition> <condition field="destination_number" expression=".*"> <action application="log" data="WARNING second TRUE"/> <action application="set" data="var01=value01" inline="true"/> <action application...