diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2014-11-04 08:00:15 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2014-11-04 08:00:15 +0000 |
commit | 58ecec36e6e30a9f9066381e1a8e1751bfd94671 (patch) | |
tree | 953900613ae387dec82743df8fb3ba0e169bd4a1 /pjsip/include/pjsua2 | |
parent | 5d027102466dca0528f6ac0da87a23517f6a3f07 (diff) |
Close #1802: Configurable randomized value range for auto re-registration interval.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4957 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include/pjsua2')
-rw-r--r-- | pjsip/include/pjsua2/account.hpp | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/pjsip/include/pjsua2/account.hpp b/pjsip/include/pjsua2/account.hpp index 106ad9d7..acb78165 100644 --- a/pjsip/include/pjsua2/account.hpp +++ b/pjsip/include/pjsua2/account.hpp @@ -81,10 +81,12 @@ struct AccountRegConfig : public PersistentObject * disable auto re-registration. Note that if the registration retry * occurs because of transport failure, the first retry will be done * after \a firstRetryIntervalSec seconds instead. Also note that - * the interval will be randomized slightly by approximately +/- ten - * seconds to avoid all clients re-registering at the same time. + * the interval will be randomized slightly by some seconds (specified + * in \a reg_retry_random_interval) to avoid all clients re-registering + * at the same time. * - * See also \a firstRetryIntervalSec setting. + * See also \a firstRetryIntervalSec and \a randomRetryIntervalSec + * settings. * * Default: PJSUA_REG_RETRY_INTERVAL */ @@ -93,13 +95,32 @@ struct AccountRegConfig : public PersistentObject /** * This specifies the interval for the first registration retry. The * registration retry is explained in \a retryIntervalSec. Note that - * the value here will also be randomized by +/- ten seconds. + * the value here will also be randomized by some seconds (specified + * in \a reg_retry_random_interval) to avoid all clients re-registering + * at the same time. + * + * See also \a retryIntervalSec and \a randomRetryIntervalSec settings. * * Default: 0 */ unsigned firstRetryIntervalSec; /** + * This specifies maximum randomized value to be added/substracted + * to/from the registration retry interval specified in \a + * reg_retry_interval and \a reg_first_retry_interval, in second. + * This is useful to avoid all clients re-registering at the same time. + * For example, if the registration retry interval is set to 100 seconds + * and this is set to 10 seconds, the actual registration retry interval + * will be in the range of 90 to 110 seconds. + * + * See also \a retryIntervalSec and \a firstRetryIntervalSec settings. + * + * Default: 10 + */ + unsigned randomRetryIntervalSec; + + /** * Specify the number of seconds to refresh the client registration * before the registration expires. * |