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 | 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) |
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 | callerpres_read (struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) |
static int | callerpres_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 = "ac1f6a56484a8820659555499174e588" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, } |
static struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_custom_function | callerid_function |
static int | callerpres_deprecate_notify |
static struct ast_custom_function | callerpres_function |
static struct ast_custom_function | connectedline_function |
static struct ast_app_option | connectedline_opts [128] = { [ 'i' ] = { .flag = CONNECTED_LINE_OPT_INHIBIT }, } |
static struct ast_custom_function | redirecting_function |
static 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 334 of file func_callerid.c.
Enumerator | |
---|---|
CONNECTED_LINE_OPT_INHIBIT |
Definition at line 331 of file func_callerid.c.
enum ID_FIELD_STATUS |
Enumerator | |
---|---|
ID_FIELD_VALID | |
ID_FIELD_INVALID | |
ID_FIELD_UNKNOWN |
Definition at line 315 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 348 of file func_callerid.c.
Enumerator | |
---|---|
REDIRECTING_OPT_INHIBIT |
Definition at line 345 of file func_callerid.c.
|
static |
Definition at line 1610 of file func_callerid.c.
|
static |
Definition at line 1610 of file func_callerid.c.
|
static |
< Member name
< Optional caller id to parse instead of from the channel.
Definition at line 880 of file func_callerid.c.
References ast_party_caller::ani, ast_party_caller::ani2, ast_party_members::argc, args, ast_party_members::argv, ARRAY_LEN, AST_APP_ARG, ast_callerid_split(), ast_channel_lock, ast_channel_unlock, ast_copy_string(), AST_DECLARE_APP_ARGS, ast_log(), AST_NONSTANDARD_APP_ARGS, AST_STANDARD_APP_ARGS, ast_strdupa, ast_channel::caller, ast_channel::dialed, ast_party_redirecting::from, ast_party_caller::id, ID_FIELD_INVALID, ID_FIELD_VALID, LOG_ERROR, name, ast_party_id::number, ast_party_dialed::number, party_id_read(), party_subaddress_read(), ast_party_dialed::plan, ast_channel::redirecting, 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 1022 of file func_callerid.c.
References ast_party_caller::ani, ast_party_caller::ani2, ast_party_func_args::argc, ast_party_members::argc, ast_party_members::argv, ARRAY_LEN, ast_cdr_setcid(), ast_channel_lock, 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_channel::caller, ast_channel::cdr, ast_channel::dialed, ast_party_redirecting::from, ast_party_caller::id, ID_FIELD_INVALID, ID_FIELD_VALID, LOG_ERROR, ast_party_func_args::member, ast_party_id::number, ast_party_dialed::number, party_id_write(), party_subaddress_write(), ast_party_dialed::plan, ast_channel::redirecting, 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 813 of file func_callerid.c.
References ast_copy_string(), ast_log(), ast_named_caller_presentation(), ast_party_id_presentation(), ast_channel::caller, ast_party_caller::id, and LOG_WARNING.
|
static |
Definition at line 842 of file func_callerid.c.
References ast_log(), ast_parse_caller_presentation(), ast_channel::caller, ast_party_caller::id, LOG_WARNING, ast_party_id::name, ast_party_id::number, ast_party_name::presentation, and ast_party_number::presentation.
|
static |
Definition at line 1190 of file func_callerid.c.
References ast_party_members::argc, ast_party_members::argv, ARRAY_LEN, ast_channel_lock, ast_channel_unlock, ast_connected_line_source_name(), ast_copy_string(), ast_log(), AST_NONSTANDARD_APP_ARGS, ast_strdupa, ast_channel::connected, ast_party_connected_line::id, ID_FIELD_INVALID, ID_FIELD_VALID, LOG_ERROR, party_id_read(), ast_party_connected_line::source, status, and ast_party_members::subnames.
|
static |
Definition at line 1243 of file func_callerid.c.
References ast_party_func_args::argc, ast_party_members::argc, ast_party_members::argv, ARRAY_LEN, ast_app_parse_options(), 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, ast_channel::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, ast_party_func_args::opts, party_id_write(), ast_party_connected_line::source, status, ast_party_members::subnames, and update().
|
static |
Definition at line 1598 of file func_callerid.c.
References ast_custom_function_register, AST_MODULE_LOAD_DECLINE, and AST_MODULE_LOAD_SUCCESS.
|
static |
Definition at line 489 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 724 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 373 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 547 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 412 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 621 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 451 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 687 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 1339 of file func_callerid.c.
References ast_party_members::argc, ast_party_members::argv, ARRAY_LEN, ast_channel_lock, 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, party_id_read(), ast_party_redirecting::reason, ast_channel::redirecting, status, ast_party_members::subnames, and ast_party_redirecting::to.
|
static |
Definition at line 1416 of file func_callerid.c.
References ast_party_func_args::argc, ast_party_members::argc, ast_party_members::argv, ARRAY_LEN, ast_app_parse_options(), ast_channel_lock, 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_skip_blanks(), AST_STANDARD_APP_ARGS, ast_strdupa, ast_test_flag, ast_trim_blanks(), 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, ast_party_id::number, ast_party_func_args::opts, party_id_write(), ast_party_name::presentation, ast_party_number::presentation, ast_party_redirecting::reason, ast_channel::redirecting, REDIRECTING_OPT_ARG_ARRAY_SIZE, REDIRECTING_OPT_INHIBIT, redirecting_opts, status, ast_party_members::subnames, ast_party_redirecting::to, and update().
|
static |
Definition at line 1580 of file func_callerid.c.
References ast_custom_function_unregister().
|
static |
Definition at line 1610 of file func_callerid.c.
|
static |
Definition at line 1610 of file func_callerid.c.
|
static |
Definition at line 1547 of file func_callerid.c.
|
static |
TRUE if we have already notified about CALLERPRES being deprecated.
Definition at line 798 of file func_callerid.c.
|
static |
Definition at line 1554 of file func_callerid.c.
|
static |
Definition at line 1561 of file func_callerid.c.
|
static |
Definition at line 343 of file func_callerid.c.
Referenced by connectedline_write().
|
static |
Definition at line 1567 of file func_callerid.c.
|
static |
Definition at line 357 of file func_callerid.c.
Referenced by redirecting_write().