Files
fusionpbx/resources/install/scripts/resources/functions/ievents.lua
Alexey Melnichuk 8a72e2afd8 Add. Event handler to support MWI. (#1720)
* Add. Event handler to support MWI.

* Fix. store cache only when get data from memcache

* Change. Use UUID as PID.
2016-06-30 09:55:37 -06:00

17 lines
361 B
Lua

local ievents = function(events, ...)
if type(events) == 'string' then
events = freeswitch.EventConsumer(events)
end
local block, timeout = ...
if timeout == 0 then block, timeout = 0, 0 end
timeout = timeout or 0
return function()
local event = events:pop(block, timeout)
if not event then return false end
return event
end
end
return ievents