mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Merge "ari: Implement 'debug all' and request/response logging" into 13
This commit is contained in:
@@ -59,7 +59,8 @@ struct ast_ari_response;
|
||||
typedef void (*stasis_rest_callback)(
|
||||
struct ast_tcptls_session_instance *ser,
|
||||
struct ast_variable *get_params, struct ast_variable *path_vars,
|
||||
struct ast_variable *headers, struct ast_ari_response *response);
|
||||
struct ast_variable *headers, struct ast_json *body,
|
||||
struct ast_ari_response *response);
|
||||
|
||||
/*!
|
||||
* \brief Handler for a single RESTful path segment.
|
||||
@@ -134,7 +135,7 @@ int ast_ari_remove_handler(struct stasis_rest_handlers *handler);
|
||||
void ast_ari_invoke(struct ast_tcptls_session_instance *ser,
|
||||
const char *uri, enum ast_http_method method,
|
||||
struct ast_variable *get_params, struct ast_variable *headers,
|
||||
struct ast_ari_response *response);
|
||||
struct ast_json *body, struct ast_ari_response *response);
|
||||
|
||||
/*!
|
||||
* \internal
|
||||
@@ -188,6 +189,25 @@ struct ast_json *ast_ari_websocket_session_read(
|
||||
int ast_ari_websocket_session_write(struct ast_ari_websocket_session *session,
|
||||
struct ast_json *message);
|
||||
|
||||
/*!
|
||||
* \brief Get the Session ID for an ARI WebSocket.
|
||||
*
|
||||
* \param session Session to query.
|
||||
* \return Session ID.
|
||||
* \return \c NULL on error.
|
||||
*/
|
||||
const char *ast_ari_websocket_session_id(
|
||||
const struct ast_ari_websocket_session *session);
|
||||
|
||||
/*!
|
||||
* \brief Get the remote address from an ARI WebSocket.
|
||||
*
|
||||
* \param session Session to write to.
|
||||
* \return ast_sockaddr (does not have to be freed)
|
||||
*/
|
||||
struct ast_sockaddr *ast_ari_websocket_session_get_remote_addr(
|
||||
struct ast_ari_websocket_session *session);
|
||||
|
||||
/*!
|
||||
* \brief The stock message to return when out of memory.
|
||||
*
|
||||
|
@@ -891,6 +891,55 @@ int stasis_app_channel_unreal_set_internal(struct ast_channel *chan);
|
||||
*/
|
||||
int stasis_app_channel_set_internal(struct ast_channel *chan);
|
||||
|
||||
/*!
|
||||
* \brief Enable/disable request/response and event logging on an application
|
||||
*
|
||||
* \param app The app to debug
|
||||
* \param debug If non-zero, enable debugging. If zero, disable.
|
||||
*/
|
||||
void stasis_app_set_debug(struct stasis_app *app, int debug);
|
||||
|
||||
/*!
|
||||
* \brief Enable/disable request/response and event logging on an application
|
||||
*
|
||||
* \param app_name The app name to debug
|
||||
* \param debug If non-zero, enable debugging. If zero, disable.
|
||||
*/
|
||||
void stasis_app_set_debug_by_name(const char *app_name, int debug);
|
||||
|
||||
/*!
|
||||
* \brief Get debug status of an application
|
||||
*
|
||||
* \param app The app to check
|
||||
* \return The debug flag for the app || the global debug flag
|
||||
*/
|
||||
int stasis_app_get_debug(struct stasis_app *app);
|
||||
|
||||
/*!
|
||||
* \brief Get debug status of an application
|
||||
*
|
||||
* \param app_name The app_name to check
|
||||
* \return The debug flag for the app || the global debug flag
|
||||
*/
|
||||
int stasis_app_get_debug_by_name(const char *app_name);
|
||||
|
||||
/*!
|
||||
* \brief Enable/disable request/response and event logging on all applications
|
||||
*
|
||||
* \param debug If non-zero, enable debugging. If zero, disable.
|
||||
*/
|
||||
void stasis_app_set_global_debug(int debug);
|
||||
|
||||
struct ast_cli_args;
|
||||
|
||||
/*!
|
||||
* \brief Dump properties of a \c stasis_app to the CLI
|
||||
*
|
||||
* \param app The application
|
||||
* \param a The CLI arguments
|
||||
*/
|
||||
void stasis_app_to_cli(const struct stasis_app *app, struct ast_cli_args *a);
|
||||
|
||||
/*! @} */
|
||||
|
||||
#endif /* _ASTERISK_STASIS_APP_H */
|
||||
|
Reference in New Issue
Block a user