From 00966a47357902ec6153f00becc9186dbc66ad06 Mon Sep 17 00:00:00 2001 From: konradSC Date: Thu, 6 Sep 2018 19:45:33 -0400 Subject: [PATCH] Update file_cache.lua (#3402) Run OS command through Freeswitch for better performance. Running OS commands directly from lua can cause RTP timing issues. --- resources/install/scripts/app/servers/resources/file_cache.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/install/scripts/app/servers/resources/file_cache.lua b/resources/install/scripts/app/servers/resources/file_cache.lua index 6a82dbc935..9e9f46dda9 100644 --- a/resources/install/scripts/app/servers/resources/file_cache.lua +++ b/resources/install/scripts/app/servers/resources/file_cache.lua @@ -79,7 +79,7 @@ if (row.method == "curl") then api_command_argument = api_command_argument:gsub(" ", "%%20"); url = [[http://]]..row.username..[[:]]..row.password..[[@]]..row.hostname..[[:]]..row.port..[[/webapi/luarun?app/servers/resources/clear_cache.lua%20]]..api_command_argument; - os.execute("curl "..url); + api:executeString("system curl" .. url ); freeswitch.consoleLog("INFO", "[notice] curl ".. url .. " \n"); end end