<div dir="ltr"><div>when i was trying to get return value from lua script (with which sql query was processed),<br></div><div><br></div><div><action application="set" data="myvar=${expand(luarun GetDataFromDB.lua ${caller_id_number})}"/></div>
<div><action application="info" data="myvar=${myvar}"/></div><div><br></div><div>GetDataFromDB.lua</div><div>--------------------------------------</div><div>callerid = argv[1]</div><div><br></div>
<div>-- DB sql query</div><div>...</div><div>varout = callerid..'abc'</div><div>return varout</div><div><br></div><div>the info shows "myvar=+OK.......", then i tried</div><div><br></div><div><action application="set" data="myvar=${expand(lua GetDataFromDB.lua ${caller_id_number})}"/> -- using lua </div>
<div><br></div><div>GetDataFromDB.lua instead of luarun GetDataFromDB.lua</div><div>the info shows an empty string, "myvar=".</div><div><br></div><div>how to get the return value from lua script?</div><div><br></div>
</div>