<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Do you keep float numbers as strings in avps?</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 30.07.20 21:43, Julien Chavanton
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAKmcL2mg+AN8oz4P=Z11L2nmWGNHzwhO_SYgDAL_+t4jZp8cQA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<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" moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">sr-users@lists.kamailio.org</a>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" moz-do-not-send="true">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" moz-do-not-send="true">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Funding: <a href="https://www.paypal.me/dcmierla" target="_blank" moz-do-not-send="true">https://www.paypal.me/dcmierla</a></pre>
</div>
</blockquote>
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Funding: <a class="moz-txt-link-freetext" href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a></pre>
</body>
</html>