[Freeswitch-users] vars.xml in Lua
Hynek Cihlar
hynek.cihlar at gmail.com
Tue Oct 25 18:46:00 MSD 2011
Like a charm! Tx.
Hynek
On Mon, Oct 24, 2011 at 9: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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20111025/865c8526/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list