Asterisk - The Open Source Telephony Project GIT-master-b023714
|
STUN Network Monitor. More...
#include "asterisk.h"
#include "asterisk/module.h"
#include "asterisk/sched.h"
#include "asterisk/config.h"
#include "asterisk/stun.h"
#include "asterisk/netsock2.h"
#include "asterisk/lock.h"
#include "asterisk/acl.h"
#include "asterisk/cli.h"
#include "asterisk/json.h"
#include "asterisk/stasis.h"
#include "asterisk/stasis_system.h"
#include "asterisk/astobj2.h"
#include <fcntl.h>
Go to the source code of this file.
Macros | |
#define | DATALN "%-25s %-5u %-7u %-8d %-7s %-16s %-d\n" |
#define | DEFAULT_MONITOR_REFRESH 30 |
#define | DEFAULT_RETRIES 3 |
#define | HEADER "%-25s %-5s %-7s %-8s %-7s %-16s %-s\n" |
Functions | |
static void | __reg_module (void) |
static int | __reload (int startup) |
static void | __unreg_module (void) |
static void | _stun_show_status (int fd) |
Execute stun show status command. | |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static char * | handle_cli_stun_show_status (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static int | load_config (int startup) |
static int | load_module (void) |
static int | reload (void) |
static int | setup_stunaddr (const char *value, int reload) |
static void | stun_close_sock (void) |
static int | stun_monitor_request (const void *blarg) |
called by scheduler to send STUN request | |
static int | stun_start_monitor (void) |
static void | stun_stop_monitor (void) |
static int | unload_module (void) |
Variables | ||
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER , .description = "STUN Network Monitor" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .reload = reload, .load_pri = AST_MODPRI_CHANNEL_DEPEND } | |
struct { | ||
struct sockaddr_in external_addr | ||
unsigned int external_addr_known:1 | ||
ast_mutex_t lock | ||
unsigned int monitor_enabled:1 | ||
unsigned int refresh | ||
const char * server_hostname | ||
unsigned int stun_poll_failed_gripe:1 | ||
unsigned int stun_port | ||
int stun_sock | ||
} | args | |
static const struct ast_module_info * | ast_module_info = &__mod_info | |
static struct ast_cli_entry | cli_stun [] | |
static struct ast_sched_context * | sched | |
static const char | stun_conf_file [] = "res_stun_monitor.conf" | |
STUN Network Monitor.
Definition in file res_stun_monitor.c.
#define DATALN "%-25s %-5u %-7u %-8d %-7s %-16s %-d\n" |
#define DEFAULT_MONITOR_REFRESH 30 |
Default refresh period in seconds
Definition at line 47 of file res_stun_monitor.c.
#define DEFAULT_RETRIES 3 |
retries shown in stun show status matching static retries in stun.c
Definition at line 49 of file res_stun_monitor.c.
#define HEADER "%-25s %-5s %-7s %-8s %-7s %-16s %-s\n" |
|
static |
Definition at line 483 of file res_stun_monitor.c.
|
static |
Definition at line 429 of file res_stun_monitor.c.
References args, ast_mutex_lock, ast_mutex_unlock, load_config(), stun_start_monitor(), and stun_stop_monitor().
Referenced by load_module(), and reload().
|
static |
Definition at line 483 of file res_stun_monitor.c.
|
static |
Execute stun show status command.
we only have one stun server, but start to play well with more
Definition at line 373 of file res_stun_monitor.c.
References args, ast_cli(), ast_inet_ntoa(), DATALN, DEFAULT_RETRIES, HEADER, and status.
Referenced by handle_cli_stun_show_status().
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 483 of file res_stun_monitor.c.
|
static |
Definition at line 404 of file res_stun_monitor.c.
References _stun_show_status(), a, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, NULL, and ast_cli_entry::usage.
|
static |
Definition at line 323 of file res_stun_monitor.c.
References args, ast_config_destroy(), ast_config_load2(), ast_log, ast_set_flag, ast_variable_browse(), CONFIG_FLAG_FILEUNCHANGED, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEUNCHANGED, DEFAULT_MONITOR_REFRESH, ast_variable::lineno, LOG_WARNING, ast_variable::name, ast_variable::next, setup_stunaddr(), stun_close_sock(), stun_conf_file, and ast_variable::value.
|
static |
Register CLI commands
Definition at line 462 of file res_stun_monitor.c.
References __reload(), args, ast_cli_register_multiple, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_mutex_destroy, ast_mutex_init, and cli_stun.
|
static |
Definition at line 446 of file res_stun_monitor.c.
References __reload().
Referenced by setup_stunaddr().
|
static |
Definition at line 269 of file res_stun_monitor.c.
References args, ast_free, ast_get_ip(), ast_log, ast_sockaddr_split_hostport(), ast_strdup, ast_strdupa, ast_strlen_zero(), LOG_WARNING, reload(), STANDARD_STUN_PORT, and value.
Referenced by load_config().
|
static |
Definition at line 75 of file res_stun_monitor.c.
References args.
Referenced by load_config(), stun_monitor_request(), stun_start_monitor(), and stun_stop_monitor().
|
static |
called by scheduler to send STUN request
Definition at line 84 of file res_stun_monitor.c.
References answer(), ao2_cleanup, args, ast_connect(), ast_get_ip(), ast_inet_ntoa(), ast_json_object_create(), ast_json_payload_create(), ast_json_unref(), ast_log, ast_mutex_lock, ast_mutex_unlock, ast_network_change_type(), ast_sockaddr_set_port, ast_sockaddr_stringify(), ast_strdupa, ast_stun_request(), ast_system_topic(), errno, LOG_ERROR, LOG_NOTICE, LOG_WARNING, NULL, RAII_VAR, stasis_message_create(), stasis_publish(), and stun_close_sock().
Referenced by stun_start_monitor().
|
static |
Definition at line 228 of file res_stun_monitor.c.
References args, ast_log, ast_sched_add_variable(), ast_sched_context_create(), ast_sched_context_destroy(), ast_sched_start_thread(), LOG_ERROR, LOG_NOTICE, NULL, stun_close_sock(), and stun_monitor_request().
Referenced by __reload().
|
static |
Definition at line 206 of file res_stun_monitor.c.
References args, ast_free, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_sched_context_destroy(), LOG_NOTICE, NULL, and stun_close_sock().
Referenced by __reload(), and unload_module().
|
static |
Unregister CLI commands
Definition at line 451 of file res_stun_monitor.c.
References args, ARRAY_LEN, ast_cli_unregister_multiple(), ast_mutex_destroy, cli_stun, and stun_stop_monitor().
|
static |
Definition at line 483 of file res_stun_monitor.c.
struct { ... } args |
Referenced by __ast_pbx_run(), __ast_sorcery_object_field_register(), __reload(), _stun_show_status(), acf_abs_exec(), acf_channel_read(), acf_curl_exec(), acf_curl_helper(), acf_curl_write(), acf_jabberreceive_read(), acf_jabberstatus_read(), acf_max_exec(), acf_meetme_info(), acf_min_exec(), acf_odbc_read(), acf_odbc_write(), acf_rand_exec(), acf_strftime(), acf_strptime(), acf_transaction_read(), acf_transaction_write(), acf_version_exec(), acf_vm_info(), acf_vmcount_exec(), action_dialplan_exec(), add_action_to_menu_entry(), add_format_information_cb(), admin_exec(), adsi_process(), aelsub_exec(), aes_helper(), agent_function_read(), agent_login_exec(), agent_request_exec(), agi_exec_full(), answer_exec_enable(), answer_exec_run(), app_control_dial(), app_exec(), app_exec(), app_exec(), app_notify(), applicationmap_handler(), aqm_exec(), ast_app_expand_sub_args(), ast_app_parse_options(), ast_app_parse_options64(), ast_ari_applications_filter(), ast_ari_applications_filter_cb(), ast_ari_applications_get(), ast_ari_applications_get_cb(), ast_ari_applications_list_cb(), ast_ari_applications_subscribe(), ast_ari_applications_subscribe_cb(), ast_ari_applications_subscribe_parse_body(), ast_ari_applications_unsubscribe(), ast_ari_applications_unsubscribe_cb(), ast_ari_applications_unsubscribe_parse_body(), ast_ari_asterisk_add_log(), ast_ari_asterisk_add_log_cb(), ast_ari_asterisk_add_log_parse_body(), ast_ari_asterisk_delete_log(), ast_ari_asterisk_delete_log_cb(), ast_ari_asterisk_delete_object(), ast_ari_asterisk_delete_object_cb(), ast_ari_asterisk_get_global_var(), ast_ari_asterisk_get_global_var_cb(), ast_ari_asterisk_get_global_var_parse_body(), ast_ari_asterisk_get_info(), ast_ari_asterisk_get_info_cb(), ast_ari_asterisk_get_info_parse_body(), ast_ari_asterisk_get_module(), ast_ari_asterisk_get_module_cb(), ast_ari_asterisk_get_object(), ast_ari_asterisk_get_object_cb(), ast_ari_asterisk_list_log_channels_cb(), ast_ari_asterisk_list_modules_cb(), ast_ari_asterisk_load_module(), ast_ari_asterisk_load_module_cb(), ast_ari_asterisk_ping_cb(), ast_ari_asterisk_reload_module(), ast_ari_asterisk_reload_module_cb(), ast_ari_asterisk_rotate_log(), ast_ari_asterisk_rotate_log_cb(), ast_ari_asterisk_set_global_var(), ast_ari_asterisk_set_global_var_cb(), ast_ari_asterisk_set_global_var_parse_body(), ast_ari_asterisk_unload_module(), ast_ari_asterisk_unload_module_cb(), ast_ari_asterisk_update_object(), ast_ari_asterisk_update_object_cb(), ast_ari_bridges_add_channel(), ast_ari_bridges_add_channel_cb(), ast_ari_bridges_add_channel_parse_body(), ast_ari_bridges_clear_video_source(), ast_ari_bridges_clear_video_source_cb(), ast_ari_bridges_create(), ast_ari_bridges_create_cb(), ast_ari_bridges_create_parse_body(), ast_ari_bridges_create_with_id(), ast_ari_bridges_create_with_id_cb(), ast_ari_bridges_create_with_id_parse_body(), ast_ari_bridges_destroy(), ast_ari_bridges_destroy_cb(), ast_ari_bridges_get(), ast_ari_bridges_get_cb(), ast_ari_bridges_list_cb(), ast_ari_bridges_play(), ast_ari_bridges_play_cb(), ast_ari_bridges_play_parse_body(), ast_ari_bridges_play_with_id(), ast_ari_bridges_play_with_id_cb(), ast_ari_bridges_play_with_id_parse_body(), ast_ari_bridges_record(), ast_ari_bridges_record_cb(), ast_ari_bridges_record_parse_body(), ast_ari_bridges_remove_channel(), ast_ari_bridges_remove_channel_cb(), ast_ari_bridges_remove_channel_parse_body(), ast_ari_bridges_set_video_source(), ast_ari_bridges_set_video_source_cb(), ast_ari_bridges_start_moh(), ast_ari_bridges_start_moh_cb(), ast_ari_bridges_start_moh_parse_body(), ast_ari_bridges_stop_moh(), ast_ari_bridges_stop_moh_cb(), ast_ari_channels_answer(), ast_ari_channels_answer_cb(), ast_ari_channels_continue_in_dialplan(), ast_ari_channels_continue_in_dialplan_cb(), ast_ari_channels_continue_in_dialplan_parse_body(), ast_ari_channels_create(), ast_ari_channels_create_cb(), ast_ari_channels_create_parse_body(), ast_ari_channels_dial(), ast_ari_channels_dial_cb(), ast_ari_channels_dial_parse_body(), ast_ari_channels_external_media(), ast_ari_channels_external_media_cb(), ast_ari_channels_external_media_parse_body(), ast_ari_channels_get(), ast_ari_channels_get_cb(), ast_ari_channels_get_channel_var(), ast_ari_channels_get_channel_var_cb(), ast_ari_channels_get_channel_var_parse_body(), ast_ari_channels_hangup(), ast_ari_channels_hangup_cb(), ast_ari_channels_hangup_parse_body(), ast_ari_channels_hold(), ast_ari_channels_hold_cb(), ast_ari_channels_list_cb(), ast_ari_channels_move(), ast_ari_channels_move_cb(), ast_ari_channels_move_parse_body(), ast_ari_channels_mute(), ast_ari_channels_mute_cb(), ast_ari_channels_mute_parse_body(), ast_ari_channels_originate(), ast_ari_channels_originate_cb(), ast_ari_channels_originate_parse_body(), ast_ari_channels_originate_with_id(), ast_ari_channels_originate_with_id_cb(), ast_ari_channels_originate_with_id_parse_body(), ast_ari_channels_play(), ast_ari_channels_play_cb(), ast_ari_channels_play_parse_body(), ast_ari_channels_play_with_id(), ast_ari_channels_play_with_id_cb(), ast_ari_channels_play_with_id_parse_body(), ast_ari_channels_progress(), ast_ari_channels_progress_cb(), ast_ari_channels_record(), ast_ari_channels_record_cb(), ast_ari_channels_record_parse_body(), ast_ari_channels_redirect(), ast_ari_channels_redirect_cb(), ast_ari_channels_redirect_parse_body(), ast_ari_channels_ring(), ast_ari_channels_ring_cb(), ast_ari_channels_ring_stop(), ast_ari_channels_ring_stop_cb(), ast_ari_channels_rtpstatistics(), ast_ari_channels_rtpstatistics_cb(), ast_ari_channels_send_dtmf(), ast_ari_channels_send_dtmf_cb(), ast_ari_channels_send_dtmf_parse_body(), ast_ari_channels_set_channel_var(), ast_ari_channels_set_channel_var_cb(), ast_ari_channels_set_channel_var_parse_body(), ast_ari_channels_snoop_channel(), ast_ari_channels_snoop_channel_cb(), ast_ari_channels_snoop_channel_parse_body(), ast_ari_channels_snoop_channel_with_id(), ast_ari_channels_snoop_channel_with_id_cb(), ast_ari_channels_snoop_channel_with_id_parse_body(), ast_ari_channels_start_moh(), ast_ari_channels_start_moh_cb(), ast_ari_channels_start_moh_parse_body(), ast_ari_channels_start_silence(), ast_ari_channels_start_silence_cb(), ast_ari_channels_stop_moh(), ast_ari_channels_stop_moh_cb(), ast_ari_channels_stop_silence(), ast_ari_channels_stop_silence_cb(), ast_ari_channels_transfer_progress(), ast_ari_channels_transfer_progress_cb(), ast_ari_channels_transfer_progress_parse_body(), ast_ari_channels_unhold(), ast_ari_channels_unhold_cb(), ast_ari_channels_unmute(), ast_ari_channels_unmute_cb(), ast_ari_channels_unmute_parse_body(), ast_ari_device_states_delete(), ast_ari_device_states_delete_cb(), ast_ari_device_states_get(), ast_ari_device_states_get_cb(), ast_ari_device_states_list_cb(), ast_ari_device_states_update(), ast_ari_device_states_update_cb(), ast_ari_device_states_update_parse_body(), ast_ari_endpoints_get(), ast_ari_endpoints_get_cb(), ast_ari_endpoints_list_by_tech(), ast_ari_endpoints_list_by_tech_cb(), ast_ari_endpoints_list_cb(), ast_ari_endpoints_refer(), ast_ari_endpoints_refer_cb(), ast_ari_endpoints_refer_parse_body(), ast_ari_endpoints_refer_to_endpoint(), ast_ari_endpoints_refer_to_endpoint_cb(), ast_ari_endpoints_refer_to_endpoint_parse_body(), ast_ari_endpoints_send_message(), ast_ari_endpoints_send_message_cb(), ast_ari_endpoints_send_message_parse_body(), ast_ari_endpoints_send_message_to_endpoint(), ast_ari_endpoints_send_message_to_endpoint_cb(), ast_ari_endpoints_send_message_to_endpoint_parse_body(), ast_ari_events_user_event(), ast_ari_events_user_event_cb(), ast_ari_events_user_event_parse_body(), ast_ari_mailboxes_delete(), ast_ari_mailboxes_delete_cb(), ast_ari_mailboxes_get(), ast_ari_mailboxes_get_cb(), ast_ari_mailboxes_list_cb(), ast_ari_mailboxes_update(), ast_ari_mailboxes_update_cb(), ast_ari_mailboxes_update_parse_body(), ast_ari_playbacks_control(), ast_ari_playbacks_control_cb(), ast_ari_playbacks_control_parse_body(), ast_ari_playbacks_get(), ast_ari_playbacks_get_cb(), ast_ari_playbacks_stop(), ast_ari_playbacks_stop_cb(), ast_ari_recordings_cancel(), ast_ari_recordings_cancel_cb(), ast_ari_recordings_copy_stored(), ast_ari_recordings_copy_stored_cb(), ast_ari_recordings_copy_stored_parse_body(), ast_ari_recordings_delete_stored(), ast_ari_recordings_delete_stored_cb(), ast_ari_recordings_get_live(), ast_ari_recordings_get_live_cb(), ast_ari_recordings_get_stored(), ast_ari_recordings_get_stored_cb(), ast_ari_recordings_get_stored_file(), ast_ari_recordings_get_stored_file_cb(), ast_ari_recordings_list_stored_cb(), ast_ari_recordings_mute(), ast_ari_recordings_mute_cb(), ast_ari_recordings_pause(), ast_ari_recordings_pause_cb(), ast_ari_recordings_stop(), ast_ari_recordings_stop_cb(), ast_ari_recordings_unmute(), ast_ari_recordings_unmute_cb(), ast_ari_recordings_unpause(), ast_ari_recordings_unpause_cb(), ast_ari_sounds_get(), ast_ari_sounds_get_cb(), ast_ari_sounds_list(), ast_ari_sounds_list_cb(), ast_ari_sounds_list_parse_body(), ast_beep_start(), ast_cc_agent_callback(), ast_cc_agent_status_response(), ast_cli_command_full(), ast_eivr_senddtmf(), ast_func_read(), ast_func_read2(), ast_func_write(), ast_json_pack(), ast_json_stringf(), ast_json_vstringf(), ast_pbx_run_args(), ast_queue_log(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), asyncgoto_exec(), attended_transfer_exec(), audiosocket_exec(), audiosocket_request(), background_detect_exec(), blind_transfer_exec(), bool_handler_fn(), bridge_exec(), bridgewait_exec(), broadcast_exec(), build_profile(), calendar_query_exec(), calendar_query_result_exec(), callerid_read(), callerid_write(), cc_agent_callback_helper(), cc_do_state_change(), cc_failed(), cc_request_state_change(), cc_status_response(), cdr_prop_write_callback(), cdr_read_callback(), cdr_write(), cdr_write_callback(), celgenuserevent_exec(), chanavail_exec(), channel_admin_exec(), channel_set_debug(), chanspy_exec(), chararray_handler_fn(), checknoargs(), clearcbone(), cleardisplay(), clearflag(), cleartimer(), cli_aor_iterate(), cli_contact_iterate(), cli_endpoint_iterate(), cli_iterate(), cli_iterator(), cli_iterator(), cli_iterator(), cli_odbc_read(), cli_odbc_write(), cli_unid_iterate(), codec_handler_fn(), conf_exec(), confbridge_exec(), config_function_read(), confkick_exec(), connectedline_write(), control_dial_args_alloc(), control_dial_args_destroy(), controlplayback_exec(), count_exec(), create_sound_blob(), cut_internal(), dahdi_call(), dahdichan_helper(), detect_write(), determine_starting_point(), dial_exec_full(), dial_trunk(), dialgroup_write(), dictate_exec(), digitcollect(), digitdirect(), directory_exec(), disa_exec(), double_handler_fn(), dtmfstore_exec(), dundi_query_read(), dundi_result_read(), dundifunc_read(), eivr_comm(), enable_jack_hook(), enum_query_read(), enum_result_read(), exec_exec(), expand_gosub_args(), extenspy_exec(), external_media_audiosocket_tcp(), external_media_rtp_udp(), external_media_websocket(), festival_exec(), file_count_line(), file_read(), file_write(), filter(), find_by_name(), find_by_uniqueid(), find_conf(), findoption(), forkcdr_exec(), func_args(), func_confbridge_channels(), func_confbridge_helper(), func_confbridge_info(), func_export_write(), func_get_parkingslot_channel(), func_mixmonitor_read(), func_read(), func_read_header(), func_read_headers(), func_read_param(), func_response_read_header(), func_response_read_headers(), func_write_header(), func_write_param(), function_amiclient(), function_db_delete(), function_db_exists(), function_db_read(), function_db_write(), function_enum(), function_fieldnum_helper(), function_fieldqty_helper(), function_realtime_read(), function_realtime_readdestroy(), function_realtime_write(), function_txtcidname(), general_apply(), geoloc_profile_read(), geoloc_profile_write(), gosubif_exec(), goto_line(), goto_line_rel(), handle_cli_presencestate_change(), handle_core_set_debug_channel(), handle_gosub(), hangupcause_read(), hint_read(), hook_on(), iconv_read(), import_helper(), incoming_answer_codec_prefs_to_str(), incoming_offer_codec_prefs_to_str(), int_handler_fn(), isAnsweringMachine(), isexten_function_read(), jb_debug_output(), jb_error_output(), jb_helper(), jb_warning_output(), jingle_request(), json_decode_read(), listfilter(), load_channelvars(), load_config(), load_module(), log_exec(), main(), man_do_variable_value(), manager_mixmonitor(), math(), mbl_sendsms_exec(), mbl_status_exec(), mixmonitor_exec(), msg_send_exec(), multicast_rtp_request(), mute_mixmonitor_instance(), onevent(), originate_exec(), outgoing_answer_codec_prefs_to_str(), outgoing_offer_codec_prefs_to_str(), page_exec(), park_and_announce_app_exec(), park_app_parse_data(), parked_call_app_exec(), parse_options(), parse_uri_cb(), parseargs(), parsedoublearg(), parsefilearg(), parseintarg(), parseswitcharg(), parsetimearg(), parsevolarg(), pbx_builtin_answer(), pbx_builtin_background(), pbx_builtin_saycharacters_case(), pbx_builtin_setvar_multiple(), pbx_builtin_waitdigit(), pbx_builtin_waitexten(), peek_read(), pickupchan_exec(), pjsip_acf_channel_read(), pjsip_acf_dial_contacts_read(), pjsip_acf_parse_uri_read(), pjsip_aor_function_read(), pjsip_contact_function_read(), pjsip_endpoint_function_read(), play_moh_exec(), playback_exec(), pp_each_extension_helper(), pp_each_user_helper(), pqm_exec(), presence_read(), presence_write(), privacy_exec(), process_opcode(), process_returncode(), pvalAppCallWalkArgs(), pvalMacroCallWalkArgs(), ql_exec(), queue_exec(), queue_function_mem_read(), queue_function_mem_write(), queue_function_memberpenalty_read(), queue_function_memberpenalty_write(), queue_function_queuegetchannel(), queue_match(), qupd_exec(), realtime_sqlite3_load(), realtimefield_read(), receivefax_exec(), record_exec(), recordthread(), recvtext_exec(), redirecting_write(), regex(), reload_single_member(), replace(), request(), resetcdr_exec(), retrydial_exec(), rqm_exec(), run_station(), saycountedadj_exec(), saycountednoun_exec(), sayfile_exec(), sayunixtime_exec(), scan_exec(), scramble_write(), send_delay(), send_dtmf(), senddtmf_exec(), sendfax_exec(), sendmf_exec(), sendsf_exec(), set_state(), setflag(), setup_stunaddr(), shared_read(), shared_write(), shift_pop(), showdisplay(), showkeys(), signal_exec(), sla_handle_dial_state_event(), sla_station_exec(), sla_trunk_exec(), smdi_msg_read(), smdi_msg_retrieve_read(), sockaddr_handler_fn(), softhangup_exec(), sorcery_function_read(), speech_background(), speech_load(), srv_result_read(), stackpeek_read(), start_mixmonitor_callback(), start_moh_exec(), starttimer(), stasis_app_control_dial(), static_realtime_cb(), statsd_exec(), stop_mixmonitor_full(), strbetween(), stream_echo_exec(), stringfield_handler_fn(), strreplace(), stun_close_sock(), stun_monitor_request(), stun_start_monitor(), stun_stop_monitor(), subscript(), talk_detect_fn_write(), test_jb_debug_output(), test_jb_error_output(), test_jb_warn_output(), timeval_struct2str(), transfer_exec(), tryexec_exec(), uint_handler_fn(), unicast_rtp_request(), unload_module(), unshift_push(), upqm_exec(), user_chan_cb(), userevent_exec(), verbose_exec(), vm_exec(), vm_execmain(), vm_playmsgexec(), volume_read(), volume_write(), wait_exec(), waitfor_exec(), waitforcond_exec(), waitsignal_exec(), webchan_request(), websocket_client_args_create(), websocket_client_args_destroy(), xmpp_join_exec(), xmpp_leave_exec(), xmpp_send_exec(), xmpp_sendgroup_exec(), yesno_handler_fn(), and zapateller_exec().
|
static |
Definition at line 483 of file res_stun_monitor.c.
|
static |
Definition at line 425 of file res_stun_monitor.c.
Referenced by load_module(), and unload_module().
struct sockaddr_in external_addr |
Current perceived external address.
Definition at line 58 of file res_stun_monitor.c.
unsigned int external_addr_known |
TRUE if the perceived external address is valid/known.
Definition at line 70 of file res_stun_monitor.c.
ast_mutex_t lock |
STUN monitor protection lock.
Definition at line 56 of file res_stun_monitor.c.
unsigned int monitor_enabled |
TRUE if the STUN monitor is enabled.
Definition at line 68 of file res_stun_monitor.c.
unsigned int refresh |
Number of seconds between polls to the STUN server for the external address.
Definition at line 64 of file res_stun_monitor.c.
Referenced by iax2_ack_registry(), and update_registry().
|
static |
Definition at line 52 of file res_stun_monitor.c.
const char* server_hostname |
STUN server host name.
Definition at line 60 of file res_stun_monitor.c.
|
static |
Definition at line 51 of file res_stun_monitor.c.
Referenced by load_config().
unsigned int stun_poll_failed_gripe |
TRUE if we have already griped about a STUN poll failing.
Definition at line 72 of file res_stun_monitor.c.
unsigned int stun_port |
Port of STUN server to use
Definition at line 62 of file res_stun_monitor.c.
int stun_sock |
Monitoring STUN socket.
Definition at line 66 of file res_stun_monitor.c.