[Freeswitch-users] Lua: io.popen/read blocking in other incoming calls

Dan freeswitch-users at digitaldan.com
Tue Jan 26 07:34:39 PST 2010


Thanks, I'm using os.execute now and piping the output to a temp file. It's not the most elagant solution, but it works. Call volume is light so I don't think there will be any scalability issues. I'll take a look at the sites you mention and see if I can find something a little bit less hacky. 

Thanks again. 
Dan- 

----- Original Message ----- 
From: "Fernando Gregianin Testa" <testa at voicetechnology.com.br> 
To: freeswitch-users at lists.freeswitch.org 
Sent: Sunday, January 24, 2010 12:21:51 PM 
Subject: Re: [Freeswitch-users] Lua: io.popen/read blocking in other incoming calls 

You may consider use lua socket.http package as an alternative to popen+wget. Check: 
https://web.tecgraf.puc-rio.br/luasocket/ 
http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/http.html 


Maybe you can be interested also in http://github.com/fertesta/restinlua 




Em 19/01/2010, às 21:17, Dan escreveu: 




I would, but I need to post a a wav file that gets recorded, I didn't see a way to supply the location of a file to use as the post data. It looks like you have to url encode the data in the script and pass it all in the call. 


Thanks 
Dan- 
----- Original Message ----- 
From: "Rupa Schomaker" < rupa at rupa.com > 
To: "freeswitch-users" < freeswitch-users at lists.freeswitch.org > 
Sent: Tuesday, January 19, 2010 4:06:36 PM 
Subject: Re: [Freeswitch-users] Lua: io.popen/read blocking in other incoming calls 




On Tue, Jan 19, 2010 at 3:03 PM, Dan < freeswitch-users at digitaldan.com > wrote: 




My lua script is calling wget through lua's io.popen to send and receive data from a web service. While the f:read to wget is running, other incoming calls will block on the same io.popen call until the first call closes the pipe (with f:close()). 


You might want to look at the api that mod_curl exposes to do what you want. No need to do an expensive system call just to call a webservice. 
-- 
-Rupa 

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



Fernando Gregianin Testa 
testa at voicetechnology.com.br 
+55 11 35882166 




_______________________________________________ 
FreeSWITCH-users mailing list 
FreeSWITCH-users at lists.freeswitch.org 
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users 
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users 
http://www.freeswitch.org 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100126/46f25d50/attachment-0002.html 


More information about the FreeSWITCH-users mailing list