<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,<br>
</p>
<br>
<div class="moz-cite-prefix">On 27.10.17 08:14, RAJA SREE RATHNA
gomathinayagam wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAJMm5LVit4URZKBp=rRz12wi1kVKPTWUs3KLELB-RTttvhyGzQ@mail.gmail.com">
<div dir="auto"><span
style="font-family:sans-serif;font-size:13.696px">Hello
Daniel,</span>
<div dir="auto"
style="font-family:sans-serif;font-size:13.696px"><br>
</div>
<div dir="auto"
style="font-family:sans-serif;font-size:13.696px">While going
through the rtimer module we noticed that it execute the
routing function repeatedly after the given interval of time.
But our specification is to execute the routing function only
once and timer should be enabled based on specific condition.
Also there is no enable or disable option for rtimer module as
in timer module, whether rtimer module can be enabled based on
specific condition.If it is possible could you please suggest
the solution.</div>
</div>
</blockquote>
<br>
the rtimer is indeed designed for repeated execution of routing
blocks. You can script ta way to enable disable execution of the
route block by having a condition on a shared memory variable, like:<br>
<br>
route[RTIMER] {<br>
<br>
if($shv(rtimer)==1) return;<br>
...<br>
}<br>
<br>
Whenever you set the $shv(rtimer) to 1, then practically the
execution of the route[RTIMER] ends without running your actions.
The shv variable can be set from any other part of the config and
even via rpc command from outside of kamailio.<br>
<br>
On the other hand, you can just try to go with timer module if suits
better your needs. I just can't provide straightforward hints for
it, because I don't use it, but it should work.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote type="cite"
cite="mid:CAJMm5LVit4URZKBp=rRz12wi1kVKPTWUs3KLELB-RTttvhyGzQ@mail.gmail.com">
<div dir="auto">
<div dir="auto"
style="font-family:sans-serif;font-size:13.696px"><br>
</div>
<div dir="auto"
style="font-family:sans-serif;font-size:13.696px">Thanks &
Regards,</div>
<div dir="auto"
style="font-family:sans-serif;font-size:13.696px">Rathna.</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Oct 24, 2017 12:54 PM, "RAJA SREE
RATHNA gomathinayagam" <<a
href="mailto:rajasreerathna@gmail.com"
moz-do-not-send="true">rajasreerathna@gmail.com</a>>
wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="auto">Hi,
<div dir="auto"> I tried using the timer function to
call a function after specific time but it was not
working as specified. Could you please help me with some
example using timer to trigger a function.</div>
<div dir="auto"> </div>
<div dir="auto">I tried it using the description given in
below link.</div>
<div dir="auto"> </div>
<div dir="auto"><a
href="http://www.kamailio.org/docs/modules/devel/modules/timer.html"
target="_blank" moz-do-not-send="true">www.kamailio.org/docs/modules/<wbr>devel/modules/timer.html</a></div>
<div dir="auto"><br>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">Thanks and regards,</div>
<div dir="auto">Rathna.</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<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>
Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>