mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-03 10:23:50 +00:00
* Add. Event handler to support MWI. * Fix. store cache only when get data from memcache * Change. Use UUID as PID.
17 lines
361 B
Lua
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 |