]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Update qualifies when AOR configuration changes. 60/4860/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:20:26 +0000 (14:20 -0600)
commitfd6b820b4d61db48755cfa169c5bfb5e7e42ef70
treecd6279d546c6a1bcb738bd4833d9068997a5ed8c
parent6cc7ee85dfcbeca765f0ba0697baa2e2e865d753
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