Return from lua two values.
Hello. If using <action application="set" data="MY_VAR=${lua(helloworld.lua $1)}" /> I get one value from lua to MY_VAR. Can I get two values to two variables in one call? Thanks. -- Mimiko desu.
Set the variables from the LUA script itself. http://wiki.freeswitch.org/wiki/Mod_lua#session:setVariable -Steve On 20 February 2013 07:02, Mimiko <vbvbrj@gmail.com> wrote:
Hello.
If using <action application="set" data="MY_VAR=${lua(helloworld.lua $1)}" /> I get one value from lua to MY_VAR.
Can I get two values to two variables in one call?
Thanks.
-- Mimiko desu.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
On 20.02.2013 10:15, Steven Ayre wrote:
Set the variables from the LUA script itself.
Thank you. I thought that was for other purposes. -- Mimiko desu.
or use the multiset application http://wiki.freeswitch.org/wiki/Multiset On 2/20/2013 3:32 AM, Mimiko wrote:
On 20.02.2013 10:15, Steven Ayre wrote:
Set the variables from the LUA script itself.
Thank you. I thought that was for other purposes.
On 20.02.2013 16:14, Abaci wrote:
or use the multiset application http://wiki.freeswitch.org/wiki/Multiset
How it can set values to two variables calling one lua script only and only once? Doesn't seems to be so. -- Mimiko desu.
Return a single string of "name1=value1 name2=value2" -Steve On 20 February 2013 15:06, Mimiko <vbvbrj@gmail.com> wrote:
On 20.02.2013 16:14, Abaci wrote:
or use the multiset application http://wiki.freeswitch.org/wiki/Multiset
How it can set values to two variables calling one lua script only and only once? Doesn't seems to be so.
-- Mimiko desu.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
Hmm, not sure if I understand what exactly you need but here is how I send three parms/vars to lua: <action application="lua" data="/usr/local/FreeSwitch-scripts/known-people.lua CALLIN ${caller_id_number} ${mvsounds}"/> And I return 3 vars from lua to FS: session:setVariable("lua_ringback",ringback) session:setVariable("lua_vmmsg",vmmsg) session:setVariable("lua_ringtone",ringtone) FS then uses $lua_ringback, etc... Mario G On Feb 20, 2013, at 7:19 AM, Steven Ayre wrote:
Return a single string of "name1=value1 name2=value2"
-Steve
On 20 February 2013 15:06, Mimiko <vbvbrj@gmail.com> wrote:
On 20.02.2013 16:14, Abaci wrote:
or use the multiset application http://wiki.freeswitch.org/wiki/Multiset
How it can set values to two variables calling one lua script only and only once? Doesn't seems to be so.
-- Mimiko desu.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
participants (4)
-
Abaci
-
Mario G
-
Mimiko
-
Steven Ayre