Asterisk - The Open Source Telephony Project
18.5.0
|
Out-of-call text message support. More...
#include "asterisk.h"
#include "asterisk/_private.h"
#include "asterisk/module.h"
#include "asterisk/datastore.h"
#include "asterisk/pbx.h"
#include "asterisk/manager.h"
#include "asterisk/strings.h"
#include "asterisk/astobj2.h"
#include "asterisk/vector.h"
#include "asterisk/app.h"
#include "asterisk/taskprocessor.h"
#include "asterisk/message.h"
Go to the source code of this file.
Data Structures | |
struct | ast_msg |
A message. More... | |
struct | ast_msg_data |
Structure used to transport a message through the frame core. More... | |
struct | ast_msg_var_iterator |
struct | msg_data |
struct | outhead |
Macros | |
#define | ATTRIBUTE_UNSET -1 |
Functions | |
static void | __init_msg_q_chan (void) |
static int | action_messagesend (struct mansession *s, const struct message *m) |
struct ast_msg * | ast_msg_alloc (void) |
Allocate a message. More... | |
struct ast_msg_data * | ast_msg_data_alloc (enum ast_msg_data_source_type source, struct ast_msg_data_attribute attributes[], size_t count) |
Allocates an ast_msg_data structure. More... | |
struct ast_msg_data * | ast_msg_data_alloc2 (enum ast_msg_data_source_type source_type, const char *to, const char *from, const char *content_type, const char *body) |
Allocates an ast_msg_data structure. More... | |
struct ast_msg_data * | ast_msg_data_dup (struct ast_msg_data *msg) |
Clone an ast_msg_data structure. More... | |
const char * | ast_msg_data_get_attribute (struct ast_msg_data *msg, enum ast_msg_data_attribute_type attribute_type) |
Get attribute from ast_msg_data. More... | |
size_t | ast_msg_data_get_length (struct ast_msg_data *msg) |
Get length of the structure. More... | |
enum ast_msg_data_source_type | ast_msg_data_get_source_type (struct ast_msg_data *msg) |
Get "source type" from ast_msg_data. More... | |
int | ast_msg_data_queue_frame (struct ast_channel *channel, struct ast_msg_data *msg) |
Queue an AST_FRAME_TEXT_DATA frame containing an ast_msg_data structure. More... | |
struct ast_msg * | ast_msg_destroy (struct ast_msg *msg) |
Destroy an ast_msg. More... | |
const char * | ast_msg_get_body (const struct ast_msg *msg) |
Get the body of a message. More... | |
const char * | ast_msg_get_endpoint (const struct ast_msg *msg) |
Retrieve the endpoint associated with this message. More... | |
const char * | ast_msg_get_from (const struct ast_msg *msg) |
Retrieve the source of this message. More... | |
const char * | ast_msg_get_tech (const struct ast_msg *msg) |
Retrieve the technology associated with this message. More... | |
const char * | ast_msg_get_to (const struct ast_msg *msg) |
Retrieve the destination of this message. More... | |
const char * | ast_msg_get_var (struct ast_msg *msg, const char *name) |
Get the specified variable on the message. More... | |
int | ast_msg_handler_register (const struct ast_msg_handler *handler) |
Register a ast_msg_handler . More... | |
int | ast_msg_handler_unregister (const struct ast_msg_handler *handler) |
Unregister a ast_msg_handler . More... | |
int | ast_msg_has_destination (const struct ast_msg *msg) |
Determine if a particular message has a destination via some handler. More... | |
int | ast_msg_init (void) |
int | ast_msg_queue (struct ast_msg *msg) |
Queue a message for routing through the dialplan. More... | |
struct ast_msg * | ast_msg_ref (struct ast_msg *msg) |
Bump a msg's ref count. More... | |
int | ast_msg_send (struct ast_msg *msg, const char *to, const char *from) |
Send a msg directly to an endpoint. More... | |
int | ast_msg_set_body (struct ast_msg *msg, const char *fmt,...) |
Set the 'body' text of a message (in UTF-8) More... | |
int | ast_msg_set_context (struct ast_msg *msg, const char *fmt,...) |
Set the dialplan context for this message. More... | |
int | ast_msg_set_endpoint (struct ast_msg *msg, const char *fmt,...) |
Set the technology's endpoint associated with this message. More... | |
int | ast_msg_set_exten (struct ast_msg *msg, const char *fmt,...) |
Set the dialplan extension for this message. More... | |
int | ast_msg_set_from (struct ast_msg *msg, const char *fmt,...) |
Set the 'from' URI of a message. More... | |
int | ast_msg_set_tech (struct ast_msg *msg, const char *fmt,...) |
Set the technology associated with this message. More... | |
int | ast_msg_set_to (struct ast_msg *msg, const char *fmt,...) |
Set the 'to' URI of a message. More... | |
int | ast_msg_set_var (struct ast_msg *msg, const char *name, const char *value) |
Set a variable on the message going to the dialplan. More... | |
int | ast_msg_set_var_outbound (struct ast_msg *msg, const char *name, const char *value) |
Set a variable on the message being sent to a message tech directly. More... | |
void | ast_msg_shutdown (void) |
int | ast_msg_tech_register (const struct ast_msg_tech *tech) |
Register a message technology. More... | |
int | ast_msg_tech_unregister (const struct ast_msg_tech *tech) |
Unregister a message technology. More... | |
void | ast_msg_var_iterator_destroy (struct ast_msg_var_iterator *iter) |
Destroy a message variable iterator. More... | |
static int | ast_msg_var_iterator_get_next (const struct ast_msg *msg, struct ast_msg_var_iterator *iter, const char **name, const char **value, unsigned int send) |
struct ast_msg_var_iterator * | ast_msg_var_iterator_init (const struct ast_msg *msg) |
Create a new message variable iterator. More... | |
int | ast_msg_var_iterator_next (const struct ast_msg *msg, struct ast_msg_var_iterator *iter, const char **name, const char **value) |
Get the next variable name and value that is set for sending outbound. More... | |
int | ast_msg_var_iterator_next_received (const struct ast_msg *msg, struct ast_msg_var_iterator *iter, const char **name, const char **value) |
Get the next variable name and value that was set on a received message. More... | |
void | ast_msg_var_unref_current (struct ast_msg_var_iterator *iter) |
Unref a message var from inside an iterator loop. More... | |
AST_VECTOR (const struct ast_msg_tech *) | |
Vector of message technologies. More... | |
static void | chan_cleanup (struct ast_channel *chan) |
static int | chan_msg_indicate (struct ast_channel *chan, int condition, const void *data, size_t datalen) |
static struct ast_frame * | chan_msg_read (struct ast_channel *chan) |
static int | chan_msg_send_digit_begin (struct ast_channel *chan, char digit) |
static int | chan_msg_send_digit_end (struct ast_channel *chan, char digit, unsigned int duration) |
static int | chan_msg_write (struct ast_channel *chan, struct ast_frame *fr) |
static struct ast_channel * | create_msg_q_chan (void) |
static void | destroy_msg_q_chan (void *data) |
static int | dialplan_handle_msg_cb (struct ast_msg *msg) |
static int | dialplan_has_destination_cb (const struct ast_msg *msg) |
static void | message_shutdown (void) |
static struct msg_data * | msg_data_alloc (void) |
static int | msg_data_cmp_fn (void *obj, void *arg, int flags) |
static void | msg_data_destructor (void *obj) |
static struct msg_data * | msg_data_find (struct ao2_container *vars, const char *name) |
static int | msg_data_func_read (struct ast_channel *chan, const char *function, char *data, char *buf, size_t len) |
static int | msg_data_func_write (struct ast_channel *chan, const char *function, char *data, const char *value) |
static struct ast_datastore * | msg_datastore_find_or_create (struct ast_channel *chan) |
static void | msg_destructor (void *obj) |
static void | msg_ds_destroy (void *data) |
static const struct ast_msg_tech * | msg_find_by_tech_name (const char *tech_name) |
static int | msg_func_read (struct ast_channel *chan, const char *function, char *data, char *buf, size_t len) |
static int | msg_func_write (struct ast_channel *chan, const char *function, char *data, const char *value) |
static int | msg_handler_cmp (const struct ast_msg_handler *vec_elem, const struct ast_msg_handler *srch) |
Comparison callback for ast_msg_handler vector removal. More... | |
static const struct ast_msg_handler * | msg_handler_find_by_tech_name (const char *tech_name) |
static int | msg_q_cb (void *data) |
static void | msg_route (struct ast_channel *chan, struct ast_msg *msg) |
static int | msg_send_exec (struct ast_channel *chan, const char *data) |
static int | msg_set_var_full (struct ast_msg *msg, const char *name, const char *value, unsigned int outbound) |
static int | msg_tech_cmp (const struct ast_msg_tech *vec_elem, const struct ast_msg_tech *srch) |
Comparison callback for ast_msg_tech vector removal. More... | |
Variables | |
static struct ast_msg_handler | dialplan_msg_handler |
static struct ast_channel_tech | msg_chan_tech_hack |
static struct ast_custom_function | msg_data_function |
static struct ast_custom_function | msg_function |
static struct ast_threadstorage | msg_q_chan = { .once = PTHREAD_ONCE_INIT , .key_init = __init_msg_q_chan , .custom_init = NULL , } |
static ast_rwlock_t | msg_techs_lock |
Lock for msg_techs vector. More... | |
Out-of-call text message support.
Definition in file message.c.
#define ATTRIBUTE_UNSET -1 |
Definition at line 1416 of file message.c.
Referenced by ast_msg_data_alloc(), and ast_msg_data_get_attribute().
|
static |
Definition at line 1306 of file message.c.
References ao2_ref, ast_base64decode(), ast_msg_alloc(), ast_msg_set_body(), ast_msg_set_var_outbound(), ast_rwlock_rdlock, ast_rwlock_unlock, ast_strdupa, ast_strlen_zero, ast_variables_destroy(), astman_get_header(), astman_get_variables_order(), astman_send_ack(), astman_send_error(), msg_data::from, msg_data::msg, msg_find_by_tech_name(), ast_msg_tech::msg_send, msg_tech, ast_variable::name, ast_variable::next, NULL, ORDER_NATURAL, S_OR, strsep(), ast_variable::value, and ast_msg::vars.
Referenced by ast_msg_init().
struct ast_msg* ast_msg_alloc | ( | void | ) |
Allocate a message.
Allocate a message for the purposes of passing it into the Asterisk core to be routed through the dialplan. If ast_msg_queue() is not called, this message must be destroyed using ast_msg_destroy(). Otherwise, the message core code will take care of it.
Definition at line 418 of file message.c.
References ao2_alloc, AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_list, ao2_ref, ast_string_field_init, ast_string_field_set, context, msg_data::msg, msg_data_cmp_fn(), msg_destructor(), NULL, and ast_msg::vars.
Referenced by action_messagesend(), AST_TEST_DEFINE(), module_on_rx_request(), msg_datastore_find_or_create(), receive_message(), send_message(), and xmpp_pak_message().
Destroy an ast_msg.
This should only be called on a message if it was not passed on to ast_msg_queue().
Definition at line 448 of file message.c.
Referenced by ast_msg_safe_destroy(), module_on_rx_request(), msg_data_destroy(), receive_message(), send_message(), and xmpp_pak_message().
const char* ast_msg_get_body | ( | const struct ast_msg * | msg | ) |
Get the body of a message.
Definition at line 531 of file message.c.
References ast_msg::body.
Referenced by AST_TEST_DEFINE(), msg_send(), msg_to_json(), sip_msg_send(), and xmpp_send_cb().
const char* ast_msg_get_endpoint | ( | const struct ast_msg * | msg | ) |
Retrieve the endpoint associated with this message.
msg | The message to get the endpoint from |
The | endpoint associated with the message |
NULL | or empty string if the message has no associated endpoint |
Definition at line 551 of file message.c.
References ast_msg::endpoint.
Referenced by AST_TEST_DEFINE(), and msg_to_endpoint().
const char* ast_msg_get_from | ( | const struct ast_msg * | msg | ) |
Retrieve the source of this message.
msg | The message to get the soure from |
The | source of the message |
NULL | or empty string if the message has no source |
Definition at line 536 of file message.c.
References ast_msg::from.
Referenced by AST_TEST_DEFINE(), msg_send(), and msg_to_json().
const char* ast_msg_get_tech | ( | const struct ast_msg * | msg | ) |
Retrieve the technology associated with this message.
msg | The message to get the technology from |
The | technology of the message |
NULL | or empty string if the message has no associated technology |
Definition at line 546 of file message.c.
References ast_msg::tech.
Referenced by AST_TEST_DEFINE(), and msg_to_endpoint().
const char* ast_msg_get_to | ( | const struct ast_msg * | msg | ) |
Retrieve the destination of this message.
msg | The message to get the destination from |
The | destination of the message |
NULL | or empty string if the message has no destination |
Definition at line 541 of file message.c.
References ast_msg::to.
Referenced by AST_TEST_DEFINE(), msg_send(), msg_to_json(), and test_msg_has_destination_cb().
const char* ast_msg_get_var | ( | struct ast_msg * | msg, |
const char * | name | ||
) |
Get the specified variable on the message.
Definition at line 620 of file message.c.
References ao2_ref, msg_data_find(), NULL, msg_data::value, and ast_msg::vars.
Referenced by AST_TEST_DEFINE(), msg_data_func_read(), and update_content_type().
int ast_msg_handler_register | ( | const struct ast_msg_handler * | handler | ) |
Register a ast_msg_handler
.
handler | The handler to register |
0 | Success |
non-zero | Error |
Definition at line 1629 of file message.c.
References ast_log, ast_rwlock_unlock, ast_rwlock_wrlock, AST_VECTOR_APPEND, ast_verb, LOG_ERROR, match(), msg_handler_find_by_tech_name(), and ast_msg_handler::name.
Referenced by ast_msg_init(), AST_TEST_DEFINE(), and messaging_init().
int ast_msg_handler_unregister | ( | const struct ast_msg_handler * | handler | ) |
Unregister a ast_msg_handler
.
handler | The handler to unregister |
0 | Success |
non-zero | Error |
Definition at line 1671 of file message.c.
References ast_log, ast_rwlock_unlock, ast_rwlock_wrlock, AST_VECTOR_ELEM_CLEANUP_NOOP, AST_VECTOR_REMOVE_CMP_UNORDERED, ast_verb, LOG_ERROR, match(), msg_handler_cmp(), and ast_msg_handler::name.
Referenced by AST_TEST_DEFINE(), message_shutdown(), and messaging_cleanup().
int ast_msg_has_destination | ( | const struct ast_msg * | msg | ) |
Determine if a particular message has a destination via some handler.
msg | The message to check |
0 | if the message has no handler that can find a destination |
1 | if the message has a handler that can find a destination |
Definition at line 937 of file message.c.
References ast_debug, ast_rwlock_rdlock, ast_rwlock_unlock, AST_VECTOR_GET, AST_VECTOR_SIZE, handler(), ast_msg_handler::has_destination, ast_msg_handler::name, and result.
Referenced by AST_TEST_DEFINE(), module_on_rx_request(), and receive_message().
int ast_msg_init | ( | void | ) |
Provided by message.c
Definition at line 1730 of file message.c.
References __ast_custom_function_register(), action_messagesend(), ast_manager_register_xml_core, ast_msg_handler_register(), ast_register_application2(), ast_register_cleanup(), ast_rwlock_init, ast_taskprocessor_get(), AST_VECTOR_INIT, EVENT_FLAG_MESSAGE, message_shutdown(), msg_send_exec(), NULL, and TPS_REF_DEFAULT.
Referenced by asterisk_daemon().
int ast_msg_queue | ( | struct ast_msg * | msg | ) |
Queue a message for routing through the dialplan.
Regardless of the return value of this function, this funciton will take care of ensuring that the message object is properly destroyed when needed.
0 | message successfully queued |
non-zero | failure, message not sent to dialplan |
Definition at line 958 of file message.c.
References ao2_ref, ast_taskprocessor_push(), and msg_q_cb().
Referenced by AST_TEST_DEFINE(), module_on_rx_request(), receive_message(), and xmpp_pak_message().
Bump a msg's ref count.
Definition at line 442 of file message.c.
References ao2_ref, and msg_data::msg.
Referenced by msg_data_create().
int ast_msg_send | ( | struct ast_msg * | msg, |
const char * | to, | ||
const char * | from | ||
) |
Send a msg directly to an endpoint.
Regardless of the return value of this function, this funciton will take care of ensuring that the message object is properly destroyed when needed.
0 | message successfully queued to be sent out |
non-zero | failure, message not get sent out. |
Definition at line 1369 of file message.c.
References ao2_ref, ast_log, ast_rwlock_rdlock, ast_rwlock_unlock, ast_strdupa, ast_strlen_zero, LOG_ERROR, msg_find_by_tech_name(), ast_msg_tech::msg_send, msg_tech, NULL, S_OR, and strsep().
Referenced by AST_TEST_DEFINE(), and send_message().
int ast_msg_set_body | ( | struct ast_msg * | msg, |
const char * | fmt, | ||
... | |||
) |
Set the 'body' text of a message (in UTF-8)
0 | success |
-1 | failure |
Definition at line 476 of file message.c.
References ast_string_field_build_va, and ast_msg::body.
Referenced by action_messagesend(), AST_TEST_DEFINE(), msg_func_write(), receive_message(), rx_data_to_ast_msg(), send_message(), and xmpp_pak_message().
int ast_msg_set_context | ( | struct ast_msg * | msg, |
const char * | fmt, | ||
... | |||
) |
Set the dialplan context for this message.
0 | success |
-1 | failure |
Definition at line 487 of file message.c.
References ast_string_field_build_va, and context.
Referenced by AST_TEST_DEFINE(), receive_message(), rx_data_to_ast_msg(), and xmpp_pak_message().
int ast_msg_set_endpoint | ( | struct ast_msg * | msg, |
const char * | fmt, | ||
... | |||
) |
Set the technology's endpoint associated with this message.
0 | success |
-1 | failure |
Definition at line 520 of file message.c.
References ast_string_field_build_va, and ast_msg::endpoint.
Referenced by AST_TEST_DEFINE(), receive_message(), rx_data_to_ast_msg(), and xmpp_pak_message().
int ast_msg_set_exten | ( | struct ast_msg * | msg, |
const char * | fmt, | ||
... | |||
) |
Set the dialplan extension for this message.
0 | success |
-1 | failure |
Definition at line 498 of file message.c.
References ast_string_field_build_va, and exten.
Referenced by AST_TEST_DEFINE(), receive_message(), and rx_data_to_ast_msg().
int ast_msg_set_from | ( | struct ast_msg * | msg, |
const char * | fmt, | ||
... | |||
) |
Set the 'from' URI of a message.
0 | success |
-1 | failure |
Definition at line 465 of file message.c.
References ast_string_field_build_va, and msg_data::from.
Referenced by AST_TEST_DEFINE(), msg_func_write(), receive_message(), rx_data_to_ast_msg(), send_message(), and xmpp_pak_message().
int ast_msg_set_tech | ( | struct ast_msg * | msg, |
const char * | fmt, | ||
... | |||
) |
Set the technology associated with this message.
0 | success |
-1 | failure |
Definition at line 509 of file message.c.
References ast_string_field_build_va, and ast_msg::tech.
Referenced by AST_TEST_DEFINE(), receive_message(), rx_data_to_ast_msg(), and xmpp_pak_message().
int ast_msg_set_to | ( | struct ast_msg * | msg, |
const char * | fmt, | ||
... | |||
) |
Set the 'to' URI of a message.
0 | success |
-1 | failure |
Definition at line 454 of file message.c.
References ast_string_field_build_va, and ast_msg::to.
Referenced by AST_TEST_DEFINE(), msg_func_write(), receive_message(), rx_data_to_ast_msg(), send_message(), and xmpp_pak_message().
int ast_msg_set_var | ( | struct ast_msg * | msg, |
const char * | name, | ||
const char * | value | ||
) |
Set a variable on the message going to the dialplan.
msg | |
name | Name of variable to set |
value | Value of variable to set |
0 | success |
-1 | failure |
Definition at line 615 of file message.c.
References msg_set_var_full().
Referenced by AST_TEST_DEFINE(), headers_to_vars(), receive_message(), rx_data_to_ast_msg(), set_message_vars_from_req(), and xmpp_pak_message().
int ast_msg_set_var_outbound | ( | struct ast_msg * | msg, |
const char * | name, | ||
const char * | value | ||
) |
Set a variable on the message being sent to a message tech directly.
msg | |
name | Name of variable to set |
value | Value of variable to set |
0 | success |
-1 | failure |
Definition at line 610 of file message.c.
References msg_set_var_full().
Referenced by action_messagesend(), AST_TEST_DEFINE(), msg_data_func_write(), and send_message().
void ast_msg_shutdown | ( | void | ) |
Provided by message.c
Definition at line 1689 of file message.c.
References ast_taskprocessor_unreference().
Referenced by can_safely_quit().
int ast_msg_tech_register | ( | const struct ast_msg_tech * | tech | ) |
Register a message technology.
0 | success |
non-zero | failure |
Definition at line 1569 of file message.c.
References ast_log, ast_rwlock_unlock, ast_rwlock_wrlock, AST_VECTOR_APPEND, ast_verb, LOG_ERROR, match(), msg_find_by_tech_name(), and ast_msg_tech::name.
Referenced by AST_TEST_DEFINE(), and load_module().
int ast_msg_tech_unregister | ( | const struct ast_msg_tech * | tech | ) |
Unregister a message technology.
0 | success |
non-zero | failure |
Definition at line 1610 of file message.c.
References ast_log, ast_rwlock_unlock, ast_rwlock_wrlock, AST_VECTOR_ELEM_CLEANUP_NOOP, AST_VECTOR_REMOVE_CMP_UNORDERED, ast_verb, LOG_ERROR, match(), msg_tech_cmp(), and ast_msg_tech::name.
Referenced by AST_TEST_DEFINE(), load_module(), and unload_module().
void ast_msg_var_iterator_destroy | ( | struct ast_msg_var_iterator * | iter | ) |
Destroy a message variable iterator.
iter | Iterator to be destroyed |
Definition at line 706 of file message.c.
References ao2_iterator_destroy(), ast_free, ast_msg_var_unref_current(), and ast_msg_var_iterator::iter.
Referenced by AST_TEST_DEFINE(), msg_to_json(), sip_msg_send(), and vars_to_headers().
|
static |
Definition at line 658 of file message.c.
References ao2_iterator_next, ao2_ref, ast_msg_var_iterator::current_used, ast_msg_var_iterator::iter, msg_data::name, msg_data::send, and msg_data::value.
Referenced by ast_msg_var_iterator_next(), and ast_msg_var_iterator_next_received().
struct ast_msg_var_iterator* ast_msg_var_iterator_init | ( | const struct ast_msg * | msg | ) |
Create a new message variable iterator.
msg | A message whose variables are to be iterated over |
Definition at line 644 of file message.c.
References ao2_iterator_init(), ast_calloc, ast_msg_var_iterator::iter, NULL, and ast_msg::vars.
Referenced by AST_TEST_DEFINE(), msg_to_json(), sip_msg_send(), and vars_to_headers().
int ast_msg_var_iterator_next | ( | const struct ast_msg * | msg, |
struct ast_msg_var_iterator * | iter, | ||
const char ** | name, | ||
const char ** | value | ||
) |
Get the next variable name and value that is set for sending outbound.
msg | The message with the variables |
iter | An iterator created with ast_msg_var_iterator_init |
name | A pointer to the name result pointer |
value | A pointer to the value result pointer |
0 | No more entries |
1 | Valid entry |
Definition at line 689 of file message.c.
References ast_msg_var_iterator_get_next().
Referenced by AST_TEST_DEFINE(), sip_msg_send(), and vars_to_headers().
int ast_msg_var_iterator_next_received | ( | const struct ast_msg * | msg, |
struct ast_msg_var_iterator * | iter, | ||
const char ** | name, | ||
const char ** | value | ||
) |
Get the next variable name and value that was set on a received message.
msg | The message with the variables |
iter | An iterator created with ast_msg_var_iterator_init |
name | A pointer to the name result pointer |
value | A pointer to the value result pointer |
0 | No more entries |
1 | Valid entry |
Definition at line 694 of file message.c.
References ast_msg_var_iterator_get_next().
Referenced by msg_to_json().
void ast_msg_var_unref_current | ( | struct ast_msg_var_iterator * | iter | ) |
Unref a message var from inside an iterator loop.
Definition at line 700 of file message.c.
References ao2_cleanup, ast_msg_var_iterator::current_used, and NULL.
Referenced by ast_msg_var_iterator_destroy(), AST_TEST_DEFINE(), msg_to_json(), sip_msg_send(), and vars_to_headers().
AST_VECTOR | ( | const struct ast_msg_tech * | ) |
|
static |
Definition at line 774 of file message.c.
References ao2_ref, ast_channel_clear_softhangup(), ast_channel_datastore_add(), ast_channel_datastore_find(), ast_channel_datastore_remove(), ast_channel_datastores(), ast_channel_internal_alert_flush(), ast_channel_lock, ast_channel_readq(), ast_channel_unlock, ast_channel_varshead(), ast_datastore_free(), ast_frfree, AST_LIST_REMOVE_HEAD, AST_SOFTHANGUP_ALL, ast_var_delete(), ast_datastore::data, and NULL.
Referenced by dialplan_handle_msg_cb().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 715 of file message.c.
References AST_CHAN_TP_INTERNAL, ast_channel_alloc, ast_channel_datastore_add(), ast_channel_lock, ast_channel_tech_set(), ast_channel_unlink(), ast_channel_unlock, ast_datastore_alloc, ast_hangup(), ast_opt_hide_messaging_ami_events, AST_STATE_UP, NULL, and ast_channel_tech::properties.
Referenced by dialplan_handle_msg_cb().
|
static |
Definition at line 838 of file message.c.
References ast_channel_release(), and ast_channel::data.
|
static |
Definition at line 852 of file message.c.
References ao2_ref, ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, ast_threadstorage_get(), chan_cleanup(), create_msg_q_chan(), ast_datastore::data, msg_data::msg, msg_q_chan, msg_route(), and NULL.
|
static |
Definition at line 883 of file message.c.
References ast_exists_extension(), ast_strlen_zero, ast_msg::context, ast_msg::exten, NULL, and S_OR.
|
static |
Definition at line 1704 of file message.c.
References ast_custom_function_unregister(), ast_manager_unregister(), ast_msg_handler_unregister(), ast_rwlock_destroy, ast_unregister_application(), and AST_VECTOR_FREE.
Referenced by ast_msg_init().
|
static |
Definition at line 556 of file message.c.
References ao2_alloc, ao2_ref, ast_string_field_init, msg_data_destructor(), and NULL.
Referenced by msg_set_var_full().
|
static |
Definition at line 398 of file message.c.
References CMP_MATCH, CMP_STOP, and msg_data::name.
Referenced by ast_msg_alloc().
|
static |
Definition at line 404 of file message.c.
References ast_string_field_free_memory.
Referenced by msg_data_alloc().
|
static |
Definition at line 572 of file message.c.
References ao2_find, msg_data::name, and OBJ_POINTER.
Referenced by ast_msg_get_var(), and msg_set_var_full().
|
static |
Definition at line 1102 of file message.c.
References ao2_lock, ao2_ref, ao2_unlock, ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, ast_copy_string(), ast_log, ast_msg_get_var(), ast_datastore::data, LOG_ERROR, LOG_WARNING, msg_data::msg, and NULL.
|
static |
Definition at line 1138 of file message.c.
References ao2_lock, ao2_ref, ao2_unlock, ast_channel_lock, ast_channel_unlock, ast_log, ast_msg_set_var_outbound(), ast_datastore::data, LOG_WARNING, msg_data::msg, and msg_datastore_find_or_create().
|
static |
Definition at line 979 of file message.c.
References ast_channel_datastore_add(), ast_channel_datastore_find(), ast_datastore_alloc, ast_datastore_free(), ast_msg_alloc(), ast_datastore::data, and NULL.
Referenced by msg_data_func_write(), and msg_func_write().
|
static |
Definition at line 410 of file message.c.
References ao2_cleanup, ast_string_field_free_memory, msg_data::msg, and ast_msg::vars.
Referenced by ast_msg_alloc().
|
static |
|
static |
Definition at line 1181 of file message.c.
References AST_VECTOR_GET, AST_VECTOR_SIZE, ast_msg_tech::name, and NULL.
Referenced by action_messagesend(), ast_msg_send(), ast_msg_tech_register(), and msg_send_exec().
|
static |
Definition at line 1001 of file message.c.
References ao2_lock, ao2_ref, ao2_unlock, ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, ast_copy_string(), ast_log, ast_msg::body, ast_datastore::data, ast_msg::from, LOG_ERROR, LOG_WARNING, msg_data::msg, NULL, and ast_msg::to.
|
static |
Definition at line 1042 of file message.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_lock, ao2_ref, ao2_unlock, ast_channel_lock, ast_channel_unlock, ast_log, ast_msg_set_body(), ast_msg_set_from(), ast_msg_set_to(), ast_datastore::data, LOG_WARNING, msg_data::msg, msg_datastore_find_or_create(), msg_data::send, and ast_msg::vars.
|
static |
Comparison callback for ast_msg_handler
vector removal.
vec_elem | The element in the vector being compared |
srch | The element being looked up |
non-zero | The items are equal |
0 | The items are not equal |
Definition at line 1666 of file message.c.
References ast_msg_handler::name.
Referenced by ast_msg_handler_unregister().
|
static |
Definition at line 1207 of file message.c.
References AST_VECTOR_GET, AST_VECTOR_SIZE, ast_msg_handler::name, and NULL.
Referenced by ast_msg_handler_register().
|
static |
Definition at line 907 of file message.c.
References ao2_ref, ast_debug, ast_log, ast_rwlock_rdlock, ast_rwlock_unlock, AST_VECTOR_GET, AST_VECTOR_SIZE, ast_msg::from, ast_msg_handler::handle_msg, handler(), ast_msg_handler::has_destination, LOG_WARNING, msg_data::msg, ast_msg_handler::name, S_OR, and ast_msg::to.
Referenced by ast_msg_queue().
|
static |
Definition at line 756 of file message.c.
References ast_explicit_goto(), ast_pbx_run_args(), ast_msg::context, ast_msg::exten, ast_pbx_args::no_hangup_chan, and S_OR.
Referenced by dialplan_handle_msg_cb().
|
static |
Definition at line 1226 of file message.c.
References ao2_lock, ao2_ref, ao2_unlock, args, AST_APP_ARG, ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, AST_DECLARE_APP_ARGS, ast_log, ast_rwlock_rdlock, ast_rwlock_unlock, AST_STANDARD_APP_ARGS, ast_strdupa, ast_string_field_set, ast_strlen_zero, ast_datastore::data, msg_data::destination, msg_data::from, LOG_WARNING, msg_data::msg, msg_find_by_tech_name(), ast_msg_tech::msg_send, msg_tech, NULL, parse(), pbx_builtin_setvar_helper(), S_OR, and strsep().
Referenced by ast_msg_init().
|
static |
Definition at line 580 of file message.c.
References ao2_link, ao2_ref, ao2_unlink, ast_string_field_set, ast_strlen_zero, msg_data_alloc(), msg_data_find(), msg_data::send, and ast_msg::vars.
Referenced by ast_msg_set_var(), and ast_msg_set_var_outbound().
|
static |
Comparison callback for ast_msg_tech
vector removal.
vec_elem | The element in the vector being compared |
srch | The element being looked up |
non-zero | The items are equal |
0 | The items are not equal |
Definition at line 1605 of file message.c.
References ast_msg_tech::name.
Referenced by ast_msg_tech_unregister().
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 849 of file message.c.
Referenced by dialplan_handle_msg_cb().
|
static |