I just added this to the wiki: http://wiki.freeswitch.org/wiki/Mod_lua#freeswitch.getGlobalVariable -MC On Tue, Oct 25, 2011 at 7:56 AM, Hynek Cihlar <hynek.cihlar@gmail.com>wrote:
Great tip!
Hynek
On Tue, Oct 25, 2011 at 4:52 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
with no session there is a more recent way
freeswitch.getGlobalVariable("foobar");
On Mon, Oct 24, 2011 at 2:34 PM, Michael Collins <msc@freeswitch.org>wrote:
Nothing special. If you are calling a dialplan script then it's this:
my_val = session:getVariable('Variable_Name')
If this is a non-session kind of script then you can do the API trick:
api = freeswitch.API() my_val = api:execute('global_getvar','Variable_Name')
-MC
On Mon, Oct 24, 2011 at 10:34 AM, Hynek Cihlar <hynek.cihlar@gmail.com>wrote:
Tx for the reply.
Are they simply declared as global variables or do they need to be accessed in a special way?
Sent from my mobile device
On Oct 24, 2011, at 19:10, Michael Collins <msc@freeswitch.org> wrote:
Yes, any global variable defined in vars.xml is available in a Lua script. -MC
On Sat, Oct 22, 2011 at 10:39 AM, Hynek Cihlar <<hynek.cihlar@gmail.com> hynek.cihlar@gmail.com> wrote:
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.
Hynek
FreeSWITCH-users mailing list <FreeSWITCH-users@lists.freeswitch.org> FreeSWITCH-users@lists.freeswitch.org <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:<http://lists.freeswitch.org/mailman/options/freeswitch-users> http://lists.freeswitch.org/mailman/options/freeswitch-users <http://www.freeswitch.org>http://www.freeswitch.org
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org