From 5b8292c0531018a1a4bbad38e2f58100a123f1d5 Mon Sep 17 00:00:00 2001 From: Redbehrend <44125368+Redbehrend@users.noreply.github.com> Date: Tue, 21 Apr 2020 22:24:39 -0700 Subject: [PATCH] Update index.lua added confirm to random ring group, quick fixed random sort for low endpoint ring groups so the likelyhood of the same extension coming up 5-8 times in a row is MUCH lower --- app/scripts/resources/scripts/app/ring_groups/index.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/scripts/resources/scripts/app/ring_groups/index.lua b/app/scripts/resources/scripts/app/ring_groups/index.lua index 7b4d35f90a..c3a89a3bc4 100644 --- a/app/scripts/resources/scripts/app/ring_groups/index.lua +++ b/app/scripts/resources/scripts/app/ring_groups/index.lua @@ -437,7 +437,7 @@ if (database["type"] == "mysql") then sql_order = 'rand()' else - sql_order = 'random()' --both postgresql and sqlite uses random() instead of rand() + sql_order = 'random() * random()' --both postgresql and sqlite uses random() instead of rand() end else sql_order='d.destination_delay, d.destination_number asc' @@ -741,7 +741,8 @@ --set confirm if (ring_group_strategy == "simultaneous" or ring_group_strategy == "sequence" - or ring_group_strategy == "rollover") then + or ring_group_strategy == "rollover" + or ring_group_strategy == "random") then session:execute("set", "group_confirm_key=exec"); session:execute("set", "group_confirm_file=lua ".. scripts_dir:gsub('\\','/') .."/confirm.lua"); end