diff options
author | George Joseph <george.joseph@fairview5.com> | 2015-04-18 12:36:19 -0600 |
---|---|---|
committer | George Joseph <george.joseph@fairview5.com> | 2015-04-19 18:45:39 -0600 |
commit | 63169e00ff21d528e40568dec6dcfd0114b55c48 (patch) | |
tree | 1b47b1390e4dfb184e0fc7cf399656d6134f1e8a /include | |
parent | e05b0768278a4d697f8b02d1fb81a8c602fc6516 (diff) |
pjsip_options: Fix non-qualified contacts showing as unavailable
The "Add qualify_timeout processing and eventing" patch introduced
an issue where contacts that had qualify_frequency set to 0 were
showing Unavailable instead Unknown. This patch checks for
qualify_frequency=0 and create an "Unknown" contact_status
with an RTT = 0.
Previously, the lack of contact_status implied Unknown but since
we're now changing endpoint state based on contact_status, I've
had to add new UNKNOWN status so that changes could trigger the
appropriate contact_status observers.
ASTERISK-24977: #close
Change-Id: Ifcbc01533ce57f0e4e584b89a395326e098b8fe7
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/res_pjsip.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/asterisk/res_pjsip.h b/include/asterisk/res_pjsip.h index e6809506b..a15e967b8 100644 --- a/include/asterisk/res_pjsip.h +++ b/include/asterisk/res_pjsip.h @@ -177,7 +177,8 @@ struct ast_sip_contact { */ enum ast_sip_contact_status_type { UNAVAILABLE, - AVAILABLE + AVAILABLE, + UNKNOWN }; /*! @@ -2000,5 +2001,13 @@ unsigned int ast_sip_get_keep_alive_interval(void); */ unsigned int ast_sip_get_max_initial_qualify_time(void); +/*! + * \brief translate ast_sip_contact_status_type to character string. + * + * \retval the character string equivalent. + */ + +const char *ast_sip_get_contact_status_label(const enum ast_sip_contact_status_type status); +const char *ast_sip_get_contact_short_status_label(const enum ast_sip_contact_status_type status); #endif /* _RES_PJSIP_H */ |