Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
#include "asterisk.h"
#include "asterisk/config.h"
#include "asterisk/cli.h"
#include "asterisk/module.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/strings.h"
#include "asterisk/utils.h"
#include "asterisk/app.h"
#include "geoloc_private.h"
Go to the source code of this file.
Macros | |
#define | RESOLVE_FOR_READ(_param) |
#define | RESOLVE_FOR_WRITE(_param) |
#define | TEST_ENUM_VALUE(_chan_name, _ep, _field, _value) |
#define | TEST_VARLIST(_chan_name, _ep, _field, _value) |
#define | VAR_LIST_REPLACE(_old, _new) |
Enumerations | |
enum | my_app_option_flags { OPT_GEOLOC_RESOLVE = (1 << 0) , OPT_GEOLOC_APPEND = (1 << 1) } |
Functions | |
int | geoloc_dialplan_load (void) |
int | geoloc_dialplan_reload (void) |
int | geoloc_dialplan_unload (void) |
static int | geoloc_profile_read (struct ast_channel *chan, const char *cmd, char *data, struct ast_str **buf, ssize_t len) |
static int | geoloc_profile_write (struct ast_channel *chan, const char *cmd, char *data, const char *value) |
static void | varlist_to_str (struct ast_variable *list, struct ast_str **buf, size_t len) |
Variables | |
static const struct ast_app_option | action_options [128] = { [ 'r' ] = { .flag = OPT_GEOLOC_RESOLVE }, [ 'a' ] = { .flag = OPT_GEOLOC_APPEND }, } |
static struct ast_custom_function | geoloc_function |
#define RESOLVE_FOR_READ | ( | _param | ) |
Definition at line 39 of file geoloc_dialplan.c.
#define RESOLVE_FOR_WRITE | ( | _param | ) |
Definition at line 208 of file geoloc_dialplan.c.
#define TEST_ENUM_VALUE | ( | _chan_name, | |
_ep, | |||
_field, | |||
_value | |||
) |
Definition at line 179 of file geoloc_dialplan.c.
#define TEST_VARLIST | ( | _chan_name, | |
_ep, | |||
_field, | |||
_value | |||
) |
Definition at line 191 of file geoloc_dialplan.c.
#define VAR_LIST_REPLACE | ( | _old, | |
_new | |||
) |
Definition at line 175 of file geoloc_dialplan.c.
enum my_app_option_flags |
Enumerator | |
---|---|
OPT_GEOLOC_RESOLVE | |
OPT_GEOLOC_APPEND |
Definition at line 56 of file geoloc_dialplan.c.
int geoloc_dialplan_load | ( | void | ) |
Definition at line 363 of file geoloc_dialplan.c.
References ast_custom_function_register, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, and geoloc_function.
Referenced by load_module().
int geoloc_dialplan_reload | ( | void | ) |
Definition at line 372 of file geoloc_dialplan.c.
References AST_MODULE_LOAD_SUCCESS.
Referenced by reload_module().
int geoloc_dialplan_unload | ( | void | ) |
Definition at line 356 of file geoloc_dialplan.c.
References ast_custom_function_unregister(), AST_MODULE_LOAD_SUCCESS, and geoloc_function.
Referenced by unload_module().
|
static |
Definition at line 67 of file geoloc_dialplan.c.
References action_options, ast_geoloc_eprofile::allow_routing_use, ao2_ref, args, AST_APP_ARG, ast_app_parse_options(), ast_channel_name(), AST_DECLARE_APP_ARGS, ast_geoloc_datastore_find(), ast_geoloc_datastore_get_eprofile(), ast_geoloc_eprofile_dup(), ast_geoloc_eprofile_refresh_location(), ast_log, AST_STANDARD_APP_ARGS, ast_str_append(), ast_strdupa, ast_strings_equal(), ast_strlen_zero(), buf, ast_geoloc_eprofile::confidence, ast_geoloc_eprofile::effective_location, ast_geoloc_eprofile::format, ast_geoloc_eprofile::id, ast_datastore::inheritance, len(), ast_geoloc_eprofile::location_reference, ast_geoloc_eprofile::location_source, LOG_ERROR, LOG_NOTICE, ast_geoloc_eprofile::method, ast_geoloc_eprofile::notes, NULL, options, pbx_builtin_setvar_helper(), ast_geoloc_eprofile::pidf_element, ast_geoloc_eprofile::precedence, RESOLVE_FOR_READ, ast_geoloc_eprofile::suppress_empty_ca_elements, and varlist_to_str().
|
static |
Definition at line 222 of file geoloc_dialplan.c.
References action_options, ao2_cleanup, args, AST_APP_ARG, ast_app_parse_options(), ast_channel_datastore_add(), ast_channel_name(), ast_debug, AST_DECLARE_APP_ARGS, ast_geoloc_datastore_add_eprofile(), ast_geoloc_datastore_create(), ast_geoloc_datastore_find(), ast_geoloc_datastore_get_eprofile(), ast_geoloc_datastore_set_inheritance(), ast_geoloc_eprofile_alloc(), ast_geoloc_eprofile_refresh_location(), ast_geoloc_get_location(), ast_log, AST_STANDARD_APP_ARGS, ast_strdupa, ast_string_field_set, ast_strings_equal(), ast_strlen_zero(), ast_test_flag, ast_true(), ast_geoloc_location::confidence, ast_geoloc_location::format, ast_geoloc_location::location_info, ast_geoloc_location::location_source, LOG_ERROR, LOG_WARNING, method, notes, NULL, OPT_GEOLOC_APPEND, OPT_GEOLOC_RESOLVE, options, pbx_builtin_setvar_helper(), RAII_VAR, RESOLVE_FOR_WRITE, TEST_ENUM_VALUE, TEST_VARLIST, and value.
|
static |
Definition at line 30 of file geoloc_dialplan.c.
References ast_str_append(), buf, len(), and var.
Referenced by geoloc_profile_read().
|
static |
Definition at line 64 of file geoloc_dialplan.c.
Referenced by geoloc_profile_read(), and geoloc_profile_write().
|
static |
Definition at line 350 of file geoloc_dialplan.c.
Referenced by geoloc_dialplan_load(), and geoloc_dialplan_unload().