[Freeswitch-users] Question how can i get variables in lua from xml dialplan?
Michael Collins
msc at freeswitch.org
Mon Jul 30 22:42:28 MSD 2012
The following code worked for me:
myvar = session:getVariable('sound_prefix')
freeswitch.consoleLog('WARNING',"The sound_prefix variable contains '" ..
myvar .. "'\n")
with dialplan:
<extension name="Lua vars test">
<condition field="destination_number" expression="^(9906)$">
<action application="answer"/>
<action application="lua" data="vars.lua"/>
<action application="hangup"/>
</condition>
</extension>
-MC
On Mon, Jul 30, 2012 at 12:22 AM, Thomas Hoellriegel <admin at blindi.net>wrote:
> Hi guys,
> I like to import variables from xml dialplan in lua.
> I found:
> session:getVariable.
> the problem:
> i can only get variables from the lua wiki page.
> But different variables for example:
> strftime
> or from: vars.xml : sound_prefix can.t be get.
>
> Or timeconditions don.t working in lua.
>
> Can your help please?
> thanks
>
>
>
>
>
>
> ---------------
> Du kannst mich jederzeit kostenlos per Festnetz erreichen unter:
> http://www.blindi.net/callback
> homepage: http://www.blindi.net
> blinde-misc mailingliste für blinde. anmeldung unter:
> http://www.blindi.net/mailman/**listinfo/blinde-misc<http://www.blindi.net/mailman/listinfo/blinde-misc>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> Join Us At ClueCon - Aug 7-9, 2012
>
> 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
>
>
--
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120730/93c9db04/attachment-0001.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list