mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Update do_not_disturb.lua
Add do not disturb toggle.
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
--
|
--
|
||||||
-- The Initial Developer of the Original Code is
|
-- The Initial Developer of the Original Code is
|
||||||
-- Mark J Crane <markjcrane@fusionpbx.com>
|
-- Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
-- Copyright (C) 2010-2014
|
-- Copyright (C) 2010-2016
|
||||||
-- the Initial Developer. All Rights Reserved.
|
-- the Initial Developer. All Rights Reserved.
|
||||||
--
|
--
|
||||||
-- Contributor(s):
|
-- Contributor(s):
|
||||||
@@ -85,10 +85,20 @@
|
|||||||
number_alias = row.number_alias or '';
|
number_alias = row.number_alias or '';
|
||||||
accountcode = row.accountcode;
|
accountcode = row.accountcode;
|
||||||
follow_me_uuid = row.follow_me_uuid;
|
follow_me_uuid = row.follow_me_uuid;
|
||||||
|
do_not_disturb = row.do_not_disturb;
|
||||||
--freeswitch.consoleLog("NOTICE", "[do_not_disturb] extension "..row.extension.."\n");
|
--freeswitch.consoleLog("NOTICE", "[do_not_disturb] extension "..row.extension.."\n");
|
||||||
--freeswitch.consoleLog("NOTICE", "[do_not_disturb] accountcode "..row.accountcode.."\n");
|
--freeswitch.consoleLog("NOTICE", "[do_not_disturb] accountcode "..row.accountcode.."\n");
|
||||||
end);
|
end);
|
||||||
|
|
||||||
|
--toggle do not disturb
|
||||||
|
if (enabled == "toggle") then
|
||||||
|
if (do_not_disturb == "true") then
|
||||||
|
enabled = "false";
|
||||||
|
else
|
||||||
|
enabled = "true";
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--set the dial string
|
--set the dial string
|
||||||
if (enabled == "true") then
|
if (enabled == "true") then
|
||||||
local user = (number_alias and #number_alias > 0) and number_alias or extension;
|
local user = (number_alias and #number_alias > 0) and number_alias or extension;
|
||||||
@@ -189,4 +199,4 @@
|
|||||||
--end the call
|
--end the call
|
||||||
session:hangup();
|
session:hangup();
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user