* Simplify `is_uuid` function.
Also because it returns now value itself it possible write
```Lua
my_uuid = is_uuid(value1) or is_uuid(value2)
```
* Change. Ensure `is_uuid` returns only boolean value
* Change. Pass pid file first. Because there really no need pass timeout.
Add. `fsc` script to be able shutdown MWI and Call Flow subscribe services.
* Change. rename `fsc` to `service`.
* Change. Use `stop` command instead of `shutdown`
Change provision variables so it will show up in a more logical order.
yealink_remote_phone_book_1_name to yealink_remote_phonebook_1_name
yealink_remote_phone_book_1_url to yealink_remote_phonebook_1_url
When handling phrases get the specific phrase instead of all of them. Remove the code that tried to build the XML from the file system. Replace it with a 'not found' response so that FreeSWITCH will check the filesystem for the XML of the phrase that was not found.
* Renamed template variable account to voicemail_id and adjusted all
templates
* Added ${voicemail_description}
* Added ${voicemail_name_formatted} (will render the voicemail identifier in accordance with Default/Domain Settings > Voicemail > display_domain_name)
* Updated templates to be consistent spacing
* Updated templates to include use of ${voicemail_name_formatted}
* Changed ${account} to be voicemail_name_formatted instead of id
This corrects the issue in #1760, where the default voicemail message was not being played and instead skipped directly to recording (start recording tone).
Voicemail greeting will not play after being transferred from IVR #1749. Replace session:streamFile( with session:execute("playback", fixes this problem.
* Add. Support `onInterval` method to EventConsumer class
Usage
```Lua
-- execute action each 30 sec
events:onInterval(30*1000, function() end)
-- execute action once after 5 min
events:onIntervalOnce(5*60*1000, function() end)
```
* Fix. Remove timers
* Fix. Reset timer before callback
It allows stop timer inside callback.
Also it produce more accurate interval invocation
if callback take quite a long time.
E.g. Interval = 10 sec and callback took 5 sec then
if we reset timer after this callback then gap between
invocation will be 15 sec.
* Add. Timers now have TimeEvent class type.
Add. `reset` method to IntervalTimer class.
```Lua
events:onIntervalOnce(1000, function(self, timer)
-- timer has type TimeEvent
-- restart timer so it will be invoke again
timer:restart()
-- or reset new interval
-- timer:reset(5000)
end)
```
* Fix. Typo in variable name
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()
```