Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
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 = AST_BUILDOPT_SUM, .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 471 of file func_callerid.c.
Enumerator | |
---|---|
CONNECTED_LINE_OPT_INHIBIT |
Definition at line 468 of file func_callerid.c.
enum ID_FIELD_STATUS |
Enumerator | |
---|---|
ID_FIELD_VALID | |
ID_FIELD_INVALID | |
ID_FIELD_UNKNOWN |
Definition at line 452 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 485 of file func_callerid.c.
Enumerator | |
---|---|
REDIRECTING_OPT_INHIBIT |
Definition at line 482 of file func_callerid.c.
|
static |
Definition at line 1850 of file func_callerid.c.
|
static |
Definition at line 1850 of file func_callerid.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 1850 of file func_callerid.c.
|
static |
< Member name
< Optional caller id to parse instead of from the channel.
Definition at line 947 of file func_callerid.c.
References 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, buf, ID_FIELD_INVALID, ID_FIELD_VALID, len(), LOG_ERROR, name, party_id_read(), party_subaddress_read(), and status.
|
static |
Definition at line 1100 of file func_callerid.c.
References ast_party_caller::ani, ast_party_caller::ani2, args, 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, 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_number::valid, and value.
|
static |
Definition at line 1261 of file func_callerid.c.
References 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, buf, ID_FIELD_INVALID, ID_FIELD_VALID, len(), LOG_ERROR, party_id_read(), and status.
|
static |
Definition at line 1325 of file func_callerid.c.
References args, 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, ID_FIELD_INVALID, ID_FIELD_VALID, LOG_ERROR, NULL, party_id_write(), status, update(), and value.
|
static |
Definition at line 1833 of file func_callerid.c.
References ast_custom_function_register, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, callerid_function, connectedline_function, redirecting_function, and unload_module().
|
static |
Definition at line 626 of file func_callerid.c.
References ast_copy_string(), ast_named_caller_presentation(), ast_party_id_presentation(), buf, id, ID_FIELD_UNKNOWN, ID_FIELD_VALID, len(), party_name_read(), party_number_read(), party_subaddress_read(), S_COR, and status.
Referenced by callerid_read(), connectedline_read(), and redirecting_read().
|
static |
Definition at line 861 of file func_callerid.c.
References ast_callerid_split(), ast_log, ast_parse_caller_presentation(), ast_strdup, ast_strdupa, ast_trim_blanks(), id, ID_FIELD_INVALID, ID_FIELD_UNKNOWN, ID_FIELD_VALID, LOG_ERROR, name, party_name_write(), party_number_write(), party_subaddress_write(), status, and value.
Referenced by callerid_write(), connectedline_write(), and redirecting_write().
|
static |
Definition at line 510 of file func_callerid.c.
References ast_copy_string(), ast_named_caller_presentation(), ast_party_name_charset_str(), buf, ID_FIELD_UNKNOWN, ID_FIELD_VALID, len(), name, and status.
Referenced by party_id_read().
|
static |
Definition at line 684 of file func_callerid.c.
References ast_log, ast_parse_caller_presentation(), ast_party_name_charset_parse(), ast_strdup, ast_strdupa, ast_trim_blanks(), ID_FIELD_INVALID, ID_FIELD_UNKNOWN, ID_FIELD_VALID, LOG_ERROR, name, status, and value.
Referenced by party_id_write().
|
static |
Definition at line 549 of file func_callerid.c.
References ast_copy_string(), ast_named_caller_presentation(), buf, ID_FIELD_UNKNOWN, ID_FIELD_VALID, len(), and status.
Referenced by party_id_read().
|
static |
Definition at line 758 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, status, and value.
Referenced by party_id_write().
|
static |
Definition at line 588 of file func_callerid.c.
References ast_copy_string(), buf, ID_FIELD_UNKNOWN, ID_FIELD_VALID, len(), 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 824 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, ast_party_subaddress::valid, and value.
Referenced by callerid_write(), and party_id_write().
|
static |
Definition at line 1434 of file func_callerid.c.
References 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, buf, ast_party_redirecting::count, ast_party_redirecting::from, ID_FIELD_INVALID, ID_FIELD_VALID, len(), 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, and ast_party_redirecting::to.
|
static |
Definition at line 1566 of file func_callerid.c.
References args, 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, LOG_WARNING, ast_party_id::name, NULL, ast_party_id::number, 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_redirecting::to, update(), and value.
|
static |
Definition at line 1818 of file func_callerid.c.
References ast_custom_function_unregister(), callerid_function, connectedline_function, and redirecting_function.
Referenced by load_module().
|
static |
Definition at line 1850 of file func_callerid.c.
|
static |
Definition at line 1850 of file func_callerid.c.
|
static |
Definition at line 1792 of file func_callerid.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 1799 of file func_callerid.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 480 of file func_callerid.c.
Referenced by connectedline_write().
|
static |
Definition at line 1805 of file func_callerid.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 494 of file func_callerid.c.
Referenced by redirecting_write().