<p dir="ltr">Set your variable as a channel_variable.</p>
<p dir="ltr">session:setVariable(&#39;myvar&#39;, &#39;myvalue&#39;);</p>
<p dir="ltr">- BDF</p>
<div class="gmail_quote">On Jun 9, 2013 8:35 PM, &quot;Vincent Xia&quot; &lt;<a href="mailto:gmangudai@gmail.com">gmangudai@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<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>&lt;action application=&quot;set&quot; data=&quot;myvar=${expand(luarun GetDataFromDB.lua ${caller_id_number})}&quot;/&gt;</div>

<div>&lt;action application=&quot;info&quot; data=&quot;myvar=${myvar}&quot;/&gt;</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..&#39;abc&#39;</div><div>return varout</div><div><br></div><div>the info shows &quot;myvar=+OK.......&quot;, then i tried</div><div><br></div><div>&lt;action application=&quot;set&quot; data=&quot;myvar=${expand(lua GetDataFromDB.lua ${caller_id_number})}&quot;/&gt; -- using lua </div>

<div><br></div><div>GetDataFromDB.lua instead of luarun GetDataFromDB.lua</div><div>the info shows an empty string, &quot;myvar=&quot;.</div><div><br></div><div>how to get the return value from lua script?</div><div><br>
</div>
</div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div>