-
|
Hello, I am new to LibreSBC and in particular to lua ! I am using v1.0.0. error=/usr/local/share/lua/5.2/redis.lua:703: /usr/local/share/lua/5.2/redis.lua:426: redis error: ERR wrong number of arguments for 'scard' command This comes from the verify_concurentcalls function at line 67 Since I am new, my configuration is maybe not correct but I think this error should be checked by specialists ! Thank you for reading and let me know if I am wrong or not. Bruno |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Hello @konikb, I confirmed it is bug. I will make the fix soon. |
Beta Was this translation helpful? Give feedback.
-
|
Hello Minh,
Thank you for your fast reply ! I have checked and it works.
BTW Thank you for your LibreSBC project and the work done !
Bruno
De : Minh ***@***.***>
Envoyé : vendredi 25 avril 2025 00:09
À : hnimminh/libresbc ***@***.***>
Cc : konikb ***@***.***>; Mention ***@***.***>
Objet : Re: [hnimminh/libresbc] Error with the redis scard function invoked in callfunc.lua verify_concurentcalls (Discussion #193)
@konikb <https://github.com/konikb> can you replace verify_concurentcalls to below and retry?
function verify_concurentcalls(name, direction, uuid)
-- unlimited/bypass cps check
local max_concurentcalls = get_defined_concurentcalls(name, direction)
if max_concurentcalls < 0 then
return -math.huge, -1
end
local cckeys = concurentcallskeys(name)
local replies = rdbconn:transaction({watch=cckeys, cas=true, retry=0}, function(txn)
txn:multi()
if direction == INBOUND then
txn:sadd('realtime:concurentcalls:'..name..':'..NODEID, uuid)
end
for i=1, #cckeys do
txn:scard(cckeys[i])
end
end)
local startpoint = ((direction == INBOUND) and 2) or 1
local concurentcalls = 0
for i=startpoint, #replies do
concurentcalls = concurentcalls + tonumber(replies[i])
end
return concurentcalls, max_concurentcalls
end
—
Reply to this email directly, view it on GitHub <#193 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AJGAENOC7PNKFKKGAKKY77D23FOG7AVCNFSM6AAAAAB3ZKTMTCVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEOJUGAZTAMQ> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/AJGAENJSS2OFUFYRZN4GR4L23FOG7A5CNFSM6AAAAAB3ZKTMTCWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAYV2A4.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
@konikb can you replace
verify_concurentcallsto below and retry?