* BLF of agent status "agent+username@domain.com

Add the ability to monitor the availability status of a call center agent with "agent+agentname@domain.com".

* Update index.lua

Send notify to blf with "agent+agentname@domain.com"
This commit is contained in:
konradSC
2018-11-19 17:39:54 -05:00
committed by FusionPBX
parent dd27347353
commit 9ff799cfe4
2 changed files with 58 additions and 0 deletions

View File

@@ -18,6 +18,8 @@
json = require "resources.functions.lunajson"
end
local presence_in = require "resources.functions.presence_in"
--set the api
api = freeswitch.API();
@@ -181,6 +183,15 @@
event:addHeader("answer-state", "confirmed");
event:fire();
end
if (action == "login") then
blf_status = "false"
end
if string.find(agent_name, 'agent+', nil, true) ~= 1 then
presence_in.turn_lamp( blf_status,
'agent+'..agent_name.."@"..domain_name
);
end
end
--unauthorized