Hi,
when using sr.pv.get() in app_lua the pv value is not always returned.
Lua code is:
local fscript = sr.pv.get("$(sht(myscripts=>" .. args["filterid"]
.."))")
if(fscript) then
sr.log("info","Filterscript is " .. fscript)
else
sr.log("warn","fscript not found!")
end
And log shows:
app_lua [app_lua_sr.c:888]: pv get: (sht(myscripts=>1))
<core> [pvapi.c:318]: pvar [$(sht(myscripts=>1))] found in cache
WARNING: app_lua [app_lua_sr.c:99]: fscript not found!
So the pv is being discovered in the pv cache, but sr.pv.get() returns
no value.
I think the problem occurs especially in the case, when using sht_reload
mi command. So I have had a short look into htable.c and I did not find
any code, that clears the pv cache... is that necessary/may the reason
for the problem, that pv is found in pv cache but nothing returned?
(kamailio 3.2.3)
Thanks for any ideas...
Cheers
Jasmin