FreeSWITCH API Documentation
1.7.0
|
Go to the source code of this file.
Data Structures | |
struct | switch_file_node_s |
struct | switch_codec_node_s |
struct | switch_loadable_module |
struct | switch_loadable_module_container |
struct | switch_say_file_handle |
Macros | |
#define | CHAT_MAX_MSG_QUEUE 101 |
#define | CHAT_QUEUE_SIZE 5000 |
#define | HASH_FUNC(_kind_) |
#define | ALLOC_INTERFACE(_TYPE_) |
Typedefs | |
typedef struct switch_file_node_s | switch_file_node_t |
typedef struct switch_codec_node_s | switch_codec_node_t |
Variables | |
static struct switch_loadable_module_container | loadable_modules |
struct { | |
switch_queue_t * msg_queue [CHAT_MAX_MSG_QUEUE] | |
switch_thread_t * msg_queue_thread [CHAT_MAX_MSG_QUEUE] | |
int msg_queue_len | |
switch_mutex_t * mutex | |
switch_memory_pool_t * pool | |
int running | |
} | chat_globals |
static int | IDX = 0 |
#define ALLOC_INTERFACE | ( | _TYPE_ | ) |
Definition at line 2634 of file switch_loadable_module.c.
Referenced by switch_loadable_module_create_interface().
#define CHAT_MAX_MSG_QUEUE 101 |
Definition at line 589 of file switch_loadable_module.c.
Referenced by chat_queue_message(), and chat_thread_start().
#define CHAT_QUEUE_SIZE 5000 |
Definition at line 590 of file switch_loadable_module.c.
Referenced by chat_thread_start().
#define HASH_FUNC | ( | _kind_ | ) |
Definition at line 2177 of file switch_loadable_module.c.
typedef struct switch_codec_node_s switch_codec_node_t |
typedef struct switch_file_node_s switch_file_node_t |
|
static |
Definition at line 713 of file switch_loadable_module.c.
References do_chat_send(), switch_assert, and switch_event_destroy().
Referenced by chat_queue_message(), chat_thread_run(), and switch_core_chat_send_args().
|
static |
Definition at line 784 of file switch_loadable_module.c.
References chat_globals, CHAT_MAX_MSG_QUEUE, chat_process_event(), chat_thread_start(), IDX, switch_assert, switch_mutex_lock(), switch_mutex_unlock(), switch_queue_push(), switch_queue_trypush(), and SWITCH_STATUS_SUCCESS.
Referenced by switch_core_chat_deliver(), switch_core_chat_send(), and switch_core_chat_send_args().
void* SWITCH_THREAD_FUNC chat_thread_run | ( | switch_thread_t * | thread, |
void * | obj | ||
) |
Definition at line 730 of file switch_loadable_module.c.
References chat_process_event(), SWITCH_CHANNEL_LOG, switch_cond_next(), SWITCH_LOG_DEBUG, switch_log_printf(), switch_queue_pop(), and SWITCH_STATUS_SUCCESS.
Referenced by chat_thread_start().
|
static |
Definition at line 750 of file switch_loadable_module.c.
References chat_globals, CHAT_MAX_MSG_QUEUE, CHAT_QUEUE_SIZE, chat_thread_run(), switch_mutex_lock(), switch_mutex_unlock(), switch_queue_create(), switch_thread_create(), SWITCH_THREAD_STACKSIZE, switch_threadattr_create(), and switch_threadattr_stacksize_set().
Referenced by chat_queue_message(), and switch_loadable_module_init().
|
static |
Definition at line 604 of file switch_loadable_module.c.
References switch_loadable_module_container::chat_hash, switch_chat_interface::chat_send, switch_chat_interface::interface_name, loadable_modules, switch_loadable_module_container::mutex, SWITCH_CHANNEL_LOG, switch_core_hash_first, switch_core_hash_next(), switch_core_hash_this(), switch_event_add_header_string(), switch_event_dup(), switch_event_fire, switch_event_get_header, switch_loadable_module_get_chat_interface(), SWITCH_LOG_ERROR, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), switch_safe_free, SWITCH_STACK_BOTTOM, SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_stristr(), switch_true(), and UNPROTECT_INTERFACE.
Referenced by chat_process_event().
|
static |
Definition at line 1993 of file switch_loadable_module.c.
References switch_loadable_module::lib, switch_loadable_module::module_interface, switch_loadable_module_interface::module_name, switch_loadable_module::pool, pool, switch_loadable_module_interface::rwlock, SCF_VG, switch_loadable_module::shutting_down, switch_loadable_module::status, switch_assert, SWITCH_CHANNEL_LOG, switch_core_destroy_memory_pool, switch_core_flags(), switch_dso_destroy(), switch_loadable_module_unprocess(), SWITCH_LOG_CONSOLE, switch_log_printf(), SWITCH_LOG_WARNING, switch_loadable_module::switch_module_shutdown, SWITCH_STATUS_FALSE, SWITCH_STATUS_NOUNLOAD, SWITCH_STATUS_SUCCESS, switch_thread_join(), switch_thread_rwlock_trywrlock(), switch_thread_rwlock_unlock(), SWITCH_TRUE, and switch_loadable_module::thread.
Referenced by switch_loadable_module_shutdown(), and switch_loadable_module_unload_module().
|
static |
Definition at line 2223 of file switch_loadable_module.c.
Referenced by switch_loadable_module_sort_codecs().
switch_core_recover_callback_t switch_core_get_secondary_recover_callback | ( | const char * | key | ) |
Definition at line 2802 of file switch_loadable_module.c.
References loadable_modules, switch_loadable_module_container::mutex, switch_loadable_module_container::secondary_recover_hash, switch_core_hash_find(), switch_mutex_lock(), and switch_mutex_unlock().
Referenced by recover_callback().
switch_status_t switch_core_register_secondary_recover_callback | ( | const char * | key, |
switch_core_recover_callback_t | cb | ||
) |
Definition at line 2814 of file switch_loadable_module.c.
References loadable_modules, switch_loadable_module_container::mutex, switch_loadable_module_container::secondary_recover_hash, switch_assert, switch_core_hash_find(), switch_core_hash_insert, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
void switch_core_unregister_secondary_recover_callback | ( | const char * | key | ) |
Definition at line 2832 of file switch_loadable_module.c.
References loadable_modules, switch_loadable_module_container::mutex, switch_loadable_module_container::secondary_recover_hash, switch_core_hash_delete(), switch_mutex_lock(), and switch_mutex_unlock().
|
static |
Definition at line 100 of file switch_loadable_module.c.
References switch_loadable_module::module_interface, switch_loadable_module_interface::module_name, switch_core_thread_session::objs, switch_core_thread_session::pool, pool, switch_loadable_module::shutting_down, switch_assert, SWITCH_CHANNEL_LOG, switch_core_destroy_memory_pool, SWITCH_LOG_DEBUG, SWITCH_LOG_NOTICE, switch_log_printf(), switch_loadable_module::switch_module_runtime, SWITCH_STATUS_SUCCESS, SWITCH_STATUS_TERM, and switch_thread_exit().
Referenced by switch_loadable_module_build_dynamic(), switch_loadable_module_load_module_ex(), and switch_loadable_module_runtime().
|
static |
Definition at line 1401 of file switch_loadable_module.c.
References switch_loadable_module::filename, switch_loadable_module::lib, switch_directories::lib_dir, switch_loadable_module_function_table::load, switch_loadable_module::module_interface, switch_loadable_module_interface::module_name, switch_loadable_module::perm, switch_loadable_module::pool, pool, switch_loadable_module_function_table::runtime, switch_loadable_module_function_table::shutdown, SMODF_GLOBAL_SYMBOLS, SWITCH_API_VERSION, switch_loadable_module_function_table::switch_api_version, switch_assert, SWITCH_CHANNEL_LOG, switch_core_alloc, switch_core_destroy_memory_pool, switch_core_new_memory_pool, switch_core_set_signal_handlers(), switch_core_sprintf(), switch_core_strdup, switch_dso_data_sym(), switch_dso_destroy(), switch_dso_open(), SWITCH_GLOBAL_dirs, SWITCH_LOG_CONSOLE, SWITCH_LOG_CRIT, SWITCH_LOG_DEBUG, switch_log_printf(), switch_loadable_module::switch_module_load, switch_loadable_module::switch_module_runtime, switch_loadable_module::switch_module_shutdown, switch_mprintf(), switch_safe_free, SWITCH_STATUS_GENERR, SWITCH_STATUS_NOUNLOAD, SWITCH_STATUS_SUCCESS, switch_test_flag, and SWITCH_TRUE.
Referenced by switch_loadable_module_load_module_ex().
|
static |
Definition at line 1550 of file switch_loadable_module.c.
References loadable_modules, switch_loadable_module_container::module_hash, switch_loadable_module_container::mutex, switch_loadable_module::pool, switch_loadable_module_container::pool, SWITCH_CHANNEL_LOG, switch_core_alloc, switch_core_hash_find_locked(), switch_core_launch_thread(), switch_core_strdup, switch_cut_path(), switch_is_file_path(), switch_loadable_module_exec(), switch_loadable_module_load_file(), switch_loadable_module_process(), switch_log_printf(), SWITCH_LOG_WARNING, switch_loadable_module::switch_module_runtime, SWITCH_PATH_SEPARATOR, switch_snprintf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_loadable_module::thread.
Referenced by switch_loadable_module_init(), and switch_loadable_module_load_module().
|
static |
Definition at line 146 of file switch_loadable_module.c.
References switch_codec_implementation::actual_samples_per_second, switch_loadable_module_container::api_hash, switch_loadable_module_interface::api_interface, switch_loadable_module_container::application_hash, switch_loadable_module_interface::application_interface, switch_loadable_module_container::asr_hash, switch_loadable_module_interface::asr_interface, switch_codec_implementation::bits_per_second, switch_loadable_module_container::chat_application_hash, switch_loadable_module_interface::chat_application_interface, switch_loadable_module_container::chat_hash, switch_loadable_module_interface::chat_interface, switch_loadable_module_container::codec_hash, switch_loadable_module_interface::codec_interface, switch_codec_implementation::decoded_bytes_per_packet, switch_api_interface::desc, switch_json_api_interface::desc, switch_loadable_module_container::dialplan_hash, switch_loadable_module_interface::dialplan_interface, switch_loadable_module_container::directory_hash, switch_loadable_module_interface::directory_interface, switch_loadable_module_container::endpoint_hash, switch_loadable_module_interface::endpoint_interface, switch_file_interface::extens, switch_loadable_module_container::file_hash, switch_loadable_module_interface::file_interface, switch_loadable_module::filename, FREESWITCH_OID_PREFIX, switch_codec_implementation::ianacode, switch_codec_implementation::iananame, switch_codec_interface::implementations, switch_file_node_s::interface_name, switch_codec_node_s::interface_name, switch_endpoint_interface::interface_name, switch_timer_interface::interface_name, switch_dialplan_interface::interface_name, switch_file_interface::interface_name, switch_asr_interface::interface_name, switch_speech_interface::interface_name, switch_say_interface::interface_name, switch_chat_interface::interface_name, switch_limit_interface::interface_name, switch_directory_interface::interface_name, switch_codec_interface::interface_name, switch_application_interface::interface_name, switch_chat_application_interface::interface_name, switch_api_interface::interface_name, switch_json_api_interface::interface_name, switch_loadable_module_container::json_api_hash, switch_loadable_module_interface::json_api_interface, switch_loadable_module::key, switch_loadable_module_container::limit_hash, switch_loadable_module_interface::limit_interface, loadable_modules, switch_loadable_module_container::management_hash, switch_loadable_module_interface::management_interface, switch_codec_implementation::microseconds_per_packet, switch_loadable_module_container::module_hash, switch_loadable_module::module_interface, switch_loadable_module_interface::module_name, switch_loadable_module_container::mutex, switch_file_node_s::next, switch_codec_node_s::next, switch_endpoint_interface::next, switch_timer_interface::next, switch_dialplan_interface::next, switch_file_interface::next, switch_asr_interface::next, switch_speech_interface::next, switch_say_interface::next, switch_chat_interface::next, switch_management_interface::next, switch_limit_interface::next, switch_directory_interface::next, switch_codec_implementation::next, switch_codec_interface::next, switch_application_interface::next, switch_chat_application_interface::next, switch_api_interface::next, switch_json_api_interface::next, switch_loadable_module::pool, switch_file_node_s::ptr, switch_codec_node_s::ptr, switch_management_interface::relative_oid, switch_loadable_module_container::say_hash, switch_loadable_module_interface::say_interface, switch_application_interface::short_desc, switch_chat_application_interface::short_desc, switch_loadable_module_container::speech_hash, switch_loadable_module_interface::speech_interface, SWITCH_CHANNEL_LOG, switch_core_alloc, switch_core_hash_find(), switch_core_hash_insert, switch_core_strdup, switch_event_add_header_string(), switch_event_create, switch_event_fire, SWITCH_EVENT_MODULE_LOAD, SWITCH_LOG_CRIT, SWITCH_LOG_NOTICE, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_RECOMMENDED_BUFFER_SIZE, SWITCH_STACK_BOTTOM, SWITCH_STATUS_SUCCESS, switch_str_nil, switch_application_interface::syntax, switch_chat_application_interface::syntax, switch_api_interface::syntax, switch_json_api_interface::syntax, switch_loadable_module_container::timer_hash, and switch_loadable_module_interface::timer_interface.
Referenced by switch_loadable_module_build_dynamic(), and switch_loadable_module_load_module_ex().
|
static |
Definition at line 127 of file switch_loadable_module.c.
References loadable_modules, switch_loadable_module_container::module_hash, switch_loadable_module::module_interface, switch_loadable_module_interface::module_name, switch_loadable_module_container::mutex, switch_loadable_module_container::pool, SWITCH_CHANNEL_LOG, switch_core_hash_first, switch_core_hash_next(), switch_core_hash_this(), switch_core_launch_thread(), switch_loadable_module_exec(), SWITCH_LOG_CONSOLE, switch_log_printf(), switch_loadable_module::switch_module_runtime, switch_mutex_lock(), switch_mutex_unlock(), and switch_loadable_module::thread.
Referenced by switch_loadable_module_init().
|
static |
Definition at line 2230 of file switch_loadable_module.c.
References do_swap(), switch_codec_implementation::microseconds_per_packet, SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, and switch_log_printf().
Referenced by switch_loadable_module_get_codecs(), and switch_loadable_module_get_codecs_sorted().
|
static |
Definition at line 928 of file switch_loadable_module.c.
References switch_codec_implementation::actual_samples_per_second, switch_loadable_module_container::api_hash, switch_loadable_module_interface::api_interface, switch_loadable_module_container::application_hash, switch_loadable_module_interface::application_interface, switch_loadable_module_container::asr_hash, switch_loadable_module_interface::asr_interface, switch_loadable_module_container::chat_application_hash, switch_loadable_module_interface::chat_application_interface, switch_loadable_module_container::chat_hash, switch_loadable_module_interface::chat_interface, switch_loadable_module_container::codec_hash, switch_loadable_module_interface::codec_interface, switch_api_interface::desc, switch_json_api_interface::desc, switch_loadable_module_container::dialplan_hash, switch_loadable_module_interface::dialplan_interface, switch_loadable_module_container::directory_hash, switch_loadable_module_interface::directory_interface, switch_loadable_module_container::endpoint_hash, switch_loadable_module_interface::endpoint_interface, switch_file_interface::extens, switch_loadable_module_container::file_hash, switch_loadable_module_interface::file_interface, FREESWITCH_OID_PREFIX, switch_codec_implementation::ianacode, switch_codec_implementation::iananame, switch_codec_interface::implementations, switch_file_node_s::interface_name, switch_codec_node_s::interface_name, switch_endpoint_interface::interface_name, switch_timer_interface::interface_name, switch_dialplan_interface::interface_name, switch_file_interface::interface_name, switch_asr_interface::interface_name, switch_speech_interface::interface_name, switch_say_interface::interface_name, switch_chat_interface::interface_name, switch_limit_interface::interface_name, switch_directory_interface::interface_name, switch_codec_interface::interface_name, switch_application_interface::interface_name, switch_chat_application_interface::interface_name, switch_api_interface::interface_name, switch_json_api_interface::interface_name, switch_loadable_module_container::json_api_hash, switch_loadable_module_interface::json_api_interface, switch_loadable_module::key, switch_loadable_module_container::limit_hash, switch_loadable_module_interface::limit_interface, loadable_modules, switch_loadable_module_container::management_hash, switch_loadable_module_interface::management_interface, switch_codec_implementation::microseconds_per_packet, switch_loadable_module::module_interface, switch_loadable_module_interface::module_name, switch_loadable_module_container::mutex, switch_file_node_s::next, switch_codec_node_s::next, switch_endpoint_interface::next, switch_timer_interface::next, switch_dialplan_interface::next, switch_file_interface::next, switch_asr_interface::next, switch_speech_interface::next, switch_say_interface::next, switch_chat_interface::next, switch_management_interface::next, switch_limit_interface::next, switch_directory_interface::next, switch_codec_implementation::next, switch_codec_interface::next, switch_application_interface::next, switch_chat_application_interface::next, switch_api_interface::next, switch_json_api_interface::next, switch_management_interface::relative_oid, switch_endpoint_interface::rwlock, switch_file_interface::rwlock, switch_asr_interface::rwlock, switch_speech_interface::rwlock, switch_say_interface::rwlock, switch_chat_interface::rwlock, switch_directory_interface::rwlock, switch_application_interface::rwlock, switch_chat_application_interface::rwlock, switch_api_interface::rwlock, switch_json_api_interface::rwlock, switch_loadable_module_container::say_hash, switch_loadable_module_interface::say_interface, switch_application_interface::short_desc, switch_chat_application_interface::short_desc, switch_loadable_module_container::speech_hash, switch_loadable_module_interface::speech_interface, SWITCH_CAUSE_MANAGER_REQUEST, SWITCH_CHANNEL_LOG, switch_core_hash_delete(), switch_core_hash_find(), switch_core_hash_insert, switch_core_session_hupall_endpoint(), switch_core_session_hupall_matching_var, SWITCH_CURRENT_APPLICATION_VARIABLE, switch_event_add_header_string(), switch_event_create, switch_event_fire, SWITCH_EVENT_MODULE_UNLOAD, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, SWITCH_LOG_NOTICE, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_SUCCESS, switch_str_nil, switch_thread_rwlock_trywrlock_timeout(), switch_thread_rwlock_unlock(), switch_application_interface::syntax, switch_chat_application_interface::syntax, switch_api_interface::syntax, switch_json_api_interface::syntax, switch_loadable_module_container::timer_hash, and switch_loadable_module_interface::timer_interface.
Referenced by do_shutdown().
void switch_say_file | ( | switch_say_file_handle_t * | sh, |
const char * | fmt, | ||
... | |||
) |
Definition at line 2780 of file switch_loadable_module.c.
References buf, and switch_vsnprintf().
switch_status_t switch_say_file_handle_create | ( | switch_say_file_handle_t ** | sh, |
const char * | ext, | ||
switch_event_t ** | var_event | ||
) |
Definition at line 2757 of file switch_loadable_module.c.
References memset(), switch_assert, SWITCH_STANDARD_STREAM, SWITCH_STATUS_SUCCESS, and zstr.
void switch_say_file_handle_destroy | ( | switch_say_file_handle_t ** | sh | ) |
Definition at line 2743 of file switch_loadable_module.c.
References switch_assert, switch_event_destroy(), and switch_safe_free.
char* switch_say_file_handle_detach_path | ( | switch_say_file_handle_t * | sh | ) |
Definition at line 2732 of file switch_loadable_module.c.
References switch_assert.
char* switch_say_file_handle_get_path | ( | switch_say_file_handle_t * | sh | ) |
Definition at line 2727 of file switch_loadable_module.c.
char* switch_say_file_handle_get_variable | ( | switch_say_file_handle_t * | sh, |
const char * | var | ||
) |
Definition at line 2715 of file switch_loadable_module.c.
References switch_event_get_header.
struct { ... } chat_globals |
|
static |
Definition at line 601 of file switch_loadable_module.c.
Referenced by chat_queue_message().
|
static |
Definition at line 95 of file switch_loadable_module.c.
Referenced by do_chat_send(), switch_core_get_secondary_recover_callback(), switch_core_register_secondary_recover_callback(), switch_core_unregister_secondary_recover_callback(), switch_loadable_module_enumerate_available(), switch_loadable_module_enumerate_loaded(), switch_loadable_module_exists(), switch_loadable_module_get_codec_interface(), switch_loadable_module_get_codecs(), switch_loadable_module_get_codecs_sorted(), switch_loadable_module_get_endpoint_interface(), switch_loadable_module_get_file_interface(), switch_loadable_module_get_management_interface(), switch_loadable_module_get_say_interface(), switch_loadable_module_init(), switch_loadable_module_load_module_ex(), switch_loadable_module_process(), switch_loadable_module_runtime(), switch_loadable_module_shutdown(), switch_loadable_module_unload_module(), and switch_loadable_module_unprocess().
switch_queue_t* msg_queue[CHAT_MAX_MSG_QUEUE] |
Definition at line 593 of file switch_loadable_module.c.
int msg_queue_len |
Definition at line 595 of file switch_loadable_module.c.
switch_thread_t* msg_queue_thread[CHAT_MAX_MSG_QUEUE] |
Definition at line 594 of file switch_loadable_module.c.
switch_mutex_t* mutex |
Definition at line 596 of file switch_loadable_module.c.
Referenced by careful_set(), switch_buffer_add_mutex(), switch_core_codec_destroy(), switch_core_session_unset_read_codec(), switch_core_session_unset_write_codec(), switch_ivr_enterprise_originate(), and switch_ivr_preprocess_session().
switch_memory_pool_t* pool |
Definition at line 597 of file switch_loadable_module.c.
Referenced by do_shutdown(), switch_loadable_module_build_dynamic(), switch_loadable_module_create_module_interface(), switch_loadable_module_exec(), and switch_loadable_module_load_file().
int running |
Definition at line 598 of file switch_loadable_module.c.