Get the call center channel variables and set in the intercepted call.
This commit is contained in:
parent
084e36d0a0
commit
4669b3efba
|
|
@ -16,7 +16,7 @@
|
|||
--
|
||||
-- The Initial Developer of the Original Code is
|
||||
-- Mark J Crane <markjcrane@fusionpbx.com>
|
||||
-- Copyright (C) 2010 - 2016
|
||||
-- Copyright (C) 2010 - 2022
|
||||
-- the Initial Developer. All Rights Reserved.
|
||||
--
|
||||
-- Contributor(s):
|
||||
|
|
@ -356,6 +356,30 @@
|
|||
end
|
||||
end
|
||||
|
||||
--get the call center channel variables and set in the intercepted call
|
||||
if (uuid ~= nil) then
|
||||
call_center_queue_uuid = api:executeString("uuid_getvar ".. uuid .." call_center_queue_uuid");
|
||||
if (call_center_queue_uuid ~= nil) then
|
||||
session:execute("set", "call_center_queue_uuid="..call_center_queue_uuid);
|
||||
session:execute("set", "cc_cause=answered");
|
||||
|
||||
cc_side = api:executeString("uuid_getvar ".. uuid .." cc_side");
|
||||
if (cc_side ~= nil) then
|
||||
session:execute("set", "cc_side="..cc_side);
|
||||
end
|
||||
|
||||
cc_queue = api:executeString("uuid_getvar ".. uuid .." cc_queue");
|
||||
if (cc_queue ~= nil) then
|
||||
session:execute("set", "cc_queue="..cc_queue);
|
||||
end
|
||||
|
||||
cc_queue_joined_epoch = api:executeString("uuid_getvar ".. uuid .." cc_queue_joined_epoch");
|
||||
if (cc_queue_joined_epoch ~= nil) then
|
||||
session:execute("set", "cc_queue_joined_epoch="..cc_queue_joined_epoch);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--notes
|
||||
--originate a call
|
||||
--cmd = "originate user/1007@voip.example.com &intercept("..uuid..")";
|
||||
|
|
|
|||
Loading…
Reference in New Issue