| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
#include "asterisk.h"#include <pjsip.h>#include "asterisk/res_pjsip.h"#include "asterisk/module.h"#include "asterisk/logger.h"#include "asterisk/sorcery.h"#include "asterisk/acl.h"#include "asterisk/stasis.h"#include "asterisk/security_events.h"
Go to the source code of this file.
| Data Structures | |
| struct | ast_sip_acl | 
| SIP ACL details and configuration.  More... | |
| Macros | |
| #define | SIP_SORCERY_ACL_TYPE "acl" | 
| Functions | |
| static void | __reg_module (void) | 
| static void | __unreg_module (void) | 
| static void * | acl_alloc (const char *name) | 
| static void | acl_change_stasis_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) | 
| static void | acl_destroy (void *obj) | 
| static int | acl_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) | 
| static pj_bool_t | acl_on_rx_msg (pjsip_rx_data *rdata) | 
| static int | apply_acl (pjsip_rx_data *rdata, struct ast_acl_list *acl) | 
| static int | apply_contact_acl (pjsip_rx_data *rdata, struct ast_acl_list *contact_acl) | 
| struct ast_module * | AST_MODULE_SELF_SYM (void) | 
| static int | check_acls (void *obj, void *arg, int flags) | 
| static int | extract_contact_addr (pjsip_contact_hdr *contact, struct ast_sockaddr **addrs) | 
| static int | load_module (void) | 
| static int | unload_module (void) | 
| Variables | |
| static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "PJSIP ACL Resource" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_APP_DEPEND, .requires = "res_pjsip", } | 
| static struct stasis_subscription * | acl_change_sub | 
| static pjsip_module | acl_module | 
| static const struct ast_module_info * | ast_module_info = &__mod_info | 
| #define SIP_SORCERY_ACL_TYPE "acl" | 
Definition at line 216 of file res_pjsip_acl.c.
| 
 | static | 
Definition at line 367 of file res_pjsip_acl.c.
| 
 | static | 
Definition at line 367 of file res_pjsip_acl.c.
| 
 | static | 
Definition at line 303 of file res_pjsip_acl.c.
References acl_destroy(), and ast_sorcery_generic_alloc().
Referenced by load_module().
| 
 | static | 
Definition at line 311 of file res_pjsip_acl.c.
References ast_named_acl_change_type(), ast_sip_get_sorcery(), ast_sorcery_force_reload_object(), and SIP_SORCERY_ACL_TYPE.
Referenced by load_module().
| 
 | static | 
Definition at line 296 of file res_pjsip_acl.c.
References ast_sip_acl::acl, ast_free_acl_list(), and ast_sip_acl::contact_acl.
Referenced by acl_alloc().
| 
 | static | 
Definition at line 261 of file res_pjsip_acl.c.
References ast_sip_acl::acl, ast_append_acl(), ast_log, ast_sip_acl::contact_acl, error(), LOG_ERROR, NULL, and var.
Referenced by load_module().
| 
 | static | 
Definition at line 239 of file res_pjsip_acl.c.
References ao2_callback, ao2_cleanup, ast_log, AST_RETRIEVE_FLAG_ALL, AST_RETRIEVE_FLAG_MULTIPLE, ast_sip_get_pjsip_endpoint(), ast_sip_get_sorcery(), ast_sorcery_retrieve_by_fields(), check_acls(), LOG_ERROR, NULL, RAII_VAR, and SIP_SORCERY_ACL_TYPE.
| 
 | static | 
Definition at line 145 of file res_pjsip_acl.c.
References ast_acl_list_is_empty(), ast_apply_acl(), ast_log, AST_SENSE_ALLOW, ast_sockaddr_parse(), ast_sockaddr_set_port, ast_sockaddr_stringify(), LOG_WARNING, and PARSE_PORT_FORBID.
Referenced by check_acls().
| 
 | static | 
Definition at line 182 of file res_pjsip_acl.c.
References ast_acl_list_is_empty(), ast_apply_acl(), ast_free, ast_log, AST_SENSE_ALLOW, ast_sockaddr_stringify(), extract_contact_addr(), and LOG_WARNING.
Referenced by check_acls().
| struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) | 
Definition at line 367 of file res_pjsip_acl.c.
| 
 | static | 
Definition at line 227 of file res_pjsip_acl.c.
References ast_sip_acl::acl, apply_acl(), apply_contact_acl(), CMP_MATCH, CMP_STOP, and ast_sip_acl::contact_acl.
Referenced by acl_on_rx_msg().
| 
 | static | 
Definition at line 164 of file res_pjsip_acl.c.
References AST_AF_UNSPEC, ast_copy_pj_str(), ast_sockaddr_resolve(), NULL, and PARSE_PORT_FORBID.
Referenced by apply_contact_acl().
| 
 | static | 
Definition at line 321 of file res_pjsip_acl.c.
References acl_alloc(), acl_change_stasis_cb(), acl_change_sub, acl_handler(), acl_module, ast_log, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_named_acl_change_type(), ast_security_topic(), ast_sip_get_sorcery(), ast_sip_register_service(), ast_sorcery_apply_config, ast_sorcery_apply_default, ast_sorcery_load_object(), ast_sorcery_object_field_register, ast_sorcery_object_field_register_custom, ast_sorcery_object_register, LOG_ERROR, NULL, OPT_NOOP_T, SIP_SORCERY_ACL_TYPE, stasis_subscribe, stasis_subscription_accept_message_type(), STASIS_SUBSCRIPTION_FILTER_SELECTIVE, and stasis_subscription_set_filter().
| 
 | static | 
Definition at line 354 of file res_pjsip_acl.c.
References acl_change_sub, acl_module, ast_sip_unregister_service(), and stasis_unsubscribe_and_join().
| 
 | static | 
Definition at line 367 of file res_pjsip_acl.c.
| 
 | static | 
Definition at line 143 of file res_pjsip_acl.c.
Referenced by load_module(), and unload_module().
| 
 | static | 
Definition at line 289 of file res_pjsip_acl.c.
Referenced by load_module(), and unload_module().
| 
 | static | 
Definition at line 367 of file res_pjsip_acl.c.