*/
struct ast_sip_endpoint_media_configuration {
AST_DECLARE_STRING_FIELDS(
- /*! Optional external media address to use in SDP */
- AST_STRING_FIELD(external_address);
+ /*! Optional media address to use in SDP */
+ AST_STRING_FIELD(address);
/*! SDP origin username */
AST_STRING_FIELD(sdpowner);
/*! SDP session name */
struct ast_sip_endpoint *(*identify_endpoint)(pjsip_rx_data *rdata);
};
-#define SIP_SORCERY_SECURITY_TYPE "security"
-
-/*!
- * \brief SIP security details and configuration.
- */
-struct ast_sip_security {
- SORCERY_OBJECT(details);
- struct ast_acl_list *acl;
- struct ast_acl_list *contact_acl;
-};
-
/*!
* \brief Register a SIP service in Asterisk.
*
int ast_sip_initialize_sorcery_auth(struct ast_sorcery *sorcery);
/*!
- * \brief Initialize security support on a sorcery instance
- *
- * \param sorcery The sorcery instance
- *
- * \retval -1 failure
- * \retval 0 success
- */
-int ast_sip_initialize_sorcery_security(struct ast_sorcery *sorcery);
-
-/*!
* \brief Callback called when an outbound request with authentication credentials is to be sent in dialog
*
* This callback will have the created request on it. The callback's purpose is to do any extra
};
/*!
- * \brief General purpose method for creating a dialog with an endpoint
+ * \brief General purpose method for creating a UAC dialog with an endpoint
*
* \param endpoint A pointer to the endpoint
* \param aor_name Optional name of the AOR to target, may even be an explicit SIP URI
* \retval non-NULL success
* \retval NULL failure
*/
- pjsip_dialog *ast_sip_create_dialog(const struct ast_sip_endpoint *endpoint, const char *aor_name, const char *request_user);
+pjsip_dialog *ast_sip_create_dialog_uac(const struct ast_sip_endpoint *endpoint, const char *aor_name, const char *request_user);
+
+/*!
+ * \brief General purpose method for creating a UAS dialog with an endpoint
+ *
+ * \param endpoint A pointer to the endpoint
+ * \param rdata The request that is starting the dialog
+ */
+pjsip_dialog *ast_sip_create_dialog_uas(const struct ast_sip_endpoint *endpoint, pjsip_rx_data *rdata);
/*!
* \brief General purpose method for creating a SIP request
*/
void ast_sip_report_auth_challenge_sent(struct ast_sip_endpoint *endpoint, pjsip_rx_data *rdata, pjsip_tx_data *tdata);
+/*!
+ * \brief Send a security event notification for when a request is not supported
+ *
+ * \param endpoint Pointer to the endpoint in use
+ * \param rdata Received message
+ * \param req_type the type of request
+ */
+void ast_sip_report_req_no_support(struct ast_sip_endpoint *endpoint, pjsip_rx_data *rdata,
+ const char* req_type);
+
+/*!
+ * \brief Send a security event notification for when a memory limit is hit.
+ *
+ * \param endpoint Pointer to the endpoint in use
+ * \param rdata Received message
+ */
+void ast_sip_report_mem_limit(struct ast_sip_endpoint *endpoint, pjsip_rx_data *rdata);
+
void ast_sip_initialize_global_headers(void);
void ast_sip_destroy_global_headers(void);