This recipe elaborates the interaction of the dialplan with the users.
This time, the dialplan extension that we add will do things before starting the Lua script. This is not necessary at all, but is being done here to let you know that the dialplan and scripting complement each other.
The best strategy for efficiency, counseled by FreeSWITCH developers, is to use the dialplan as much as you can. It is the most efficient (compiled in a tree in RAM) way to process your calls. Then, when things require logic (loops, conditionals, and so on) that does not fit well in XML, spawn a script.
Create a dialplan extension
12346. It will call our second Lua script. Edit the