Asterisk - The Open Source Telephony Project GIT-master-b023714
|
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. | |
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. | |
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. | |
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. | |
static void * | phoneprov_alloc (const char *name) |
Allocator for phoneprov. | |
static void | phoneprov_destroy (void *obj) |
Destructor function for phoneprov. | |
static int | reload_module (void) |
static int | unload_module (void) |
static void | users_apply_handler (struct phoneprov *pp) |
Callback that validates the phoneprov object. | |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "PJSIP Phoneprov Provider" , .key = ASTERISK_GPL_KEY , .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 426 of file res_pjsip_phoneprov_provider.c.
|
static |
Definition at line 426 of file res_pjsip_phoneprov_provider.c.
|
static |
Adds a config name/value pair to the phoneprov object.
Definition at line 193 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 169 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 426 of file res_pjsip_phoneprov_provider.c.
|
static |
Converts the phoneprov varlist to an ast_variable list.
Definition at line 201 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 229 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 374 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 349 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, and users_apply_handler().
Referenced by load_module(), and reload_module().
|
static |
Allocator for phoneprov.
Definition at line 154 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 141 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 407 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 400 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 295 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 426 of file res_pjsip_phoneprov_provider.c.
|
static |
Definition at line 426 of file res_pjsip_phoneprov_provider.c.
|
static |
Definition at line 132 of file res_pjsip_phoneprov_provider.c.
Referenced by load_endpoint(), load_module(), and load_users().