[OpenSIPS-Users] Question about run exec from route script periodically.

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Nov 23 09:11:07 EST 2017


Hello Dmitry,

Maybe the timer_route[] will help with this ?
     http://www.opensips.org/Documentation/Script-Routes-2-3#toc8

Regards,

Bogdan-Andrei Iancu
   OpenSIPS Founder and Developer
   http://www.opensips-solutions.com

On 11/23/2017 01:10 PM, Dmitry wrote:
>
> Hello All,
>
> I don’t found the info in google, so I’ll try to ask here.
>
> Data:
>
> 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 _/useragent/_ 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.
>
> ==opensips router snippet ==
>
> async(exec("/etc/opensips/ios/wakeup.php '$var(ua)' '$var(key)'", 
> "$var(out)", "$var(err)"), LOOKUP);
>
> ===
>
> My question is:
>
> How can I run an external script (via exec/etc app inside the routing 
> script) _periodically_ for keep alive _/useragent/_ record in location 
> table? Something like a cron inside opensips maybe. I’ll glad to any 
> ideas.
>
> PS. For keep alive “normal” users I use nathelper directives:
>
> sipping_bflag
>
> remove_on_timeout_bflag
>
> natping_interval
>
> ping_threshold
>
> max_pings_lost
>
> BR,
>
> Dmitry
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20171123/fb31d856/attachment.html>


More information about the Users mailing list