<div>Like a charm! Tx.</div><br clear="all">Hynek<br><br>
<br><br><div class="gmail_quote">On Mon, Oct 24, 2011 at 9:34 PM, Michael Collins <span dir="ltr"><<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Nothing special. If you are calling a dialplan script then it's this:<div><br></div><div><font face="'courier new', monospace">my_val = session:getVariable('Variable_Name')</font></div>
<div><br></div><div>If this is a non-session kind of script then you can do the API trick:</div><div><br></div><div><font face="'courier new', monospace">api = freeswitch.API()</font></div>
<div><font face="'courier new', monospace">my_val = api:execute('global_getvar','Variable_Name')</font></div><div><br></div><div><font color="#888888">-MC</font><div><div></div><div class="h5"><br>
<br><div class="gmail_quote">On Mon, Oct 24, 2011 at 10:34 AM, Hynek Cihlar <span dir="ltr"><<a href="mailto:hynek.cihlar@gmail.com" target="_blank">hynek.cihlar@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF"><div>Tx for the reply. </div><div><br></div><div>Are they simply declared as global variables or do they need to be accessed in a special way?<br>
<br>Sent from my mobile device</div><div><div></div><div><div><br>On Oct 24, 2011, at 19:10, Michael Collins <<a href="mailto:msc@freeswitch.org" target="_blank">msc@freeswitch.org</a>> wrote:<br>
<br></div><div></div><blockquote type="cite"><div>Yes, any global variable defined in vars.xml is available in a Lua script.<div>-MC<br><br><div class="gmail_quote">On Sat, Oct 22, 2011 at 10:39 AM, Hynek Cihlar <span dir="ltr"><<a href="mailto:hynek.cihlar@gmail.com" target="_blank"></a><a href="mailto:hynek.cihlar@gmail.com" target="_blank">hynek.cihlar@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Are the parameters defined in the XML config files visible to Lua scrips? In this case it is the script for loading up the directory.</div>
<br clear="all"><font color="#888888">Hynek<br><br>
</font><br><br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank"></a><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank"></a><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"></a><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"></a><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
</div></blockquote><blockquote type="cite"><div><span></span><br><span>FreeSWITCH-users mailing list</span><br><span><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a></span><br>
<span><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></span><br><span>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a></span><br>
<span><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span><br></div></blockquote></div></div></div>
<br><br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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><br></div></div></div>
<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><br>