summaryrefslogtreecommitdiff
path: root/misc/freeswitch/scripts
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-01-24 15:38:21 +0100
committerspag <spag@golwen.net>2013-01-24 15:38:21 +0100
commitacb016e9262e950e610d485eecc0605440533e2a (patch)
tree42f7c2d6ff5dfa435b83099a395b68c2d56c5f8d /misc/freeswitch/scripts
parent99270421d02b3ac77bf111bbde62a2ef80f8e114 (diff)
use http_request for phone resync
Diffstat (limited to 'misc/freeswitch/scripts')
-rw-r--r--misc/freeswitch/scripts/phones/snom.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/misc/freeswitch/scripts/phones/snom.lua b/misc/freeswitch/scripts/phones/snom.lua
index 096ccb7..ef3ab93 100644
--- a/misc/freeswitch/scripts/phones/snom.lua
+++ b/misc/freeswitch/scripts/phones/snom.lua
@@ -53,11 +53,10 @@ 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);
+ require 'common.fapi'
+ common.fapi.FApi:new():execute('luarun', command);
if result and tonumber(result) == 0 then
return true;