Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
#include "asterisk.h"
#include <pjsip.h>
#include "asterisk/res_pjsip.h"
#include "asterisk/module.h"
Go to the source code of this file.
Macros | |
#define | DOMAIN_NAME_LEN 255 |
#define | USERNAME_LEN 255 |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static struct ast_sip_endpoint * | auth_username_identify (pjsip_rx_data *rdata) |
static struct ast_sip_endpoint * | find_endpoint (pjsip_rx_data *rdata, char *endpoint_name, char *domain_name) |
static int | find_transport_state_in_use (void *obj, void *arg, int flags) |
static pjsip_authorization_hdr * | get_auth_header (pjsip_rx_data *rdata, char *username, size_t username_size, char *realm, size_t realm_size, pjsip_authorization_hdr *start) |
static int | get_from_header (pjsip_rx_data *rdata, char *username, size_t username_size, char *domain, size_t domain_size) |
static int | load_module (void) |
static int | unload_module (void) |
static struct ast_sip_endpoint * | username_identify (pjsip_rx_data *rdata) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "PJSIP username endpoint identifier" , .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_CORE, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_CHANNEL_DEPEND - 4, .requires = "res_pjsip", } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_sip_endpoint_identifier | auth_username_identifier |
static struct ast_sip_endpoint_identifier | username_identifier |
#define DOMAIN_NAME_LEN 255 |
Definition at line 78 of file res_pjsip_endpoint_identifier_user.c.
#define USERNAME_LEN 255 |
Definition at line 79 of file res_pjsip_endpoint_identifier_user.c.
|
static |
Definition at line 227 of file res_pjsip_endpoint_identifier_user.c.
|
static |
Definition at line 227 of file res_pjsip_endpoint_identifier_user.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 227 of file res_pjsip_endpoint_identifier_user.c.
|
static |
Definition at line 165 of file res_pjsip_endpoint_identifier_user.c.
References ao2_cleanup, ast_debug, AST_SIP_AUTH_MAX_REALM_LENGTH, AST_SIP_ENDPOINT_IDENTIFY_BY_AUTH_USERNAME, find_endpoint(), get_auth_header(), ast_sip_endpoint::ident_method, NULL, and USERNAME_LEN.
|
static |
Definition at line 81 of file res_pjsip_endpoint_identifier_user.c.
References ao2_callback, ao2_cleanup, ao2_ref, ast_sip_get_disable_multi_domain(), ast_sip_get_sorcery(), ast_sip_get_transport_states(), ast_sorcery_retrieve_by_id(), ast_strlen_zero(), ast_sip_transport::domain, ast_sip_domain_alias::domain, DOMAIN_NAME_LEN, find_transport_state_in_use(), ast_sip_transport_state::id, NULL, transport_states, and USERNAME_LEN.
Referenced by auth_username_identify(), and username_identify().
|
static |
Definition at line 63 of file res_pjsip_endpoint_identifier_user.c.
References CMP_MATCH, ast_sip_transport_state::factory, and ast_sip_transport_state::transport.
Referenced by find_endpoint().
|
static |
Definition at line 46 of file res_pjsip_endpoint_identifier_user.c.
References ast_copy_pj_str(), and NULL.
Referenced by auth_username_identify().
|
static |
Definition at line 32 of file res_pjsip_endpoint_identifier_user.c.
References ast_copy_pj_str(), ast_sip_is_uri_sip_sips(), ast_sip_pjsip_uri_get_hostname(), and ast_sip_pjsip_uri_get_username().
Referenced by username_identify().
|
static |
Definition at line 207 of file res_pjsip_endpoint_identifier_user.c.
References AST_MODULE_LOAD_SUCCESS, ast_sip_register_endpoint_identifier_with_name(), auth_username_identifier, and username_identifier.
|
static |
Definition at line 214 of file res_pjsip_endpoint_identifier_user.c.
References ast_sip_unregister_endpoint_identifier(), auth_username_identifier, and username_identifier.
|
static |
Definition at line 132 of file res_pjsip_endpoint_identifier_user.c.
References ao2_cleanup, ast_debug, AST_SIP_ENDPOINT_IDENTIFY_BY_USERNAME, AST_SIP_USER_OPTIONS_TRUNCATE_CHECK, DOMAIN_NAME_LEN, find_endpoint(), get_from_header(), ast_sip_endpoint::ident_method, NULL, and USERNAME_LEN.
|
static |
Definition at line 227 of file res_pjsip_endpoint_identifier_user.c.
|
static |
Definition at line 227 of file res_pjsip_endpoint_identifier_user.c.
|
static |
Definition at line 202 of file res_pjsip_endpoint_identifier_user.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 198 of file res_pjsip_endpoint_identifier_user.c.
Referenced by load_module(), and unload_module().