summaryrefslogtreecommitdiff
path: root/res/res_pjsip/include
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2017-02-01 13:54:50 -0600
committerMark Michelson <mmichelson@digium.com>2017-02-01 13:54:50 -0600
commit6492e91392b8fd394193e411c6eb64b45486093f (patch)
treedbb9184e0b09d76bec77a33b5dd94ac2abfbd014 /res/res_pjsip/include
parent9e3150b98ddf4ecfe09e281c73c634b89ba2514e (diff)
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
Diffstat (limited to 'res/res_pjsip/include')
-rw-r--r--res/res_pjsip/include/res_pjsip_private.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/res/res_pjsip/include/res_pjsip_private.h b/res/res_pjsip/include/res_pjsip_private.h
index 11ad12c45..8ba2528b2 100644
--- a/res/res_pjsip/include/res_pjsip_private.h
+++ b/res/res_pjsip/include/res_pjsip_private.h
@@ -184,6 +184,18 @@ void ast_sip_destroy_global_headers(void);
int ast_res_pjsip_init_options_handling(int reload);
/*!
+ * \internal
+ * \brief Indicate OPTIONS handling for this AOR needs updating.
+ *
+ * When AOR configuration is retrieved, it is possible that the
+ * qualify frequency has changed. The OPTIONs code needs to update
+ * its qualifies to reflect these changes.
+ *
+ * \param aor The AOR that has been retrieved
+ */
+void ast_res_pjsip_update_options(struct ast_sip_aor *aor);
+
+/*!
* \internal Initialize message IP updating handling.
*
* \retval 0 on success