19#ifndef ARI_WEBSOCKETS_H_
20#define ARI_WEBSOCKETS_H_
46#define STASIS_CONTEXT_PREFIX "stasis-"
47#define STASIS_CONTEXT_PREFIX_LEN (sizeof(STASIS_CONTEXT_PREFIX) - 1)
48#define ARI_MAX_APP_NAME_LEN (AST_MAX_CONTEXT - STASIS_CONTEXT_PREFIX_LEN)
int ari_outbound_websocket_start(struct ari_conf_outbound_websocket *owc)
struct ari_ws_session * ari_websocket_get_session(const char *session_id)
void ari_websocket_shutdown_all(void)
int ari_websocket_process_request(struct ari_ws_session *ast_ws_session, const char *remote_addr, struct ast_variable *upgrade_headers, const char *app_name, struct ast_json *msg)
int ari_websocket_load_module(int is_enabled)
struct ari_ws_session * ari_websocket_get_session_by_app(const char *app_name)
void ari_websocket_send_event(struct ari_ws_session *ari_ws_session, const char *app_name, struct ast_json *message, int debug_app)
Callback handler for Stasis application messages.
void ari_websocket_shutdown(struct ari_ws_session *session)
const char * ari_websocket_type_to_str(enum ast_websocket_type type)
int ari_websocket_unload_module(void)
void ari_handle_websocket(struct ast_tcptls_session_instance *ser, const char *uri, enum ast_http_method method, struct ast_variable *get_params, struct ast_variable *headers)
Wrapper for invoking the websocket code for an incoming connection.
struct ao2_container * ari_websocket_get_sessions(void)
static struct ast_mansession session
Support for Private Asterisk HTTP Servers.
ast_http_method
HTTP Request methods known by Asterisk.
ast_websocket_type
WebSocket connection/configuration types.
Asterisk JSON abstraction layer.
const char * app_name(struct ast_app *app)
static int is_enabled(void)
Helper function to check if module is enabled.
struct ast_vector_string websocket_apps
struct ari_conf_outbound_websocket * owc
enum ast_websocket_type type
struct ari_ws_session::@424 message_queue
struct ast_websocket * ast_ws_session
int(* validator)(struct ast_json *)
Abstract JSON element (object, array, string, int, ...).
describes a server instance
Structure for variables, used for configurations and for channel variables.
String vector definitions.
Structure definition for session.
Vector container support.
#define AST_VECTOR(name, type)
Define a vector structure.