RTS API Documentation
1.10.11
|
Macros | |
#define | switch_check_network_list_ip(_ip_str, _list_name) switch_check_network_list_ip_token(_ip_str, _list_name, NULL) |
#define switch_check_network_list_ip | ( | _ip_str, | |
_list_name | |||
) | switch_check_network_list_ip_token(_ip_str, _list_name, NULL) |
Definition at line 2519 of file switch_core.h.
Referenced by check_ice(), and switch_core_media_check_nat().
int32_t change_user_group | ( | const char * | user, |
const char * | group | ||
) |
Change user and/or group of the running process.
user | name of the user to switch to (or NULL) |
group | name of the group to switch to (or NULL) |
Several possible combinations:
Definition at line 1083 of file switch_core.c.
Referenced by main().
int32_t set_auto_priority | ( | void | ) |
Definition at line 1065 of file switch_core.c.
References switch_runtime::cpu_count, and set_realtime_priority().
Referenced by main().
int32_t set_low_priority | ( | void | ) |
int32_t set_normal_priority | ( | void | ) |
Set the maximum priority the process can obtain.
Definition at line 1060 of file switch_core.c.
Referenced by main().
int32_t set_realtime_priority | ( | void | ) |
Definition at line 981 of file switch_core.c.
References SWITCH_PRI_LOW.
Referenced by main(), and set_auto_priority().
switch_bool_t switch_check_network_list_ip_port_token | ( | const char * | ip_str, |
int | port, | ||
const char * | list_name, | ||
const char ** | token | ||
) |
Definition at line 1374 of file switch_core.c.
References switch_runtime::global_mutex, switch_ip_list_t::hash, ip, switch_assert, switch_core_hash_find(), SWITCH_FALSE, switch_inet_pton(), switch_mutex_lock(), switch_mutex_unlock(), switch_network_ipv4_mapped_ipv6_addr(), switch_network_list_validate_ip6_port_token(), switch_network_list_validate_ip_port_token(), switch_parse_cidr(), switch_safe_free, switch_separate_string(), switch_test_subnet, switch_testv6_subnet(), and ip_t::v4.
Referenced by switch_check_network_list_ip_token().
switch_bool_t switch_check_network_list_ip_token | ( | const char * | ip_str, |
const char * | list_name, | ||
const char ** | token | ||
) |
Definition at line 1447 of file switch_core.c.
References switch_check_network_list_ip_port_token().
void switch_cond_next | ( | void | ) |
Definition at line 658 of file switch_time.c.
References do_sleep(), globals, mutex, runtime, switch_mutex_lock(), switch_mutex_unlock(), switch_os_yield(), switch_thread_cond_wait(), switch_runtime::timestamp, and switch_runtime::tipping_point.
Referenced by careful_set(), chat_thread_run(), check_dispatch(), handle_rfc2833(), qm_wake(), rtp_common_read(), sql_close(), switch_cache_db_execute_sql2str(), switch_channel_wait_for_app_flag(), switch_channel_wait_for_flag(), switch_channel_wait_for_state(), switch_channel_wait_for_state_timeout(), switch_console_save_history(), switch_core_file_read_video(), switch_core_memory_init(), switch_core_session_execute_application_get_flags(), switch_core_session_read_frame(), switch_core_session_read_text_frame(), switch_core_session_read_video_frame(), switch_core_session_start_text_thread(), switch_core_session_start_video_thread(), switch_core_session_wake_session_thread(), switch_ivr_collect_digits_callback(), switch_ivr_collect_digits_count(), switch_ivr_multi_threaded_bridge(), switch_ivr_originate(), switch_ivr_park(), switch_ivr_wait_for_answer(), switch_log_init(), switch_log_shutdown(), switch_rtp_set_local_address(), switch_sql_queue_manager_start(), switch_stun_lookup(), switch_thread_pool_wait(), text_bridge_thread(), text_helper_thread(), and video_helper_thread().
void switch_cond_yield | ( | switch_interval_time_t | t | ) |
Definition at line 677 of file switch_time.c.
References do_sleep(), globals, mutex, runtime, switch_mutex_lock(), switch_mutex_unlock(), switch_thread_cond_wait(), and switch_runtime::timestamp.
Referenced by switch_sleep().
switch_status_t switch_console_set_alias | ( | const char * | string | ) |
Definition at line 1919 of file switch_console.c.
References SCDB_TYPE_CORE_DB, switch_cache_db_get_type(), switch_cache_db_persistant_execute(), switch_cache_db_release_db_handle(), SWITCH_CHANNEL_LOG, switch_core_db_handle, switch_core_get_switchname(), SWITCH_LOG_ERROR, switch_log_printf(), switch_mprintf(), switch_safe_free, switch_separate_string(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_console_set_complete | ( | const char * | string | ) |
Definition at line 1835 of file switch_console.c.
References switch_stream_handle::data, SCDB_TYPE_CORE_DB, SCF_USE_SQL, switch_core_dbtype(), switch_core_flags(), switch_core_get_hostname(), switch_core_sql_exec(), switch_safe_free, switch_separate_string(), SWITCH_STANDARD_STREAM, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_str_nil, switch_stream_handle::write_function, and zstr.
Referenced by switch_msrp_load_apis_and_applications().
switch_status_t switch_core_chat_deliver | ( | const char * | dest_proto, |
switch_event_t ** | message_event | ||
) |
Definition at line 1090 of file switch_loadable_module.c.
References chat_queue_message(), switch_event_add_header_string(), SWITCH_STACK_BOTTOM, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_core_chat_send | ( | const char * | dest_proto, |
switch_event_t * | message_event | ||
) |
Definition at line 1075 of file switch_loadable_module.c.
References chat_queue_message(), switch_event_add_header_string(), switch_event_dup(), SWITCH_STACK_BOTTOM, and SWITCH_STATUS_SUCCESS.
Referenced by Event::chat_send().
switch_status_t switch_core_chat_send_args | ( | const char * | dest_proto, |
const char * | proto, | ||
const char * | from, | ||
const char * | to, | ||
const char * | subject, | ||
const char * | body, | ||
const char * | type, | ||
const char * | hint, | ||
switch_bool_t | blocking | ||
) |
Definition at line 1033 of file switch_loadable_module.c.
References chat_process_event(), chat_queue_message(), switch_event_add_body(), switch_event_add_header_string(), switch_event_create, SWITCH_EVENT_MESSAGE, SWITCH_STACK_BOTTOM, and SWITCH_STATUS_SUCCESS.
FILE* switch_core_data_channel | ( | switch_text_channel_t | channel | ) |
Retrieve a FILE stream of a given text channel name.
channel | text channel enumeration |
Definition at line 286 of file switch_core.c.
References switch_runtime::console.
Referenced by switch_console_printf(), and switch_log_meta_vprintf().
uint32_t switch_core_default_dtmf_duration | ( | uint32_t | duration | ) |
Definition at line 1721 of file switch_core.c.
References switch_runtime::default_dtmf_duration, switch_runtime::max_dtmf_duration, switch_runtime::min_dtmf_duration, SWITCH_MAX_DTMF_DURATION, and SWITCH_MIN_DTMF_DURATION.
Referenced by inband_dtmf_generate_callback(), speech_thread(), switch_channel_dequeue_dtmf(), switch_channel_queue_dtmf(), switch_channel_queue_dtmf_string(), switch_core_session_ctl(), switch_core_session_recv_dtmf(), switch_core_session_send_dtmf(), switch_core_session_send_dtmf_string(), and switch_load_core_config().
switch_core_flag_t switch_core_flags | ( | void | ) |
return core flags
Definition at line 2988 of file switch_core.c.
References switch_runtime::flags.
Referenced by do_shutdown(), switch_console_expand_alias(), and switch_console_set_complete().
FILE* switch_core_get_console | ( | void | ) |
Get the output console.
Definition at line 253 of file switch_core.c.
References switch_runtime::console.
Referenced by switch_console_process(), switch_console_save_history(), and switch_log_init().
double switch_core_idle_cpu | ( | void | ) |
Definition at line 2611 of file switch_core_session.c.
References switch_runtime::profile_time, and runtime.
Referenced by send_heartbeat(), and switch_log_meta_vprintf().
switch_thread_t* switch_core_launch_thread | ( | void * | SWITCH_THREAD_FUNC *func)(switch_thread_t *, void *, |
void * | obj, | ||
switch_memory_pool_t * | pool | ||
) |
Launch a thread.
Referenced by switch_loadable_module_build_dynamic(), switch_loadable_module_load_module_ex(), and switch_loadable_module_runtime().
switch_status_t switch_core_management_exec | ( | char * | relative_oid, |
switch_management_action_t | action, | ||
char * | data, | ||
switch_size_t | datalen | ||
) |
Execute a management operation.
relative_oid | the relative oid of the operation. |
action | the action to perform. |
data | input/output string. |
datalen | size in bytes of data. |
Definition at line 3118 of file switch_core.c.
References switch_management_interface::management_function, switch_loadable_module_get_management_interface(), and SWITCH_STATUS_FALSE.
uint32_t switch_core_max_dtmf_duration | ( | uint32_t | duration | ) |
Definition at line 1704 of file switch_core.c.
References switch_runtime::max_dtmf_duration, switch_runtime::min_dtmf_duration, SWITCH_MAX_DTMF_DURATION, and SWITCH_MIN_DTMF_DURATION.
Referenced by inband_dtmf_generate_callback(), switch_channel_dequeue_dtmf(), switch_channel_queue_dtmf(), switch_channel_queue_dtmf_string(), switch_core_session_ctl(), switch_core_session_recv_dtmf(), switch_core_session_send_dtmf(), switch_core_session_send_dtmf_string(), and switch_load_core_config().
void switch_core_measure_time | ( | switch_time_t | total_ms, |
switch_core_time_duration_t * | duration | ||
) |
Breakdown a number of milliseconds into various time spec.
total_ms | a number of milliseconds |
duration | an object to store the results |
Definition at line 2535 of file switch_core.c.
References switch_core_time_duration::day, switch_core_time_duration::hr, memset(), switch_core_time_duration::min, switch_core_time_duration::mms, switch_core_time_duration::ms, switch_core_time_duration::sec, and switch_core_time_duration::yr.
Referenced by send_heartbeat().
void switch_core_memory_reclaim | ( | void | ) |
Definition at line 554 of file switch_core_memory.c.
References memory_manager, pool, SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), switch_queue_size(), switch_queue_trypop(), and SWITCH_STATUS_SUCCESS.
Referenced by pool_thread(), and switch_core_memory_reclaim_all().
void switch_core_memory_reclaim_all | ( | void | ) |
Definition at line 3130 of file switch_core.c.
References switch_core_memory_reclaim(), switch_core_memory_reclaim_events(), and switch_core_memory_reclaim_logger().
Referenced by switch_core_session_ctl().
void switch_core_memory_reclaim_events | ( | void | ) |
Definition at line 524 of file switch_event.c.
References SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, switch_log_printf(), switch_queue_size(), switch_queue_trypop(), and SWITCH_STATUS_SUCCESS.
Referenced by switch_core_memory_reclaim_all(), and switch_event_shutdown().
void switch_core_memory_reclaim_logger | ( | void | ) |
Definition at line 783 of file switch_log.c.
References SWITCH_CHANNEL_SESSION_LOG, SWITCH_LOG_CONSOLE, switch_log_node_free(), switch_log_printf(), switch_queue_size(), switch_queue_trypop(), and SWITCH_STATUS_SUCCESS.
Referenced by switch_core_memory_reclaim_all(), and switch_log_shutdown().
switch_status_t switch_core_mime_add_type | ( | const char * | type, |
const char * | ext | ||
) |
Definition at line 1232 of file switch_core.c.
References switch_runtime::mime_type_exts, switch_runtime::mime_types, switch_assert, switch_core_hash_find(), switch_core_hash_insert, switch_core_permanent_strdup, switch_separate_string(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by load_mime_types().
const char* switch_core_mime_ext2type | ( | const char * | ext | ) |
Definition at line 1211 of file switch_core.c.
References switch_runtime::mime_types, and switch_core_hash_find().
Referenced by switch_simple_email().
switch_hash_index_t* switch_core_mime_index | ( | void | ) |
Definition at line 1227 of file switch_core.c.
References switch_runtime::mime_types, and switch_core_hash_first.
const char* switch_core_mime_type2ext | ( | const char * | type | ) |
Definition at line 1219 of file switch_core.c.
References switch_runtime::mime_type_exts, and switch_core_hash_find().
uint32_t switch_core_min_dtmf_duration | ( | uint32_t | duration | ) |
Definition at line 1744 of file switch_core.c.
References switch_runtime::max_dtmf_duration, switch_runtime::min_dtmf_duration, SWITCH_MAX_DTMF_DURATION, and SWITCH_MIN_DTMF_DURATION.
Referenced by handle_rfc2833(), switch_channel_dequeue_dtmf(), switch_channel_queue_dtmf(), switch_channel_queue_dtmf_string(), switch_core_session_ctl(), switch_core_session_recv_dtmf(), switch_core_session_send_dtmf(), switch_core_session_send_dtmf_string(), switch_load_core_config(), switch_rtp_queue_rfc2833(), and switch_rtp_queue_rfc2833_in().
double switch_core_min_idle_cpu | ( | double | new_limit | ) |
Definition at line 2601 of file switch_core_session.c.
References switch_runtime::min_idle_time, and runtime.
Referenced by switch_core_session_ctl(), and switch_load_core_config().
switch_bool_t switch_core_ready | ( | void | ) |
Determines if the core is ready to take calls.
Definition at line 2998 of file switch_core.c.
References SCF_NO_NEW_SESSIONS, SCF_SHUTTING_DOWN, SWITCH_FALSE, switch_test_flag, and SWITCH_TRUE.
Referenced by switch_core_session_ctl(), and switch_core_session_request_uuid().
switch_bool_t switch_core_ready_inbound | ( | void | ) |
Determines if the core is ready to take inbound calls.
Definition at line 3003 of file switch_core.c.
References SCF_NO_NEW_INBOUND_SESSIONS, SCF_SHUTTING_DOWN, SWITCH_FALSE, switch_test_flag, and SWITCH_TRUE.
Referenced by switch_core_session_request_uuid().
switch_bool_t switch_core_ready_outbound | ( | void | ) |
Determines if the core is ready to place outbound calls.
Definition at line 3008 of file switch_core.c.
References SCF_NO_NEW_OUTBOUND_SESSIONS, SCF_SHUTTING_DOWN, SWITCH_FALSE, switch_test_flag, and SWITCH_TRUE.
Referenced by switch_core_session_request_uuid().
switch_bool_t switch_core_running | ( | void | ) |
Definition at line 2993 of file switch_core.c.
References switch_runtime::running, SWITCH_FALSE, and SWITCH_TRUE.
Referenced by running().
void switch_core_runtime_loop | ( | int | bg | ) |
Run endlessly until the system is shutdown.
bg | divert console to the background |
Definition at line 1187 of file switch_core.c.
References FALSE, path, switch_runtime::running, switch_console_loop(), switch_snprintf(), and switch_yield.
Referenced by main().
uint8_t switch_core_session_check_interface | ( | switch_core_session_t * | session, |
const switch_endpoint_interface_t * | endpoint_interface | ||
) |
Checks if a session is using a specific endpoint.
session | the session |
endpoint_interface | interface of the endpoint to check |
Definition at line 2572 of file switch_core_session.c.
References switch_core_session::endpoint_interface, and switch_assert.
uint8_t switch_core_session_compare | ( | switch_core_session_t * | a, |
switch_core_session_t * | b | ||
) |
Checks if 2 sessions are using the same endpoint module.
a | the first session |
b | the second session |
Definition at line 2564 of file switch_core_session.c.
References switch_core_session::endpoint_interface, and switch_assert.
int32_t switch_core_session_ctl | ( | switch_session_ctl_t | cmd, |
void * | val | ||
) |
send a control message to the core
cmd | the command |
val | the command arguement (if needed) |
Definition at line 2651 of file switch_core.c.
References count, switch_runtime::debug_level, handle_SIGHUP(), switch_runtime::hard_log_level, switch_runtime::running, SCF_API_EXPANSION, SCF_DEBUG_SQL, SCF_NO_NEW_INBOUND_SESSIONS, SCF_NO_NEW_OUTBOUND_SESSIONS, SCF_NO_NEW_SESSIONS, SCF_RESTART, SCF_SHUTDOWN_REQUESTED, SCF_SHUTTING_DOWN, SCF_THREADED_SYSTEM_EXEC, SCF_VERBOSE_EVENTS, SCSC_API_EXPANSION, SCSC_CALIBRATE_CLOCK, SCSC_CANCEL_SHUTDOWN, SCSC_CHECK_RUNNING, SCSC_CRASH, SCSC_DEBUG_LEVEL, SCSC_DEBUG_SQL, SCSC_DEFAULT_DTMF_DURATION, SCSC_FLUSH_DB_HANDLES, SCSC_HUPALL, SCSC_LAST_SPS, SCSC_LOGLEVEL, SCSC_MAX_DTMF_DURATION, SCSC_MAX_SESSIONS, SCSC_MDNS_RESOLVE, SCSC_MIN_DTMF_DURATION, SCSC_MIN_IDLE_CPU, SCSC_PAUSE_ALL, SCSC_PAUSE_CHECK, SCSC_PAUSE_INBOUND, SCSC_PAUSE_INBOUND_CHECK, SCSC_PAUSE_OUTBOUND, SCSC_PAUSE_OUTBOUND_CHECK, SCSC_READY_CHECK, SCSC_RECLAIM, SCSC_RECOVER, SCSC_REINCARNATE_NOW, SCSC_SAVE_HISTORY, SCSC_SEND_SIGHUP, SCSC_SESSIONS_PEAK, SCSC_SESSIONS_PEAK_FIVEMIN, SCSC_SHUTDOWN, SCSC_SHUTDOWN_ASAP, SCSC_SHUTDOWN_CAUSE, SCSC_SHUTDOWN_CHECK, SCSC_SHUTDOWN_ELEGANT, SCSC_SHUTDOWN_NOW, SCSC_SPS, SCSC_SPS_PEAK, SCSC_SPS_PEAK_FIVEMIN, SCSC_SQL, SCSC_SYNC_CLOCK, SCSC_SYNC_CLOCK_WHEN_IDLE, SCSC_THREADED_SYSTEM_EXEC, SCSC_VERBOSE_EVENTS, switch_runtime::sessions_peak, switch_runtime::sessions_peak_fivemin, switch_runtime::shutdown_cause, switch_runtime::sps_last, switch_runtime::sps_peak, switch_runtime::sps_peak_fivemin, switch_runtime::sps_total, switch_assert, switch_cache_db_flush_handles(), SWITCH_CAUSE_MANAGER_REQUEST, SWITCH_CHANNEL_LOG, switch_clear_flag, switch_console_save_history(), switch_core_default_dtmf_duration(), switch_core_max_dtmf_duration(), switch_core_media_set_resolveice(), switch_core_memory_reclaim_all(), switch_core_min_dtmf_duration(), switch_core_min_idle_cpu(), switch_core_ready(), switch_core_recovery_flush(), switch_core_recovery_recover(), switch_core_session_count(), switch_core_session_hupall(), switch_core_session_limit(), switch_core_session_sync_clock(), switch_core_sqldb_pause(), switch_core_sqldb_resume(), switch_event_add_header(), switch_event_create, switch_event_fire, SWITCH_EVENT_SHUTDOWN_REQUESTED, SWITCH_LOG_CRIT, SWITCH_LOG_DEBUG, SWITCH_LOG_DISABLE, SWITCH_LOG_INFO, switch_log_printf(), SWITCH_LOG_WARNING, switch_mutex_lock(), switch_mutex_unlock(), switch_safe_free, switch_set_flag, SWITCH_STACK_BOTTOM, SWITCH_STATUS_RESTART, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_time_calibrate_clock(), switch_time_sync(), switch_yield, switch_runtime::throttle_mutex, and zstr.
Referenced by handle_SIGILL(), handle_SIGTERM(), switch_channel_event_set_extended_data(), switch_console_loop(), switch_console_save_history(), and switch_load_core_config().
switch_status_t switch_core_session_set_video_read_callback | ( | switch_core_session_t * | session, |
switch_core_video_thread_callback_func_t | func, | ||
void * | user_data | ||
) |
Definition at line 15260 of file switch_core_media.c.
References switch_media_handle_s::control_mutex, switch_core_session::media_handle, switch_core_session_start_video_thread(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_core_session::video_read_callback, and switch_core_session::video_read_user_data.
Referenced by eavesdrop_callback().
switch_status_t switch_core_session_video_read_callback | ( | switch_core_session_t * | session, |
switch_frame_t * | frame | ||
) |
Definition at line 15287 of file switch_core_media.c.
References switch_media_handle_s::control_mutex, switch_core_session::media_handle, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_CONTINUE, SWITCH_STATUS_FALSE, switch_core_session::video_read_callback, and switch_core_session::video_read_user_data.
Referenced by switch_core_session_read_video_frame().
switch_status_t switch_core_set_console | ( | const char * | console | ) |
Set the output console to the desired file.
console | the file path |
Definition at line 243 of file switch_core.c.
References switch_runtime::console, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
void switch_core_set_globals | ( | void | ) |
Initiate Globals.
Definition at line 633 of file switch_core.c.
References switch_directories::base_dir, BUFSIZE, switch_directories::cache_dir, switch_directories::certs_dir, switch_directories::conf_dir, switch_filenames::conf_name, switch_directories::data_dir, switch_directories::db_dir, switch_directories::fonts_dir, switch_directories::grammar_dir, switch_directories::htdocs_dir, switch_directories::images_dir, switch_directories::lib_dir, switch_directories::localstate_dir, switch_directories::log_dir, switch_directories::mod_dir, switch_directories::recordings_dir, switch_directories::run_dir, switch_directories::script_dir, switch_directories::sounds_dir, switch_directories::storage_dir, switch_assert, SWITCH_GLOBAL_dirs, SWITCH_GLOBAL_filenames, SWITCH_PATH_SEPARATOR, SWITCH_PREFIX_DIR, switch_snprintf(), switch_string_replace(), and switch_directories::temp_dir.
Referenced by freeswitch_kill_background(), fs_core_set_globals(), fst_init_core_and_modload(), main(), and switch_core_init().
int32_t switch_core_set_process_privileges | ( | void | ) |
Switch on the privilege awareness for the process and request required privileges.
Definition at line 910 of file switch_core.c.
Referenced by main().
void switch_core_setrlimits | ( | void | ) |
Definition at line 1322 of file switch_core.c.
References memset(), SWITCH_SYSTEM_THREAD_STACKSIZE, and SWITCH_THREAD_STACKSIZE.
Referenced by main().
void switch_core_sqldb_pause | ( | void | ) |
Definition at line 3854 of file switch_core_sqldb.c.
References sql_manager, SWITCH_CHANNEL_LOG, switch_log_printf(), and SWITCH_LOG_WARNING.
Referenced by switch_core_session_ctl().
void switch_core_sqldb_resume | ( | void | ) |
Definition at line 3862 of file switch_core_sqldb.c.
References sql_manager, SWITCH_CHANNEL_LOG, switch_log_printf(), and SWITCH_LOG_WARNING.
Referenced by switch_core_session_ctl().
switch_time_t switch_core_uptime | ( | void | ) |
Number of microseconds the system has been up.
Definition at line 2552 of file switch_core.c.
References FALSE, switch_runtime::initiated, path, and switch_mono_micro_time_now().
Referenced by send_heartbeat().
time_t switch_epoch_time_now | ( | time_t * | t | ) |
Get the current epoch time.
[out] | (optional) | The current epoch time |
Definition at line 322 of file switch_time.c.
References switch_micro_time_now().
Referenced by _switch_cache_db_get_db_handle(), audio_bridge_thread(), check_channel_status(), check_per_channel_timeouts(), core_event_handler(), meta_on_dtmf(), perform_write(), rtp_common_write(), switch_cache_db_execute_sql_callback(), switch_cache_db_execute_sql_callback_err(), switch_cache_db_execute_sql_event_callback(), switch_cache_db_execute_sql_event_callback_err(), switch_cache_db_flush_handles(), switch_cache_db_release_db_handle(), switch_cache_db_status(), switch_core_expire_registration(), switch_core_init(), switch_core_media_bug_patch_video(), switch_core_media_gen_local_sdp(), switch_core_media_get_video_fps(), switch_core_media_patch_sdp(), switch_core_media_read_frame(), switch_core_media_set_udptl_image_sdp(), switch_core_session_dequeue_message(), switch_core_session_read_frame(), switch_core_session_read_video_frame(), switch_core_session_sched_heartbeat(), switch_core_session_write_frame(), switch_core_session_write_video_frame(), switch_core_sql_db_thread(), switch_ivr_displace_session(), switch_ivr_originate(), switch_ivr_park(), switch_ivr_record_file_event(), switch_ivr_record_session_event(), switch_ivr_session_transfer(), switch_ivr_uuid_bridge(), switch_nat_late_init(), switch_rtp_create(), switch_rtp_enable_vad(), switch_scheduler_add_task_ex(), switch_scheduler_execute(), switch_simple_email(), SWITCH_STANDARD_SCHED_FUNC(), task_thread_loop(), and video_bug_thread().
switch_status_t switch_ivr_preprocess_session | ( | switch_core_session_t * | session, |
const char * | cmds | ||
) |
Definition at line 3461 of file switch_ivr_async.c.
References pp_cb_t::done, mutex, preprocess_callback(), pp_cb_t::read_ec, pp_cb_t::read_mutex, pp_cb_t::read_st, switch_codec_implementation::samples_per_packet, switch_codec_implementation::samples_per_second, SMBF_NO_PAUSE, SMBF_READ_REPLACE, SMBF_WRITE_REPLACE, switch_channel_get_private(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_private(), switch_core_media_bug_add(), switch_core_session_alloc, switch_core_session_get_channel(), switch_core_session_get_read_impl(), SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_LOG_WARNING, switch_mutex_lock(), switch_mutex_unlock(), switch_safe_free, switch_separate_string(), SWITCH_STATUS_SUCCESS, switch_true(), to, pp_cb_t::write_ec, pp_cb_t::write_mutex, and pp_cb_t::write_st.
void switch_load_network_lists | ( | switch_bool_t | reload | ) |
Definition at line 1452 of file switch_core.c.
References switch_runtime::global_mutex, switch_ip_list_t::hash, MAX_NETWORK_PORTS, switch_network_port_range::max_port, memset(), switch_network_port_range::min_port, name, switch_xml::next, switch_ip_list_t::pool, switch_network_port_range::port, switch_network_port_range::ports, switch_assert, SWITCH_CHANNEL_LOG, switch_core_destroy_memory_pool, switch_core_hash_destroy(), switch_core_hash_init, switch_core_hash_insert, switch_core_new_memory_pool, switch_event_add_header_string(), switch_event_create, switch_event_destroy(), SWITCH_EVENT_GENERAL, SWITCH_FALSE, switch_find_local_ip(), SWITCH_LOG_CONSOLE, SWITCH_LOG_NOTICE, switch_log_printf(), SWITCH_LOG_WARNING, switch_mprintf(), switch_mutex_lock(), switch_mutex_unlock(), switch_network_list_add_cidr, switch_network_list_add_cidr_port_token(), switch_network_list_add_cidr_token(), switch_network_list_add_host_mask(), switch_network_list_add_host_port_mask(), switch_network_list_create(), switch_separate_string(), switch_set_string, SWITCH_STACK_BOTTOM, SWITCH_STATUS_SUCCESS, SWITCH_TRUE, switch_true(), switch_xml_attr(), switch_xml_child(), switch_xml_free(), switch_xml_locate_domain(), switch_xml_open_cfg(), and zstr.
Referenced by switch_core_init_and_modload().
void* switch_loadable_module_create_interface | ( | switch_loadable_module_interface_t * | mod, |
switch_module_interface_name_t | iname | ||
) |
Definition at line 3063 of file switch_loadable_module.c.
References ALLOC_INTERFACE, SWITCH_API_INTERFACE, SWITCH_APPLICATION_INTERFACE, SWITCH_ASR_INTERFACE, SWITCH_CHANNEL_LOG, SWITCH_CHAT_APPLICATION_INTERFACE, SWITCH_CHAT_INTERFACE, SWITCH_CODEC_INTERFACE, SWITCH_DATABASE_INTERFACE, SWITCH_DIALPLAN_INTERFACE, SWITCH_DIRECTORY_INTERFACE, SWITCH_ENDPOINT_INTERFACE, SWITCH_FILE_INTERFACE, SWITCH_JSON_API_INTERFACE, SWITCH_LIMIT_INTERFACE, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_MANAGEMENT_INTERFACE, SWITCH_SAY_INTERFACE, SWITCH_SPEECH_INTERFACE, and SWITCH_TIMER_INTERFACE.
Referenced by SWITCH_MODULE_LOAD_FUNCTION().
switch_loadable_module_interface_t* switch_loadable_module_create_module_interface | ( | switch_memory_pool_t * | pool, |
const char * | name | ||
) |
Definition at line 3033 of file switch_loadable_module.c.
References switch_loadable_module_interface::module_name, switch_loadable_module_interface::pool, pool, switch_loadable_module_interface::rwlock, switch_assert, switch_core_alloc, switch_core_strdup, and switch_thread_rwlock_create().
Referenced by SWITCH_MODULE_LOAD_FUNCTION().
const char* switch_lookup_timezone | ( | const char * | tz_name | ) |
Definition at line 1379 of file switch_time.c.
References switch_timezones_list_t::hash, SWITCH_CHANNEL_LOG, switch_core_hash_find(), SWITCH_LOG_ERROR, switch_log_printf(), value, and zstr.
Referenced by switch_strftime_tz(), and switch_time_exp_tz_name().
switch_time_t switch_micro_time_now | ( | void | ) |
Get the current epoch time in microseconds.
Definition at line 311 of file switch_time.c.
References globals, runtime, switch_time_now(), and switch_runtime::timestamp.
Referenced by _switch_core_session_request_video_refresh(), calc_elapsed(), calc_local_lsr_now(), check_jitter(), check_rtcp_and_ice(), check_timeout(), do_flush(), API::getTime(), handle_ice(), ice_out(), process_rtcp_report(), read_rtp_packet(), record_callback(), rtcp_generate_sender_info(), rtp_common_write(), switch_channel_check_device_state(), switch_channel_perform_mark_answered(), switch_channel_perform_mark_pre_answered(), switch_channel_perform_mark_ring_ready_value(), switch_channel_set_bridge_time(), switch_channel_set_caller_profile(), switch_channel_set_hangup_time(), switch_collect_input_callback(), switch_console_printf(), switch_core_port_allocator_request_port(), switch_core_session_read_text_frame(), switch_core_session_write_video_frame(), switch_epoch_time_now(), switch_event_prep_for_delivery_detailed(), switch_generate_sln_silence(), switch_ivr_collect_digits_callback(), switch_ivr_collect_digits_count(), switch_ivr_digit_stream_parser_feed(), switch_ivr_originate(), switch_ivr_parse_event(), switch_ivr_play_and_collect_input(), switch_ivr_sleep(), switch_ivr_tone_detect_session(), switch_ivr_wait_for_answer(), switch_log_meta_vprintf(), switch_rtp_activate_ice(), switch_rtp_create(), switch_rtp_enable_vad(), switch_rtp_reset_media_timer(), switch_rtp_sync_stats(), switch_str_time(), switch_strftime_tz(), switch_stun_lookup(), switch_time_exp_tz_name(), switch_xml_locate_user_cache(), switch_xml_locate_user_merged(), switch_xml_std_datetime_check(), timer_generic_sync(), timer_init(), and tone_detect_set_total_time().
switch_time_t switch_mono_micro_time_now | ( | void | ) |
Definition at line 316 of file switch_time.c.
References time_now().
Referenced by switch_core_init(), switch_core_uptime(), SWITCH_MODULE_LOAD_FUNCTION(), SWITCH_MODULE_RUNTIME_FUNCTION(), switch_time_ref(), and switch_time_sync().
int switch_stream_system | ( | const char * | cmd, |
switch_stream_handle_t * | stream | ||
) |
Definition at line 3536 of file switch_core.c.
References buffer, switch_stream_handle::raw_write_function, switch_core_get_variable(), SWITCH_FALSE, switch_stream_spawn(), SWITCH_TRUE, and switch_true().
Referenced by preprocess_exec_set(), and switch_stream_system_fork().
switch_status_t switch_strftime_tz | ( | const char * | tz, |
const char * | format, | ||
char * | date, | ||
size_t | len, | ||
switch_time_t | thetime | ||
) |
Definition at line 1475 of file switch_time.c.
References switch_lookup_timezone(), switch_micro_time_now(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_strftime_nocheck(), tm2switchtime(), tztime(), zstr, and zstr_buf.
int switch_system | ( | const char * | cmd, |
switch_bool_t | wait | ||
) |
Definition at line 3342 of file switch_core.c.
References SCF_THREADED_SYSTEM_EXEC, switch_core_get_variable(), SWITCH_FALSE, switch_stream_spawn(), switch_system_fork(), switch_system_thread(), switch_test_flag, SWITCH_TRUE, and switch_true().
Referenced by preprocess_exec(), and switch_simple_email().
switch_status_t switch_time_exp_tz_name | ( | const char * | tz, |
switch_time_exp_t * | tm, | ||
switch_time_t | thetime | ||
) |
Definition at line 1445 of file switch_time.c.
References switch_lookup_timezone(), switch_micro_time_now(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, tm2switchtime(), tztime(), and zstr.
Referenced by switch_xml_std_datetime_check().
switch_time_t switch_time_ref | ( | void | ) |
Definition at line 596 of file switch_time.c.
References switch_mono_micro_time_now(), SYSTEM_TIME, and time_now().
Referenced by average_time(), and SWITCH_MODULE_RUNTIME_FUNCTION().
void switch_time_set_cond_yield | ( | switch_bool_t | enable | ) |
Definition at line 373 of file switch_time.c.
References COND, MATRIX, and switch_time_sync().
Referenced by switch_load_core_config(), SWITCH_MODULE_LOAD_FUNCTION(), and switch_time_calibrate_clock().
void switch_time_set_matrix | ( | switch_bool_t | enable | ) |
Definition at line 360 of file switch_time.c.
References MATRIX, and switch_time_sync().
Referenced by switch_load_core_config().
void switch_time_set_monotonic | ( | switch_bool_t | enable | ) |
Definition at line 331 of file switch_time.c.
References MONO, and switch_time_sync().
Referenced by switch_load_core_config().
void switch_time_set_nanosleep | ( | switch_bool_t | enable | ) |
Definition at line 366 of file switch_time.c.
References NANO.
Referenced by switch_load_core_config(), and SWITCH_MODULE_LOAD_FUNCTION().
void switch_time_set_timerfd | ( | int | enable | ) |
Definition at line 348 of file switch_time.c.
References switch_time_sync(), and TFD.
Referenced by switch_load_core_config().
void switch_time_set_use_system_time | ( | switch_bool_t | enable | ) |
Definition at line 342 of file switch_time.c.
References SYSTEM_TIME.
Referenced by switch_load_core_config().
void switch_time_sync | ( | void | ) |
Definition at line 609 of file switch_time.c.
References last_time, switch_runtime::offset, switch_runtime::reference, runtime, SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, switch_log_printf(), switch_mono_micro_time_now(), switch_time_now(), SYSTEM_TIME, time_now(), and switch_runtime::time_sync.
Referenced by switch_core_session_ctl(), switch_core_session_perform_destroy(), switch_core_session_sync_clock(), SWITCH_MODULE_RUNTIME_FUNCTION(), switch_time_set_cond_yield(), switch_time_set_matrix(), switch_time_set_monotonic(), switch_time_set_timerfd(), and timer_init().