<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hello Dmitry,<br>
<br>
Maybe the timer_route[] will help with this ?<br>
<a class="moz-txt-link-freetext" href="http://www.opensips.org/Documentation/Script-Routes-2-3#toc8">http://www.opensips.org/Documentation/Script-Routes-2-3#toc8</a><br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and 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 11/23/2017 01:10 PM, Dmitry wrote:<br>
</div>
<blockquote type="cite"
cite="mid:003601d3644b$abaccdf0$030669d0$@gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:2.0cm 42.5pt 2.0cm 3.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hello All,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I don’t found the info
in google, so I’ll try to ask here.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Data:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I have some custom SIP
client for iIOS with logic wake up via push notification and
most of the time it working in a background. The client send
REGISTER in first time and go to the background. Now I have
a special _<i>useragent</i>_ for next steps for detect it as
my app. When a caller try to call to special client,
opensips detect _useragent_ and run php script for send push
notification (before send INVITE forth) to iOS server and
will wait 2 sec in async mode. In this time, iOS client
(callee) receive push, “wake up” and send REGISTER to
opensips. So, registration completed, we run LOOKUP route
with search updated “Contact” data for callee.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">==opensips router
snippet ==<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">async(exec("/etc/opensips/ios/wakeup.php
'$var(ua)' '$var(key)'", "$var(out)", "$var(err)"), LOOKUP);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">===<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">My question is:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">How can I run an
external script (via exec/etc app inside the routing script)
_periodically_ for keep alive _<i>useragent</i>_ record in
location table? Something like a cron inside opensips maybe.
I’ll glad to any ideas.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">PS. For keep alive
“normal” users I use nathelper directives:</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">sipping_bflag<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">remove_on_timeout_bflag<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">natping_interval <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">ping_threshold<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">max_pings_lost<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">BR,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Dmitry<o:p></o:p></span></p>
</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>