<div dir="ltr">It will work if you define object in global table, then setup argument as string name of that object, like so:<div><br></div><div>somethingToPassAsArg={</div><div>name="arg";</div><div>}</div><div><br></div><div>callbackFunction = function(s, type, obj, arg) </div><div>freeswitch.consoleLog("debug","hi, i'm "..<a href="http://arg.name">arg.name</a>);</div><div>end</div><div><br></div><div>session:setInputCallback("onInputRecognition","somethingToPassAsArg");</div><div><br></div><div>object will be available as arg parameter of callbackFunction</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><pre style="white-space:pre-wrap;color:rgb(0,0,0)">Hi,
><i>From what I understand based on the documentation at
</i><a href="https://freeswitch.org/confluence/display/FREESWITCH/Lua+API+Reference#LuaAPIReference-session:setInputCallback">https://freeswitch.org/confluence/display/FREESWITCH/Lua+API+Reference#LuaAPIReference-session:setInputCallback</a>
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</pre></blockquote><div>Best regards, Artyom <br></div></div>