Hi,
I am using XML dialplan with some LUA scripting to get rid of complex nested XML conditions. But I am stuck on this. Here what I try to achive in LUA script:
-
When a call hits XML dialplan for an internal account (4 digit destination number), I query DB if there is a config flag in DB for this destination number. I use Freeswitch API, "local api:execute(“db”, “select/blablabla”)
-
If flag exists, then I do “session:answer(); session.streamFile(“blabla”); session:hangup()”. Then process of dialplan should end immediately.
-
If flag does not exists, then LUA script should end immediately but process of the remaining XML dial plan should continue.
So how can I do step 3 in LUA script. I could not find a way to dynamically decide to continue remaining XML dialplan. I konw I can do something like this in XML dial plan with some conditions and “continue=true” but I want to do all of it in LUA script if possible.
Regards,
Rahman