<div dir="ltr"><div>Yes, this was an example I have for float comparison ...<br><br></div>good, we will use KSR latest greatest !<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 30, 2020 at 11:37 AM Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Thanks for spotting it, I pushed a commit adding a note about
availability of sr Lua module by loading app_lua_sr Kamailio
module as well as updated the Lua script examples to use KSR
instead of sr.</p>
<p>But, on the other hand, the example in the docs for
lua_dostring() does not have the line you pasted:</p>
<p>lua_dostring("KSR.pv.seti(\"$$var(var1)\", $avp(var1) <
$avp(var3) and 1 or 0)");</p>
<p>just assuming is was on your local testing.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div>On 30.07.20 18:50, Julien Chavanton
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div><br>
lua_dostring("sr.pv.seti(\"$$var(var1)\", $avp(var1) <
$avp(var3) and 1 or 0)");<br>
<div><br>
</div>
<div>results in error :<br>
kamailio app lual_dostring(): error from Lua: attempt to
index global 'sr' (a nil value)</div>
<div><br>
replacing sr with KSR is working :<br>
</div>
<div><br>
</div>
<div>lua_dostring("KSR.pv.seti(\"$$var(var1)\", $avp(var1)
< $avp(var3) and 1 or 0)");</div>
<br>
</div>
Shall we update the docs for<br>
<a href="https://kamailio.org/docs/modules/devel/modules/app_lua.html#app_lua.f.lua_dostring" target="_blank">https://kamailio.org/docs/modules/devel/modules/app_lua.html#app_lua.f.lua_dostring</a>
?<br>
<br>
<br>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Kamailio (SER) - Users Mailing List
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Funding: <a href="https://www.paypal.me/dcmierla" target="_blank">https://www.paypal.me/dcmierla</a></pre>
</div>
</blockquote></div>