]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Update qualifies when AOR configuration changes. 62/4862/1
authorMark Michelson <mmichelson@digium.com>
Wed, 1 Feb 2017 19:54:50 +0000 (13:54 -0600)
committerMark Michelson <mmichelson@digium.com>
Wed, 1 Feb 2017 20:21:04 +0000 (14:21 -0600)
commitbbed75c3ba424b63257e1556b79a80242f3b6e2b
tree88b1d9f613a9d40e6678c6f614bd84d4db03eaf9
parente252aff9ad9e8448ec0bdcd031b3833dd460d7db
Update qualifies when AOR configuration changes.

Prior to this change, qualifies would only update in the following
cases:
* A reload of res_pjsip.so was issued.
* A dynamic contact was re-registered after its AOR's qualify_frequency
  had been changed
This does not work well if you are using realtime for your AORs. You can
update your database to have a new qualify_frequency, but the permanent
contacts on that AOR will not have their qualifies updated. And the
dynamic contacts on that AOR will not have their qualifies updated until
the next registration, which could be a long time.

This change seeks to fix this problem by making it so that whenever AOR
configuration is applied, the contacts pertaining to that AOR have their
qualifies updated.

Additions from this patch:
* AOR sorcery objects now have an apply handler that calls into a newly
  added function in the OPTIONS code. This causes all contacts
  associated with that AOR to re-schedule qualifies.
* When it is time to qualify a contact, the OPTIONS code checks to see
  if the AOR can still be retrieved. If not, then qualification is
  canceled on the contact.

Alterations from this patch:
* The registrar code no longer updates contact's qualify_frequence and
  qualify_timeout. There is no point to this since those values already
  get updated when the AOR changes.
* Reloading res_pjsip.so no longer calls the OPTIONS initialization
  function. Reloading res_pjsip.so results in re-loading AORs, which
  results in re-scheduling qualifies.

Change-Id: I2e7c3316da28f389c45954f24c4e9389abac1121
res/res_pjsip.c
res/res_pjsip/include/res_pjsip_private.h
res/res_pjsip/location.c
res/res_pjsip/pjsip_options.c
res/res_pjsip_registrar.c