I just added this to the wiki:<div><a href="http://wiki.freeswitch.org/wiki/Mod_lua#freeswitch.getGlobalVariable">http://wiki.freeswitch.org/wiki/Mod_lua#freeswitch.getGlobalVariable</a></div><div><br></div><div>-MC<br><br>
<div class="gmail_quote">On Tue, Oct 25, 2011 at 7:56 AM, Hynek Cihlar <span dir="ltr">&lt;<a href="mailto:hynek.cihlar@gmail.com">hynek.cihlar@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>Great tip!</div><br clear="all"><font color="#888888">Hynek</font><div><div></div><div class="h5"><br><br>
<br><br><div class="gmail_quote">On Tue, Oct 25, 2011 at 4:52 PM, Anthony Minessale <span dir="ltr">&lt;<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


with no session there is a more recent way<div><br></div><div>freeswitch.getGlobalVariable(&quot;foobar&quot;);<br><br><div class="gmail_quote"><div>On Mon, Oct 24, 2011 at 2:34 PM, Michael Collins <span dir="ltr">&lt;<a href="mailto:msc@freeswitch.org" target="_blank">msc@freeswitch.org</a>&gt;</span> wrote:<br>



</div><div><div></div><div><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&#39;s this:<div><br>

</div><div><font face="&#39;courier new&#39;, monospace">my_val = session:getVariable(&#39;Variable_Name&#39;)</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="&#39;courier new&#39;, monospace">api = freeswitch.API()</font></div>
<div><font face="&#39;courier new&#39;, monospace">my_val = api:execute(&#39;global_getvar&#39;,&#39;Variable_Name&#39;)</font></div><div><br></div><div><font color="#888888">-MC</font><div><div></div><div><br>
<br><div class="gmail_quote">On Mon, Oct 24, 2011 at 10:34 AM, Hynek Cihlar <span dir="ltr">&lt;<a href="mailto:hynek.cihlar@gmail.com" target="_blank">hynek.cihlar@gmail.com</a>&gt;</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 &lt;<a href="mailto:msc@freeswitch.org" target="_blank">msc@freeswitch.org</a>&gt; 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">&lt;<a href="mailto:hynek.cihlar@gmail.com" target="_blank"></a><a href="mailto:hynek.cihlar@gmail.com" target="_blank">hynek.cihlar@gmail.com</a>&gt;</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" 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></div></div><br><br clear="all"><div><br></div>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>



Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>


GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>


<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:<a href="tel:%2B19193869900" value="+19193869900" target="_blank">+19193869900</a><br>
</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><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></div>