diff options
author | Julian Pawlowski <julian.pawlowski@gmail.com> | 2013-01-28 14:17:52 +0100 |
---|---|---|
committer | Julian Pawlowski <julian.pawlowski@gmail.com> | 2013-01-28 14:17:52 +0100 |
commit | 8aa7de2636dcd22781b623d5c9270f5ecf8b85c2 (patch) | |
tree | 1bb5dc36fb28c96ad9be9a2357d380c2c24ee31e /misc/freeswitch/scripts/phones/snom.lua | |
parent | 39aa7132ceed3d4beab3a9b828e571bbfc67c07e (diff) | |
parent | 600574759573e48da9f5f82d4ff8a863b6830c95 (diff) |
Merge branch 'develop'5.1-beta2
Diffstat (limited to 'misc/freeswitch/scripts/phones/snom.lua')
-rw-r--r-- | misc/freeswitch/scripts/phones/snom.lua | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/misc/freeswitch/scripts/phones/snom.lua b/misc/freeswitch/scripts/phones/snom.lua index 096ccb7..bb17796 100644 --- a/misc/freeswitch/scripts/phones/snom.lua +++ b/misc/freeswitch/scripts/phones/snom.lua @@ -53,13 +53,8 @@ function Snom.resync_http(self, ip_address, http_user, http_password, http_port) port_str = ':' .. http_port; end - get_command = 'wget --no-proxy -q -O /dev/null -o /dev/null -b --tries=2 --timeout=10 --user="' .. (http_user or '') .. '" --password="' .. (http_password or '') .. '"' .. - ' wget http://' .. tostring(ip_address):gsub('[^0-9%.]', '') .. port_str .. '/advanced.htm?reboot=Reboot' .. - ' 1>>/dev/null 2>>/dev/null &'; + local command = 'http_request.lua snom_resync http://' .. tostring(ip_address):gsub('[^0-9%.]', '') .. port_str .. '/advanced.htm?reboot=Reboot ' .. (http_user or '') .. ' ' .. (http_password or ''); - result = os.execute(get_command); - - if result and tonumber(result) == 0 then - return true; - end + require 'common.fapi' + return common.fapi.FApi:new():execute('luarun', command); end |