<div dir="ltr">Hi Alex,<br><div><br>It prints only one time. The log file looks like this:<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">Jul 11 20:43:58 ip-10-238-242-214 kamailio[20354]: ALERT: <script>: hello<br>

</blockquote><div><br></div><div>I am sure that I run the script for many seconds, say 30 or so at least, but I do not get more than one single log... <br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">

On Fri, Jul 11, 2014 at 4:56 PM, Alex Balashov <span dir="ltr"><<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hello AliReza,<div class=""><br>
<br>
On 07/11/2014 04:53 PM, AliReza Khoshgoftar Monfared wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I have a basic yet weird problem with Rtimer module.<br>
I cannot make it execute a route block for me at an interval of my<br>
choice (which is what it is supposed to do, right?)<br>
<br>
Here is a simplified example with relevant parts of my config script:<br>
<br>
Assume I want to print "hello" every 100 ms:<br>
<br>
I have a script like this (I've put all my global variables, in case<br>
they matter and my relevant route blocks...)<br>
<br>
Is there anything I am doing wrong here in the usage of rtimer?<br>
</blockquote>
<br></div>
Well, what's not working? Is it not printing anything at all? Or is it printing at a different interval than you expect? If so, what is the interval?<br>
<br>
Note that you've specified an interval of 1s:<div class=""><br>
<br>
   modparam("rtimer", "timer", "name=ta;interval=1;mode=1;")<br>
<br></div>
By default, the interval value is in seconds. If you append a 'u', the value is expressed in microseconds (millionths of a second), which gives you sub-second timing granularity, per <a href="http://kamailio.org/docs/modules/4.1.x/modules/rtimer.html#idp2566368" target="_blank">http://kamailio.org/docs/<u></u>modules/4.1.x/modules/rtimer.<u></u>html#idp2566368</a>.<br>


<br>
This means that to have an interval of 100 ms, you'd define the timer thusly:<br>
<br>
   modparam("rtimer", "timer", "name=ta;interval=100000u;<u></u>mode=1;")<br>
<br>
-- Alex<br>
<br>
-- <br>
Alex Balashov - Principal<br>
Evariste Systems LLC<br>
Tel: <a href="tel:%2B1-678-954-0670" value="+16789540670" target="_blank">+1-678-954-0670</a><br>
Web: <a href="http://www.evaristesys.com/" target="_blank">http://www.evaristesys.com/</a>, <a href="http://www.alexbalashov.com/" target="_blank">http://www.alexbalashov.com/</a><br>
<br>
Please be kind to the English language:<br>
<br>
<a href="http://www.entrepreneur.com/article/232906" target="_blank">http://www.entrepreneur.com/<u></u>article/232906</a><br>
<br>
______________________________<u></u>_________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a><br>
</blockquote></div><br></div>