It will work if you define object in global table, then setup argument as string name of that object, like so: somethingToPassAsArg={ name="arg"; } callbackFunction = function(s, type, obj, arg) freeswitch.consoleLog("debug","hi, i'm "..arg.name); end session:setInputCallback("onInputRecognition","somethingToPassAsArg"); object will be available as arg parameter of callbackFunction Hi,
*From what I understand based on the documentation at *https://freeswitch.org/confluence/display/FREESWITCH/Lua+API+Reference#LuaAP... you can pass an arg to the callback function in the second argument of session:setInputCallback, however in my callback if I have function my_cb(s, type, obj, arg) the value of arg is always nil, does anybody have this working or can confirm if the documentation is correct? Thanks
Best regards, Artyom