Asterisk - The Open Source Telephony Project
18.5.0
|
Party ID related dialplan functions (Caller-ID, Connected-line, Redirecting) More...
#include "asterisk.h"
#include "asterisk/module.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/utils.h"
#include "asterisk/app.h"
#include "asterisk/callerid.h"
Go to the source code of this file.
Data Structures | |
struct | __subtype_ast_party_func_args |
struct | __subtype_ast_party_members |
struct | ast_party_func_args |
struct | ast_party_members |
Enumerations | |
enum | CONNECTED_LINE_OPT_ARGS { CONNECTED_LINE_OPT_DUMMY, CONNECTED_LINE_OPT_ARG_ARRAY_SIZE } |
enum | CONNECTED_LINE_OPT_FLAGS { CONNECTED_LINE_OPT_INHIBIT = (1 << 0) } |
enum | ID_FIELD_STATUS { ID_FIELD_VALID, ID_FIELD_INVALID, ID_FIELD_UNKNOWN } |
enum | REDIRECTING_OPT_ARGS { REDIRECTING_OPT_DUMMY, REDIRECTING_OPT_ARG_ARRAY_SIZE } |
enum | REDIRECTING_OPT_FLAGS { REDIRECTING_OPT_INHIBIT = (1 << 0) } |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | callerid_read (struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) |
static int | callerid_write (struct ast_channel *chan, const char *cmd, char *data, const char *value) |
static int | connectedline_read (struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) |
static int | connectedline_write (struct ast_channel *chan, const char *cmd, char *data, const char *value) |
static int | load_module (void) |
static enum ID_FIELD_STATUS | party_id_read (char *buf, size_t len, int argc, char *argv[], const struct ast_party_id *id) |
static enum ID_FIELD_STATUS | party_id_write (struct ast_party_id *id, int argc, char *argv[], const char *value) |
static enum ID_FIELD_STATUS | party_name_read (char *buf, size_t len, int argc, char *argv[], const struct ast_party_name *name) |
static enum ID_FIELD_STATUS | party_name_write (struct ast_party_name *name, int argc, char *argv[], const char *value) |
static enum ID_FIELD_STATUS | party_number_read (char *buf, size_t len, int argc, char *argv[], const struct ast_party_number *number) |
static enum ID_FIELD_STATUS | party_number_write (struct ast_party_number *number, int argc, char *argv[], const char *value) |
static enum ID_FIELD_STATUS | party_subaddress_read (char *buf, size_t len, int argc, char *argv[], const struct ast_party_subaddress *subaddress) |
static enum ID_FIELD_STATUS | party_subaddress_write (struct ast_party_subaddress *subaddress, int argc, char *argv[], const char *value) |
static int | redirecting_read (struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) |
static int | redirecting_write (struct ast_channel *chan, const char *cmd, char *data, const char *value) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Party ID related dialplan functions (Caller-ID, Connected-line, Redirecting)" , .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_custom_function | callerid_function |
static struct ast_custom_function | connectedline_function |
static const struct ast_app_option | connectedline_opts [128] = { [ 'i' ] = { .flag = CONNECTED_LINE_OPT_INHIBIT }, } |
static struct ast_custom_function | redirecting_function |
static const struct ast_app_option | redirecting_opts [128] = { [ 'i' ] = { .flag = REDIRECTING_OPT_INHIBIT }, } |
Party ID related dialplan functions (Caller-ID, Connected-line, Redirecting)
See Also:
Definition in file func_callerid.c.
Enumerator | |
---|---|
CONNECTED_LINE_OPT_DUMMY | Delete this if CONNECTED_LINE ever gets an option with parameters. |
CONNECTED_LINE_OPT_ARG_ARRAY_SIZE |
|
Definition at line 454 of file func_callerid.c.
Enumerator | |
---|---|
CONNECTED_LINE_OPT_INHIBIT |
Definition at line 451 of file func_callerid.c.
enum ID_FIELD_STATUS |
Enumerator | |
---|---|
ID_FIELD_VALID | |
ID_FIELD_INVALID | |
ID_FIELD_UNKNOWN |
Definition at line 435 of file func_callerid.c.
enum REDIRECTING_OPT_ARGS |
Enumerator | |
---|---|
REDIRECTING_OPT_DUMMY | Delete this if REDIRECTING ever gets an option with parameters. |
REDIRECTING_OPT_ARG_ARRAY_SIZE |
|
Definition at line 468 of file func_callerid.c.
Enumerator | |
---|---|
REDIRECTING_OPT_INHIBIT |
Definition at line 465 of file func_callerid.c.
|
static |
Definition at line 1831 of file func_callerid.c.
|
static |
Definition at line 1831 of file func_callerid.c.
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 1831 of file func_callerid.c.
|
static |
< Member name
< Optional caller id to parse instead of from the channel.
< Member name
< Optional caller id to parse instead of from the channel.
Definition at line 930 of file func_callerid.c.
References ast_party_members::argc, args, ARRAY_LEN, AST_APP_ARG, ast_callerid_split(), ast_channel_caller(), ast_channel_dialed(), ast_channel_lock, ast_channel_redirecting(), ast_channel_unlock, ast_copy_string(), AST_DECLARE_APP_ARGS, ast_log, AST_NONSTANDARD_APP_ARGS, AST_STANDARD_APP_ARGS, ast_strdupa, ID_FIELD_INVALID, ID_FIELD_VALID, LOG_ERROR, name, party_id_read(), party_subaddress_read(), status, and ast_party_members::subnames.
|
static |
Definition at line 1083 of file func_callerid.c.
References ast_party_caller::ani, ast_party_caller::ani2, ast_party_func_args::argc, ast_party_members::argc, ARRAY_LEN, ast_channel_caller(), ast_channel_dialed(), ast_channel_lock, ast_channel_redirecting(), ast_channel_set_caller_event(), ast_channel_unlock, ast_free, ast_log, AST_NONSTANDARD_APP_ARGS, ast_party_caller_free(), ast_party_caller_set(), ast_party_caller_set_init(), ast_party_dialed_free(), ast_party_dialed_set(), ast_party_dialed_set_init(), ast_skip_blanks(), AST_STANDARD_APP_ARGS, ast_strdup, ast_strdupa, ast_trim_blanks(), ast_party_redirecting::from, ast_party_caller::id, ID_FIELD_INVALID, ID_FIELD_VALID, LOG_ERROR, ast_party_func_args::member, NULL, ast_party_id::number, ast_party_dialed::number, party_id_write(), party_subaddress_write(), ast_party_dialed::plan, ast_party_caller::priv, status, ast_party_number::str, ast_party_dialed::str, ast_party_dialed::subaddress, ast_party_members::subnames, and ast_party_number::valid.
|
static |
Definition at line 1244 of file func_callerid.c.
References ast_party_members::argc, ARRAY_LEN, ast_channel_connected(), ast_channel_lock, ast_channel_unlock, ast_connected_line_source_name(), ast_copy_string(), ast_log, AST_NONSTANDARD_APP_ARGS, ast_strdupa, ID_FIELD_INVALID, ID_FIELD_VALID, LOG_ERROR, party_id_read(), status, and ast_party_members::subnames.
|
static |
Definition at line 1308 of file func_callerid.c.
References ast_party_func_args::argc, ast_party_members::argc, ARRAY_LEN, ast_app_parse_options(), ast_channel_connected(), ast_channel_lock, ast_channel_set_connected_line(), ast_channel_unlock, ast_channel_update_connected_line(), ast_connected_line_source_parse(), ast_log, AST_NONSTANDARD_APP_ARGS, ast_party_connected_line_free(), ast_party_connected_line_set_init(), ast_skip_blanks(), AST_STANDARD_APP_ARGS, ast_strdupa, ast_test_flag, ast_trim_blanks(), connected, CONNECTED_LINE_OPT_ARG_ARRAY_SIZE, CONNECTED_LINE_OPT_INHIBIT, connectedline_opts, ast_party_connected_line::id, ID_FIELD_INVALID, ID_FIELD_VALID, LOG_ERROR, ast_party_func_args::member, NULL, ast_party_func_args::opts, party_id_write(), ast_party_connected_line::priv, ast_party_connected_line::source, status, ast_party_members::subnames, and update().
|
static |
Definition at line 1814 of file func_callerid.c.
References ast_custom_function_register, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, and unload_module().
|
static |
Definition at line 609 of file func_callerid.c.
References ast_copy_string(), ast_named_caller_presentation(), ast_party_id_presentation(), ID_FIELD_UNKNOWN, ID_FIELD_VALID, ast_party_id::name, ast_party_id::number, party_name_read(), party_number_read(), party_subaddress_read(), ast_party_number::plan, S_COR, status, ast_party_name::str, ast_party_number::str, ast_party_id::subaddress, ast_party_id::tag, ast_party_name::valid, and ast_party_number::valid.
Referenced by callerid_read(), connectedline_read(), and redirecting_read().
|
static |
Definition at line 844 of file func_callerid.c.
References ast_callerid_split(), ast_log, ast_parse_caller_presentation(), ast_strdup, ast_strdupa, ast_trim_blanks(), ID_FIELD_INVALID, ID_FIELD_UNKNOWN, ID_FIELD_VALID, LOG_ERROR, name, ast_party_id::name, ast_party_id::number, party_name_write(), party_number_write(), party_subaddress_write(), status, ast_party_name::str, ast_party_number::str, ast_party_id::subaddress, and ast_party_id::tag.
Referenced by callerid_write(), connectedline_write(), and redirecting_write().
|
static |
Definition at line 493 of file func_callerid.c.
References ast_copy_string(), ast_named_caller_presentation(), ast_party_name_charset_str(), ast_party_name::char_set, ID_FIELD_UNKNOWN, ID_FIELD_VALID, ast_party_name::presentation, status, ast_party_name::str, and ast_party_name::valid.
Referenced by party_id_read().
|
static |
Definition at line 667 of file func_callerid.c.
References ast_log, ast_parse_caller_presentation(), ast_party_name_charset_parse(), ast_strdup, ast_strdupa, ast_trim_blanks(), ast_party_name::char_set, ID_FIELD_INVALID, ID_FIELD_UNKNOWN, ID_FIELD_VALID, LOG_ERROR, ast_party_name::presentation, status, ast_party_name::str, and ast_party_name::valid.
Referenced by party_id_write().
|
static |
Definition at line 532 of file func_callerid.c.
References ast_copy_string(), ast_named_caller_presentation(), ID_FIELD_UNKNOWN, ID_FIELD_VALID, ast_party_number::plan, ast_party_number::presentation, status, ast_party_number::str, and ast_party_number::valid.
Referenced by party_id_read().
|
static |
Definition at line 741 of file func_callerid.c.
References ast_log, ast_parse_caller_presentation(), ast_strdup, ast_strdupa, ast_trim_blanks(), ID_FIELD_INVALID, ID_FIELD_UNKNOWN, ID_FIELD_VALID, LOG_ERROR, ast_party_number::plan, ast_party_number::presentation, status, ast_party_number::str, and ast_party_number::valid.
Referenced by party_id_write().
|
static |
Definition at line 571 of file func_callerid.c.
References ast_copy_string(), ID_FIELD_UNKNOWN, ID_FIELD_VALID, ast_party_subaddress::odd_even_indicator, status, ast_party_subaddress::str, ast_party_subaddress::type, and ast_party_subaddress::valid.
Referenced by callerid_read(), and party_id_read().
|
static |
Definition at line 807 of file func_callerid.c.
References ast_strdup, ast_trim_blanks(), ID_FIELD_UNKNOWN, ID_FIELD_VALID, ast_party_subaddress::odd_even_indicator, status, ast_party_subaddress::str, ast_party_subaddress::type, and ast_party_subaddress::valid.
Referenced by callerid_write(), and party_id_write().
|
static |
Definition at line 1417 of file func_callerid.c.
References ast_party_members::argc, ARRAY_LEN, ast_channel_lock, ast_channel_redirecting(), ast_channel_unlock, ast_copy_string(), ast_log, ast_named_caller_presentation(), AST_NONSTANDARD_APP_ARGS, ast_party_id_presentation(), ast_redirecting_reason_name(), ast_strdupa, ast_party_redirecting::count, ast_party_redirecting::from, ID_FIELD_INVALID, ID_FIELD_VALID, LOG_ERROR, ast_party_redirecting::orig, ast_party_redirecting::orig_reason, party_id_read(), ast_party_redirecting::priv_from, ast_party_redirecting::priv_orig, ast_party_redirecting::priv_to, ast_party_redirecting::reason, status, ast_party_members::subnames, and ast_party_redirecting::to.
|
static |
Definition at line 1549 of file func_callerid.c.
References ast_party_func_args::argc, ast_party_members::argc, ARRAY_LEN, ast_app_parse_options(), ast_channel_lock, ast_channel_redirecting(), ast_channel_set_redirecting(), ast_channel_unlock, ast_channel_update_redirecting(), ast_log, AST_NONSTANDARD_APP_ARGS, ast_parse_caller_presentation(), ast_party_redirecting_free(), ast_party_redirecting_set_init(), ast_redirecting_reason_parse(), AST_REDIRECTING_REASON_UNKNOWN, ast_skip_blanks(), AST_STANDARD_APP_ARGS, ast_strdupa, ast_test_flag, ast_trim_blanks(), ast_party_redirecting_reason::code, ast_party_redirecting::count, ast_party_redirecting::from, ID_FIELD_INVALID, ID_FIELD_VALID, LOG_ERROR, ast_party_func_args::member, ast_party_id::name, NULL, ast_party_id::number, ast_party_func_args::opts, ast_party_redirecting::orig, ast_party_redirecting::orig_reason, party_id_write(), ast_party_name::presentation, ast_party_number::presentation, ast_party_redirecting::priv_from, ast_party_redirecting::priv_orig, ast_party_redirecting::priv_to, ast_party_redirecting::reason, REDIRECTING_OPT_ARG_ARRAY_SIZE, REDIRECTING_OPT_INHIBIT, redirecting_opts, status, ast_party_redirecting_reason::str, ast_party_members::subnames, ast_party_redirecting::to, and update().
|
static |
Definition at line 1799 of file func_callerid.c.
References ast_custom_function_unregister().
Referenced by load_module().
|
static |
Definition at line 1831 of file func_callerid.c.
|
static |
Definition at line 1831 of file func_callerid.c.
|
static |
Definition at line 1773 of file func_callerid.c.
|
static |
Definition at line 1780 of file func_callerid.c.
|
static |
Definition at line 463 of file func_callerid.c.
Referenced by connectedline_write().
|
static |
Definition at line 1786 of file func_callerid.c.
|
static |
Definition at line 477 of file func_callerid.c.
Referenced by redirecting_write().