How to continue dialplan in LUA script?

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:

  1. 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”)

  2. If flag exists, then I do “session:answer(); session.streamFile(“blabla”); session:hangup()”. Then process of dialplan should end immediately.

  3. 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

we need examples and a issue filed in github please.

/b

The XML dialplan should continue when your Lua script exit. You can verify that by put a empty lua there.