<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><tt>I do not see any problems with calling "get_profile_size()"
from timer routes, event routes, etc. As such, you can safely
bypass the block restriction using the following example:</tt></p>
<p><tt>route [get_prof_sz_inboundCalls] {<br>
get_profile_size("inboundCalls",,"$var(size)");<br>
}<br>
<br>
route [get_prof_sz_outboundCalls] {<br>
get_profile_size("outboundCalls",,"$</tt><tt><tt>var</tt>(size)");<br>
}<br>
<br>
timer_route [mytimer, 1]<br>
{<br>
route(get_prof_sz_inboundCalls);<br>
xlog("inboundCalls: $</tt><tt><tt>var</tt>(size)\n");<br>
<br>
route(get_prof_sz_outboundCalls);<br>
xlog("outboundCalls: $</tt><tt><tt>var</tt>(size)\n");<br>
}</tt></p>
<p><tt>Regards,<br>
</tt></p>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 24.01.2017 01:05, Khalil Khamlichi
wrote:<br>
</div>
<blockquote
cite="mid:CAEK98WZXHj9aD-zX9YBPppkZs+5ji=SJ1e2d1JuabMoq+hEm6A@mail.gmail.com"
type="cite">
<div dir="ltr">the idea is that I don't need to get the number of
calls 30 times per second which would happens if I save to redis
on each invite. scheduling the saving to redis every 10 seconds
serves well my purpose but the timer_route doesn't seem to
accept <span style="font-size:12.8px">get_profile_size()</span>
<div><span style="font-size:12.8px"><br>
</span></div>
<div><span style="font-size:12.8px">any hints would be
appreciated.</span></div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Jan 23, 2017 at 10:39 PM,
Khalil Khamlichi <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:khamlichi.khalil@gmail.com" target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:khamlichi.khalil@gmail.com">khamlichi.khalil@gmail.com</a></a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi,
<div><br>
</div>
<div>I am trying to get call load information out of
opensips at regular intervals to get some sort of
realtime view of the load on the server.</div>
<div><br>
</div>
<div>After applying profiles on the the INVITEs, I have
tried to call get_profile_size from a timer_route.</div>
<div>I am getting error : </div>
<div><br>
</div>
<div><span style="font-family:monospace"><span
style="color:rgb(0,0,0)">CRITICAL:core:yyerror:
parse error in config file /usr/local//etc/opensips/<wbr>opensips.cfg,
line 483, column 38-39: Command cannot be used in
the block</span><br>
</span></div>
<div><br>
</div>
<div>Any alternative solutions ?</div>
<div><br>
</div>
<div>Thanks in advance.</div>
<div><br>
</div>
<div>kkh</div>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>