mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-13 14:45:01 +00:00
BLF of agent status "agent+username@domain.com (#3860)
* 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user