summaryrefslogtreecommitdiff
path: root/include/asterisk/res_pjsip.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asterisk/res_pjsip.h')
-rw-r--r--include/asterisk/res_pjsip.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/asterisk/res_pjsip.h b/include/asterisk/res_pjsip.h
index a15e967b8..cbae5955e 100644
--- a/include/asterisk/res_pjsip.h
+++ b/include/asterisk/res_pjsip.h
@@ -702,6 +702,18 @@ struct ast_sip_outbound_authenticator {
*/
int (*create_request_with_auth)(const struct ast_sip_auth_vector *auths, struct pjsip_rx_data *challenge,
struct pjsip_transaction *tsx, struct pjsip_tx_data **new_request);
+ /*!
+ * \brief Create a new request with authentication credentials based on old request
+ *
+ * \param auths A vector of IDs of auth sorcery objects
+ * \param challenge The SIP response with authentication challenge(s)
+ * \param old_request The request that resulted in challenge(s)
+ * \param new_request The new SIP request with challenge response(s)
+ * \retval 0 Successfully created new request
+ * \retval -1 Failed to create a new request
+ */
+ int (*create_request_with_auth_from_old)(const struct ast_sip_auth_vector *auths, struct pjsip_rx_data *challenge,
+ struct pjsip_tx_data *old_request, struct pjsip_tx_data **new_request);
};
/*!
@@ -1397,6 +1409,17 @@ int ast_sip_create_request_with_auth(const struct ast_sip_auth_vector *auths, pj
pjsip_transaction *tsx, pjsip_tx_data **new_request);
/*!
+ * \brief Create a response to an authentication challenge
+ *
+ * This will call into an outbound authenticator's create_request_with_auth callback
+ * to create a new request with authentication credentials. See the create_request_with_auth_from_old
+ * callback in the \ref ast_sip_outbound_authenticator structure for details about
+ * the parameters and return values.
+ */
+int ast_sip_create_request_with_auth_from_old(const struct ast_sip_auth_vector *auths, pjsip_rx_data *challenge,
+ pjsip_tx_data *old_request, pjsip_tx_data **new_request);
+
+/*!
* \brief Determine the endpoint that has sent a SIP message
*
* This will call into each of the registered endpoint identifiers'