Asterisk - The Open Source Telephony Project
18.5.0
|
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 = "30ef0c93b36035ec78c9cfd712d36d9b" , .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(), ast_variable::name, ast_variable::value, 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, 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, and RAII_VAR.
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, and phoneprov_alloc().
Referenced by reload_module().
|
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, 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, 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_MODFLAG_LOAD_ORDER, AST_MODPRI_APP_DEPEND, AST_MODULE, AST_MODULE_INFO(), AST_MODULE_LOAD_DECLINE, AST_MODULE_SUPPORT_EXTENDED, ast_phoneprov_provider_register(), ast_phoneprov_provider_unregister(), ASTERISK_GPL_KEY, load_module(), load_users(), LOG_ERROR, reload(), and unload_module().
|
static |
Definition at line 394 of file res_pjsip_phoneprov_provider.c.
References AST_MODULE, and ast_phoneprov_provider_unregister().
Referenced by reload_module().
|
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_open(), alloc_and_initialize_sorcery(), 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_create(), ast_sorcery_delete(), ast_sorcery_force_reload(), ast_sorcery_force_reload_object(), ast_sorcery_load(), ast_sorcery_load_object(), ast_sorcery_reload(), ast_sorcery_reload_object(), ast_sorcery_retrieve_by_id(), ast_sorcery_update(), AST_TEST_DEFINE(), can_reuse_registration(), load_module(), sorcery_config_retrieve_fields(), sorcery_config_retrieve_multiple(), sorcery_config_retrieve_prefix(), sorcery_config_retrieve_regex(), sorcery_destructor(), sorcery_function_read(), sorcery_wizard_load(), stir_shaken_certificate_load(), stir_shaken_general_load(), stir_shaken_store_load(), test_stir_shaken_cleanup_cert(), and test_stir_shaken_create_cert().