Asterisk - The Open Source Telephony Project GIT-master-0644429
|
#include "asterisk.h"
#include <pjsip.h>
#include <pjsip_ua.h>
#include "asterisk/res_geolocation.h"
#include "asterisk/res_pjsip.h"
#include "include/res_pjsip_private.h"
#include "asterisk/res_pjsip_cli.h"
#include "asterisk/acl.h"
#include "asterisk/manager.h"
#include "asterisk/astobj2.h"
#include "asterisk/utils.h"
#include "asterisk/sorcery.h"
#include "asterisk/callerid.h"
#include "asterisk/test.h"
#include "asterisk/statsd.h"
#include "asterisk/pbx.h"
#include "asterisk/stream.h"
#include "asterisk/stasis.h"
#include "asterisk/security_events.h"
#include "asterisk/res_stir_shaken.h"
Go to the source code of this file.
Data Structures | |
struct | sip_persistent_endpoint |
Persistent endpoint information. More... | |
Macros | |
#define | AMI_DEFAULT_STR_SIZE 512 |
#define | AMI_SHOW_ENDPOINT "PJSIPShowEndpoint" |
#define | AMI_SHOW_ENDPOINTS "PJSIPShowEndpoints" |
#define | PERSISTENT_BUCKETS 53 |
Number of buckets for persistent endpoint information. More... | |
Functions | |
static void | acl_change_stasis_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static int | acl_to_str (const void *obj, const intptr_t *args, char **buf) |
static void | active_channels_to_str (const struct ast_sip_endpoint *endpoint, struct ast_str **str) |
static int | active_channels_to_str_cb (void *object, void *arg, int flags) |
static int | add_to_regcontext (void *obj, void *arg, int flags) |
static int | ami_show_endpoint (struct mansession *s, const struct message *m) |
static int | ami_show_endpoints (struct mansession *s, const struct message *m) |
void | ast_res_pjsip_destroy_configuration (void) |
int | ast_res_pjsip_initialize_configuration (void) |
int | ast_res_pjsip_reload_configuration (void) |
void | ast_sip_auth_vector_destroy (struct ast_sip_auth_vector *auths) |
Free contents of an auth vector. More... | |
int | ast_sip_auth_vector_init (struct ast_sip_auth_vector *auths, const char *value) |
Initialize an auth vector with the configured values. More... | |
int | ast_sip_auths_to_str (const struct ast_sip_auth_vector *auths, char **buf) |
Converts an auths array to a string of comma separated values. More... | |
void | ast_sip_cleanup_auths (struct ast_sip_auth *auths[], size_t num_auths) |
Clean up retrieved auth structures from memory. More... | |
struct ast_str * | ast_sip_create_ami_event (const char *event, struct ast_sip_ami *ami) |
Creates a string to store AMI event data in. More... | |
struct ast_sip_endpoint * | ast_sip_default_outbound_endpoint (void) |
Retrieve the default outbound endpoint. More... | |
void * | ast_sip_endpoint_alloc (const char *name) |
Allocate a new SIP endpoint. More... | |
int | ast_sip_for_each_channel (const struct ast_sip_endpoint *endpoint, ao2_callback_fn on_channel_snapshot, void *arg) |
For every channel snapshot on an endpoint all the given 'on_channel_snapshot' handler. More... | |
int | ast_sip_for_each_channel_snapshot (const struct ast_endpoint_snapshot *endpoint_snapshot, ao2_callback_fn on_channel_snapshot, void *arg) |
For every channel snapshot on an endpoint snapshot call the given 'on_channel_snapshot' handler. More... | |
const char * | ast_sip_get_device_state (const struct ast_sip_endpoint *endpoint) |
Retrieve the device state for an endpoint. More... | |
struct ast_endpoint_snapshot * | ast_sip_get_endpoint_snapshot (const struct ast_sip_endpoint *endpoint) |
Retrieve the endpoint snapshot for an endpoint. More... | |
struct ao2_container * | ast_sip_get_endpoints (void) |
Retrieve any endpoints available to sorcery. More... | |
struct ast_sorcery * | ast_sip_get_sorcery (void) |
Get a pointer to the SIP sorcery structure. More... | |
int | ast_sip_persistent_endpoint_add_to_regcontext (const char *regcontext) |
void | ast_sip_persistent_endpoint_publish_contact_state (const char *endpoint_name, const struct ast_sip_contact_status *contact_status) |
Publish the change of state for a contact. More... | |
int | ast_sip_persistent_endpoint_update_state (const char *endpoint_name, enum ast_endpoint_state state) |
Change state of a persistent endpoint. More... | |
int | ast_sip_retrieve_auths (const struct ast_sip_auth_vector *auths, struct ast_sip_auth **out) |
Retrieve relevant SIP auth structures from sorcery. More... | |
int | ast_sip_retrieve_auths_vector (const struct ast_sip_auth_vector *auth_ids, struct ast_sip_auth_objects_vector *auth_objects) |
Retrieve relevant SIP auth structures from sorcery as a vector. More... | |
int | ast_sip_set_security_negotiation (enum ast_sip_security_negotiation *security_negotiation, const char *val) |
Set the security negotiation based on a given string. More... | |
int | ast_sip_sorcery_object_to_ami (const void *obj, struct ast_str **buf) |
Converts a sorcery object to a string of object properties. More... | |
static int | call_offer_pref_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | caller_id_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | caller_id_privacy_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | caller_id_privacy_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | caller_id_tag_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | caller_id_tag_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | caller_id_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | callgroup_to_str (const void *obj, const intptr_t *args, char **buf) |
static struct ao2_container * | cli_endpoint_get_container (const char *regex) |
static int | cli_endpoint_iterate (void *obj, ao2_callback_fn callback, void *args) |
static int | cli_endpoint_print_body (void *obj, void *arg, int flags) |
static void | cli_endpoint_print_child_body (char *type, const void *obj, struct ast_sip_cli_context *context) |
static void | cli_endpoint_print_child_header (char *type, struct ast_sip_cli_context *context) |
static int | cli_endpoint_print_header (void *obj, void *arg, int flags) |
static void * | cli_endpoint_retrieve_by_id (const char *id) |
static int | codec_prefs_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | codec_prefs_to_str (const struct ast_stream_codec_negotiation_prefs *prefs, const void *obj, const intptr_t *args, char **buf) |
static int | connected_line_method_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | connected_line_method_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | contact_acl_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | contact_user_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | contact_user_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | direct_media_glare_mitigation_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | direct_media_glare_mitigation_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | direct_media_method_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | direct_media_method_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | dtls_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | dtlsautogeneratecert_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | dtlscafile_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | dtlscapath_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | dtlscertfile_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | dtlscipher_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | dtlsfingerprint_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | dtlsprivatekey_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | dtlsrekey_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | dtlssetup_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | dtlsverify_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | dtmf_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | dtmf_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | endpoint_acl_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static void | endpoint_deleted_observer (const void *object) |
static void | endpoint_destructor (void *obj) |
static int | format_ami_endpoint (const struct ast_sip_endpoint *endpoint, struct ast_sip_ami *ami) |
static int | format_ami_endpoints (void *obj, void *arg, int flags) |
static int | format_str_append_auth (const struct ast_sip_auth_vector *auths, struct ast_str **buf) |
static int | from_user_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | from_user_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | group_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | ident_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | ident_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | inbound_auth_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | inbound_auths_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | incoming_answer_codec_prefs_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | incoming_call_offer_pref_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | incoming_offer_codec_prefs_to_str (const void *obj, const intptr_t *args, char **buf) |
static void | info_configuration_destroy (struct ast_sip_endpoint_info_configuration *info) |
static int | init_info_configuration (struct ast_sip_endpoint_info_configuration *info) |
static int | init_media_configuration (struct ast_sip_endpoint_media_configuration *media) |
static int | init_subscription_configuration (struct ast_sip_endpoint_subscription_configuration *subscription) |
static void | load_all_endpoints (void) |
static int | media_address_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | media_address_to_str (const void *obj, const intptr_t *args, char **buf) |
static void | media_configuration_destroy (struct ast_sip_endpoint_media_configuration *media) |
static int | media_encryption_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | media_encryption_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | named_callgroups_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | named_groups_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | named_pickupgroups_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | outbound_auth_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | outbound_auths_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | outgoing_answer_codec_prefs_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | outgoing_call_offer_pref_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | outgoing_offer_codec_prefs_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | persistent_endpoint_cmp (void *obj, void *arg, int flags) |
Comparison function for persistent endpoint information. More... | |
static void | persistent_endpoint_destroy (void *obj) |
Destructor function for persistent endpoint information. More... | |
static struct ast_endpoint * | persistent_endpoint_find_or_create (const struct ast_sip_endpoint *endpoint) |
Internal function which finds (or creates) persistent endpoint information. More... | |
static int | persistent_endpoint_hash (const void *obj, const int flags) |
Hashing function for persistent endpoint information. More... | |
static int | pickupgroup_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | prack_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | prack_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | redirect_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | security_mechanism_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | security_mechanism_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | security_negotiation_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | security_negotiation_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | set_var_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | set_var_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | set_var_to_vl (const void *obj, struct ast_variable **fields) |
static int | sip_endpoint_apply_handler (const struct ast_sorcery *sorcery, void *obj) |
Callback function for when an object is finalized. More... | |
static int | sip_endpoint_identifier_str2type (const char *str) |
static const char * | sip_endpoint_identifier_type2str (enum ast_sip_endpoint_identifier_type method) |
static int | sip_endpoint_to_ami (const struct ast_sip_endpoint *endpoint, struct ast_str **buf) |
static int | sip_endpoints_aors_ami (void *obj, void *arg, int flags) |
static void * | sip_nat_hook_alloc (const char *name) |
static void | sip_sorcery_object_ami_set_type_name (const void *obj, struct ast_str **buf) |
static int | stir_shaken_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | stir_shaken_to_str (const void *obj, const intptr_t *args, char **buf) |
static void | subscription_configuration_destroy (struct ast_sip_endpoint_subscription_configuration *subscription) |
static int | t38udptl_ec_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | t38udptl_ec_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | timers_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | timers_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | tos_audio_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | tos_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | tos_video_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | voicemail_extension_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | voicemail_extension_to_str (const void *obj, const intptr_t *args, char **buf) |
Variables | |
static struct stasis_subscription * | acl_change_sub |
static const char * | ast_rtp_dtls_fingerprint_map [] |
static const char * | ast_rtp_dtls_setup_map [] |
static const char * | ast_t38_ec_modes_map [] |
struct ast_sip_cli_formatter_entry * | channel_formatter |
static struct ast_cli_entry | cli_commands [] |
static const char * | direct_media_glare_mitigation_map [] |
struct ast_sip_cli_formatter_entry * | endpoint_formatter |
static const struct ast_sorcery_observer | endpoint_observers |
static const char * | id_configuration_refresh_methods [] |
static const char * | media_encryption_map [] |
static struct ao2_container * | persistent_endpoints |
Container for persistent endpoint information. More... | |
static const char * | security_negotiation_map [] |
static struct ast_sorcery * | sip_sorcery |
#define AMI_DEFAULT_STR_SIZE 512 |
Definition at line 1722 of file pjsip_configuration.c.
#define AMI_SHOW_ENDPOINT "PJSIPShowEndpoint" |
Definition at line 1814 of file pjsip_configuration.c.
#define AMI_SHOW_ENDPOINTS "PJSIPShowEndpoints" |
Definition at line 1813 of file pjsip_configuration.c.
#define PERSISTENT_BUCKETS 53 |
Number of buckets for persistent endpoint information.
Definition at line 43 of file pjsip_configuration.c.
|
static |
Definition at line 2103 of file pjsip_configuration.c.
References ast_named_acl_change_type(), ast_sorcery_force_reload_object(), sip_sorcery, and stasis_message_type().
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 106 of file pjsip_configuration.c.
References ast_sip_endpoint::acl, ast_acl_list_is_empty(), AST_LIST_FIRST, AST_LIST_LOCK, AST_LIST_UNLOCK, ast_strdup, ast_strlen_zero(), buf, and ast_acl::name.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 1706 of file pjsip_configuration.c.
References active_channels_to_str_cb(), ao2_cleanup, ast_sip_for_each_channel_snapshot(), ast_sip_get_endpoint_snapshot(), ast_str_truncate(), RAII_VAR, and str.
Referenced by format_ami_endpoints(), and sip_endpoint_to_ami().
|
static |
Definition at line 1698 of file pjsip_configuration.c.
References ast_str_append(), ast_channel_snapshot::base, buf, and ast_channel_snapshot_base::name.
Referenced by active_channels_to_str().
|
static |
Definition at line 1399 of file pjsip_configuration.c.
References ast_add_extension(), ast_endpoint_get_resource(), ast_endpoint_get_state(), AST_ENDPOINT_ONLINE, ast_exists_extension(), ast_free_ptr(), ast_strdup, sip_persistent_endpoint::endpoint, NULL, and regcontext.
Referenced by ast_sip_persistent_endpoint_add_to_regcontext().
|
static |
Definition at line 1816 of file pjsip_configuration.c.
References AMI_SHOW_ENDPOINT, ao2_cleanup, ast_sip_format_endpoint_ami(), ast_sip_get_sorcery(), ast_sorcery_retrieve_by_id(), ast_strlen_zero(), astman_get_header(), astman_send_error_va(), astman_send_list_complete_end(), astman_send_list_complete_start(), astman_send_listack(), ast_sip_ami::count, format_ami_endpoint(), ast_sip_ami::m, NULL, RAII_VAR, and ast_sip_ami::s.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 1909 of file pjsip_configuration.c.
References ao2_callback, ao2_cleanup, ao2_container_count(), ast_sip_get_endpoints(), astman_get_header(), astman_send_error(), astman_send_list_complete_end(), astman_send_list_complete_start(), astman_send_listack(), endpoints, format_ami_endpoints(), ast_sip_ami::m, NULL, OBJ_NODATA, RAII_VAR, and ast_sip_ami::s.
Referenced by ast_res_pjsip_initialize_configuration().
void ast_res_pjsip_destroy_configuration | ( | void | ) |
Definition at line 2367 of file pjsip_configuration.c.
References acl_change_sub, AMI_SHOW_ENDPOINT, AMI_SHOW_ENDPOINTS, ao2_cleanup, ARRAY_LEN, ast_cli_unregister_multiple(), ast_manager_unregister(), ast_sip_destroy_cli(), ast_sip_destroy_sorcery_auth(), ast_sip_destroy_sorcery_global(), ast_sip_destroy_sorcery_location(), ast_sip_destroy_sorcery_transport(), ast_sip_unregister_cli_formatter(), ast_sorcery_unref, cli_commands, endpoint_formatter, NULL, persistent_endpoints, sip_sorcery, and stasis_unsubscribe_and_join().
Referenced by unload_pjsip().
int ast_res_pjsip_initialize_configuration | ( | void | ) |
Definition at line 2113 of file pjsip_configuration.c.
References accountcode, acl_change_stasis_cb(), acl_change_sub, acl_to_str(), AMI_SHOW_ENDPOINT, ami_show_endpoint(), AMI_SHOW_ENDPOINTS, ami_show_endpoints(), ao2_alloc, AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, ARRAY_LEN, ast_cli_register_multiple, ast_log, ast_manager_register_xml, ast_named_acl_change_type(), ast_security_topic(), ast_sip_endpoint_alloc(), ast_sip_initialize_cli(), 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_sip_register_cli_formatter(), ast_sorcery_apply_default, ast_sorcery_internal_object_register, ast_sorcery_load(), ast_sorcery_object_field_register, ast_sorcery_object_field_register_alias, ast_sorcery_object_field_register_custom, ast_sorcery_object_get_id(), ast_sorcery_object_register, ast_sorcery_observer_add(), ast_sorcery_open, ast_sorcery_unref, call_offer_pref_handler(), caller_id_handler(), caller_id_privacy_handler(), caller_id_privacy_to_str(), caller_id_tag_handler(), caller_id_tag_to_str(), caller_id_to_str(), callgroup_to_str(), CHARFLDSET, cli_commands, cli_endpoint_get_container(), cli_endpoint_iterate(), cli_endpoint_print_body(), cli_endpoint_print_header(), cli_endpoint_retrieve_by_id(), codec_prefs_handler(), connected_line_method_handler(), connected_line_method_to_str(), contact_acl_to_str(), contact_user_handler(), contact_user_to_str(), voicemailpwcheck::context, ast_sip_endpoint::context, direct_media_glare_mitigation_handler(), direct_media_glare_mitigation_to_str(), direct_media_method_handler(), direct_media_method_to_str(), dtls_handler(), dtlsautogeneratecert_to_str(), dtlscafile_to_str(), dtlscapath_to_str(), dtlscertfile_to_str(), dtlscipher_to_str(), dtlsfingerprint_to_str(), dtlsprivatekey_to_str(), dtlsrekey_to_str(), dtlssetup_to_str(), dtlsverify_to_str(), dtmf_handler(), dtmf_to_str(), endpoint_acl_handler(), endpoint_formatter, endpoint_observers, EVENT_FLAG_SYSTEM, FLDSET, from_user_handler(), from_user_to_str(), ast_sip_endpoint::fromuser, ast_sip_cli_formatter_entry::get_container, ast_sip_cli_formatter_entry::get_id, group_handler(), ident_handler(), ident_to_str(), inbound_auth_handler(), inbound_auths_to_str(), incoming_answer_codec_prefs_to_str(), incoming_call_offer_pref_to_str(), incoming_offer_codec_prefs_to_str(), sip_to_pjsip::info(), ast_sip_cli_formatter_entry::iterate, language, load_all_endpoints(), LOG_ERROR, media_address_handler(), media_address_to_str(), media_encryption_handler(), media_encryption_to_str(), mohsuggest, ast_sip_cli_formatter_entry::name, named_callgroups_to_str(), named_groups_handler(), named_pickupgroups_to_str(), ast_sip_endpoint::nat, NULL, OPT_BOOL_T, OPT_CHAR_ARRAY_T, OPT_CODEC_T, OPT_NOOP_T, OPT_STRINGFIELD_T, OPT_UINT_T, OPT_YESNO_T, outbound_auth_handler(), outbound_auths_to_str(), outgoing_answer_codec_prefs_to_str(), outgoing_call_offer_pref_to_str(), outgoing_offer_codec_prefs_to_str(), PERSISTENT_BUCKETS, persistent_endpoint_cmp(), persistent_endpoint_hash(), persistent_endpoints, pickupgroup_to_str(), prack_handler(), prack_to_str(), ast_sip_cli_formatter_entry::print_body, ast_sip_cli_formatter_entry::print_header, redirect_handler(), ast_sip_cli_formatter_entry::retrieve_by_id, security_mechanism_handler(), security_mechanism_to_str(), security_negotiation_handler(), security_negotiation_to_str(), set_var_handler(), set_var_to_str(), set_var_to_vl(), sip_endpoint_apply_handler(), sip_nat_hook_alloc(), sip_sorcery, stasis_subscribe, stasis_subscription_accept_message_type(), STASIS_SUBSCRIPTION_FILTER_SELECTIVE, stasis_subscription_set_filter(), stir_shaken_handler(), stir_shaken_to_str(), STRFLDSET, t38udptl_ec_handler(), t38udptl_ec_to_str(), timers_handler(), timers_to_str(), tos_audio_to_str(), tos_handler(), tos_video_to_str(), voicemail_extension_handler(), and voicemail_extension_to_str().
Referenced by load_module().
int ast_res_pjsip_reload_configuration | ( | void | ) |
Definition at line 2389 of file pjsip_configuration.c.
References ast_sorcery_reload(), and sip_sorcery.
Referenced by reload_configuration_task().
void ast_sip_auth_vector_destroy | ( | struct ast_sip_auth_vector * | vector | ) |
Free contents of an auth vector.
vector | Vector whose contents are to be freed |
Definition at line 306 of file pjsip_configuration.c.
References ast_free, AST_VECTOR_FREE, AST_VECTOR_REMOVE_UNORDERED, AST_VECTOR_SIZE, and name.
Referenced by ast_sip_auth_vector_init(), endpoint_destructor(), handle_client_state_destruction(), sip_outbound_publish_destroy(), sip_outbound_registration_destroy(), and sip_outbound_registration_perform().
int ast_sip_auth_vector_init | ( | struct ast_sip_auth_vector * | vector, |
const char * | auth_names | ||
) |
Initialize an auth vector with the configured values.
vector | Vector to initialize |
auth_names | Comma-separated list of names to set in the array |
0 | Success |
non-zero | Failure |
Definition at line 324 of file pjsip_configuration.c.
References ast_assert, ast_free, ast_sip_auth_vector_destroy(), ast_strdup, ast_strdupa, ast_strip(), ast_strlen_zero(), AST_VECTOR_APPEND, AST_VECTOR_INIT, AST_VECTOR_SIZE, NULL, strsep(), and value.
Referenced by inbound_auth_handler(), and outbound_auth_handler().
int ast_sip_auths_to_str | ( | const struct ast_sip_auth_vector * | auths, |
char ** | buf | ||
) |
Converts an auths array to a string of comma separated values.
auths | an auth array |
buf | the string buffer to write the object data |
0 | Success, non-zero on failure |
Definition at line 374 of file pjsip_configuration.c.
References ast_calloc, ast_join_delim(), AST_VECTOR_SIZE, buf, ast_sip_auth_vector::elems, and MAX_OBJECT_FIELD.
Referenced by format_str_append_auth(), inbound_auths_to_str(), and outbound_auths_to_str().
void ast_sip_cleanup_auths | ( | struct ast_sip_auth * | auths[], |
size_t | num_auths | ||
) |
Clean up retrieved auth structures from memory.
Call this function once you have completed operating on auths retrieved from ast_sip_retrieve_auths
auths | An array of auth object pointers to clean up |
num_auths | The number of auths in the array |
Definition at line 2536 of file pjsip_configuration.c.
References ao2_cleanup.
Referenced by digest_check_auth(), and set_outbound_initial_authentication_credentials().
struct ast_str * ast_sip_create_ami_event | ( | const char * | event, |
struct ast_sip_ami * | ami | ||
) |
Creates a string to store AMI event data in.
event | the event to set |
ami | AMI session and message container |
an | initialized ast_str or NULL on error. |
Definition at line 1724 of file pjsip_configuration.c.
References ast_sip_ami::action_id, AMI_DEFAULT_STR_SIZE, ast_str_append(), ast_str_create, ast_str_set(), ast_strlen_zero(), astman_send_error_va(), buf, ast_sip_ami::m, NULL, and ast_sip_ami::s.
Referenced by ami_outbound_registration_task(), ami_registrations_aor(), ami_subscription_detail(), ast_sip_format_contact_ami(), format_ami_aor_handler(), format_ami_aorlist_handler(), format_ami_auth_handler(), format_ami_authlist_handler(), format_ami_contactlist_handler(), format_ami_endpoint(), format_ami_endpoint_transport(), format_ami_endpoints(), format_ami_resource_lists(), and send_identify_ami_event().
struct ast_sip_endpoint * ast_sip_default_outbound_endpoint | ( | void | ) |
Retrieve the default outbound endpoint.
The | default outbound endpoint, NULL if not found. |
Definition at line 2512 of file pjsip_configuration.c.
References ast_free, ast_sip_global_default_outbound_endpoint(), ast_sorcery_retrieve_by_id(), ast_strlen_zero(), name, NULL, RAII_VAR, and sip_sorcery.
Referenced by ast_sip_get_endpoint(), handle_atsign(), handle_single_token(), and notify_uri().
void * ast_sip_endpoint_alloc | ( | const char * | name | ) |
Allocate a new SIP endpoint.
This will return an endpoint with its refcount increased by one. This reference can be released using ao2_ref().
name | The name of the endpoint. |
NULL | Endpoint allocation failed |
non-NULL | The newly allocated endpoint |
Definition at line 2455 of file pjsip_configuration.c.
References ao2_cleanup, ast_format_cap_alloc, AST_FORMAT_CAP_FLAG_DEFAULT, ast_party_id_init(), ast_sorcery_generic_alloc(), ast_strdup, ast_string_field_init, ast_string_field_init_extended, AST_VECTOR_INIT, ast_sip_endpoint_media_configuration::codecs, endpoint_destructor(), ast_sip_endpoint::id, ast_sip_endpoint::ident_method_order, ast_sip_endpoint::info, init_info_configuration(), init_media_configuration(), init_subscription_configuration(), ast_sip_endpoint::media, NULL, ast_sip_endpoint_id_configuration::self, ast_sip_endpoint::subscription, and ast_party_id::tag.
Referenced by ast_res_pjsip_initialize_configuration().
int ast_sip_for_each_channel | ( | const struct ast_sip_endpoint * | endpoint, |
ao2_callback_fn | on_channel_snapshot, | ||
void * | arg | ||
) |
For every channel snapshot on an endpoint all the given 'on_channel_snapshot' handler.
endpoint | endpoint |
on_channel_snapshot | callback for each channel snapshot |
arg | user data passed to handler |
0 | Success, non-zero on failure |
Definition at line 1690 of file pjsip_configuration.c.
References ao2_cleanup, ast_sip_for_each_channel_snapshot(), ast_sip_get_endpoint_snapshot(), and RAII_VAR.
Referenced by cli_channel_iterate(), and cli_channelstats_iterate().
int ast_sip_for_each_channel_snapshot | ( | const struct ast_endpoint_snapshot * | endpoint_snapshot, |
ao2_callback_fn | on_channel_snapshot, | ||
void * | arg | ||
) |
For every channel snapshot on an endpoint snapshot call the given 'on_channel_snapshot' handler.
endpoint_snapshot | snapshot of an endpoint |
on_channel_snapshot | callback for each channel snapshot |
arg | user data passed to handler |
0 | Success, non-zero on failure |
Definition at line 1663 of file pjsip_configuration.c.
References ao2_cleanup, ast_channel_snapshot_get_latest(), ast_endpoint_snapshot::channel_ids, NULL, ast_endpoint_snapshot::num_channels, and RAII_VAR.
Referenced by active_channels_to_str(), and ast_sip_for_each_channel().
const char * ast_sip_get_device_state | ( | const struct ast_sip_endpoint * | endpoint | ) |
Retrieve the device state for an endpoint.
endpoint | The endpoint whose state is to be retrieved. |
The | device state. |
Definition at line 1647 of file pjsip_configuration.c.
References ast_devstate2str(), ast_sorcery_object_get_id(), and MAX_OBJECT_FIELD.
Referenced by cli_endpoint_print_body(), format_ami_endpoints(), and sip_endpoint_to_ami().
struct ast_endpoint_snapshot * ast_sip_get_endpoint_snapshot | ( | const struct ast_sip_endpoint * | endpoint | ) |
Retrieve the endpoint snapshot for an endpoint.
endpoint | The endpoint whose snapshot is to be retrieved. |
The | endpoint snapshot |
Definition at line 1655 of file pjsip_configuration.c.
References ast_endpoint_get_resource(), ast_endpoint_get_tech(), ast_endpoint_latest_snapshot(), and ast_sip_endpoint::persistent.
Referenced by active_channels_to_str(), ast_sip_for_each_channel(), and cli_endpoint_print_body().
struct ao2_container * ast_sip_get_endpoints | ( | void | ) |
Retrieve any endpoints available to sorcery.
Endpoints | available to sorcery, NULL if no endpoints found. |
Definition at line 2503 of file pjsip_configuration.c.
References AST_RETRIEVE_FLAG_ALL, AST_RETRIEVE_FLAG_MULTIPLE, ast_sorcery_retrieve_by_fields(), endpoints, NULL, and sip_sorcery.
Referenced by ami_registrations_endpoints(), ami_show_endpoints(), and load_module().
struct ast_sorcery * ast_sip_get_sorcery | ( | void | ) |
Get a pointer to the SIP sorcery structure.
NULL | sorcery has not been initialized |
non-NULL | sorcery structure |
Definition at line 2563 of file pjsip_configuration.c.
References sip_sorcery.
Referenced by acl_change_stasis_cb(), acl_on_rx_msg(), add_security_headers(), alloc_artificial_auth(), ami_show_endpoint(), ami_show_registration_contact_statuses(), ami_show_resource_lists(), ami_sip_qualify(), anonymous_identify(), aor_deleted_observer(), ast_res_pjsip_cleanup_options_handling(), ast_sip_cli_print_sorcery_objectset(), ast_sip_destroy_distributor(), ast_sip_destroy_sorcery_global(), ast_sip_destroy_sorcery_location(), ast_sip_destroy_transport_management(), ast_sip_for_each_auth(), ast_sip_initialize_distributor(), 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_sip_initialize_transport_management(), ast_sip_location_create_contact(), ast_sip_location_delete_contact(), ast_sip_location_prune_boot_contacts(), ast_sip_location_retrieve_aor(), ast_sip_location_retrieve_aor_contacts_nolock_filtered(), ast_sip_location_retrieve_contact(), ast_sip_location_update_contact(), ast_sip_retrieve_auths(), ast_sip_retrieve_auths_vector(), ast_sip_rewrite_uri_to_local(), ast_sip_set_tpselector_from_transport_name(), ast_sip_sorcery_object_to_ami(), asterisk_publication_devicestate_state_change(), asterisk_publication_mwi_state_change(), asterisk_publication_new(), asterisk_publication_send_refresh(), auth_observer(), can_reuse_registration(), chan_pjsip_devicestate(), check_expiration_thread(), check_state(), cli_aor_get_container(), cli_aor_retrieve_by_id(), cli_complete_endpoint(), cli_complete_registration(), cli_contact_get_container(), cli_endpoint_retrieve_by_id(), cli_get_aors(), cli_get_auths(), cli_get_container(), cli_iterate(), cli_iterator(), cli_qualify(), cli_reload_qualify_aor(), cli_reload_qualify_endpoint(), cli_retrieve_by_id(), cli_show_qualify_endpoint(), common_identify(), contact_observer_updated(), create_artificial_endpoint(), create_mwi_subscriptions(), create_rtp(), find_aor2(), find_aor_name(), find_endpoint(), format_ami_endpoint_identify(), format_ami_endpoint_transport(), get_all_contacts(), get_publishes_and_update_state(), get_registrations(), get_write_timeout(), handle_atsign(), handle_export_primitives(), handle_registration_response(), handle_single_token(), handle_slash(), line_identify(), load_module(), mwi_contact_changed(), mwi_contact_deleted(), mwi_subscription_shutdown(), on_rx_process_symmetric_transport(), permanent_uri_handler(), pjsip_acf_dial_contacts_read(), pjsip_aor_function_read(), pjsip_contact_function_read(), pjsip_endpoint_function_read(), pjsip_outbound_registration_metrics_init(), pjsip_outbound_registration_metrics_unload_cb(), process_nat(), publish_request_initial(), push_notify(), reload_module(), request(), reregister_all(), retrieve_resource_list(), send_unsolicited_mwi_notify(), sip_aor_to_ami(), sip_cli_print_global(), sip_options_aor_observer_modified_task(), sip_options_apply_aor_configuration(), sip_options_contact_add_management_task(), sip_options_init_task(), sip_options_qualify_contact(), sip_options_synchronize_task(), sub_persistence_recreate(), subscription_persistence_create(), subscription_persistence_load(), subscription_persistence_recreate(), subscription_persistence_remove(), subscription_persistence_update(), t38_initialize_session(), transfer(), and unload_module().
int ast_sip_persistent_endpoint_add_to_regcontext | ( | const char * | regcontext | ) |
Definition at line 1415 of file pjsip_configuration.c.
References add_to_regcontext(), ao2_callback, ast_context_find_or_create(), ast_log, ast_strlen_zero(), LOG_ERROR, NULL, OBJ_NODATA, persistent_endpoints, and regcontext.
Referenced by check_regcontext().
void ast_sip_persistent_endpoint_publish_contact_state | ( | const char * | endpoint_name, |
const struct ast_sip_contact_status * | contact_status | ||
) |
Publish the change of state for a contact.
endpoint_name | The SIP endpoint name. |
contact_status | The contact status. |
Definition at line 1489 of file pjsip_configuration.c.
References ao2_find, ao2_ref, ast_sip_contact_status::aor, ast_endpoint_blob_publish(), ast_endpoint_contact_state_type(), ast_endpoint_get_resource(), ast_json_pack(), ast_json_unref(), ast_sip_get_contact_status_label(), sip_persistent_endpoint::endpoint, OBJ_SEARCH_KEY, persistent_endpoints, ast_sip_contact_status::rtt, ast_sip_contact_status::status, and ast_sip_contact_status::uri.
Referenced by sip_options_publish_contact_state().
int ast_sip_persistent_endpoint_update_state | ( | const char * | endpoint_name, |
enum ast_endpoint_state | state | ||
) |
Change state of a persistent endpoint.
endpoint_name | The SIP endpoint name to change state. |
state | The new state |
0 | Success |
-1 | Endpoint not found |
Definition at line 1432 of file pjsip_configuration.c.
References ao2_find, ao2_ref, ast_add_extension(), ast_context_remove_extension(), AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, ast_devstate_changed(), ast_endpoint_blob_publish(), ast_endpoint_get_resource(), ast_endpoint_get_state(), AST_ENDPOINT_OFFLINE, AST_ENDPOINT_ONLINE, ast_endpoint_set_state(), ast_endpoint_state_type(), ast_exists_extension(), ast_free, ast_free_ptr(), ast_json_pack(), ast_json_unref(), ast_sip_get_regcontext(), ast_strdup, ast_strlen_zero(), ast_verb, E_MATCH, sip_persistent_endpoint::endpoint, NULL, OBJ_SEARCH_KEY, pbx_find_extension(), persistent_endpoints, regcontext, and pbx_find_info::stacklen.
Referenced by sip_options_synchronize_endpoint(), sip_options_unused_endpoint_state_compositor(), and sip_options_update_endpoint_state_compositor_aor().
int ast_sip_retrieve_auths | ( | const struct ast_sip_auth_vector * | auths, |
struct ast_sip_auth ** | out | ||
) |
Retrieve relevant SIP auth structures from sorcery.
auths | Vector of sorcery IDs of auth credentials to retrieve | |
[out] | out | The retrieved auths are stored here |
Definition at line 2519 of file pjsip_configuration.c.
References ast_log, ast_sip_get_sorcery(), ast_sorcery_retrieve_by_id(), AST_VECTOR_GET, AST_VECTOR_SIZE, LOG_NOTICE, name, out, and SIP_SORCERY_AUTH_TYPE.
Referenced by digest_check_auth(), and set_outbound_initial_authentication_credentials().
int ast_sip_retrieve_auths_vector | ( | const struct ast_sip_auth_vector * | auth_ids, |
struct ast_sip_auth_objects_vector * | auth_objects | ||
) |
Retrieve relevant SIP auth structures from sorcery as a vector.
auth_ids | Vector of sorcery IDs of auth credentials to retrieve | |
[out] | auth_objects | A pointer ast_sip_auth_objects_vector to hold the objects |
0 | Success |
-1 | Number of auth objects found is less than the number of names supplied. |
Definition at line 2544 of file pjsip_configuration.c.
References ast_log, ast_sip_get_sorcery(), ast_sorcery_retrieve_by_id(), AST_VECTOR_APPEND, AST_VECTOR_GET, AST_VECTOR_SIZE, LOG_WARNING, name, and SIP_SORCERY_AUTH_TYPE.
Referenced by digest_create_request_with_auth().
int ast_sip_set_security_negotiation | ( | enum ast_sip_security_negotiation * | security_negotiation, |
const char * | val | ||
) |
Set the security negotiation based on a given string.
security_negotiation | Security negotiation enum to set. |
val | String that represents a security_negotiation value. |
0 | Success |
non-zero | Failure |
Definition at line 288 of file pjsip_configuration.c.
References AST_SIP_SECURITY_NEG_MEDIASEC, AST_SIP_SECURITY_NEG_NONE, and ast_sip_endpoint::security_negotiation.
Referenced by security_negotiation_handler().
int ast_sip_sorcery_object_to_ami | ( | const void * | obj, |
struct ast_str ** | buf | ||
) |
Converts a sorcery object to a string of object properties.
obj | the sorcery object to convert |
buf | the string buffer to write the object data |
0 | Success, non-zero on failure |
Definition at line 1749 of file pjsip_configuration.c.
References ast_free, AST_HANDLER_ONLY_STRING, ast_sip_get_sorcery(), ast_sorcery_objectset_create2(), ast_str_append(), ast_to_camel_case, ast_variables_destroy(), buf, ast_variable::name, ast_variable::next, RAII_VAR, sip_sorcery_object_ami_set_type_name(), and ast_variable::value.
Referenced by ami_outbound_registration_task(), ami_registrations_aor(), format_ami_resource_lists(), sip_auth_to_ami(), sip_contact_to_ami(), sip_endpoint_to_ami(), sip_identify_to_ami(), and sip_transport_to_ami().
|
static |
Definition at line 1227 of file pjsip_configuration.c.
References ast_sip_call_codec_str_to_pref(), ast_sip_endpoint_media_configuration::incoming_call_offer_pref, ast_sip_endpoint::media, ast_sip_endpoint_media_configuration::outgoing_call_offer_pref, and var.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 677 of file pjsip_configuration.c.
References ast_callerid_split(), ast_free, ast_strdup, ast_strlen_zero(), ast_sip_endpoint::id, ast_party_id::name, NULL, ast_party_id::number, ast_sip_endpoint_id_configuration::self, ast_party_name::str, ast_party_number::str, ast_party_name::valid, ast_party_number::valid, and var.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 731 of file pjsip_configuration.c.
References ast_parse_caller_presentation(), ast_sip_endpoint::id, ast_party_id::name, ast_party_id::number, ast_party_name::presentation, ast_party_number::presentation, ast_sip_endpoint_id_configuration::self, and var.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 743 of file pjsip_configuration.c.
References ast_named_caller_presentation(), ast_strdup, buf, ast_sip_endpoint::id, ast_party_id::name, ast_party_name::presentation, and ast_sip_endpoint_id_configuration::self.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 753 of file pjsip_configuration.c.
References ast_free, ast_strdup, ast_sip_endpoint::id, ast_sip_endpoint_id_configuration::self, ast_party_id::tag, and var.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 763 of file pjsip_configuration.c.
References ast_strdup, buf, ast_sip_endpoint::id, ast_sip_endpoint_id_configuration::self, and ast_party_id::tag.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 708 of file pjsip_configuration.c.
References ast_callerid_merge(), ast_calloc, buf, ast_sip_endpoint::id, name, ast_party_id::name, NULL, ast_party_id::number, S_COR, ast_sip_endpoint_id_configuration::self, ast_party_name::str, ast_party_number::str, ast_party_name::valid, and ast_party_number::valid.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 839 of file pjsip_configuration.c.
References ast_calloc, ast_print_group(), buf, ast_sip_endpoint_pickup_configuration::callgroup, MAX_OBJECT_FIELD, and ast_sip_endpoint::pickup.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 1936 of file pjsip_configuration.c.
References AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_cleanup, ao2_container_alloc_list, ao2_container_dup(), ao2_ref, ast_sorcery_object_id_compare(), ast_sorcery_object_id_sort(), ast_sorcery_retrieve_by_regex(), container, NULL, RAII_VAR, regex(), and sip_sorcery.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 1960 of file pjsip_configuration.c.
References ao2_callback, args, and OBJ_NODATA.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 2014 of file pjsip_configuration.c.
References ao2_cleanup, ast_sip_endpoint::aors, ast_alloca, ast_assert, ast_sip_cli_print_sorcery_objectset(), ast_sip_get_device_state(), ast_sip_get_endpoint_snapshot(), ast_sorcery_object_get_id(), ast_str_append(), cli_endpoint_print_child_body(), CLI_INDENT_TO_SPACES, CLI_LAST_TABSTOP, voicemailpwcheck::context, ast_sip_endpoint::devicestate_busy_at, ast_sip_endpoint::id, ast_sip_endpoint::inbound_auths, INFINITY, NULL, ast_party_id::number, ast_sip_endpoint::outbound_auths, RAII_VAR, S_COR, ast_sip_endpoint_id_configuration::self, ast_party_number::str, and ast_party_number::valid.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 2004 of file pjsip_configuration.c.
References ao2_cleanup, ast_sip_lookup_cli_formatter(), voicemailpwcheck::context, NULL, RAII_VAR, and type.
Referenced by cli_endpoint_print_body().
|
static |
Definition at line 1972 of file pjsip_configuration.c.
References ao2_cleanup, ast_sip_lookup_cli_formatter(), voicemailpwcheck::context, NULL, RAII_VAR, and type.
Referenced by cli_endpoint_print_header().
|
static |
Definition at line 1982 of file pjsip_configuration.c.
References ast_assert, ast_str_append(), cli_endpoint_print_child_header(), voicemailpwcheck::context, and NULL.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 1967 of file pjsip_configuration.c.
References ast_sip_get_sorcery(), and ast_sorcery_retrieve_by_id().
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 1272 of file pjsip_configuration.c.
References ast_free, ast_log, ast_sorcery_object_get_id(), ast_str_buffer(), ast_str_create, ast_stream_codec_operation_to_str, ast_stream_codec_param_to_str, ast_stream_codec_prefs_parse(), CODEC_NEGOTIATION_KEEP_ALL, CODEC_NEGOTIATION_KEEP_UNSPECIFIED, CODEC_NEGOTIATION_OPERATION_INTERSECT, CODEC_NEGOTIATION_OPERATION_UNION, CODEC_NEGOTIATION_OPERATION_UNSPECIFIED, CODEC_NEGOTIATION_PARAM_OPERATION, CODEC_NEGOTIATION_PREFER_PENDING, CODEC_NEGOTIATION_PREFER_UNSPECIFIED, CODEC_NEGOTIATION_TRANSCODE_ALLOW, CODEC_NEGOTIATION_TRANSCODE_UNSPECIFIED, ast_sip_endpoint_media_configuration::codec_prefs_incoming_answer, ast_sip_endpoint_media_configuration::codec_prefs_incoming_offer, ast_sip_endpoint_media_configuration::codec_prefs_outgoing_answer, ast_sip_endpoint_media_configuration::codec_prefs_outgoing_offer, ast_stream_codec_negotiation_prefs::keep, LOG_ERROR, ast_sip_endpoint::media, ast_stream_codec_negotiation_prefs::operation, ast_stream_codec_negotiation_prefs::prefer, ast_stream_codec_negotiation_prefs::transcode, and var.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 1347 of file pjsip_configuration.c.
References ast_free, ast_str_create, ast_strdup, ast_stream_codec_prefs_to_str(), AST_STREAM_MAX_CODEC_PREFS_LENGTH, buf, and codecs.
Referenced by incoming_answer_codec_prefs_to_str(), incoming_offer_codec_prefs_to_str(), outgoing_answer_codec_prefs_to_str(), and outgoing_offer_codec_prefs_to_str().
|
static |
Definition at line 619 of file pjsip_configuration.c.
References ast_log, AST_SIP_SESSION_REFRESH_METHOD_INVITE, AST_SIP_SESSION_REFRESH_METHOD_UPDATE, ast_sorcery_object_get_id(), ast_sip_endpoint::id, LOG_NOTICE, ast_sip_endpoint_id_configuration::refresh_method, and var.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 635 of file pjsip_configuration.c.
References ast_strdup, buf, ast_sip_endpoint::id, id_configuration_refresh_methods, and ast_sip_endpoint_id_configuration::refresh_method.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 127 of file pjsip_configuration.c.
References ast_acl_list_is_empty(), AST_LIST_FIRST, AST_LIST_LOCK, AST_LIST_UNLOCK, ast_strdup, ast_strlen_zero(), buf, ast_sip_endpoint::contact_acl, and ast_acl::name.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 1204 of file pjsip_configuration.c.
References ast_free, ast_strdup, ast_sip_endpoint::contact_user, and var.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 1215 of file pjsip_configuration.c.
References ast_strdup, buf, and ast_sip_endpoint::contact_user.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 642 of file pjsip_configuration.c.
References ast_log, AST_SIP_DIRECT_MEDIA_GLARE_MITIGATION_INCOMING, AST_SIP_DIRECT_MEDIA_GLARE_MITIGATION_NONE, AST_SIP_DIRECT_MEDIA_GLARE_MITIGATION_OUTGOING, ast_sorcery_object_get_id(), ast_sip_endpoint_media_configuration::direct_media, ast_sip_direct_media_configuration::glare_mitigation, LOG_NOTICE, ast_sip_endpoint::media, and var.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 667 of file pjsip_configuration.c.
References ARRAY_IN_BOUNDS, ast_strdup, buf, ast_sip_endpoint_media_configuration::direct_media, direct_media_glare_mitigation_map, ast_sip_direct_media_configuration::glare_mitigation, and ast_sip_endpoint::media.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 589 of file pjsip_configuration.c.
References ast_log, AST_SIP_SESSION_REFRESH_METHOD_INVITE, AST_SIP_SESSION_REFRESH_METHOD_UPDATE, ast_sorcery_object_get_id(), ast_sip_endpoint_media_configuration::direct_media, LOG_NOTICE, ast_sip_endpoint::media, ast_sip_direct_media_configuration::method, and var.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 610 of file pjsip_configuration.c.
References ARRAY_IN_BOUNDS, ast_strdup, buf, ast_sip_endpoint::id, id_configuration_refresh_methods, and ast_sip_endpoint_id_configuration::refresh_method.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 911 of file pjsip_configuration.c.
References ast_copy_string(), ast_rtp_dtls_cfg_parse(), ast_strdupa, buf, ast_sip_media_rtp_configuration::dtls_cfg, ast_sip_endpoint::media, name, NULL, ast_sip_endpoint_media_configuration::rtp, and var.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 947 of file pjsip_configuration.c.
References ast_strdup, AST_YESNO, buf, ast_sip_media_rtp_configuration::dtls_cfg, ast_rtp_dtls_cfg::ephemeral_cert, ast_sip_endpoint::media, and ast_sip_endpoint_media_configuration::rtp.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 975 of file pjsip_configuration.c.
References ast_strdup, buf, ast_rtp_dtls_cfg::cafile, ast_sip_media_rtp_configuration::dtls_cfg, ast_sip_endpoint::media, and ast_sip_endpoint_media_configuration::rtp.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 982 of file pjsip_configuration.c.
References ast_strdup, buf, ast_rtp_dtls_cfg::capath, ast_sip_media_rtp_configuration::dtls_cfg, ast_sip_endpoint::media, and ast_sip_endpoint_media_configuration::rtp.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 954 of file pjsip_configuration.c.
References ast_strdup, buf, ast_rtp_dtls_cfg::certfile, ast_sip_media_rtp_configuration::dtls_cfg, ast_sip_endpoint::media, and ast_sip_endpoint_media_configuration::rtp.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 968 of file pjsip_configuration.c.
References ast_strdup, buf, ast_rtp_dtls_cfg::cipher, ast_sip_media_rtp_configuration::dtls_cfg, ast_sip_endpoint::media, and ast_sip_endpoint_media_configuration::rtp.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 1010 of file pjsip_configuration.c.
References ARRAY_IN_BOUNDS, ast_rtp_dtls_fingerprint_map, ast_strdup, buf, ast_sip_media_rtp_configuration::dtls_cfg, ast_rtp_dtls_cfg::hash, ast_sip_endpoint::media, and ast_sip_endpoint_media_configuration::rtp.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 961 of file pjsip_configuration.c.
References ast_strdup, buf, ast_sip_media_rtp_configuration::dtls_cfg, ast_sip_endpoint::media, ast_rtp_dtls_cfg::pvtfile, and ast_sip_endpoint_media_configuration::rtp.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 939 of file pjsip_configuration.c.
References ast_asprintf, buf, ast_sip_media_rtp_configuration::dtls_cfg, ast_sip_endpoint::media, ast_rtp_dtls_cfg::rekey, and ast_sip_endpoint_media_configuration::rtp.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 996 of file pjsip_configuration.c.
References ARRAY_IN_BOUNDS, ast_rtp_dtls_setup_map, ast_strdup, buf, ast_rtp_dtls_cfg::default_setup, ast_sip_media_rtp_configuration::dtls_cfg, ast_sip_endpoint::media, and ast_sip_endpoint_media_configuration::rtp.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 932 of file pjsip_configuration.c.
References ast_strdup, AST_YESNO, buf, ast_sip_media_rtp_configuration::dtls_cfg, ast_sip_endpoint::media, ast_sip_endpoint_media_configuration::rtp, and ast_rtp_dtls_cfg::verify.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 148 of file pjsip_configuration.c.
References ast_sip_str_to_dtmf(), ast_sip_endpoint::dtmf, and var.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 161 of file pjsip_configuration.c.
References ast_sip_dtmf_to_str(), ast_strdup, buf, ast_sip_endpoint::dtmf, and result.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 89 of file pjsip_configuration.c.
References ast_sip_endpoint::acl, ast_append_acl(), ast_strlen_zero(), ast_sip_endpoint::contact_acl, error(), sip_to_pjsip::ignore(), and var.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 77 of file pjsip_configuration.c.
References ao2_find, ast_endpoint_get_resource(), OBJ_NODATA, OBJ_SEARCH_KEY, OBJ_UNLINK, ast_sip_endpoint::persistent, and persistent_endpoints.
|
static |
Definition at line 2415 of file pjsip_configuration.c.
References ast_sip_endpoint::acl, ao2_cleanup, ast_free, ast_free_acl_list(), ast_party_id_free(), ast_sip_auth_vector_destroy(), ast_sip_security_mechanisms_vector_destroy(), ast_stream_topology_free(), ast_string_field_free_memory, ast_unref_namedgroups(), ast_variables_destroy(), AST_VECTOR_FREE, ast_sip_endpoint::channel_vars, ast_sip_endpoint_media_configuration::codecs, ast_sip_endpoint::contact_acl, ast_sip_endpoint::contact_user, ast_sip_endpoint::id, ast_sip_endpoint::ident_method_order, ast_sip_endpoint::inbound_auths, ast_sip_endpoint::info, info_configuration_destroy(), ast_sip_endpoint::media, media_configuration_destroy(), ast_sip_endpoint_pickup_configuration::named_callgroups, ast_sip_endpoint_pickup_configuration::named_pickupgroups, ast_sip_endpoint::outbound_auths, ast_sip_endpoint::persistent, ast_sip_endpoint::pickup, ast_sip_endpoint::security_mechanisms, ast_sip_endpoint_id_configuration::self, ast_sip_endpoint::subscription, subscription_configuration_destroy(), and ast_sip_endpoint_media_configuration::topology.
Referenced by ast_sip_endpoint_alloc().
|
static |
Definition at line 1798 of file pjsip_configuration.c.
References ast_free, ast_sip_create_ami_event(), ast_str_buffer(), astman_append(), buf, RAII_VAR, ast_sip_ami::s, and sip_endpoint_to_ami().
Referenced by ami_show_endpoint().
|
static |
Definition at line 1869 of file pjsip_configuration.c.
References active_channels_to_str(), ast_sip_endpoint::aors, ast_sip_ami::arg, ast_free, ast_sip_create_ami_event(), ast_sip_for_each_aor(), ast_sip_get_device_state(), ast_str_append(), ast_str_buffer(), astman_append(), buf, CMP_STOP, format_str_append_auth(), ast_sip_endpoint::inbound_auths, ast_sip_endpoint::outbound_auths, RAII_VAR, ast_sip_ami::s, sip_endpoints_aors_ami(), sip_sorcery_object_ami_set_type_name(), and ast_sip_endpoint::transport.
Referenced by ami_show_endpoints().
|
static |
Definition at line 1857 of file pjsip_configuration.c.
References ast_free, ast_sip_auths_to_str(), ast_str_append(), buf, NULL, and str.
Referenced by format_ami_endpoints().
|
static |
Definition at line 1098 of file pjsip_configuration.c.
References ast_log, ast_sorcery_object_get_id(), ast_string_field_set, ast_sip_endpoint::fromuser, LOG_ERROR, and var.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 1120 of file pjsip_configuration.c.
References ast_strdup, buf, and ast_sip_endpoint::fromuser.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 823 of file pjsip_configuration.c.
References ast_get_group(), ast_sip_endpoint_pickup_configuration::callgroup, ast_sip_endpoint::pickup, ast_sip_endpoint_pickup_configuration::pickupgroup, and var.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 462 of file pjsip_configuration.c.
References ast_log, ast_sorcery_object_get_id(), ast_strdupa, ast_strip(), ast_strlen_zero(), AST_VECTOR_APPEND, AST_VECTOR_ELEM_CLEANUP_NOOP, AST_VECTOR_RESET, AST_VECTOR_SIZE, ast_sip_endpoint::ident_method, ast_sip_endpoint::ident_method_order, LOG_ERROR, method, sip_endpoint_identifier_str2type(), strsep(), and var.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 503 of file pjsip_configuration.c.
References ast_assert, ast_log, ast_malloc, AST_VECTOR_GET, AST_VECTOR_SIZE, buf, ast_sip_endpoint::ident_method_order, LOG_WARNING, MAX_OBJECT_FIELD, method, methods, and sip_endpoint_identifier_type2str().
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 360 of file pjsip_configuration.c.
References ast_sip_auth_vector_init(), ast_sip_endpoint::inbound_auths, and var.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 389 of file pjsip_configuration.c.
References ast_sip_auths_to_str(), buf, and ast_sip_endpoint::inbound_auths.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 1374 of file pjsip_configuration.c.
References args, buf, ast_sip_endpoint_media_configuration::codec_prefs_incoming_answer, codec_prefs_to_str(), and ast_sip_endpoint::media.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 1248 of file pjsip_configuration.c.
References ast_sip_call_codec_pref_to_str(), ast_strdup, buf, ast_sip_endpoint_media_configuration::incoming_call_offer_pref, and ast_sip_endpoint::media.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 1362 of file pjsip_configuration.c.
References args, buf, ast_sip_endpoint_media_configuration::codec_prefs_incoming_offer, codec_prefs_to_str(), and ast_sip_endpoint::media.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 2403 of file pjsip_configuration.c.
References ast_string_field_free_memory, and sip_to_pjsip::info().
Referenced by endpoint_destructor().
|
static |
Definition at line 2445 of file pjsip_configuration.c.
References ast_string_field_init, and sip_to_pjsip::info().
Referenced by ast_sip_endpoint_alloc().
|
static |
Definition at line 2450 of file pjsip_configuration.c.
References ast_string_field_init, ast_sip_endpoint::media, and ast_sip_endpoint_media_configuration::rtp.
Referenced by ast_sip_endpoint_alloc().
|
static |
Definition at line 2440 of file pjsip_configuration.c.
References ast_string_field_init, ast_sip_endpoint_subscription_configuration::mwi, and ast_sip_endpoint::subscription.
Referenced by ast_sip_endpoint_alloc().
|
static |
Definition at line 2095 of file pjsip_configuration.c.
References ao2_cleanup, AST_RETRIEVE_FLAG_ALL, AST_RETRIEVE_FLAG_MULTIPLE, ast_sorcery_retrieve_by_fields(), endpoints, NULL, and sip_sorcery.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 547 of file pjsip_configuration.c.
References ast_sockaddr_parse(), ast_sockaddr_stringify_addr_remote(), ast_string_field_set, and var.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 563 of file pjsip_configuration.c.
References ast_sip_endpoint_media_configuration::address, ast_strdup, buf, and ast_sip_endpoint::media.
Referenced by ast_res_pjsip_initialize_configuration().
|
static |
Definition at line 2408 of file pjsip_configuration.c.
References ast_rtp_dtls_cfg_free(), ast_string_field_free_memory, ast_sip_media_rtp_configuration::dtls_cfg, and ast_sip_endpoint_media_configuration::rtp.
Referenced by endpoint_destructor().
|
static |
Definition at line 770 of file pjsip_configuration.c.