Update index.lua (#5241)

* 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

* Update index.lua

two randoms added too much query time just simplified not the same results but still better than just plain random()

* Fixed Yealink Account 6 Errors

Fixed Yealink Account 6 Errors (misstyped)

* Revert "Fixed Yealink Account 6 Errors"

This reverts commit 7e48d32a33.
This commit is contained in:
Redbehrend
2020-04-23 23:27:50 -07:00
committed by GitHub
parent 685ca1ffa4
commit 210bc253d6

View File

@@ -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() * 1000000' --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