Fix. cache.support always returns `false`

This commit is contained in:
Alexey Melnichuk 2016-02-02 19:54:23 +03:00
parent 1a0301f6f7
commit 05188ffd24
1 changed files with 9 additions and 5 deletions

View File

@ -9,11 +9,15 @@
require "resources.functions.trim";
local api = api
if (not api) and freeswitch then api = freeswitch.API() else
api = {}
function api:execute()
return '-ERR UNSUPPORTTED'
end
if not api then
if freeswitch then
api = freeswitch.API()
else
api = {}
function api:execute()
return '-ERR UNSUPPORTTED'
end
end
end
local function send_event(action, key)