Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Lua Script Return Value & mod_xmlrpc


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
Nick.Lemberger at lkfd...
Guest





PostPosted: Thu Aug 06, 2009 6:27 pm    Post subject: [Freeswitch-users] Lua Script Return Value & mod_xmlrpc Reply with quote

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
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
Back to top
pete at privateconnect...
Guest





PostPosted: Thu Aug 06, 2009 6:40 pm    Post subject: [Freeswitch-users] Lua Script Return Value & mod_xmlrpc Reply with quote

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


Quote:
-------- Original Message --------
Subject: [Freeswitch-users] Lua Script Return Value & mod_xmlrpc
From: "Nick Lemberger" <Nick.Lemberger@lkfd.net>
Date: Thu, August 06, 2009 4:19 pm
To: <freeswitch-users@lists.freeswitch.org>

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
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

Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services