[asterisk-dev] Change in asterisk[13]: res_pjsip: Add global option to limit the maximum time for i...

George Joseph (Code Review) asteriskteam at digium.com
Sat Apr 11 17:59:25 CDT 2015


George Joseph has uploaded a new patch set (#2).

Change subject: res_pjsip: Add global option to limit the maximum time for initial qualifies
......................................................................

res_pjsip: Add global option to limit the maximum time for initial qualifies

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).

Testing Done:
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.

Change-Id: Ib80498aa1ea9923277bef51d6a9015c9c79740f4
Tested-by: George Joseph <george.joseph at fairview5.com>
---
M CHANGES
A contrib/ast-db-manage/config/versions/45119a33fbbe_add_pjsip_max_initial_qualify_time.py
M include/asterisk/res_pjsip.h
M res/res_pjsip.c
M res/res_pjsip/config_global.c
M res/res_pjsip/pjsip_options.c
6 files changed, 66 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/45/45/2
-- 
To view, visit https://gerrit.asterisk.org/45
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib80498aa1ea9923277bef51d6a9015c9c79740f4
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>



More information about the asterisk-dev mailing list