Asterisk - The Open Source Telephony Project GIT-master-d856a3e
|
PJSIP Phoneprov Configuration Provider. More...
#include "asterisk.h"
#include <pjsip.h>
#include "asterisk/res_pjsip.h"
#include "asterisk/module.h"
#include "asterisk/sorcery.h"
#include "asterisk/phoneprov.h"
#include "res_pjsip/include/res_pjsip_private.h"
Go to the source code of this file.
Data Structures | |
struct | phoneprov |
Structure for a phoneprov object. More... | |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | aco_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Adds a config name/value pair to the phoneprov object. More... | |
static int | assign_and_insert (const char *name, const char *value, struct varshead *vars) |
Helper that creates an ast_var_t and inserts it into the list. More... | |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | fields_handler (const void *obj, struct ast_variable **fields) |
Converts the phoneprov varlist to an ast_variable list. More... | |
static int | load_endpoint (const char *id, const char *endpoint_name, struct varshead *vars, char *port_string) |
static int | load_module (void) |
static int | load_users (void) |
Callback that loads the users from phoneprov sections. More... | |
static void * | phoneprov_alloc (const char *name) |
Allocator for phoneprov. More... | |
static void | phoneprov_destroy (void *obj) |
Destructor function for phoneprov. More... | |
static int | reload_module (void) |
static int | unload_module (void) |
static void | users_apply_handler (struct phoneprov *pp) |
Callback that validates the phoneprov object. More... | |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "PJSIP Phoneprov Provider" , .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, .support_level = AST_MODULE_SUPPORT_EXTENDED, .load = load_module, .reload = reload_module, .unload = unload_module, .load_pri = AST_MODPRI_APP_DEPEND, .requires = "res_pjsip,res_phoneprov", } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_sorcery * | sorcery |
PJSIP Phoneprov Configuration Provider.
Definition in file res_pjsip_phoneprov_provider.c.
|
static |
Definition at line 420 of file res_pjsip_phoneprov_provider.c.
|
static |
Definition at line 420 of file res_pjsip_phoneprov_provider.c.
|
static |
Adds a config name/value pair to the phoneprov object.
Definition at line 187 of file res_pjsip_phoneprov_provider.c.
References assign_and_insert(), var, and phoneprov::vars.
Referenced by load_module().
|
static |
Helper that creates an ast_var_t and inserts it into the list.
Definition at line 163 of file res_pjsip_phoneprov_provider.c.
References ast_log, ast_strlen_zero(), ast_var_assign, AST_VAR_LIST_INSERT_TAIL(), LOG_ERROR, name, value, and var.
Referenced by aco_handler(), load_endpoint(), and users_apply_handler().
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 420 of file res_pjsip_phoneprov_provider.c.
|
static |
Converts the phoneprov varlist to an ast_variable list.
Definition at line 195 of file res_pjsip_phoneprov_provider.c.
References AST_VAR_LIST_TRAVERSE, ast_variable_new, ast_variables_destroy(), ast_var_t::name, ast_variable::next, NULL, ast_var_t::value, var, and phoneprov::vars.
Referenced by load_module().
|
static |
Definition at line 223 of file res_pjsip_phoneprov_provider.c.
References ao2_cleanup, ao2_ref, assign_and_insert(), ast_log, AST_PHONEPROV_STD_CALLERID, AST_PHONEPROV_STD_DISPLAY_NAME, AST_PHONEPROV_STD_SECRET, AST_PHONEPROV_STD_USERNAME, ast_phoneprov_std_variable_lookup(), ast_sorcery_retrieve_by_id(), ast_strlen_zero(), AST_VECTOR_GET, AST_VECTOR_SIZE, ast_sip_auth::auth_pass, ast_sip_auth::auth_user, LOG_ERROR, NULL, RAII_VAR, and sorcery.
Referenced by users_apply_handler().
|
static |
Definition at line 368 of file res_pjsip_phoneprov_provider.c.
References aco_handler(), ast_log, AST_MODULE, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_phoneprov_provider_register(), ast_sip_get_sorcery(), ast_sorcery_apply_config, ast_sorcery_apply_default, ast_sorcery_load_object(), ast_sorcery_object_field_register, ast_sorcery_object_fields_register(), ast_sorcery_object_register, fields_handler(), load_users(), LOG_ERROR, NULL, OPT_NOOP_T, phoneprov_alloc(), and sorcery.
|
static |
Callback that loads the users from phoneprov sections.
Definition at line 343 of file res_pjsip_phoneprov_provider.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, AST_RETRIEVE_FLAG_ALL, AST_RETRIEVE_FLAG_MULTIPLE, ast_sorcery_reload_object(), ast_sorcery_retrieve_by_fields(), NULL, sorcery, users, and users_apply_handler().
Referenced by load_module(), and reload_module().
|
static |
Allocator for phoneprov.
Definition at line 148 of file res_pjsip_phoneprov_provider.c.
References ao2_cleanup, ast_log, ast_sorcery_generic_alloc(), ast_var_list_create(), LOG_ERROR, name, NULL, phoneprov_destroy(), and phoneprov::vars.
Referenced by load_module().
|
static |
Destructor function for phoneprov.
Definition at line 135 of file res_pjsip_phoneprov_provider.c.
References AST_MODULE, ast_phoneprov_delete_extension(), ast_var_find(), ast_var_list_destroy(), and phoneprov::vars.
Referenced by phoneprov_alloc().
|
static |
Definition at line 401 of file res_pjsip_phoneprov_provider.c.
References ast_log, AST_MODULE, AST_MODULE_LOAD_DECLINE, ast_phoneprov_provider_register(), ast_phoneprov_provider_unregister(), load_users(), and LOG_ERROR.
|
static |
Definition at line 394 of file res_pjsip_phoneprov_provider.c.
References AST_MODULE, and ast_phoneprov_provider_unregister().
|
static |
Callback that validates the phoneprov object.
Definition at line 289 of file res_pjsip_phoneprov_provider.c.
References assign_and_insert(), ast_log, AST_MODULE, ast_phoneprov_add_extension(), AST_PHONEPROV_STD_LABEL, AST_PHONEPROV_STD_MAC, AST_PHONEPROV_STD_PROFILE, AST_PHONEPROV_STD_SERVER_PORT, AST_PHONEPROV_STD_USERNAME, ast_phoneprov_std_variable_lookup(), ast_sorcery_object_get_id(), ast_var_find(), load_endpoint(), LOG_ERROR, S_OR, and phoneprov::vars.
Referenced by load_users().
|
static |
Definition at line 420 of file res_pjsip_phoneprov_provider.c.
|
static |
Definition at line 420 of file res_pjsip_phoneprov_provider.c.
|
static |
Definition at line 126 of file res_pjsip_phoneprov_provider.c.
Referenced by __ast_sorcery_apply_config(), __ast_sorcery_apply_default(), __ast_sorcery_apply_wizard_mapping(), __ast_sorcery_insert_wizard_mapping(), __ast_sorcery_object_field_register(), __ast_sorcery_object_register(), __ast_sorcery_object_type_insert_wizard(), __ast_sorcery_object_type_remove_wizard(), __ast_sorcery_open(), __ast_sorcery_remove_wizard_mapping(), alloc_and_initialize_sorcery(), apply_list_configuration(), as_config_load(), as_config_reload(), ast_ari_asterisk_delete_object(), ast_ari_asterisk_get_object(), ast_ari_asterisk_update_object(), ast_sip_destroy_sorcery_global(), ast_sip_initialize_sorcery_auth(), ast_sip_initialize_sorcery_domain_alias(), ast_sip_initialize_sorcery_global(), ast_sip_initialize_sorcery_location(), ast_sip_initialize_sorcery_transport(), ast_sorcery_alloc(), ast_sorcery_copy(), ast_sorcery_create(), ast_sorcery_delete(), ast_sorcery_diff(), ast_sorcery_force_reload(), ast_sorcery_force_reload_object(), ast_sorcery_get_module(), ast_sorcery_get_object_type(), ast_sorcery_get_wizard_mapping(), ast_sorcery_get_wizard_mapping_count(), ast_sorcery_instance_observer_add(), ast_sorcery_instance_observer_remove(), ast_sorcery_is_stale(), ast_sorcery_load(), ast_sorcery_load_object(), ast_sorcery_object_fields_register(), ast_sorcery_object_set_congestion_levels(), ast_sorcery_object_set_copy_handler(), ast_sorcery_object_set_diff_handler(), ast_sorcery_object_unregister(), ast_sorcery_objectset_apply(), ast_sorcery_objectset_create2(), ast_sorcery_objectset_json_create(), ast_sorcery_observer_add(), ast_sorcery_observer_remove(), ast_sorcery_ref(), ast_sorcery_reload(), ast_sorcery_reload_object(), ast_sorcery_retrieve_by_fields(), ast_sorcery_retrieve_by_id(), ast_sorcery_retrieve_by_prefix(), ast_sorcery_retrieve_by_regex(), ast_sorcery_update(), AST_TEST_DEFINE(), bucket_file_wizard_create(), bucket_file_wizard_delete(), bucket_file_wizard_is_stale(), bucket_file_wizard_retrieve(), bucket_file_wizard_update(), bucket_http_wizard_retrieve_id(), bucket_wizard_create(), bucket_wizard_delete(), bucket_wizard_is_stale(), bucket_wizard_retrieve(), can_reuse_registration(), create_object(), deinitialize_sorcery(), global_loaded_observer(), handle_aor(), handle_auth(), handle_auths(), handle_endpoint(), handle_export_primitives(), handle_identify(), handle_phoneprov(), handle_registrations(), instance_created_observer(), instance_destroying_observer(), load_endpoint(), load_module(), load_users(), memory_cache_full_update(), memory_cache_populate(), memory_cache_stale_check(), memory_cache_stale_check_object(), memory_cache_stale_update_full(), memory_cache_stale_update_object(), mock_retrieve_id(), object_type_loaded_observer(), object_type_registered_observer(), profile_load(), profile_reload(), return_sorcery_object(), sorcery_astdb_create(), sorcery_astdb_filter_objectset(), sorcery_astdb_retrieve_fields(), sorcery_astdb_retrieve_fields_common(), sorcery_astdb_retrieve_id(), sorcery_astdb_retrieve_multiple(), sorcery_astdb_retrieve_prefix(), sorcery_astdb_retrieve_regex(), sorcery_astdb_update(), sorcery_config_internal_load(), sorcery_config_load(), sorcery_config_reload(), sorcery_config_retrieve_fields(), sorcery_config_retrieve_multiple(), sorcery_config_retrieve_prefix(), sorcery_config_retrieve_regex(), sorcery_destructor(), sorcery_function_read(), sorcery_is_configuration_met(), sorcery_is_explicit_name_met(), sorcery_memory_cache_create(), sorcery_memory_cache_load(), sorcery_memory_cache_retrieve_fields(), sorcery_memory_cache_retrieve_id(), sorcery_memory_cache_retrieve_multiple(), sorcery_memory_cache_retrieve_prefix(), sorcery_memory_cache_retrieve_regex(), sorcery_memory_cached_object_alloc(), sorcery_memory_retrieve_fields(), sorcery_memory_retrieve_multiple(), sorcery_memory_retrieve_prefix(), sorcery_memory_retrieve_regex(), sorcery_realtime_create(), sorcery_realtime_filter_objectset(), sorcery_realtime_retrieve_fields(), sorcery_realtime_retrieve_id(), sorcery_realtime_retrieve_multiple(), sorcery_realtime_retrieve_prefix(), sorcery_realtime_retrieve_regex(), sorcery_realtime_update(), sorcery_reloadable(), sorcery_test_retrieve_id(), sorcery_wizard_load(), stale_cache_update_task_data_alloc(), stale_update_task_data_alloc(), tn_config_load(), tn_config_reload(), transport_apply(), vs_config_load(), vs_config_reload(), and wizard_apply_handler().