Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Channel signaling applications. More...
#include "asterisk.h"
#include "asterisk/file.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/app.h"
Go to the source code of this file.
Data Structures | |
struct | signalitem |
struct | signals |
Functions | |
static struct signalitem * | alloc_signal (const char *sname) |
AST_MODULE_INFO_STANDARD_EXTENDED (ASTERISK_GPL_KEY, "Channel Signaling Applications") | |
static int | dealloc_signal (struct signalitem *s) |
static struct signalitem * | get_signal (char *sname, int addnew) |
static int | load_module (void) |
static int | remove_signal (char *sname) |
static int | send_signal (char *signame, char *payload) |
static int | signal_exec (struct ast_channel *chan, const char *data) |
static int | unload_module (void) |
static int | wait_for_signal_or_hangup (struct ast_channel *chan, char *signame, int timeout) |
static int | waitsignal_exec (struct ast_channel *chan, const char *data) |
Variables | |
static const char *const | app = "Signal" |
static const char *const | app2 = "WaitForSignal" |
static struct signals | signals = { .first = NULL, .last = NULL, .lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } , } |
Channel signaling applications.
Definition in file app_signal.c.
|
static |
Definition at line 137 of file app_signal.c.
References ast_alertpipe_init(), ast_calloc, ast_copy_string(), ast_mutex_init, signalitem::lock, signalitem::name, NULL, signalitem::payload, signalitem::sig_alert_pipe, and signalitem::watchers.
Referenced by get_signal().
AST_MODULE_INFO_STANDARD_EXTENDED | ( | ASTERISK_GPL_KEY | , |
"Channel Signaling Applications" | |||
) |
|
static |
Definition at line 157 of file app_signal.c.
References ast_alertpipe_close(), ast_debug, ast_free, ast_mutex_destroy, signalitem::lock, signalitem::name, NULL, signalitem::payload, signalitem::sig_alert_pipe, and signalitem::watchers.
Referenced by remove_signal(), and unload_module().
|
static |
Definition at line 191 of file app_signal.c.
References alloc_signal(), ast_debug, AST_LIST_TRAVERSE, ast_log, AST_RWLIST_INSERT_HEAD, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, LOG_WARNING, signalitem::name, and NULL.
Referenced by send_signal(), and wait_for_signal_or_hangup().
|
static |
Definition at line 461 of file app_signal.c.
References app, app2, ast_register_application_xml, signal_exec(), and waitsignal_exec().
|
static |
Definition at line 174 of file app_signal.c.
References ast_debug, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, dealloc_signal(), and signalitem::name.
Referenced by wait_for_signal_or_hangup().
|
static |
Definition at line 296 of file app_signal.c.
References ast_alertpipe_write(), ast_copy_string(), ast_debug, ast_free, ast_log, ast_malloc, ast_mutex_lock, ast_mutex_unlock, errno, get_signal(), len(), signalitem::lock, LOG_WARNING, NULL, signalitem::payload, signalitem::sig_alert_pipe, signalitem::signaled, and signalitem::watchers.
Referenced by signal_exec().
|
static |
Definition at line 394 of file app_signal.c.
References args, AST_APP_ARG, AST_DECLARE_APP_ARGS, ast_log, AST_MAX_CONTEXT, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero(), LOG_WARNING, signalitem::payload, pbx_builtin_setvar_helper(), and send_signal().
Referenced by load_module().
|
static |
Definition at line 428 of file app_signal.c.
References app, app2, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ast_log, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_unregister_application(), dealloc_signal(), and LOG_WARNING.
|
static |
Definition at line 219 of file app_signal.c.
References AST_ALERT_READ_SUCCESS, ast_alertpipe_read(), ast_alertpipe_write(), ast_channel_name(), ast_debug, ast_frfree, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_read(), ast_remaining_ms(), AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_tvnow(), ast_waitfor_nandfds(), errno, get_signal(), signalitem::lock, LOG_WARNING, NULL, signalitem::payload, pbx_builtin_setvar_helper(), remove_signal(), signalitem::sig_alert_pipe, and signalitem::watchers.
Referenced by waitsignal_exec().
|
static |
Definition at line 336 of file app_signal.c.
References args, AST_APP_ARG, ast_channel_name(), ast_debug, AST_DECLARE_APP_ARGS, ast_log, AST_MAX_CONTEXT, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero(), ast_verb, LOG_WARNING, pbx_builtin_setvar_helper(), and wait_for_signal_or_hangup().
Referenced by load_module().
|
static |
Definition at line 122 of file app_signal.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 123 of file app_signal.c.
Referenced by load_module(), and unload_module().