Mathieu,

 

Thanks for the reply. I'm very new with FreeSWITCH and not familiar with api
calls. I tried:

 

     user_data = apiExecute("user_data", "[email protected] var
callgroup");

 

But got a similar error:

 

2009-07-16 17:01:47.212904 [ERR] mod_lua.cpp:182
/usr/local/freeswitch/scripts/helloworld.lua:13: attempt to call global
'apiExecute' (a nil value)

stack traceback:

        /usr/local/freeswitch/scripts/helloworld.lua:13: in main chunk

 

I would appreciate an example or a link to the pertinent documentation.

 

Thanks, Lars

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Mathieu
Rene
Sent: Thursday, July 16, 2009 2:42 PM
To: [email protected]
Subject: Re: [Freeswitch-users] Error in lua script with session:getVariable

 

You need to make an API call, not get a variable.

 

Mathieu Rene

Avant-Garde Solutions Inc

Office: + 1 (514) 664-1044 x100

Cell: +1 (514) 664-1044 x200

[email protected]

 

 

 

 

Am 16-Jul-09 um 5:36 PM schrieb Lars Zeb:





I am getting an error in a lua script which I don't understand. Why is it
returning nil in the script yet something in the cli?

 

lua snippet:

user_data = session:getVariable('user_data [email protected] var
callgroup');

freeswitch.console_log("INFO", " UserData group " .. user_data .. "\n")

 

log:

2009-07-16 14:30:49.237343 [ERR] mod_lua.cpp:182
/usr/local/freeswitch/scripts/helloworld.lua:14: attempt to concatenate
global 'user_data' (a nil value)

stack traceback:

        /usr/local/freeswitch/scripts/helloworld.lua:14: in main chunk

 

 

cli:

freeswi...@internal> user_data [email protected] var callgroup

techsupport

 

Thanks, Lars

_______________________________________________
FreeSWITCH-users mailing list
[email protected]
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
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

Reply via email to