mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-31 17:33:48 +00:00
Enable the IVR Menu Direct Dial. Remove * from the direct dial for security to prevent calls to feature codes.
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
|
||||
--get the variables
|
||||
domain_name = session:getVariable("domain_name");
|
||||
context = session:getVariable("context");
|
||||
ivr_menu_uuid = session:getVariable("ivr_menu_uuid");
|
||||
caller_id_name = session:getVariable("caller_id_name");
|
||||
caller_id_number = session:getVariable("caller_id_number");
|
||||
@@ -92,7 +93,7 @@
|
||||
ivr_menu_max_failures = row["ivr_menu_max_failures"];
|
||||
ivr_menu_max_timeouts = row["ivr_menu_max_timeouts"];
|
||||
ivr_menu_digit_len = row["ivr_menu_digit_len"];
|
||||
--ivr_menu_direct_dial = row["ivr_menu_direct_dial"];
|
||||
ivr_menu_direct_dial = row["ivr_menu_direct_dial"];
|
||||
--ivr_menu_description = row["ivr_menu_description"];
|
||||
ivr_menu_ringback = row["ivr_menu_ringback"];
|
||||
end);
|
||||
@@ -216,6 +217,15 @@
|
||||
--run the action
|
||||
session:execute(action, data);
|
||||
end
|
||||
else
|
||||
if (ivr_menu_direct_dial == "true") then
|
||||
if (string.len(digits) < 6) then
|
||||
--replace the $1 and the domain name
|
||||
digits = digits:gsub("*", "");
|
||||
--run the action
|
||||
session:execute("transfer", digits.." XML "..context);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--clear the variables
|
||||
|
||||
Reference in New Issue
Block a user