19#ifndef _ASTERISK_ARI_H
20#define _ASTERISK_ARI_H
208 const char *response_text,
209 const char *message_fmt, ...)
210__attribute__((format(printf, 4, 5)));
enum ast_json_encoding_format ast_ari_json_format(void)
Configured encoding format for JSON output.
@ ARI_INVOKE_SOURCE_WEBSOCKET
void ast_ari_response_created(struct ast_ari_response *response, const char *url, struct ast_json *message)
Fill in a Created (201) ast_ari_response.
int ast_ari_remove_handler(struct stasis_rest_handlers *handler)
@ ARI_INVOKE_RESULT_SUCCESS
@ ARI_INVOKE_RESULT_ERROR_CLOSE
@ ARI_INVOKE_RESULT_ERROR_CONTINUE
void ast_ari_response_error(struct ast_ari_response *response, int response_code, const char *response_text, const char *message_fmt,...)
Fill in an error ast_ari_response.
void ast_ari_response_ok(struct ast_ari_response *response, struct ast_json *message)
Fill in an OK (200) ast_ari_response.
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_json *body, struct ast_ari_response *response)
Callback type for RESTful method handlers.
void ast_ari_response_accepted(struct ast_ari_response *response)
Fill in a Accepted (202) ast_ari_response.
struct ast_json * ast_ari_oom_json(void)
The stock message to return when out of memory.
void ast_ari_response_alloc_failed(struct ast_ari_response *response)
Fill in response with a 500 message for allocation failures.
void ast_ari_response_no_content(struct ast_ari_response *response)
Fill in a No Content (204) ast_ari_response.
void ast_ari_get_docs(const char *uri, const char *prefix, struct ast_variable *headers, struct ast_ari_response *response)
int ast_ari_add_handler(struct stasis_rest_handlers *handler)
enum ast_ari_invoke_result ast_ari_invoke(struct ast_tcptls_session_instance *ser, enum ast_ari_invoke_source source, const struct ast_http_uri *urih, const char *uri, enum ast_http_method method, struct ast_variable *get_params, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
static char prefix[MAX_PREFIX]
Support for Private Asterisk HTTP Servers.
ast_http_method
HTTP Request methods known by Asterisk.
Asterisk JSON abstraction layer.
ast_json_encoding_format
Encoding format type.
struct ast_json * message
const char * response_text
Definition of a URI handler.
Abstract JSON element (object, array, string, int, ...).
Support for dynamic strings.
describes a server instance
Structure for variables, used for configurations and for channel variables.
Structure for a WebSocket server.
Structure definition for session.
Handler for a single RESTful path segment.
stasis_rest_callback callbacks[AST_HTTP_MAX_METHOD]
const char * path_segment
struct ast_websocket_server * ws_server
struct stasis_rest_handlers * children[]
static void handler(const char *name, int response_code, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)