lua_dostring("sr.pv.seti(\"$$var(var1)\", $avp(var1) < $avp(var3) and 1 or 0)");

results in error :
kamailio app lual_dostring(): error from Lua:  attempt to index global 'sr' (a nil value)

replacing sr with KSR is working :

lua_dostring("KSR.pv.seti(\"$$var(var1)\", $avp(var1) < $avp(var3) and 1 or 0)");

Shall we update the docs for
https://kamailio.org/docs/modules/devel/modules/app_lua.html#app_lua.f.lua_dostring ?