Add bind_meta_app to the ring groups to allow in call transfer, and recordings.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
-- intercom.lua
|
-- ring_groups.lua
|
||||||
-- Part of FusionPBX
|
-- Part of FusionPBX
|
||||||
-- Copyright (C) 2010 Mark J Crane <markjcrane@fusionpbx.com>
|
-- Copyright (C) 2010 Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
-- All rights reserved.
|
-- All rights reserved.
|
||||||
@@ -40,10 +40,14 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
--get the variables
|
--get the variables
|
||||||
domain_name = session:getVariable("domain_name");
|
if (session:ready()) then
|
||||||
ring_group_uuid = session:getVariable("ring_group_uuid");
|
domain_name = session:getVariable("domain_name");
|
||||||
caller_id_name = session:getVariable("caller_id_name");
|
ring_group_uuid = session:getVariable("ring_group_uuid");
|
||||||
caller_id_number = session:getVariable("caller_id_number");
|
caller_id_name = session:getVariable("caller_id_name");
|
||||||
|
caller_id_number = session:getVariable("caller_id_number");
|
||||||
|
recordings_dir = session:getVariable("recordings_dir");
|
||||||
|
uuid = session:getVariable("uuid");
|
||||||
|
end
|
||||||
|
|
||||||
--get the extension list
|
--get the extension list
|
||||||
sql =
|
sql =
|
||||||
@@ -108,6 +112,10 @@
|
|||||||
if (session:ready()) then
|
if (session:ready()) then
|
||||||
session:execute("set", "hangup_after_bridge=true");
|
session:execute("set", "hangup_after_bridge=true");
|
||||||
session:execute("set", "continue_on_fail=true");
|
session:execute("set", "continue_on_fail=true");
|
||||||
|
session:execute("bind_meta_app", "1 ab s execute_extension::dx XML features");
|
||||||
|
session:execute("bind_meta_app", "2 ab s record_session::"..recordings_dir.."}/archive/"..os.date("%Y").."/"..os.date("%m").."/"..os.date("%d").."}/"..uuid..".wav");
|
||||||
|
session:execute("bind_meta_app", "3 ab s execute_extension::cf XML features");
|
||||||
|
session:execute("bind_meta_app", "4 ab s execute_extension::att_xfer XML features");
|
||||||
session:execute("bridge", app_data);
|
session:execute("bridge", app_data);
|
||||||
if (session:getVariable("last_bridge_hangup_cause") == "NORMAL_CLEARING") then
|
if (session:getVariable("last_bridge_hangup_cause") == "NORMAL_CLEARING") then
|
||||||
--ring group was answered
|
--ring group was answered
|
||||||
|
|||||||
Reference in New Issue
Block a user