Pitfalls to avoid
There are two major places where the Dialplan design can confuse new users of FreeSWITCH—especially those with a background using Asterisk. Firstly, in understanding how variables are handled during conditional processing, and secondly, in interpreting the logs.
Keep in mind that the Dialplan is, two-phase process, the first of which is the ROUTE
(also called the "hunting" or "
parsing") phase. This phase completes prior to any other command being actually executed. Let us again look at the example provided, which do not work as intended. This time around, we will do what many people try to do when debugging their XML—we will add the info application to the XML, to obtain a printout of the variables that are set on a channel, on the console.
<extension name="check_for_user" continue="true">
<condition field="${callerid}" expression="2035551212">
<action application="set" data="user=yes"/>
<action application="info"/>
</condition>...