Add bind_meta_app to the ring groups to allow in call transfer, and recordings.

This commit is contained in:
Mark Crane
2012-12-16 00:54:47 +00:00
parent 2ba4cf1228
commit a1211c9ba2

View File

@@ -1,4 +1,4 @@
-- intercom.lua
-- ring_groups.lua
-- Part of FusionPBX
-- Copyright (C) 2010 Mark J Crane <markjcrane@fusionpbx.com>
-- All rights reserved.
@@ -40,10 +40,14 @@
end
--get the variables
domain_name = session:getVariable("domain_name");
ring_group_uuid = session:getVariable("ring_group_uuid");
caller_id_name = session:getVariable("caller_id_name");
caller_id_number = session:getVariable("caller_id_number");
if (session:ready()) then
domain_name = session:getVariable("domain_name");
ring_group_uuid = session:getVariable("ring_group_uuid");
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
sql =
@@ -108,6 +112,10 @@
if (session:ready()) then
session:execute("set", "hangup_after_bridge=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);
if (session:getVariable("last_bridge_hangup_cause") == "NORMAL_CLEARING") then
--ring group was answered