mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
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
|
||||
-- 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
|
||||
|
||||
Reference in New Issue
Block a user