[asterisk-dev] [Code Review] 4611: res_pjsip: Add global option to limit the maximum time for initial qualifies

George Joseph reviewboard at asterisk.org
Sat Apr 11 17:06:53 CDT 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4611/
-----------------------------------------------------------

(Updated April 11, 2015, 4:06 p.m.)


Status
------

This change has been discarded.


Review request for Asterisk Developers and rmudgett.


Repository: Asterisk


Description
-------

Currently when Asterisk starts initial qualifies of contacts are spread out randomly between 0 and qualify_timeout to prevent network and system overload.  If a contact's qualify_frequency is 5 minutes however, that contact may be unavailable to accept calls for the entire 5 minutes after startup.  So while staggering the initial qualifies is a good idea, basing the time on qualify_timeout could leave contacts unavailable for too long.

This patch adds a new global parameter "max_initial_qualify_time" that sets the maximum time for the initial qualifies.  This way you could make sure that all your contacts are initialy, ransomly qualified within say 30 seconds but still have the contact's ongoing qualifies at a 5 minute interval.

If max_initial_qualify_time is > 0, the formula is initial_interval = min(max_initial_interval, qualify_timeout * random().  If not set, qualify_timeout is used.

The default is "0" (disabled).


Diffs
-----

  branches/13/res/res_pjsip/pjsip_options.c 434653 
  branches/13/res/res_pjsip/config_global.c 434653 
  branches/13/res/res_pjsip.c 434653 
  branches/13/include/asterisk/res_pjsip.h 434653 
  branches/13/contrib/ast-db-manage/config/versions/45119a33fbbe_add_pjsip_max_initial_qualify_time.py PRE-CREATION 
  branches/13/CHANGES 434653 

Diff: https://reviewboard.asterisk.org/r/4611/diff/


Testing
-------

Tested in my own pbx with 15 endpoints.  If max_initial_qualify_time is > 0 and < qualify_time, it's used, otherwise qualify_timeout is used.

Testsuite test forthcoming.


Thanks,

George Joseph

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150411/30d780c9/attachment.html>


More information about the asterisk-dev mailing list