[Freeswitch-users] vars.xml in Lua

Anthony Minessale anthony.minessale at gmail.com
Tue Oct 25 18:52:55 MSD 2011


with no session there is a more recent way

freeswitch.getGlobalVariable("foobar");

On Mon, Oct 24, 2011 at 2:34 PM, Michael Collins <msc at 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 at 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 at 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 at gmail.com>
>> hynek.cihlar at 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 at lists.freeswitch.org>
>>> FreeSWITCH-users at 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 at 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 at 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 at 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 at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20111025/0c134f3a/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list