Yes, you can use the stream global object.  

example:
   local api = freeswitch.API();
   local reply = api:execute("originate", someRoute);

   if (reply) then
      stream:write("RESULT: " .. reply .. "\n");
   else
      stream:write("ERROR")
   end


-------- Original Message --------
Subject: [Freeswitch-users] Lua Script Return Value & mod_xmlrpc
From: "Nick Lemberger" <[email protected]>
Date: Thu, August 06, 2009 4:19 pm
To: <[email protected]>

Is it possible to have a LUA script return something to the client when accessed via the XML RPC gateway & luarun?

ie: access the url: http://FSip:8080/api/luarun?myscript.lua and have the script return a value?

-Nick


_______________________________________________
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