[OpenSIPS-Users] Question about run exec from route script periodically.
Dmitry
netaskd at gmail.com
Fri Nov 24 06:52:05 EST 2017
Hi Bogdan-Andrei,
Exactly.
Script send a push via iOS server, the server send the push notification for wake up a client, it wakes up and send REGISTER to my proxy, and authenticated. Then the client go to background again. That’s all.
I don't use nathelper module, because it is not make sense (client will not respond, because it frozen)
So, I need to concern about keep alive _useragent_ in DB by himself.
From: Bogdan-Andrei Iancu [mailto:bogdan at opensips.org]
Sent: Friday, November 24, 2017 2:35 PM
To: netaskd at gmail.com; 'OpenSIPS users mailling list' <users at lists.opensips.org>
Subject: Re: [OpenSIPS-Users] Question about run exec from route script periodically.
Hi Dmitry,
So, basically you want to do a kind of user pinging, but not via SIP (as nathelper is doing), but via PN, using your external script ?
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 11/24/2017 12:19 AM, netaskd at gmail.com <mailto:netaskd at gmail.com> wrote:
Hi Bogdan-Andrei,
I've tested the timer_route, it works well. But ,as it turned out, my issue is broader.
===
So, if I use the timer_route, it runs some logic at specific time. I'm imagine, that users will be more then 100, so 100+ requests at one time will send keepalive to iOS server...
Thereby, I'll try to rephrase my question:
How can I run an external script _periodically_ for keep alive _useragent_ record in location table, and do not do it simultaneously. I guess, I need to bind the logic to expires time of the acc. I can try to get it time from the location table, but maybe exists some graceful way for it?
BR,
Dmitry
_____
From: Dmitry
Sent: Nov 23, 2017 5:56 PM
To: 'Bogdan-Andrei Iancu'; 'OpenSIPS users mailling list'
Subject: RE: [OpenSIPS-Users] Question about run exec from route script periodically.
Hello Bogdan-Andrei,
Thank you for reply. It seems like that’s what I need.
BR,
Dmitry
From: Bogdan-Andrei Iancu [mailto:bogdan at opensips.org]
Sent: Thursday, November 23, 2017 5:11 PM
To: OpenSIPS users mailling list <mailto:users at lists.opensips.org> <users at lists.opensips.org>; Dmitry <mailto:netaskd at gmail.com> <netaskd at gmail.com>
Subject: Re: [OpenSIPS-Users] Question about run exec from route script periodically.
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 <mailto: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/20171124/8bad93e5/attachment.html>
More information about the Users
mailing list