res_pjsip: add option to enable ContactStatus event when contact is updated

The commit I2f97ebfa79969a36a97bb7b9afd5b6268cf1a07d removed sending out
the ContactStatus AMI event when a contact is updated.
Thist change broke things which rely on old behavior.

This patch adds a new PJSIP global configuration option
'send_contact_status_on_update_registration' to be able to preserve old
ContactStatus behavior.
By default new behavior, i.e. the ContactStatus event will not be sent when a
device refreshes its registration.

Change-Id: I706adf7584e7077eb6bde6d9799ca408bc82ce46
This commit is contained in:
Alexei Gradinari
2018-12-18 14:47:36 -05:00
parent 9b57199a7a
commit 7f22c9f4b7
7 changed files with 136 additions and 1 deletions

View File

@@ -2767,6 +2767,15 @@ unsigned int ast_sip_get_use_callerid_contact(void);
*/
unsigned int ast_sip_get_ignore_uri_user_options(void);
/*!
* \brief Retrieve the global setting 'send_contact_status_on_update_registration'.
* \since 16.2.0
*
* \retval non zero if need to send AMI ContactStatus event when a contact is updated.
*/
unsigned int ast_sip_get_send_contact_status_on_update_registration(void);
/*!
* \brief Truncate the URI user field options string if enabled.
* \since 13.12.0