RTS API Documentation
1.10.11
|
Enumerations | |
enum | switch_hup_type_t { SHT_NONE = 0, SHT_UNANSWERED = (1 << 0), SHT_ANSWERED = (1 << 1) } |
#define switch_core_service_session | ( | _s | ) | switch_core_service_session_av(_s, SWITCH_TRUE, SWITCH_FALSE) |
Definition at line 1216 of file switch_core.h.
Referenced by switch_ivr_play_file(), and switch_ivr_speak_text().
#define switch_core_session_destroy | ( | session | ) | switch_core_session_perform_destroy(session, __FILE__, __SWITCH_FUNC__, __LINE__) |
Destroy a session and return the memory pool to the core.
session | pointer to a pointer of the session to destroy |
Definition at line 817 of file switch_core.h.
Referenced by switch_core_session_request_xml(), and switch_core_session_thread().
#define switch_core_session_execute_application | ( | _a, | |
_b, | |||
_c | |||
) | switch_core_session_execute_application_get_flags(_a, _b, _c, NULL) |
Execute an application on a session.
session | the current session |
app | the application's name |
arg | application arguments |
Definition at line 1129 of file switch_core.h.
Referenced by exec_app(), exec_cb(), CoreSession::execute(), switch_channel_execute_on_value(), switch_core_session_execute_exten(), switch_core_standard_on_execute(), switch_core_standard_on_hangup(), switch_ivr_broadcast(), and switch_ivr_parse_event().
#define switch_core_session_force_locate | ( | uuid_str | ) | switch_core_session_perform_force_locate(uuid_str, __FILE__, __SWITCH_FUNC__, __LINE__) |
Locate a session based on it's uuid even if the channel is not ready.
uuid_str | the unique id of the session you want to find |
Definition at line 941 of file switch_core.h.
Referenced by CoreSession::CoreSession(), and switch_ivr_uuid_force_exists().
#define switch_core_session_get_partner | ( | _session, | |
_partner | |||
) | switch_core_session_perform_get_partner(_session, _partner, __FILE__, __SWITCH_FUNC__, __LINE__) |
Definition at line 1028 of file switch_core.h.
Referenced by check_stream_changes(), cleanup_proxy_mode_a(), dtls_state_ready(), rtp_common_write(), switch_channel_get_hold_music_partner(), switch_channel_mark_hold(), switch_core_media_gen_local_sdp(), switch_core_media_negotiate_sdp(), switch_core_media_receive_message(), switch_core_media_set_rmode(), switch_core_media_set_smode(), switch_core_media_toggle_hold(), switch_core_session_read_frame(), switch_ivr_record_session_event(), SWITCH_STANDARD_SCHED_FUNC(), and video_write_thread().
#define switch_core_session_get_private | ( | _s | ) | switch_core_session_get_private_class(_s, SWITCH_PVT_PRIMARY) |
Definition at line 1160 of file switch_core.h.
#define switch_core_session_hupall_matching_var | ( | _vn, | |
_vv, | |||
_c | |||
) | switch_core_session_hupall_matching_var_ans(_vn, _vv, _c, SHT_UNANSWERED | SHT_ANSWERED) |
Definition at line 1000 of file switch_core.h.
Referenced by switch_loadable_module_unprocess().
#define switch_core_session_hupall_matching_vars | ( | _vs, | |
_c | |||
) | switch_core_session_hupall_matching_vars_ans(_vs, _c, SHT_UNANSWERED | SHT_ANSWERED) |
Definition at line 1010 of file switch_core.h.
#define switch_core_session_kill_channel | ( | session, | |
sig | |||
) | switch_core_session_perform_kill_channel(session, __FILE__, __SWITCH_FUNC__, __LINE__, sig) |
Send a signal to a channel.
session | session to send signal to |
sig | signal to send |
Definition at line 1393 of file switch_core.h.
Referenced by audio_bridge_thread(), switch_channel_perform_hangup(), switch_channel_perform_mark_answered(), switch_channel_perform_mark_pre_answered(), switch_core_session_perform_receive_message(), switch_core_session_queue_message(), switch_core_session_queue_private_event(), switch_core_session_queue_signal_data(), switch_core_session_receive_event(), switch_core_session_signal_state_change(), switch_core_thread_session_end(), switch_ivr_parse_event(), and text_bridge_thread().
#define switch_core_session_locate | ( | uuid_str | ) | switch_core_session_perform_locate(uuid_str, __FILE__, __SWITCH_FUNC__, __LINE__) |
Locate a session based on it's uuid.
uuid_str | the unique id of the session you want to find |
Definition at line 932 of file switch_core.h.
Referenced by audio_bridge_thread(), check_channel_status(), fs_core_session_locate(), msrp_worker(), rtp_common_read(), sb_on_dtmf(), signal_bridge_on_hangup(), signal_bridge_on_hibernate(), switch_channel_clear_flag_partner(), switch_channel_get_private_partner(), switch_channel_get_variable_partner(), switch_channel_perform_mark_answered(), switch_channel_perform_mark_pre_answered(), switch_channel_perform_mark_ring_ready_value(), switch_channel_set_flag_partner(), switch_channel_set_variable_partner_var_check(), switch_channel_test_cap_partner(), switch_channel_test_flag_partner(), switch_core_media_receive_message(), switch_core_session_findall_matching_var(), switch_core_session_hupall(), switch_core_session_hupall_endpoint(), switch_core_session_hupall_matching_vars_ans(), switch_core_session_outgoing_channel(), switch_core_session_pass_indication(), switch_core_session_perform_receive_message(), switch_core_session_read_frame(), switch_core_session_write_frame(), switch_core_standard_on_execute(), switch_core_standard_on_reset(), switch_ivr_3p_media(), switch_ivr_3p_nomedia(), switch_ivr_blind_transfer_ack(), switch_ivr_broadcast(), switch_ivr_eavesdrop_session(), switch_ivr_find_bridged_uuid(), switch_ivr_hold_toggle_uuid(), switch_ivr_hold_uuid(), switch_ivr_intercept_session(), switch_ivr_kill_uuid(), switch_ivr_media(), switch_ivr_nomedia(), switch_ivr_originate(), switch_ivr_parse_event(), switch_ivr_session_transfer(), switch_ivr_soft_hold(), switch_ivr_unhold(), switch_ivr_unhold_uuid(), switch_ivr_uuid_bridge(), switch_ivr_uuid_exists(), switch_log_node_to_json(), SWITCH_STANDARD_API(), SWITCH_STANDARD_SCHED_FUNC(), and uuid_bridge_on_soft_execute().
#define switch_core_session_receive_message | ( | _session, | |
_message | |||
) |
Definition at line 1247 of file switch_core.h.
Referenced by _switch_core_session_request_video_refresh(), audio_bridge_thread(), display_exec_cb(), handle_ice(), signal_bridge_on_hibernate(), switch_core_media_hard_mute(), switch_core_media_media_params(), switch_core_media_receive_message(), switch_core_media_set_video_codec(), switch_core_session_exec(), switch_core_session_message_send(), switch_core_session_pass_indication(), switch_core_session_perform_receive_message(), switch_core_session_read_frame(), switch_core_session_set_uuid(), switch_core_session_write_frame(), switch_core_standard_on_execute(), switch_ivr_3p_media(), switch_ivr_3p_nomedia(), switch_ivr_blind_transfer_ack(), switch_ivr_check_hold(), switch_ivr_eavesdrop_session(), switch_ivr_hold(), switch_ivr_media(), switch_ivr_multi_threaded_bridge(), switch_ivr_nomedia(), switch_ivr_originate(), switch_ivr_parse_all_messages(), switch_ivr_parse_signal_data(), switch_ivr_process_indications(), switch_ivr_record_session_event(), switch_ivr_send_prompt(), switch_ivr_session_transfer(), switch_ivr_unhold(), switch_jb_get_packet(), and SWITCH_STANDARD_SCHED_FUNC().
#define switch_core_session_request | ( | _ep, | |
_d, | |||
_f, | |||
_p | |||
) | switch_core_session_request_uuid(_ep, _d, _f, _p, NULL) |
Definition at line 803 of file switch_core.h.
Referenced by switch_core_session_request_by_name().
#define switch_core_session_set_private | ( | _s, | |
_p | |||
) | switch_core_session_set_private_class(_s, _p, SWITCH_PVT_PRIMARY) |
Definition at line 1169 of file switch_core.h.
enum switch_hup_type_t |
Enumerator | |
---|---|
SHT_NONE | |
SHT_UNANSWERED | |
SHT_ANSWERED |
Definition at line 985 of file switch_core.h.
void switch_core_dump_variables | ( | _In_ switch_stream_handle_t * | stream | ) |
char* switch_core_get_domain | ( | switch_bool_t | dup | ) |
Definition at line 367 of file switch_core.c.
References switch_runtime::global_var_rwlock, switch_core_get_variable(), switch_thread_rwlock_rdlock(), and switch_thread_rwlock_unlock().
const char* switch_core_get_hostname | ( | void | ) |
Definition at line 356 of file switch_core.c.
References switch_runtime::hostname.
Referenced by core_event_handler(), switch_console_complete(), switch_console_set_complete(), switch_core_sqldb_start(), and switch_event_prep_for_delivery_detailed().
const char* switch_core_get_switchname | ( | void | ) |
Definition at line 361 of file switch_core.c.
References switch_runtime::hostname, switch_runtime::switchname, and zstr.
Referenced by core_event_handler(), switch_console_list_uuid(), switch_console_loop(), switch_console_save_history(), switch_console_set_alias(), switch_core_add_registration(), switch_core_del_registration(), switch_core_expire_registration(), switch_core_recovery_track(), switch_core_sqldb_start(), switch_event_prep_for_delivery_detailed(), switch_ivr_generate_json_cdr(), and switch_ivr_generate_xml_cdr().
char* switch_core_get_uuid | ( | void | ) |
Retrieve the unique identifier from the core.
Definition at line 495 of file switch_core.c.
References switch_runtime::uuid_str.
Referenced by switch_core_recovery_recover(), switch_core_recovery_track(), switch_core_recovery_untrack(), switch_event_prep_for_delivery_detailed(), switch_ivr_generate_json_cdr(), and switch_ivr_generate_xml_cdr().
char* switch_core_get_variable | ( | _In_z_ const char * | varname | ) |
Retrieve a global variable from the core.
varname | the name of the variable |
Referenced by get_channels(), init_upnp(), switch_ivr_originate(), switch_ivr_set_xml_call_stats(), switch_log_node_to_json(), switch_rtp_add_crypto_key(), switch_xml_clear_user_cache(), and text_callback().
char* switch_core_get_variable_dup | ( | _In_z_ const char * | varname | ) |
Referenced by expand_vars(), getGlobalVariable(), switch_event_expand_headers_check(), and switch_find_local_ip().
char* switch_core_get_variable_pdup | ( | _In_z_ const char * | varname, |
switch_memory_pool_t * | pool | ||
) |
Referenced by switch_channel_get_variable_dup(), and switch_core_perform_file_open().
switch_status_t switch_core_get_variables | ( | switch_event_t ** | event | ) |
Definition at line 386 of file switch_core.c.
References switch_runtime::global_var_rwlock, switch_runtime::global_vars, switch_event_dup(), switch_thread_rwlock_rdlock(), and switch_thread_rwlock_unlock().
Referenced by asr_set_json_text_params(), and switch_channel_execute_on().
void switch_core_service_session_av | ( | _In_ switch_core_session_t * | session, |
switch_bool_t | audio, | ||
switch_bool_t | video | ||
) |
Launch a service thread on a session to drop inbound data.
session | the session the launch thread on |
int switch_core_session_add_stream | ( | _In_ switch_core_session_t * | session, |
_In_opt_ void * | private_info | ||
) |
Add a logical stream to a session.
session | the session to add the stream to |
private_info | an optional pointer to private data for the new stream |
uint32_t switch_core_session_count | ( | void | ) |
Provide the total number of sessions.
Definition at line 2518 of file switch_core_session.c.
References switch_session_manager::session_count, and session_manager.
Referenced by send_heartbeat(), switch_channel_perform_set_running_state(), switch_core_session_ctl(), and thread_launch_failure().
switch_status_t switch_core_session_dequeue_event | ( | _In_ switch_core_session_t * | session, |
_Out_ switch_event_t ** | event, | ||
switch_bool_t | force | ||
) |
DE-Queue an event on a given session.
session | the session to de-queue the message on |
event | the de-queued event |
force | force the dequeue |
Referenced by audio_bridge_thread(), CoreSession::flushEvents(), switch_ivr_collect_digits_callback(), switch_ivr_eavesdrop_session(), switch_ivr_gentones(), switch_ivr_park(), switch_ivr_play_file(), switch_ivr_record_file_event(), switch_ivr_session_echo(), switch_ivr_sleep(), and switch_ivr_speak_text_handle().
switch_status_t switch_core_session_dequeue_message | ( | _In_ switch_core_session_t * | session, |
_Out_ switch_core_session_message_t ** | message | ||
) |
DE-Queue an message on a given session.
session | the session to de-queue the message on |
message | the de-queued message |
Referenced by switch_ivr_parse_all_messages().
switch_status_t switch_core_session_dequeue_private_event | ( | _In_ switch_core_session_t * | session, |
_Out_ switch_event_t ** | event | ||
) |
DE-Queue a private event on a given session.
session | the session to de-queue the message on |
event | the de-queued event |
Referenced by switch_ivr_park(), and switch_ivr_parse_next_event().
switch_status_t switch_core_session_dequeue_signal_data | ( | switch_core_session_t * | session, |
void ** | signal_data | ||
) |
Definition at line 1151 of file switch_core_session.c.
References switch_core_session::signal_data_queue, switch_assert, switch_queue_trypop(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by switch_ivr_parse_signal_data().
void switch_core_session_destroy_state | ( | switch_core_session_t * | session | ) |
Definition at line 720 of file switch_core_state_machine.c.
References CCS_DOWN, CF_REDIRECT, CF_TRANSFER, switch_core_session::channel, CS_DESTROY, switch_core_session::endpoint_interface, index, switch_endpoint_interface::state_handler, STATE_MACRO, switch_assert, switch_channel_clear_device_record(), switch_channel_clear_flag(), switch_channel_set_callstate, and switch_channel_set_running_state.
Referenced by switch_core_session_perform_destroy().
uint32_t switch_core_session_event_count | ( | _In_ switch_core_session_t * | session | ) |
Indicate the number of waiting events on a session.
session | the session to check |
switch_status_t switch_core_session_event_send | ( | _In_z_ const char * | uuid_str, |
_Inout_ switch_event_t ** | event | ||
) |
Queue an event on another session using its uuid.
uuid_str | the unique id of the session you want to send a message to |
event | the event to send |
switch_status_t switch_core_session_exec | ( | _In_ switch_core_session_t * | session, |
_In_ const switch_application_interface_t * | application_interface, | ||
_In_opt_z_ const char * | arg | ||
) |
Execute an application on a session.
session | the current session |
application_interface | the interface of the application to execute |
arg | application arguments |
Referenced by collect_thread_run(), switch_ivr_menu_execute(), and switch_ivr_phrase_macro_event().
switch_status_t switch_core_session_execute_application_async | ( | switch_core_session_t * | session, |
const char * | app, | ||
const char * | arg | ||
) |
Definition at line 2677 of file switch_core_session.c.
References CF_BLOCK_BROADCAST_UNTIL_MEDIA, CF_PROXY_MODE, switch_core_session::channel, switch_channel_set_flag, switch_channel_test_flag(), switch_core_session_queue_private_event(), switch_core_session_strdup, switch_event_add_header_string(), SWITCH_EVENT_COMMAND, switch_event_create, SWITCH_FALSE, SWITCH_STACK_BOTTOM, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by audio_bridge_thread(), switch_channel_execute_on_value(), switch_core_session_execute_application_get_flags(), tone_detect_callback(), and tone_on_dtmf().
switch_status_t switch_core_session_execute_application_get_flags | ( | _In_ switch_core_session_t * | session, |
_In_ const char * | app, | ||
_In_opt_z_ const char * | arg, | ||
_Out_opt_ int32_t * | flags | ||
) |
Execute an application on a session.
session | the current session |
app | the application's name |
arg | application arguments |
flags | pointer to a flags variable to set the applications flags to |
Referenced by switch_ivr_broadcast().
switch_status_t switch_core_session_execute_exten | ( | _In_ switch_core_session_t * | session, |
_In_z_ const char * | exten, | ||
_In_opt_z_ const char * | dialplan, | ||
_In_opt_z_ const char * | context | ||
) |
Run a dialplan and execute an extension.
session | the current session |
exten | the interface of the application to execute |
arg | application arguments |
switch_console_callback_match_t* switch_core_session_findall | ( | void | ) |
Definition at line 417 of file switch_core_session.c.
References runtime, switch_runtime::session_hash_mutex, session_manager, switch_session_manager::session_table, switch_console_push_match(), switch_core_hash_first, switch_core_hash_next(), switch_core_hash_this(), switch_core_session_read_lock(), switch_core_session_rwunlock(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_SUCCESS, and switch_core_session::uuid_str.
switch_console_callback_match_t* switch_core_session_findall_matching_var | ( | const char * | var_name, |
const char * | var_val | ||
) |
Definition at line 289 of file switch_core_session.c.
References switch_core_session::channel, str_node::next, pool, runtime, switch_runtime::session_hash_mutex, session_manager, switch_session_manager::session_table, switch_channel_get_variable_dup(), switch_channel_up_nosig, switch_console_push_match(), switch_core_alloc, switch_core_destroy_memory_pool, switch_core_hash_first, switch_core_hash_next(), switch_core_hash_this(), switch_core_new_memory_pool, switch_core_session_locate, switch_core_session_read_lock(), switch_core_session_rwunlock(), switch_core_strdup, SWITCH_FALSE, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_SUCCESS, switch_stristr(), and switch_core_session::uuid_str.
switch_status_t switch_core_session_flush_message | ( | _In_ switch_core_session_t * | session | ) |
Flush a message queue on a given session.
session | the session to de-queue the message on |
uint32_t switch_core_session_flush_private_events | ( | switch_core_session_t * | session | ) |
Flush the private event queue of a session.
session | the session to flush |
Definition at line 1348 of file switch_core_session.c.
References check_media, switch_core_session::private_event_queue, switch_core_session::private_event_queue_pri, switch_event_destroy(), switch_queue_trypop(), and SWITCH_STATUS_SUCCESS.
Referenced by switch_core_session_perform_destroy(), and switch_ivr_parse_event().
void switch_core_session_free_message | ( | switch_core_session_message_t ** | message | ) |
Definition at line 1070 of file switch_core_session.c.
References MESSAGE_STRING_ARG_MAX, switch_core_session_message::pointer_arg, SCSMF_DYNAMIC, switch_core_session_message::string_arg, switch_core_session_message::string_array_arg, switch_safe_free, and switch_test_flag.
Referenced by switch_core_session_flush_message(), switch_core_session_perform_receive_message(), and switch_ivr_parse_all_messages().
switch_status_t switch_core_session_get_app_flags | ( | const char * | app, |
int32_t * | flags | ||
) |
Definition at line 2652 of file switch_core_session.c.
References switch_application_interface::flags, switch_assert, SWITCH_CHANNEL_LOG, switch_loadable_module_get_application_interface(), SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and UNPROTECT_INTERFACE.
Referenced by switch_ivr_broadcast().
switch_app_log_t* switch_core_session_get_app_log | ( | _In_ switch_core_session_t * | session | ) |
Referenced by switch_channel_set_timestamps(), switch_ivr_generate_json_cdr(), and switch_ivr_generate_xml_cdr().
_Ret_ switch_channel_t* switch_core_session_get_channel | ( | _In_ switch_core_session_t * | session | ) |
Retrieve a pointer to the channel object associated with a given session.
session | the session to retrieve from |
Referenced by _switch_core_session_request_video_refresh(), asr_set_json_text_params(), audio_bridge_on_consume_media(), audio_bridge_on_exchange_media(), audio_bridge_on_routing(), audio_bridge_thread(), block_on_dtmf(), bridge(), check_channel_status(), check_timeout(), cleanup_proxy_mode_a(), cleanup_proxy_mode_b(), collect_thread_run(), CoreSession::CoreSession(), CoreSession::destroy(), do_dtls(), do_flush(), dtls_state_fail(), dtmf_callback(), early_thread_run(), eavesdrop_callback(), enterprise_originate_ringback_thread(), enterprise_originate_thread(), exec_app(), exec_cb(), CoreSession::flushDigits(), fs_channel_answer(), fs_channel_get_variable(), fs_channel_hangup(), fs_channel_pre_answer(), fs_channel_set_state(), fs_channel_set_variable(), fs_switch_ivr_originate(), gen_ice(), generate_on_dtmf(), CoreSession::getDigits(), handle_ice(), handle_nack(), hanguphook(), inband_dtmf_callback(), inband_dtmf_generate_callback(), inherit_codec(), ivr_send_event(), limit_state_handler(), meta_on_dtmf(), monitor_callback(), CoreSession::originate(), originate_on_consume_media_transmit(), originate_on_routing(), play_and_collect(), play_and_detect_input_callback(), preprocess_callback(), process_rtcp_report(), read_bundle_rtp_packet(), read_displace_callback(), read_rtp_packet(), record_callback(), record_helper_post_process(), recording_thread(), recover_callback(), rtp_common_read(), rtp_common_write(), sb_on_dtmf(), send_display(), session_audio_callback(), set_stats(), CoreSession::setHangupHook(), setup_ringback(), signal_bridge_on_hangup(), signal_bridge_on_hibernate(), speech_callback(), speech_on_dtmf(), speech_thread(), switch_channel_clear_flag_partner(), switch_channel_get_hold_music_partner(), switch_channel_get_variable_partner(), switch_channel_perform_mark_pre_answered(), switch_channel_perform_mark_ring_ready_value(), switch_channel_set_flag_partner(), switch_channel_set_variable_partner_var_check(), switch_channel_test_cap_partner(), switch_channel_test_flag_partner(), switch_collect_input_callback(), switch_core_media_activate_rtp(), switch_core_media_build_crypto(), switch_core_media_copy_t38_options(), switch_core_media_negotiate_sdp(), switch_core_media_process_sdp_filter(), switch_core_media_receive_message(), switch_core_media_reset_t38(), switch_core_media_set_r_sdp_codec_string(), switch_core_media_toggle_hold(), switch_core_recovery_track(), switch_core_recovery_untrack(), switch_core_service_session_av(), switch_core_service_thread(), switch_core_session_check_outgoing_crypto(), switch_core_session_read_frame(), switch_core_session_set_read_codec(), switch_core_session_set_real_read_codec(), switch_core_session_set_video_read_codec(), switch_core_session_set_video_write_codec(), switch_core_session_set_write_codec(), switch_core_session_write_frame(), switch_core_standard_on_reset(), switch_core_thread_session_end(), switch_ivr_3p_media(), switch_ivr_3p_nomedia(), switch_ivr_activate_unicast(), switch_ivr_bind_dtmf_meta_session(), switch_ivr_blind_transfer_ack(), switch_ivr_block_dtmf_session(), switch_ivr_bridge_bleg(), switch_ivr_broadcast(), switch_ivr_capture_text(), switch_ivr_check_hold(), switch_ivr_clear_speech_cache(), switch_ivr_collect_digits_callback(), switch_ivr_collect_digits_count(), switch_ivr_deactivate_unicast(), switch_ivr_delay_echo(), switch_ivr_detect_audio(), switch_ivr_detect_silence(), switch_ivr_detect_speech(), switch_ivr_detect_speech_disable_all_grammars(), switch_ivr_detect_speech_disable_grammar(), switch_ivr_detect_speech_enable_grammar(), switch_ivr_detect_speech_init(), switch_ivr_detect_speech_load_grammar(), switch_ivr_detect_speech_start_input_timers(), switch_ivr_detect_speech_unload_grammar(), switch_ivr_displace_session(), switch_ivr_eavesdrop_session(), switch_ivr_eavesdrop_update_display(), switch_ivr_enterprise_orig_and_bridge(), switch_ivr_enterprise_originate(), switch_ivr_find_bridged_uuid(), switch_ivr_generate_json_cdr(), switch_ivr_generate_xml_cdr(), switch_ivr_gentones(), switch_ivr_get_file_handle(), switch_ivr_hold(), switch_ivr_hold_toggle_uuid(), switch_ivr_inband_dtmf_generate_session(), switch_ivr_inband_dtmf_session(), switch_ivr_insert_file(), switch_ivr_intercept_session(), switch_ivr_kill_uuid(), switch_ivr_media(), switch_ivr_menu_execute(), switch_ivr_multi_threaded_bridge(), switch_ivr_nomedia(), switch_ivr_orig_and_bridge(), switch_ivr_originate(), switch_ivr_park(), switch_ivr_park_session(), switch_ivr_parse_all_events(), switch_ivr_parse_event(), switch_ivr_parse_next_event(), switch_ivr_parse_signal_data(), switch_ivr_pause_detect_speech(), switch_ivr_phrase_macro_event(), switch_ivr_play_and_collect_input(), switch_ivr_play_and_detect_speech(), switch_ivr_play_file(), switch_ivr_preprocess_session(), switch_ivr_process_indications(), switch_ivr_read(), switch_ivr_record_file_event(), switch_ivr_record_session_event(), switch_ivr_record_session_mask(), switch_ivr_record_session_pause(), switch_ivr_resume_detect_speech(), switch_ivr_say(), switch_ivr_say_string(), switch_ivr_session_audio(), switch_ivr_session_echo(), switch_ivr_session_transfer(), switch_ivr_set_param_detect_speech(), switch_ivr_set_user_xml(), switch_ivr_signal_bridge(), switch_ivr_sleep(), switch_ivr_soft_hold(), switch_ivr_sound_test(), switch_ivr_speak_text(), switch_ivr_speak_text_handle(), switch_ivr_stop_detect_speech(), switch_ivr_stop_displace_session(), switch_ivr_stop_inband_dtmf_generate_session(), switch_ivr_stop_inband_dtmf_session(), switch_ivr_stop_record_session(), switch_ivr_stop_session_audio(), switch_ivr_stop_tone_detect_session(), switch_ivr_stop_video_write_overlay_session(), switch_ivr_tone_detect_session(), switch_ivr_transfer_recordings(), switch_ivr_transfer_variable(), switch_ivr_unbind_dtmf_meta_session(), switch_ivr_unblock_dtmf_session(), switch_ivr_unhold(), switch_ivr_uuid_bridge(), switch_ivr_video_write_overlay_session(), switch_ivr_wait_for_answer(), switch_ivr_wait_for_silence(), switch_jb_set_session(), switch_limit_incr(), switch_log_meta_vprintf(), switch_log_node_to_json(), switch_play_and_get_digits(), switch_process_import(), switch_regex_set_var_callback(), switch_rtp_activate_jitter_buffer(), switch_rtp_add_crypto_key(), switch_rtp_add_dtls(), switch_rtp_break(), switch_rtp_create(), switch_rtp_dequeue_dtmf(), switch_rtp_enable_vad(), switch_rtp_set_flag(), switch_rtp_set_local_address(), switch_rtp_sync_stats(), switch_rtp_write_frame(), SWITCH_STANDARD_APP(), SWITCH_STANDARD_SCHED_FUNC(), text_bridge_thread(), text_helper_thread(), tone_detect_callback(), tone_detect_set_total_time(), tone_on_dtmf(), transfer_after_bridge(), uuid_bridge_on_hibernate(), uuid_bridge_on_reset(), uuid_bridge_on_soft_execute(), video_helper_thread(), video_write_overlay_callback(), and write_displace_callback().
switch_ivr_dmachine_t* switch_core_session_get_dmachine | ( | switch_core_session_t * | session, |
switch_digit_action_target_t | target | ||
) |
Definition at line 56 of file switch_core_session.c.
References switch_core_session::dmachine.
Referenced by signal_bridge_on_hibernate().
const char* switch_core_session_get_external_id | ( | _In_ switch_core_session_t * | session | ) |
Retrieve the unique external identifier from a session.
session | the session to retrieve the uuid from |
Referenced by switch_channel_event_set_basic_data().
switch_size_t switch_core_session_get_id | ( | _In_ switch_core_session_t * | session | ) |
switch_jb_t* switch_core_session_get_jb | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 68 of file switch_core_session.c.
References switch_core_session::endpoint_interface, switch_io_routines::get_jb, and switch_endpoint_interface::io_routines.
Referenced by switch_core_media_read_frame().
switch_log_level_t switch_core_session_get_loglevel | ( | switch_core_session_t * | session | ) |
Get the log level for a session.
session | the session to get the log level from |
Definition at line 3116 of file switch_core_session.c.
References switch_core_session::loglevel, and switch_assert.
switch_mutex_t* switch_core_session_get_mutex | ( | switch_core_session_t * | session | ) |
Signal a session's state machine thread that a state change has occured.
Definition at line 1437 of file switch_core_session.c.
References switch_core_session::mutex.
Referenced by careful_set().
void* switch_core_session_get_private_class | ( | _In_ switch_core_session_t * | session, |
_In_ switch_pvt_class_t | index | ||
) |
Retrieve private user data from a session.
session | the session to retrieve from |
void* switch_core_session_get_stream | ( | _In_ switch_core_session_t * | session, |
_In_ int | index | ||
) |
Retreive a logical stream from a session.
session | the session to add the stream to |
index | the index to retrieve |
int switch_core_session_get_stream_count | ( | _In_ switch_core_session_t * | session | ) |
Determine the number of logical streams a session has.
session | the session to query |
const char* switch_core_session_get_text_buffer | ( | switch_core_session_t * | session | ) |
Definition at line 1990 of file switch_core_session.c.
References buf, switch_buffer_get_head_pointer(), switch_core_session_strdup, switch_mutex_lock(), switch_mutex_unlock(), switch_core_session::text_buffer, and switch_core_session::text_mutex.
Referenced by switch_ivr_generate_xml_cdr().
char* switch_core_session_get_uuid | ( | _In_ switch_core_session_t * | session | ) |
Retrieve the unique identifier from a session.
session | the session to retrieve the uuid from |
Referenced by _switch_core_session_request_video_refresh(), add_uuid(), audio_bridge_thread(), bcast_thread(), check_channel_status(), check_jb_sync(), cleanup_proxy_mode_b(), CoreSession::CoreSession(), meta_on_dtmf(), CoreSession::originate(), signal_bridge_on_hangup(), signal_bridge_on_hibernate(), switch_channel_event_set_basic_data(), switch_channel_get_uuid(), switch_channel_set_caller_profile(), switch_channel_set_name(), switch_core_media_gen_local_sdp(), switch_core_media_negotiate_sdp(), switch_core_media_read_frame(), switch_core_media_toggle_hold(), switch_core_recovery_track(), switch_core_recovery_untrack(), switch_core_session_perform_kill_channel(), switch_core_session_read_lock(), switch_core_session_read_lock_hangup(), switch_core_session_send_dtmf(), switch_core_session_write_lock(), switch_core_standard_on_execute(), switch_core_standard_on_reset(), switch_core_standard_on_routing(), switch_ivr_capture_text(), switch_ivr_enterprise_originate(), switch_ivr_intercept_session(), switch_ivr_multi_threaded_bridge(), switch_ivr_originate(), switch_ivr_parse_event(), switch_ivr_signal_bridge(), switch_ivr_uuid_bridge(), switch_log_meta_vprintf(), switch_send_rtcp_event(), and uuid_bridge_on_soft_execute().
void switch_core_session_hangup_state | ( | switch_core_session_t * | session, |
switch_bool_t | force | ||
) |
Definition at line 793 of file switch_core_state_machine.c.
References api_hook(), CCS_HANGUP, CF_EARLY_HANGUP, switch_core_session::channel, switch_core_session::endpoint_interface, index, runtime, SCF_EARLY_HANGUP, SSF_HANGUP, switch_endpoint_interface::state_handler, STATE_MACRO, SWITCH_API_HANGUP_HOOK_VARIABLE, switch_assert, switch_channel_cause2str(), switch_channel_get_cause(), switch_channel_get_cause_q850(), switch_channel_get_name(), switch_channel_get_state(), switch_channel_get_variable, switch_channel_process_device_hangup(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_callstate, switch_channel_set_hangup_time(), switch_channel_set_timestamps(), switch_channel_set_variable, switch_channel_set_variable_printf(), switch_channel_stop_broadcast, switch_channel_test_flag(), switch_core_media_bug_remove_all, switch_core_media_set_stats(), SWITCH_LOG_DEBUG10, switch_log_printf(), SWITCH_SESSION_IN_HANGUP_HOOK_VARIABLE, switch_set_flag, switch_test_flag, switch_thread_self(), switch_true(), and switch_core_session::thread_id.
Referenced by CoreSession::hangupState(), switch_channel_perform_hangup(), and switch_core_session_run().
void switch_core_session_hupall | ( | _In_ switch_call_cause_t | cause | ) |
Hangup all sessions.
cause | the hangup cause to apply to the hungup channels |
Referenced by switch_core_destroy(), and switch_core_session_ctl().
void switch_core_session_hupall_endpoint | ( | const switch_endpoint_interface_t * | endpoint_interface, |
switch_call_cause_t | cause | ||
) |
Hangup all sessions that belong to an endpoint.
endpoint_interface | The endpoint interface |
cause | the hangup cause to apply to the hungup channels |
Definition at line 339 of file switch_core_session.c.
References switch_core_session::channel, switch_core_session::endpoint_interface, str_node::next, pool, runtime, switch_runtime::session_hash_mutex, session_manager, switch_session_manager::session_table, switch_channel_hangup, switch_core_alloc, switch_core_destroy_memory_pool, switch_core_hash_first, switch_core_hash_next(), switch_core_hash_this(), switch_core_new_memory_pool, switch_core_session_locate, switch_core_session_read_lock(), switch_core_session_rwunlock(), switch_core_strdup, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_SUCCESS, and switch_core_session::uuid_str.
Referenced by switch_loadable_module_unprocess().
uint32_t switch_core_session_hupall_matching_var_ans | ( | _In_ const char * | var_name, |
_In_ const char * | var_val, | ||
_In_ switch_call_cause_t | cause, | ||
switch_hup_type_t | type | ||
) |
Hangup all sessions which match a specific channel variable.
var_name | The variable name to look for |
var_val | The value to look for |
cause | the hangup cause to apply to the hungup channels |
uint32_t switch_core_session_hupall_matching_vars_ans | ( | _In_ switch_event_t * | vars, |
_In_ switch_call_cause_t | cause, | ||
switch_hup_type_t | type | ||
) |
Hangup all sessions which match specific channel variable(s)
var_name | The variable name to look for |
var_val | The value to look for |
cause | the hangup cause to apply to the hungup channels |
switch_size_t switch_core_session_id | ( | void | ) |
Provide the current session_id.
Definition at line 2536 of file switch_core_session.c.
References switch_session_manager::session_id, and session_manager.
Referenced by send_heartbeat(), and switch_channel_perform_set_running_state().
switch_size_t switch_core_session_id_dec | ( | void | ) |
Definition at line 2528 of file switch_core_session.c.
References runtime, switch_runtime::session_hash_mutex, switch_session_manager::session_id, session_manager, switch_mutex_lock(), and switch_mutex_unlock().
void switch_core_session_launch_thread | ( | _In_ switch_core_session_t * | session, |
_In_ void *(*)(switch_thread_t *, void *) | func, | ||
_In_opt_ void * | obj | ||
) |
Launch a thread designed to exist within the scope of a given session.
session | a session to allocate the thread from |
func | a function to execute in the thread |
obj | an arguement |
Referenced by switch_core_service_session_av().
switch_status_t switch_core_session_message_send | ( | _In_z_ const char * | uuid_str, |
_In_ switch_core_session_message_t * | message | ||
) |
Send a message to another session using it's uuid.
uuid_str | the unique id of the session you want to send a message to |
message | the switch_core_session_message_t object to send |
uint32_t switch_core_session_messages_waiting | ( | switch_core_session_t * | session | ) |
Definition at line 1223 of file switch_core_session.c.
References switch_core_session::message_queue, switch_core_session::private_event_queue, and switch_queue_size().
Referenced by check_channel_status().
switch_call_cause_t switch_core_session_outgoing_channel | ( | _In_opt_ switch_core_session_t * | session, |
_In_opt_ switch_event_t * | var_event, | ||
_In_z_ const char * | endpoint_name, | ||
_In_ switch_caller_profile_t * | caller_profile, | ||
_Inout_ switch_core_session_t ** | new_session, | ||
_Inout_ switch_memory_pool_t ** | pool, | ||
_In_ switch_originate_flag_t | flags, | ||
switch_call_cause_t * | cancel_cause | ||
) |
Request an outgoing session spawned from an existing session using a desired endpoing module.
session | the originating session |
var_event | switch_event_t containing paramaters |
endpoint_name | the name of the module to use for the new session |
caller_profile | the originator's caller profile |
new_session | a NULL pointer to aim at the newly created session |
pool | optional existing memory pool to donate to the session |
flags | flags to use |
Referenced by switch_ivr_originate().
switch_status_t switch_core_session_pass_indication | ( | _In_ switch_core_session_t * | session, |
_In_ switch_core_session_message_types_t | indication | ||
) |
pass an indication message on a session
session | the session to pass the message across |
indication | the indication message to pass |
void switch_core_session_passthru | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
switch_bool_t | on | ||
) |
Definition at line 15014 of file switch_core_media.c.
References switch_core_session::channel, switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::rtp_session, switch_channel_var_true(), switch_core_media_gen_key_frame, switch_core_session_request_video_refresh, SWITCH_MEDIA_TYPE_VIDEO, switch_rtp_clear_flag(), SWITCH_RTP_FLAG_PASSTHRU, switch_rtp_ready(), switch_rtp_set_flag(), switch_snprintf(), and type2str.
Referenced by audio_bridge_thread(), and text_bridge_thread().
void switch_core_session_perform_destroy | ( | _Inout_ switch_core_session_t ** | session, |
_In_z_ const char * | file, | ||
_In_z_ const char * | func, | ||
_In_ int | line | ||
) |
switch_core_session_t* switch_core_session_perform_force_locate | ( | const char * | uuid_str, |
const char * | file, | ||
const char * | func, | ||
int | line | ||
) |
Definition at line 152 of file switch_core_session.c.
References switch_core_session::channel, runtime, switch_core_session::rwlock, switch_runtime::session_hash_mutex, session_manager, switch_session_manager::session_table, SSF_DESTROYED, switch_channel_get_name(), SWITCH_CHANNEL_ID_LOG, switch_core_hash_find(), switch_core_session_get_uuid(), SWITCH_LOG_ERROR, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_test_flag, and switch_thread_rwlock_tryrdlock().
switch_status_t switch_core_session_perform_get_partner | ( | switch_core_session_t * | session, |
switch_core_session_t ** | partner, | ||
const char * | file, | ||
const char * | func, | ||
int | line | ||
) |
Get the session's partner (the session its bridged to)
session | The session we're searching with |
partner | [out] The session's partner, or NULL if it wasnt found |
Definition at line 189 of file switch_core_session.c.
References switch_core_session::channel, switch_channel_get_partner_uuid_copy(), switch_core_session_perform_locate(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and SWITCH_UUID_FORMATTED_LENGTH.
switch_status_t switch_core_session_perform_kill_channel | ( | _In_ switch_core_session_t * | session, |
const char * | file, | ||
const char * | func, | ||
int | line, | ||
switch_signal_t | sig | ||
) |
switch_core_session_t* switch_core_session_perform_locate | ( | const char * | uuid_str, |
const char * | file, | ||
const char * | func, | ||
int | line | ||
) |
Definition at line 121 of file switch_core_session.c.
References runtime, switch_runtime::session_hash_mutex, session_manager, switch_session_manager::session_table, switch_core_hash_find(), switch_core_session_read_lock(), switch_mutex_lock(), switch_mutex_unlock(), and SWITCH_STATUS_SUCCESS.
Referenced by switch_core_session_perform_get_partner().
switch_status_t switch_core_session_perform_receive_message | ( | _In_ switch_core_session_t * | session, |
_In_ switch_core_session_message_t * | message, | ||
const char * | file, | ||
const char * | func, | ||
int | line | ||
) |
Receive a message on a given session.
session | the session to receive the message from |
message | the message to recieve |
Referenced by send_ind(), switch_channel_perform_answer(), switch_channel_perform_pre_answer(), and switch_channel_perform_ring_ready_value().
uint32_t switch_core_session_private_event_count | ( | _In_ switch_core_session_t * | session | ) |
Indicate the number of waiting private events on a session.
session | the session to check |
Referenced by audio_bridge_thread().
switch_status_t switch_core_session_queue_event | ( | _In_ switch_core_session_t * | session, |
_Inout_ switch_event_t ** | event | ||
) |
Queue an event on a given session.
session | the session to queue the message on |
event | the event to queue |
Referenced by generate_on_dtmf(), speech_thread(), switch_channel_dequeue_dtmf(), switch_core_session_read_text_frame(), text_callback(), and tone_detect_callback().
switch_status_t switch_core_session_queue_indication | ( | _In_ switch_core_session_t * | session, |
_In_ switch_core_session_message_types_t | indication | ||
) |
Queue an indication message on a session.
session | the session to queue the message to |
indication | the indication message to queue |
switch_status_t switch_core_session_queue_message | ( | _In_ switch_core_session_t * | session, |
_In_ switch_core_session_message_t * | message | ||
) |
Queue a message on a session.
session | the session to queue the message to |
message | the message to queue |
Referenced by check_stream_changes(), hanguphook(), send_display(), switch_channel_perform_audio_sync(), switch_channel_perform_video_sync(), and switch_core_media_negotiate_sdp().
switch_status_t switch_core_session_queue_private_event | ( | _In_ switch_core_session_t * | session, |
_Inout_ switch_event_t ** | event, | ||
switch_bool_t | priority | ||
) |
Queue a private event on a given session.
session | the session to queue the message on |
event | the event to queue |
priority | event has high priority |
Referenced by switch_ivr_broadcast().
switch_status_t switch_core_session_queue_signal_data | ( | switch_core_session_t * | session, |
void * | signal_data | ||
) |
Definition at line 1131 of file switch_core_session.c.
References switch_core_session::signal_data_queue, switch_assert, switch_core_session_kill_channel, switch_core_session_wake_session_thread(), switch_queue_push(), SWITCH_SIG_BREAK, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
void switch_core_session_raw_read | ( | switch_core_session_t * | session | ) |
Definition at line 3128 of file switch_core_session.c.
References switch_slin_data::codec, memset(), switch_core_session::sdata, switch_core_codec_destroy(), switch_core_codec_ready(), switch_core_session_alloc, and switch_core_session_set_codec_slin().
Referenced by switch_ivr_session_echo().
switch_status_t switch_core_session_read_frame | ( | _In_ switch_core_session_t * | session, |
switch_frame_t ** | frame, | ||
switch_io_flag_t | flags, | ||
int | stream_id | ||
) |
Read a frame from a session.
session | the session to read from |
frame | a NULL pointer to a frame to aim at the newly read frame |
flags | I/O flags to modify behavior (i.e. non blocking) |
stream_id | which logical media channel to use |
Referenced by audio_bridge_thread(), early_thread_run(), switch_core_service_thread(), switch_core_session_wait_for_video_input_params(), switch_ivr_collect_digits_callback(), switch_ivr_collect_digits_count(), switch_ivr_delay_echo(), switch_ivr_detect_audio(), switch_ivr_detect_silence(), switch_ivr_eavesdrop_session(), switch_ivr_gentones(), switch_ivr_media(), switch_ivr_originate(), switch_ivr_park(), switch_ivr_parse_event(), switch_ivr_play_file(), switch_ivr_record_file_event(), switch_ivr_session_echo(), switch_ivr_sleep(), switch_ivr_sound_test(), switch_ivr_speak_text_handle(), switch_ivr_wait_for_answer(), and switch_ivr_wait_for_silence().
switch_status_t switch_core_session_read_video_frame | ( | _In_ switch_core_session_t * | session, |
switch_frame_t ** | frame, | ||
switch_io_flag_t | flags, | ||
int | stream_id | ||
) |
Read a video frame from a session.
session | the session to read from |
frame | a NULL pointer to a frame to aim at the newly read frame |
flags | I/O flags to modify behavior (i.e. non blocking) |
stream_id | which logical media channel to use |
Referenced by audio_bridge_thread(), switch_core_service_thread(), and text_bridge_thread().
switch_status_t switch_core_session_receive_event | ( | _In_ switch_core_session_t * | session, |
_Inout_ switch_event_t ** | event | ||
) |
Send an event to a session translating it to it's native message format.
session | the session to receive the event |
event | the event to receive |
Referenced by audio_bridge_thread(), and CoreSession::sendEvent().
switch_status_t switch_core_session_recv_dtmf | ( | _In_ switch_core_session_t * | session, |
const switch_dtmf_t * | dtmf | ||
) |
RECV DTMF on a session.
session | session to recv DTMF from |
dtmf | string to recv from the session |
Referenced by switch_channel_queue_dtmf().
void switch_core_session_reporting_state | ( | switch_core_session_t * | session | ) |
Definition at line 865 of file switch_core_state_machine.c.
References api_hook(), CF_NO_CDR, CF_REPORTING, switch_core_session::channel, switch_core_session::endpoint_interface, db_job::event, index, switch_endpoint_interface::state_handler, STATE_MACRO, SWITCH_API_REPORTING_HOOK_VARIABLE, switch_assert, switch_channel_cause2str(), switch_channel_event_set_data(), switch_channel_get_cause(), switch_channel_get_originatee_caller_profile(), switch_channel_get_originator_caller_profile(), switch_channel_get_state(), switch_channel_get_variable, switch_channel_set_flag, switch_channel_str2cause(), switch_channel_test_flag(), switch_core_session_strdup, switch_event_add_body(), switch_event_add_header_string(), SWITCH_EVENT_CHANNEL_HANGUP_COMPLETE, switch_event_create, switch_event_fire, SWITCH_FALSE, switch_ivr_generate_xml_cdr(), SWITCH_PROCESS_CDR_VARIABLE, switch_safe_free, SWITCH_SESSION_IN_HANGUP_HOOK_VARIABLE, SWITCH_SKIP_CDR_CAUSES_VARIABLE, switch_split, SWITCH_STACK_BOTTOM, SWITCH_STATUS_SUCCESS, switch_true(), switch_xml_free(), switch_xml_toxml, and zstr.
Referenced by switch_core_session_run().
switch_core_session_t* switch_core_session_request_by_name | ( | _In_z_ const char * | endpoint_name, |
_In_ switch_call_direction_t | direction, | ||
_Inout_ switch_memory_pool_t ** | pool | ||
) |
Allocate and return a new session from the core based on a given endpoint module name.
endpoint_name | the name of the endpoint module |
pool | the pool to use |
switch_core_session_t* switch_core_session_request_uuid | ( | _In_ switch_endpoint_interface_t * | endpoint_interface, |
_In_ switch_call_direction_t | direction, | ||
switch_originate_flag_t | originate_flags, | ||
_Inout_opt_ switch_memory_pool_t ** | pool, | ||
_In_opt_z_ const char * | use_uuid | ||
) |
Allocate and return a new session from the core.
endpoint_interface | the endpoint interface the session is to be based on |
pool | the pool to use for the allocation (a new one will be used if NULL) |
void switch_core_session_reset | ( | _In_ switch_core_session_t * | session, |
switch_bool_t | flush_dtmf, | ||
switch_bool_t | reset_read_codec | ||
) |
Reset the buffers and resampler on a session.
session | the session to reset |
flush_dtmf | flush all queued dtmf events too |
Referenced by audio_bridge_on_exchange_media(), audio_bridge_thread(), early_thread_run(), eavesdrop_callback(), record_callback(), recording_thread(), switch_core_media_set_codec(), switch_core_standard_on_park(), switch_ivr_detect_audio(), switch_ivr_detect_silence(), switch_ivr_displace_session(), switch_ivr_eavesdrop_session(), switch_ivr_originate(), switch_ivr_play_file(), switch_ivr_record_file_event(), switch_ivr_record_session_event(), switch_ivr_session_echo(), switch_ivr_session_transfer(), switch_ivr_speak_text(), switch_ivr_wait_for_answer(), switch_ivr_wait_for_silence(), and uuid_bridge_on_soft_execute().
switch_status_t switch_core_session_send_dtmf | ( | _In_ switch_core_session_t * | session, |
const switch_dtmf_t * | dtmf | ||
) |
Send DTMF to a session.
session | session to send DTMF to |
dtmf | dtmf to send to the session |
Referenced by audio_bridge_thread().
switch_status_t switch_core_session_send_dtmf_string | ( | switch_core_session_t * | session, |
const char * | dtmf_string | ||
) |
Send DTMF to a session.
session | session to send DTMF to |
dtmf_string | string to send to the session |
Definition at line 1121 of file switch_core_io.c.
References switch_codec_implementation::actual_samples_per_second, switch_core_session::channel, switch_dtmf_t::digit, DTMF_FLAG_SKIP_PROCESS, switch_dtmf_t::duration, switch_dtmf_t::flags, is_dtmf, string, switch_assert, switch_channel_down, switch_channel_get_name(), switch_channel_pre_answer, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable, switch_core_default_dtmf_duration(), switch_core_max_dtmf_duration(), switch_core_min_dtmf_duration(), switch_core_session_get_write_impl(), switch_core_session_send_dtmf(), switch_core_session_strdup, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_LOG_WARNING, switch_separate_string(), switch_snprintf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and zstr.
switch_status_t switch_core_session_set_codec_slin | ( | switch_core_session_t * | session, |
switch_slin_data_t * | data | ||
) |
Definition at line 87 of file switch_core_session.c.
References switch_codec_implementation::actual_samples_per_second, switch_frame::buflen, switch_frame::codec, switch_slin_data::codec, switch_frame::data, switch_frame::datalen, switch_slin_data::frame_data, memset(), switch_codec_implementation::microseconds_per_packet, switch_codec_implementation::number_of_channels, switch_slin_data::session, SWITCH_CHANNEL_SESSION_LOG, SWITCH_CODEC_FLAG_DECODE, SWITCH_CODEC_FLAG_ENCODE, switch_core_codec_init, switch_core_session_get_read_impl(), switch_core_session_set_read_codec(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_slin_data::write_frame.
Referenced by switch_core_session_raw_read().
void switch_core_session_set_dmachine | ( | switch_core_session_t * | session, |
switch_ivr_dmachine_t * | dmachine, | ||
switch_digit_action_target_t | target | ||
) |
Definition at line 44 of file switch_core_session.c.
References switch_core_session::dmachine, and switch_ivr_dmachine_set_target().
switch_status_t switch_core_session_set_external_id | ( | _In_ switch_core_session_t * | session, |
_In_z_ const char * | use_external_id | ||
) |
switch_status_t switch_core_session_set_loglevel | ( | switch_core_session_t * | session, |
switch_log_level_t | loglevel | ||
) |
Sets the log level for a session.
session | the session to set the log level on |
Definition at line 3109 of file switch_core_session.c.
References switch_core_session::loglevel, switch_assert, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_core_session_set_private_class | ( | _In_ switch_core_session_t * | session, |
_In_ void * | private_info, | ||
_In_ switch_pvt_class_t | index | ||
) |
Add private user data to a session.
session | the session to add used data to |
private_info | the used data to add |
switch_status_t switch_core_session_set_read_impl | ( | switch_core_session_t * | session, |
const switch_codec_implementation_t * | impp | ||
) |
Definition at line 384 of file switch_core_codec.c.
References switch_core_session::read_impl, and SWITCH_STATUS_SUCCESS.
Referenced by switch_core_media_set_codec().
switch_status_t switch_core_session_set_uuid | ( | _In_ switch_core_session_t * | session, |
_In_z_ const char * | use_uuid | ||
) |
switch_status_t switch_core_session_set_video_read_impl | ( | switch_core_session_t * | session, |
const switch_codec_implementation_t * | impp | ||
) |
Definition at line 396 of file switch_core_codec.c.
References SWITCH_STATUS_SUCCESS, and switch_core_session::video_read_impl.
switch_status_t switch_core_session_set_video_write_impl | ( | switch_core_session_t * | session, |
const switch_codec_implementation_t * | impp | ||
) |
Definition at line 402 of file switch_core_codec.c.
References SWITCH_STATUS_SUCCESS, and switch_core_session::video_write_impl.
switch_status_t switch_core_session_set_write_impl | ( | switch_core_session_t * | session, |
const switch_codec_implementation_t * | impp | ||
) |
Definition at line 390 of file switch_core_codec.c.
References SWITCH_STATUS_SUCCESS, and switch_core_session::write_impl.
Referenced by switch_core_media_set_codec().
void switch_core_session_signal_state_change | ( | _In_ switch_core_session_t * | session | ) |
Referenced by switch_channel_perform_hangup(), and switch_channel_perform_set_state().
void switch_core_session_soft_lock | ( | switch_core_session_t * | session, |
uint32_t | sec | ||
) |
void switch_core_session_soft_unlock | ( | switch_core_session_t * | session | ) |
uint32_t switch_core_session_stack_count | ( | switch_core_session_t * | session, |
int | x | ||
) |
Definition at line 2992 of file switch_core_session.c.
References switch_core_session::stack_count, switch_core_session::stack_count_mutex, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_core_session_exec(), switch_core_session_execute_exten(), switch_ivr_parse_all_events(), and switch_ivr_parse_event().
switch_status_t switch_core_session_thread_launch | ( | _In_ switch_core_session_t * | session | ) |
Launch the session thread (state machine) on a given session.
session | the session to activate the state machine on |
Referenced by recover_callback(), switch_channel_perform_hangup(), and switch_ivr_originate().
switch_status_t switch_core_session_thread_pool_launch | ( | switch_core_session_t * | session | ) |
Definition at line 1918 of file switch_core_session.c.
References check_queue(), switch_thread_data_s::func, switch_core_session::mutex, switch_thread_data_s::obj, session_manager, SSF_THREAD_RUNNING, SSF_THREAD_STARTED, SWITCH_CHANNEL_SESSION_LOG, switch_core_session_alloc, switch_core_session_thread(), SWITCH_LOG_CRIT, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), switch_queue_push(), switch_set_flag, SWITCH_STATUS_INUSE, switch_test_flag, and switch_session_manager::thread_queue.
Referenced by switch_core_session_thread_launch().
switch_bool_t switch_core_session_transcoding | ( | switch_core_session_t * | session_a, |
switch_core_session_t * | session_b, | ||
switch_media_type_t | type | ||
) |
Definition at line 14985 of file switch_core_media.c.
References CF_VIDEO_DECODED_READ, switch_core_session::channel, switch_codec_implementation::decoded_bytes_per_packet, switch_codec_implementation::impl_id, switch_channel_test_flag(), switch_core_session_get_read_impl(), SWITCH_FALSE, SWITCH_MEDIA_TYPE_AUDIO, and SWITCH_MEDIA_TYPE_VIDEO.
Referenced by audio_bridge_thread(), and text_bridge_thread().
switch_status_t switch_core_session_try_reset | ( | switch_core_session_t * | session, |
switch_bool_t | flush_dtmf, | ||
switch_bool_t | reset_read_codec | ||
) |
Reset the buffers and resampler on a session, fail if can not lock codec mutexes.
session | the session to reset |
flush_dtmf | flush all queued dtmf events too |
Definition at line 1374 of file switch_core_session.c.
References switch_core_session::codec_read_mutex, switch_core_session::codec_write_mutex, switch_core_session_reset(), switch_mutex_trylock(), switch_mutex_unlock(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
void switch_core_session_video_reset | ( | switch_core_session_t * | session | ) |
Definition at line 2713 of file switch_core_session.c.
References CF_VIDEO_BLANK, CF_VIDEO_DEBUG_READ, CF_VIDEO_DEBUG_WRITE, CF_VIDEO_ECHO, CF_VIDEO_PASSIVE, switch_core_session::channel, switch_channel_clear_flag(), and switch_core_session_request_video_refresh.
Referenced by audio_bridge_thread(), switch_core_media_set_video_file(), switch_core_media_start_engine_function(), switch_core_standard_on_execute(), and switch_ivr_session_echo().
switch_status_t switch_core_session_wake_session_thread | ( | _In_ switch_core_session_t * | session | ) |
Referenced by check_channel_status(), and switch_core_session_read_lock().
switch_status_t switch_core_session_write_encoded_video_frame | ( | switch_core_session_t * | session, |
switch_frame_t * | frame, | ||
switch_io_flag_t | flags, | ||
int | stream_id | ||
) |
Definition at line 14658 of file switch_core_media.c.
References switch_core_session::endpoint_interface, switch_core_session::event_hooks, switch_endpoint_interface::io_routines, switch_io_event_hook_video_write_frame::next, SWITCH_CHANNEL_SESSION_LOG, switch_core_session_media_flow(), SWITCH_LOG_DEBUG3, switch_log_printf(), SWITCH_MEDIA_FLOW_INACTIVE, SWITCH_MEDIA_FLOW_RECVONLY, SWITCH_MEDIA_TYPE_VIDEO, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_io_event_hook_video_write_frame::video_write_frame, and switch_io_routines::write_video_frame.
Referenced by switch_core_session_write_video_frame().
switch_status_t switch_core_session_write_frame | ( | _In_ switch_core_session_t * | session, |
switch_frame_t * | frame, | ||
switch_io_flag_t | flags, | ||
int | stream_id | ||
) |
Write a frame to a session.
session | the session to write to |
frame | the frame to write |
flags | I/O flags to modify behavior (i.e. non blocking) |
stream_id | which logical media channel to use |
Referenced by audio_bridge_thread(), eavesdrop_callback(), switch_ivr_collect_digits_count(), switch_ivr_delay_echo(), switch_ivr_detect_audio(), switch_ivr_detect_silence(), switch_ivr_eavesdrop_session(), switch_ivr_gentones(), switch_ivr_originate(), switch_ivr_park(), switch_ivr_play_file(), switch_ivr_record_file_event(), switch_ivr_session_echo(), switch_ivr_sleep(), switch_ivr_speak_text_handle(), switch_ivr_wait_for_answer(), switch_ivr_wait_for_silence(), and unicast_thread_run().
switch_status_t switch_core_session_write_video_frame | ( | _In_ switch_core_session_t * | session, |
switch_frame_t * | frame, | ||
switch_io_flag_t | flags, | ||
int | stream_id | ||
) |
Write a video frame to a session.
session | the session to write to |
frame | a pointer to a frame to write |
flags | I/O flags to modify behavior (i.e. non blocking) |
stream_id | which logical media channel to use |
Referenced by audio_bridge_thread(), eavesdrop_callback(), and text_bridge_thread().
switch_bool_t switch_core_set_var_conditional | ( | _In_z_ const char * | varname, |
_In_opt_z_ const char * | value, | ||
_In_opt_z_ const char * | val2 | ||
) |
Conditionally add a global variable to the core.
varname | the name of the variable |
value | the value of the variable |
val2 | the value of the variable to verify against \ If the global did not exist and val2=="", add global with value, return true \ If the global exists with the value of val2, replace it, return true \ If the global exists with a value other than val2, return false |
Referenced by globalSetVariable().
void switch_core_set_variable | ( | _In_z_ const char * | varname, |
_In_opt_z_ const char * | value | ||
) |
Add a global variable to the core.
varname | the name of the variable |
value | the value of the variable \ If value is NULL, then varname is deleted. |
Referenced by fst_init_core_and_modload(), globalSetVariable(), preprocess(), preprocess_env_set(), preprocess_exec_set(), preprocess_stun_set(), setGlobalVariable(), and switch_nat_init().
void switch_core_thread_session_end | ( | _In_ switch_core_session_t * | session | ) |
Signal a thread using a thread session to terminate.
session | the session to indicate to |
Referenced by switch_ivr_play_file(), and switch_ivr_speak_text().
switch_digit_action_target_t switch_ivr_dmachine_get_target | ( | switch_ivr_dmachine_t * | dmachine | ) |
Definition at line 98 of file switch_ivr_async.c.
References switch_assert, and switch_ivr_dmachine::target.
void switch_ivr_dmachine_set_target | ( | switch_ivr_dmachine_t * | dmachine, |
switch_digit_action_target_t | target | ||
) |
Definition at line 104 of file switch_ivr_async.c.
References switch_assert, switch_ivr_dmachine::target, and target.
Referenced by switch_core_session_set_dmachine().
switch_status_t switch_ivr_dmachine_set_terminators | ( | switch_ivr_dmachine_t * | dmachine, |
const char * | terminators | ||
) |
Definition at line 201 of file switch_ivr_async.c.
References dm_binding_head_t::name, switch_ivr_dmachine::name, switch_ivr_dmachine::pool, switch_ivr_dmachine::realm, SWITCH_CHANNEL_LOG, switch_core_strdup, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and dm_binding_head_t::terminators.
switch_status_t switch_thread_pool_launch_thread | ( | switch_thread_data_t ** | tdp | ) |
Definition at line 1893 of file switch_core_session.c.
References check_queue(), session_manager, switch_assert, switch_queue_push(), SWITCH_STATUS_SUCCESS, and switch_session_manager::thread_queue.
Referenced by switch_event_channel_broadcast(), switch_event_deliver_thread_pool(), switch_ivr_bg_media(), switch_sql_queue_manager_execute_sql_callback(), switch_sql_queue_manager_execute_sql_callback_err(), switch_sql_queue_manager_execute_sql_event_callback(), and switch_sql_queue_manager_execute_sql_event_callback_err().
switch_status_t switch_thread_pool_wait | ( | switch_thread_data_t * | td, |
int | ms | ||
) |
Definition at line 1909 of file switch_core_session.c.
References switch_thread_data_s::running, switch_cond_next(), SWITCH_STATUS_SUCCESS, and SWITCH_STATUS_TIMEOUT.