35#define AEAP_CONFIG_CLIENT "client"
73 const char *protocol);
static void * cleanup(void *unused)
int ast_aeap_disconnect(struct ast_aeap *aeap)
Disconnect an Asterisk external application object.
struct ast_aeap * ast_aeap_create_and_connect_by_id(const char *id, const struct ast_aeap_params *params, int timeout)
Create and connect to an Asterisk external application by sorcery id.
struct ast_aeap * ast_aeap_create(const char *type, const struct ast_aeap_params *params)
Create an Asterisk external application object.
int ast_aeap_user_data_register(struct ast_aeap *aeap, const char *id, void *obj, ast_aeap_user_obj_cleanup cleanup)
Register a user data object.
int ast_aeap_client_config_has_protocol(const struct ast_aeap_client_config *cfg, const char *protocol)
Check a given protocol against that in an Asterisk external application configuration.
void(* ast_aeap_on_timeout)(struct ast_aeap *aeap, struct ast_aeap_message *message, void *obj)
Event raised when a sent message does not receive a reply within a specified time interval.
void * ast_aeap_user_data_object_by_id(struct ast_aeap *aeap, const char *id)
Retrieve a registered user data object by its id.
int ast_aeap_send_msg(struct ast_aeap *aeap, struct ast_aeap_message *msg)
Send a message to an external application.
struct ast_variable * ast_aeap_custom_fields_get(const char *id)
Retrieve a list of custom configuration fields.
struct ast_sorcery * ast_aeap_sorcery(void)
Retrieve the AEAP sorcery object.
int ast_aeap_send_msg_tsx(struct ast_aeap *aeap, struct ast_aeap_tsx_params *params)
Send a transaction based message to an external application using the given parameters.
AST_AEAP_DATA_TYPE
Supported Asterisk external application data types.
@ AST_AEAP_DATA_TYPE_NONE
@ AST_AEAP_DATA_TYPE_BINARY
@ AST_AEAP_DATA_TYPE_STRING
struct ast_aeap * ast_aeap_create_by_id(const char *id, const struct ast_aeap_params *params)
Create an Asterisk external application object by sorcery id.
int ast_aeap_send_binary(struct ast_aeap *aeap, const void *buf, uintmax_t size)
Send a binary data to an external application.
struct ao2_container * ast_aeap_client_configs_get(const char *protocol)
Retrieve a listing of all client configuration objects by protocol.
void ast_aeap_user_data_unregister(struct ast_aeap *aeap, const char *id)
Un-register a user data object.
const struct ast_format_cap * ast_aeap_client_config_codecs(const struct ast_aeap_client_config *cfg)
Retrieve codec capabilities from the configuration.
int ast_aeap_connect(struct ast_aeap *aeap, const char *url, const char *protocol, int timeout)
Connect to an external application.
int(* ast_aeap_on_message)(struct ast_aeap *aeap, struct ast_aeap_message *message, void *obj)
Event raised when a message is received.
struct ast_aeap * ast_aeap_create_and_connect(const char *type, const struct ast_aeap_params *params, const char *url, const char *protocol, int timeout)
Create and connect to an Asterisk external application.
void(* ast_aeap_user_obj_cleanup)(void *obj)
Callback to cleanup a user object.
An Asterisk external application message handler.
ast_aeap_on_message on_message
Message type virtual method table.
Asterisk external application base message.
Callbacks and other parameters used by an Asterisk external application object.
const struct ast_aeap_message_type * msg_type
void(* on_string)(struct ast_aeap *aeap, const char *buf, intmax_t size)
Raised when string data is received.
uintmax_t response_handlers_size
void(* on_error)(struct ast_aeap *aeap)
Raised when an error occurs during reading.
uintmax_t request_handlers_size
const struct ast_aeap_message_handler * response_handlers
const struct ast_aeap_message_handler * request_handlers
void(* on_binary)(struct ast_aeap *aeap, const void *buf, intmax_t size)
Raised when binary data is received.
Parameters to be used when sending a transaction based message.
struct ast_aeap_message * msg
ast_aeap_user_obj_cleanup obj_cleanup
ast_aeap_on_timeout on_timeout
const struct ast_aeap_params * params
Full structure for sorcery.
Structure for variables, used for configurations and for channel variables.