fusionpbx/resources/install/scripts/app
Alexey Melnichuk a52e9c3626 Add. EventConsumer class. (#1741)
Rewrite MWI and CallFlow subscribe handlers based on EventConsumer class.
Also on my test VirtualBox/Debian system Lua function `os.clock` produce
very strange result(delta ~0.015 for 1 second) so I switch to `os.time`.
Now to to stop this background Lua scripts it possible send CUSTOM event
with subclass `fusion::XXX::shutdown`. Where XXX is `mwi` or `flow`.

Usage of EventConsumer class
```Lua
-- create new object with timeout one minute
local events = EventConsumer.new(60000)

-- bind to some FS event
events:bind("SHUTDOW", function(self, name, event) ... end)

-- bind to another FS event with subclass
events:bind("CUSTOM::fusion::mwi::shutdown", function(self, name, event) ... end)

-- handle timeout event
events:on("TIMEOUT", function(self, name) ... end)

--run event loop
events:run()
```
2016-07-08 13:10:43 -06:00
..
agent_status Revert "Revert "Change. Use `require "resources.functions.config"` to load co…" 2015-08-11 05:06:33 +03:00
avmd Fix the indentation on lua app/avmd/index.lua. 2015-04-24 20:44:47 +00:00
call_block WhitespaceClean-resources/install/scripts 2016-03-11 13:21:52 +00:00
conference_center Remove contact_email from v_contacts table as this was replaced by the v_contact_emails table. 2016-04-14 10:40:25 -06:00
dialplan After removing domain name from the default recordings dir path need to add the domain name every where the recordings directory is currently used. 2015-12-06 13:37:35 -07:00
event_notify Seperate Cisco 7940/7960 from Cisco SPA so that both can work with check-sync for reboot and reprovision. 2015-12-01 21:12:52 -07:00
failure_handler WhitespaceClean-resources/install/scripts 2016-03-11 13:21:52 +00:00
fax Fix. send fax file as PDF in response message 2016-04-05 13:48:50 +03:00
hangup Get the channel variable in a way that will work with hangup. 2015-09-15 10:09:16 -06:00
is_local Rollback changes to is_local.lua determined that switching to regex would lower perfomance adding an 'or' with a search for prefix would perform better. 2016-03-27 20:44:14 -06:00
missed_calls/resources/templates/en/us Add multi-lingual support to the missed call emails. 2015-09-15 08:49:37 -06:00
provision Merge pull request #1479 from mafoo/WhitespaceClean-resources/install/scripts 2016-03-11 13:20:17 -07:00
ring_groups Merge pull request #1461 from mafoo/BugFix-ring_groups 2016-03-11 13:25:20 -07:00
toll_allow Fix. Off debug output 2015-08-14 12:26:34 +04:00
voicemail Add. EventConsumer class. (#1741) 2016-07-08 13:10:43 -06:00
xml_handler Update local_stream.conf.lua 2016-07-06 16:27:22 -06:00