I was trying to make lua to bridge in dialplan, but somehow it did not behave like XML dialplan:<div><br></div><div>If I have this in XML:</div><div><br></div><div><div> <action application="set" data="hangup_after_bridge=true"/></div>
<div> <action application="set" data="continue_on_fail=true"/></div><div> <action application="bridge" data="sofia/gateway/<a href="http://1.2.3.4/$1">1.2.3.4/$1</a>" /></div>
<div> <action application="bridge" data="sofia/gateway/<a href="http://5.6.7.8/$1">5.6.7.8/$1</a>" /></div></div><div><br></div><div>then, the second action will not be called if the first one hangs up the channel unless the first action failed.</div>
<div><br></div><div>But, if I have this in Lua:</div><div><br></div><div><div><div> session:execute("set","hangup_after_bridge=true")</div><div> session:execute("set","continue_on_fail=true")</div>
</div><div> for k, v in pairs(split(dst_gw_ip_list, ';')) do</div><div> session:execute("bridge","sofia/gateway/" .. v .. "/" .. dest_out .. "")</div><div> end</div></div>
<div><br></div><div>then, the second action is also called.</div><div><br></div><div>How do I make the lua script to behave like XML?</div><div><br></div><div>Thank you,</div><div>Dorn B.</div>