[asterisk-dev] Idle Timers and Keep-Alives

George Joseph gjoseph at digium.com
Thu Jan 4 15:10:54 CST 2018


I'm currently working an issue related to both idle timers and keep-alives
and need some feedback...

pjproject has keep-alive timers for connection-oriented transports but at
the time we implemented res_pjsip, you couldn't modify the interval at
runtime, so we implemented our own keep-alives in res_pjsip controlled by
the global keep_alive_interval option.

pjproject also has an idle timer which it set to 600 seconds by default and
is NOT a runtime option.  If no transaction occurs on a transport in that
time, the transport and it's connection are destroyed.   If things like
REGISTERs and SUBSCRIBEs have an expires longer than 600 seconds and no
activity happens during that time, the connection WILL be torn down and the
client will have to re-register or re-subscribe.

Since we can now set pjproject's keep-alive interval, we're thinking we can
get rid of our res_pjsip keep-alives and have the global
keep_alive_interval option control pjproject's.  There's one wrinkle
however...  the res_pjsip keep-alives reset the idle timer whereas the
pjproject keep-alives do not reset the idle timer.

So the questions are...

   1. What should the correct behavior be for whether keep-alives should
   reset the idle timer?
   2. Is the default of 600 seconds OK for the idle timer?
   3. Do we even WANT an idle timer?
   4. Should we spend effort making it configurable at runtime in pjproject?


















-- 
George Joseph
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20180104/3c67af0d/attachment.html>


More information about the asterisk-dev mailing list