I was trying to make lua to bridge in dialplan, but somehow it did not behave like XML dialplan:

If I have this in XML:

    <action application="set" data="hangup_after_bridge=true"/>
    <action application="set" data="continue_on_fail=true"/>
    <action application="bridge" data="sofia/gateway/1.2.3.4/$1" />
    <action application="bridge" data="sofia/gateway/5.6.7.8/$1" />

then, the second action will not be called if the first one hangs up the channel unless the first action failed.

But, if I have this in Lua:

   session:execute("set","hangup_after_bridge=true")
   session:execute("set","continue_on_fail=true")
  for k, v in pairs(split(dst_gw_ip_list, ';')) do
   session:execute("bridge","sofia/gateway/" .. v .. "/" .. dest_out .. "")
  end

then, the second action is also called.

How do I make the lua script to behave like XML?

Thank you,
Dorn B.