Merge branch 'master' of https://github.com/fusionpbx/fusionpbx
This commit is contained in:
@@ -254,9 +254,9 @@
|
||||
-- next check should prevent pickup call from extension
|
||||
-- e.g. if extension 100 dial some cell phone and some one else dial *8
|
||||
-- he can pickup this call.
|
||||
-- if not extension then
|
||||
-- sql = sql .. "AND direction = 'outbound' ";
|
||||
-- end
|
||||
if not extension then
|
||||
sql = sql .. "AND direction = 'outbound' ";
|
||||
end
|
||||
sql = sql .. "AND (1<>1 ";
|
||||
for key,extension in pairs(extensions) do
|
||||
sql = sql .. "OR presence_id = '"..extension.."@"..domain_name.."' ";
|
||||
|
||||
@@ -407,8 +407,12 @@
|
||||
if (row.ivr_menu_option_action == "menu-exec-app") then
|
||||
--get the action and data
|
||||
pos = string.find(row.ivr_menu_option_param, " ", 0, true);
|
||||
action = string.sub(row.ivr_menu_option_param, 0, pos-1);
|
||||
data = string.sub(row.ivr_menu_option_param, pos+1);
|
||||
if pos then
|
||||
action = string.sub(row.ivr_menu_option_param, 0, pos-1);
|
||||
data = string.sub(row.ivr_menu_option_param, pos+1);
|
||||
else
|
||||
action, data = row.ivr_menu_option_param, ""
|
||||
end
|
||||
|
||||
--check if the option uses a regex
|
||||
regex = string.find(row.ivr_menu_option_digits, "(", 0, true);
|
||||
@@ -431,7 +435,11 @@
|
||||
end
|
||||
if (action == "lua") then
|
||||
pos = string.find(data, " ", 0, true);
|
||||
script = string.sub(data, 0, pos-1);
|
||||
if pos then
|
||||
script = string.sub(data, 0, pos-1);
|
||||
else
|
||||
script = data
|
||||
end
|
||||
end
|
||||
end --if regex match
|
||||
|
||||
|
||||
Reference in New Issue
Block a user