Asterisk - The Open Source Telephony Project
21.4.1
|
PBX Hangup Handler management routines. More...
#include "asterisk.h"
#include "asterisk/_private.h"
#include "asterisk/app.h"
#include "asterisk/cli.h"
#include "asterisk/linkedlists.h"
#include "asterisk/pbx.h"
#include "asterisk/stasis_channels.h"
#include "asterisk/utils.h"
Go to the source code of this file.
Macros | |
#define | HANDLER_FORMAT "%-30s %s\n" |
Functions | |
void | ast_pbx_hangup_handler_destroy (struct ast_channel *chan) |
Destroy the hangup handler container on a channel. More... | |
static void | ast_pbx_hangup_handler_headers (int fd) |
void | ast_pbx_hangup_handler_init (struct ast_channel *chan) |
Init the hangup handler container on a channel. More... | |
int | ast_pbx_hangup_handler_pop (struct ast_channel *chan) |
Pop the top of the channel hangup handler stack. More... | |
void | ast_pbx_hangup_handler_push (struct ast_channel *chan, const char *handler) |
Push the given hangup handler onto the channel hangup handler stack. More... | |
int | ast_pbx_hangup_handler_run (struct ast_channel *chan) |
Run all hangup handlers on the channel. More... | |
static void | ast_pbx_hangup_handler_show (int fd, struct ast_channel *chan) |
static char * | handle_show_hangup_all (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
'show hanguphandlers all' CLI command implementation function... | |
static char * | handle_show_hangup_channel (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
'show hanguphandlers <channel>' CLI command implementation function... | |
int | load_pbx_hangup_handler (void) |
static void | publish_hangup_handler_message (const char *action, struct ast_channel *chan, const char *handler) |
static void | unload_pbx_hangup_handler (void) |
Variables | |
static struct ast_cli_entry | cli [] |
PBX Hangup Handler management routines.
Definition in file pbx_hangup_handler.c.
void ast_pbx_hangup_handler_destroy | ( | struct ast_channel * | chan | ) |
Destroy the hangup handler container on a channel.
chan | Channel to destroy the hangup handler container on. |
Definition at line 103 of file pbx_hangup_handler.c.
References AST_LIST_REMOVE_HEAD.
Referenced by ast_channel_destructor(), and ast_dummy_channel_destructor().
void ast_pbx_hangup_handler_init | ( | struct ast_channel * | chan | ) |
Init the hangup handler container on a channel.
chan | Channel to init the hangup handler container on. |
Definition at line 95 of file pbx_hangup_handler.c.
References AST_LIST_HEAD_INIT_NOLOCK.
Referenced by __ast_channel_alloc_ap().
int ast_pbx_hangup_handler_pop | ( | struct ast_channel * | chan | ) |
Pop the top of the channel hangup handler stack.
chan | Channel to push the hangup handler onto. |
TRUE | if a handler was popped off of the stack. |
Definition at line 119 of file pbx_hangup_handler.c.
References ast_hangup_handler::args, and AST_LIST_REMOVE_HEAD.
void ast_pbx_hangup_handler_push | ( | struct ast_channel * | chan, |
const char * | handler | ||
) |
Push the given hangup handler onto the channel hangup handler stack.
chan | Channel to push the hangup handler onto. |
handler | Gosub application parameter string. |
Definition at line 138 of file pbx_hangup_handler.c.
References ast_hangup_handler::args, ast_app_expand_sub_args(), AST_LIST_INSERT_HEAD, and ast_malloc.
int ast_pbx_hangup_handler_run | ( | struct ast_channel * | chan | ) |
Run all hangup handlers on the channel.
chan | Channel to run the hangup handlers on. |
Zero | if no hangup handlers run. |
non-zero | if hangup handlers were run. |
Definition at line 58 of file pbx_hangup_handler.c.
References ast_hangup_handler::args, ast_app_exec_sub(), AST_LIST_EMPTY, AST_LIST_REMOVE_HEAD, AST_SOFTHANGUP_HANGUP_EXEC, and ast_softhangup_nolock().
Referenced by __ast_pbx_run(), and ast_hangup().
int load_pbx_hangup_handler | ( | void | ) |
Provided by pbx_hangup_handler.c
Definition at line 288 of file pbx_hangup_handler.c.
References ast_cli_register_multiple, and ast_register_cleanup().
|
static |
Definition at line 278 of file pbx_hangup_handler.c.