summaryrefslogtreecommitdiff
path: root/include/asterisk/res_pjsip.h
diff options
context:
space:
mode:
authorAlexei Gradinari <alex2grad@gmail.com>2016-06-02 18:26:09 -0400
committerAlexei Gradinari <alex2grad@gmail.com>2016-06-22 10:08:37 -0400
commitb3c787d1ddd36eb7dfa0906b92a83ab23d8741cd (patch)
tree077f1fa82d9378a241bc1c6436cfc97ad8113e34 /include/asterisk/res_pjsip.h
parent49b1be895256ab12dd813ebda0702590f9cd14e6 (diff)
res_pjsip: improve realtime performance #2
The patch removes updating all Endpoints' status on startup. Instead, only non-qualified aors with static contact and non-qualified non-expired contacts are retrieved from the realtime to update the endpoint status to ONLINE. The endpoint name was added to the contact object to simply find the endpoint that created this contact. The status of endpoints with qualified aors will be updated by 'qualify' functions. ASTERISK-26061 #close Change-Id: Id324c1776fa55d3741e0c5457ecac0304cb1a0df
Diffstat (limited to 'include/asterisk/res_pjsip.h')
-rw-r--r--include/asterisk/res_pjsip.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asterisk/res_pjsip.h b/include/asterisk/res_pjsip.h
index b64ad624b..4319dbdb6 100644
--- a/include/asterisk/res_pjsip.h
+++ b/include/asterisk/res_pjsip.h
@@ -256,6 +256,8 @@ struct ast_sip_contact {
int via_port;
/*! Content of the Call-ID header in REGISTER request */
AST_STRING_FIELD_EXTENDED(call_id);
+ /*! The name of the endpoint that added the contact */
+ AST_STRING_FIELD_EXTENDED(endpoint_name);
};
#define CONTACT_STATUS "contact_status"
@@ -986,6 +988,16 @@ void ast_sip_unregister_endpoint_identifier(struct ast_sip_endpoint_identifier *
void *ast_sip_endpoint_alloc(const char *name);
/*!
+ * \brief Change state of a persistent endpoint.
+ *
+ * \param endpoint The SIP endpoint name to change state.
+ * \param state The new state
+ * \retval 0 Success
+ * \retval -1 Endpoint not found
+ */
+int ast_sip_persistent_endpoint_update_state(const char *endpoint_name, enum ast_endpoint_state state);
+
+/*!
* \brief Get a pointer to the PJSIP endpoint.
*
* This is useful when modules have specific information they need