Asterisk - The Open Source Telephony Project
18.5.0
|
Originate calls via the CLI. More...
#include "asterisk.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/cli.h"
#include "asterisk/utils.h"
#include "asterisk/frame.h"
#include "asterisk/format_cache.h"
Go to the source code of this file.
Macros | |
#define | TIMEOUT 30 |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static char * | handle_orig (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
handle for orgination app or exten. More... | |
static char * | handle_redirect (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static int | load_module (void) |
static char * | orig_app (int fd, const char *chan, const char *app, const char *appdata) |
orginate a call from the CLI More... | |
static char * | orig_exten (int fd, const char *chan, const char *data) |
orginate from extension More... | |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Call origination and redirection from the CLI" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "30ef0c93b36035ec78c9cfd712d36d9b" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_cli_entry | cli_cliorig [] |
Originate calls via the CLI.
Definition in file res_clioriginate.c.
#define TIMEOUT 30 |
The timeout for originated calls, in seconds
Definition at line 42 of file res_clioriginate.c.
Referenced by orig_app(), and orig_exten().
|
static |
Definition at line 249 of file res_clioriginate.c.
|
static |
Definition at line 249 of file res_clioriginate.c.
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 249 of file res_clioriginate.c.
|
static |
handle for orgination app or exten.
e | pointer to the CLI structure to initialize |
cmd | operation to execute |
a | structure that contains either application or extension arguments |
CLI_SUCCESS | on success. |
CLI_SHOWUSAGE | on failure. |
Definition at line 136 of file res_clioriginate.c.
References ast_cli_args::argv, ast_cli_complete(), ast_complete_applications(), ast_strlen_zero, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, ast_cli_entry::command, ast_cli_args::fd, ast_cli_args::line, ast_cli_args::n, NULL, orig_app(), orig_exten(), ast_cli_args::pos, ast_cli_entry::usage, and ast_cli_args::word.
|
static |
Definition at line 185 of file res_clioriginate.c.
References ast_cli_args::argc, ast_cli_entry::args, ast_cli_args::argv, ast_async_parseable_goto(), ast_channel_get_by_name(), ast_channel_unref, ast_cli(), ast_complete_channels(), CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, ast_cli_args::line, ast_cli_args::n, name, NULL, ast_cli_args::pos, ast_cli_entry::usage, and ast_cli_args::word.
|
static |
Definition at line 242 of file res_clioriginate.c.
References ARRAY_LEN, ast_cli_register_multiple, AST_MODULE_LOAD_DECLINE, and AST_MODULE_LOAD_SUCCESS.
|
static |
orginate a call from the CLI
fd | file descriptor for cli |
chan | channel to create type/data |
app | application you want to run |
appdata | data for application |
CLI_SUCCESS | on success. |
CLI_SHOWUSAGE | on failure. |
Definition at line 53 of file res_clioriginate.c.
References ao2_ref, ast_cli(), ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_slin, AST_OUTGOING_NO_WAIT, ast_pbx_outgoing_app(), ast_strdupa, ast_strlen_zero, CLI_FAILURE, CLI_SHOWUSAGE, CLI_SUCCESS, NULL, strsep(), and TIMEOUT.
Referenced by handle_orig().
|
static |
orginate from extension
fd | file descriptor for cli |
chan | channel to create type/data |
data | contains exten@context |
CLI_SUCCESS | on success. |
CLI_SHOWUSAGE | on failure. |
Definition at line 91 of file res_clioriginate.c.
References ao2_ref, ast_cli(), ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_slin, AST_OUTGOING_NO_WAIT, ast_pbx_outgoing_exten(), ast_strdupa, ast_strlen_zero, CLI_FAILURE, CLI_SHOWUSAGE, CLI_SUCCESS, context, exten, NULL, strsep(), and TIMEOUT.
Referenced by gosub_exec(), and handle_orig().
|
static |
Definition at line 237 of file res_clioriginate.c.
References ARRAY_LEN, and ast_cli_unregister_multiple().
|
static |
Definition at line 249 of file res_clioriginate.c.
|
static |
Definition at line 249 of file res_clioriginate.c.
|
static |
Definition at line 232 of file res_clioriginate.c.