[Freeswitch-users] Upload file in Lua background

Michael Jerris mike at jerris.com
Wed Feb 21 23:23:25 UTC 2018


to do it in the background it needs to run in a different thread.  Sometime with bgapi executing the command to do the upload passing the right params should work.

> On Feb 21, 2018, at 2:48 PM, Sonnie <basmo13 at yahoo.co.uk> wrote:
> 
>  I'm writing some IVR in Lua  and trying to execute some code while the main program continues execution. 
>    
> I've tried 
>   
>     ...
>     -- aws is AWS Command Line Interface
>     io.popen("aws s3 cp " ..  s3_src .. " ".. s3_dst)
>     os.execute("aws s3 cp " ..  s3_src .. " ".. s3_dst)
>     ... -- program execution continues
>     
> 
> Even tried  passing it off to a shell script(`s3_upload`)
> 
>     os.execute("s3_upload " ..  s3_src .." " .. s3_dst)
>     io.popen("s3_upload " ..  s3_src .. " ".. s3_dst)
> 
> I've tried 
> 
>  session:execute("bgsystem","s3_upload " ..  s3_src .. " ".. s3_dst )
> 
> 
> If i use the Lua Interactive shell to run these commands independently, it works.
> 
> would appreciate any assistance.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180221/c7a1ea61/attachment.html>


More information about the FreeSWITCH-users mailing list