Files
fusionpbx/resources/install/scripts/resources/functions/channel_utils.lua
Alexey Melnichuk e5a0134ec6 Fix. Intercept enterprise ring group.
With enterprise call each outbound channel has its own call_uuid.
But we have to use `intercept` for call_uuid of inbound channel.
2015-09-22 19:33:41 +04:00

21 lines
528 B
Lua

local api = api or freeswitch.API()
function channel_variable(uuid, name)
local result = api:executeString("uuid_getvar " .. uuid .. " " .. name)
if result:sub(1, 4) == '-ERR' then return nil, result end
if result == '_undef_' then return false end
return result
end
function channel_evalute(uuid, cmd)
local result = api:executeString("eval uuid:" .. uuid .. " " .. cmd)
if result:sub(1, 4) == '-ERR' then return nil, result end
if result == '_undef_' then return false end
return result
end