RTS API Documentation
1.10.11
|
The switch_channel object is a private entity that belongs to a session that contains the call specific information such as the call state, variables, caller profiles and DTMF queue
#define switch_channel_acknowledge_call | ( | channel | ) | switch_channel_perform_acknowledge_call(channel, __FILE__, __SWITCH_FUNC__, __LINE__) |
Definition at line 481 of file switch_channel.h.
#define switch_channel_answer | ( | channel | ) | switch_channel_perform_answer(channel, __FILE__, __SWITCH_FUNC__, __LINE__) |
Answer a channel (initiate/acknowledge a successful connection)
channel | channel to answer |
Definition at line 463 of file switch_channel.h.
Referenced by CoreSession::answer(), audio_bridge_thread(), check_channel_status(), fs_channel_answer(), switch_ivr_intercept_session(), switch_ivr_multi_threaded_bridge(), switch_ivr_originate(), switch_ivr_process_indications(), and SWITCH_STANDARD_APP().
#define switch_channel_audio_sync | ( | _c | ) | switch_channel_perform_audio_sync(_c, __FILE__, __SWITCH_FUNC__, __LINE__) |
Definition at line 667 of file switch_channel.h.
Referenced by check_channel_status(), switch_channel_perform_answer(), switch_channel_perform_pre_answer(), switch_core_media_receive_message(), switch_core_media_set_codec(), switch_core_standard_on_execute(), switch_ivr_multi_threaded_bridge(), switch_ivr_originate(), switch_ivr_parse_event(), switch_ivr_play_file(), switch_ivr_resume_detect_speech(), switch_ivr_session_transfer(), switch_ivr_sleep(), and switch_ivr_speak_text_handle().
#define switch_channel_clear_app_flag | ( | _c, | |
_f | |||
) | switch_channel_clear_app_flag_key(__FILE__, _c, _f) |
Definition at line 680 of file switch_channel.h.
#define switch_channel_down | ( | _channel | ) | (switch_channel_check_signal(_channel, SWITCH_TRUE) || switch_channel_get_state(_channel) >= CS_HANGUP) |
Definition at line 89 of file switch_channel.h.
Referenced by CoreSession::hangupState(), switch_channel_wait_for_app_flag(), switch_channel_wait_for_flag(), switch_channel_wait_for_state(), switch_core_media_activate_rtp(), switch_core_media_get_media_bw_mult(), switch_core_media_get_orig_bitrate(), switch_core_media_patch_sdp(), switch_core_media_receive_message(), switch_core_media_set_media_bw_mult(), switch_core_media_set_outgoing_bitrate(), switch_core_media_start_udptl(), switch_core_session_read_frame(), switch_core_session_recv_dtmf(), switch_core_session_send_dtmf(), switch_core_session_send_dtmf_string(), switch_core_session_video_reinit(), switch_core_session_write_frame(), switch_core_session_write_text_frame(), switch_core_session_write_video_frame(), and uuid_bridge_on_soft_execute().
#define switch_channel_down_nosig | ( | _channel | ) | (switch_channel_get_state(_channel) >= CS_HANGUP) |
Definition at line 92 of file switch_channel.h.
Referenced by audio_bridge_thread(), check_channel_status(), record_callback(), recording_thread(), speech_thread(), switch_channel_event_set_basic_data(), switch_channel_state_change_pending(), switch_channel_wait_for_state(), switch_core_session_execute_application_get_flags(), switch_core_session_perform_receive_message(), switch_core_session_read_lock(), switch_core_session_read_text_frame(), switch_core_session_read_video_frame(), switch_ivr_multi_threaded_bridge(), switch_ivr_originate(), switch_ivr_signal_bridge(), switch_ivr_uuid_bridge(), and uuid_bridge_on_soft_execute().
#define switch_channel_expand_variables | ( | _channel, | |
_in | |||
) | switch_channel_expand_variables_check(_channel, _in, NULL, NULL, 0) |
Definition at line 654 of file switch_channel.h.
Referenced by do_api_on(), exec_app(), play_and_collect(), record_helper_post_process(), switch_channel_execute_on_value(), switch_channel_get_hold_music(), switch_core_session_exec(), switch_core_standard_on_routing(), switch_ivr_phrase_macro_event(), and switch_ivr_record_file_event().
#define switch_channel_export_variable | ( | _channel, | |
_varname, | |||
_value, | |||
_ev | |||
) | switch_channel_export_variable_var_check(_channel, _varname, _value, _ev, SWITCH_TRUE) |
Definition at line 312 of file switch_channel.h.
Referenced by switch_channel_export_variable_printf().
#define switch_channel_get_variable | ( | _c, | |
_v | |||
) | switch_channel_get_variable_dup(_c, _v, SWITCH_TRUE, -1) |
Definition at line 326 of file switch_channel.h.
Referenced by audio_bridge_on_exchange_media(), audio_bridge_thread(), check_channel_status(), check_ice(), check_jb(), check_media_timeout_params(), check_stream_changes(), fs_channel_get_variable(), fs_switch_channel_get_variable(), fs_switch_ivr_originate(), get_recording_var(), CoreSession::getVariable(), handle_ice(), hanguphook(), inherit_codec(), limit_state_handler(), monitor_callback(), play_and_collect(), play_and_detect_input_callback(), record_helper_post_process(), recover_callback(), rtp_common_read(), rtp_common_write(), sb_on_dtmf(), signal_bridge_on_hangup(), signal_bridge_on_hibernate(), speech_thread(), CoreSession::streamFile(), switch_channel_caller_extension_masquerade(), switch_channel_export_variable_var_check(), switch_channel_flip_cid(), switch_channel_get_hold_music(), switch_channel_get_partner_uuid(), switch_channel_get_variable_partner(), switch_channel_handle_cause(), switch_channel_mark_hold(), switch_channel_pass_sdp(), switch_channel_perform_answer(), switch_channel_perform_hangup(), switch_channel_perform_mark_answered(), switch_channel_perform_mark_pre_answered(), switch_channel_perform_presence(), switch_channel_process_export(), switch_channel_set_presence_data_vals(), switch_channel_set_timestamps(), switch_core_media_absorb_sdp(), switch_core_media_activate_rtp(), switch_core_media_bug_add(), switch_core_media_build_crypto(), switch_core_media_check_autoadj(), switch_core_media_check_dtmf_type(), switch_core_media_check_outgoing_proxy(), switch_core_media_choose_port(), switch_core_media_gen_local_sdp(), switch_core_media_get_codec_string(), switch_core_media_negotiate_sdp(), switch_core_media_parse_media_flags(), switch_core_media_prepare_codecs(), switch_core_media_proxy_remote_addr(), switch_core_media_read_frame(), switch_core_media_receive_message(), switch_core_media_recover_session(), switch_core_media_set_r_sdp_codec_string(), switch_core_media_set_udptl_image_sdp(), switch_core_media_start_udptl(), switch_core_media_toggle_hold(), switch_core_session_enable_heartbeat(), switch_core_session_exec(), switch_core_session_get_recovery_crypto_key(), switch_core_session_hangup_state(), switch_core_session_hupall_matching_vars_ans(), switch_core_session_outgoing_channel(), switch_core_session_parse_codec_settings(), switch_core_session_parse_crypto_prefs(), switch_core_session_perform_receive_message(), switch_core_session_reporting_state(), switch_core_session_sched_heartbeat(), switch_core_session_thread(), switch_core_standard_on_execute(), switch_core_standard_on_hangup(), switch_event_add_presence_data_cols(), switch_ivr_3p_media(), switch_ivr_3p_nomedia(), switch_ivr_bind_dtmf_meta_session(), switch_ivr_blind_transfer_ack(), switch_ivr_collect_digits_count(), switch_ivr_delay_echo(), switch_ivr_detect_speech(), switch_ivr_detect_speech_init(), switch_ivr_displace_session(), switch_ivr_eavesdrop_session(), switch_ivr_enterprise_orig_and_bridge(), switch_ivr_enterprise_originate(), switch_ivr_find_bridged_uuid(), switch_ivr_intercept_session(), switch_ivr_media(), switch_ivr_multi_threaded_bridge(), switch_ivr_nomedia(), switch_ivr_orig_and_bridge(), switch_ivr_originate(), switch_ivr_park(), switch_ivr_parse_event(), switch_ivr_phrase_macro_event(), switch_ivr_play_file(), switch_ivr_record_file_event(), switch_ivr_record_session_event(), switch_ivr_say(), switch_ivr_say_string(), switch_ivr_session_transfer(), switch_ivr_sleep(), switch_ivr_speak_text(), switch_ivr_speak_text_handle(), switch_ivr_tone_detect_session(), switch_ivr_transfer_recordings(), switch_ivr_transfer_variable(), switch_ivr_wait_for_answer(), switch_limit_incr(), switch_log_node_to_json(), switch_play_and_get_digits(), switch_process_import(), switch_rtp_add_crypto_key(), switch_rtp_add_dtls(), switch_rtp_enable_vad(), switch_rtp_set_flag(), switch_rtp_set_local_address(), SWITCH_STANDARD_APP(), uuid_bridge_on_soft_execute(), video_helper_thread(), and video_write_thread().
#define switch_channel_hangup | ( | channel, | |
hangup_cause | |||
) | switch_channel_perform_hangup(channel, __FILE__, __SWITCH_FUNC__, __LINE__, hangup_cause) |
Hangup a channel flagging it's state machine to end.
channel | channel to hangup |
hangup_cause | the appropriate hangup cause |
Definition at line 589 of file switch_channel.h.
Referenced by abort_call(), audio_bridge_on_exchange_media(), audio_bridge_thread(), check_channel_status(), check_per_channel_timeouts(), check_timeout(), cleanup_proxy_mode_a(), collect_thread_run(), CoreSession::destroy(), dtls_state_fail(), eavesdrop_callback(), enterprise_originate_thread(), fs_channel_hangup(), fs_switch_ivr_originate(), CoreSession::hangup(), monitor_callback(), read_bundle_rtp_packet(), read_rtp_packet(), record_callback(), recording_thread(), setup_ringback(), signal_bridge_on_hangup(), switch_channel_handle_cause(), switch_channel_perform_answer(), switch_channel_perform_pre_answer(), switch_channel_perform_ring_ready_value(), switch_core_media_activate_rtp(), switch_core_media_choose_ports(), switch_core_media_negotiate_sdp(), switch_core_media_process_t38_passthru(), switch_core_media_read_frame(), switch_core_media_set_codec(), switch_core_session_execute_application_get_flags(), switch_core_session_hupall(), switch_core_session_hupall_endpoint(), switch_core_session_hupall_matching_vars_ans(), switch_core_session_read_frame(), switch_core_session_run(), switch_core_session_write_frame(), switch_core_standard_on_execute(), switch_core_standard_on_routing(), switch_ivr_displace_session(), switch_ivr_intercept_session(), switch_ivr_kill_uuid(), switch_ivr_multi_threaded_bridge(), switch_ivr_originate(), switch_ivr_park(), switch_ivr_parse_event(), switch_ivr_process_indications(), switch_ivr_record_file_event(), switch_ivr_record_session_event(), switch_ivr_session_transfer(), switch_ivr_signal_bridge(), switch_ivr_wait_for_answer(), switch_rtp_add_dtls(), SWITCH_STANDARD_SCHED_FUNC(), text_bridge_thread(), and uuid_bridge_on_soft_execute().
#define switch_channel_inbound_display | ( | _channel | ) | ((switch_channel_direction(_channel) == SWITCH_CALL_DIRECTION_INBOUND && !switch_channel_test_flag(_channel, CF_BLEG)) || (switch_channel_direction(_channel) == SWITCH_CALL_DIRECTION_OUTBOUND && switch_channel_test_flag(_channel, CF_DIALPLAN))) |
Definition at line 656 of file switch_channel.h.
Referenced by switch_ivr_uuid_bridge().
#define switch_channel_mark_answered | ( | channel | ) | switch_channel_perform_mark_answered(channel, __FILE__, __SWITCH_FUNC__, __LINE__) |
Mark a channel answered with no indication (for outbound calls)
channel | channel to mark answered |
Definition at line 470 of file switch_channel.h.
#define switch_channel_mark_pre_answered | ( | channel | ) | switch_channel_perform_mark_pre_answered(channel, __FILE__, __SWITCH_FUNC__, __LINE__) |
Mark a channel pre_answered (early media) with no indication (for outbound calls)
channel | channel to mark pre_answered |
Definition at line 477 of file switch_channel.h.
#define switch_channel_mark_ring_ready | ( | channel | ) | switch_channel_perform_mark_ring_ready_value(channel, SWITCH_RING_READY_RINGING, __FILE__, __SWITCH_FUNC__, __LINE__) |
Indicate a channel is ready to provide ringback.
channel | channel |
Definition at line 516 of file switch_channel.h.
#define switch_channel_mark_ring_ready_value | ( | channel, | |
_rv | |||
) | switch_channel_perform_mark_ring_ready_value(channel, _rv, __FILE__, __SWITCH_FUNC__, __LINE__) |
Definition at line 519 of file switch_channel.h.
#define switch_channel_media_ack | ( | _channel | ) | (!switch_channel_test_cap(_channel, CC_MEDIA_ACK) || switch_channel_test_flag(_channel, CF_MEDIA_ACK)) |
Definition at line 94 of file switch_channel.h.
Referenced by audio_bridge_thread(), and switch_ivr_eavesdrop_session().
#define switch_channel_media_ready | ( | _channel | ) | switch_channel_test_ready(_channel, SWITCH_TRUE, SWITCH_TRUE) |
Definition at line 85 of file switch_channel.h.
Referenced by bridge(), check_channel_status(), early_thread_run(), CoreSession::mediaReady(), originate_on_consume_media_transmit(), setup_ringback(), switch_core_media_bug_add(), switch_core_media_bug_transfer_callback(), switch_core_media_patch_sdp(), switch_core_session_enable_heartbeat(), switch_core_session_execute_application_get_flags(), switch_core_session_write_frame(), switch_ivr_enterprise_originate(), switch_ivr_multi_threaded_bridge(), switch_ivr_originate(), switch_ivr_park(), switch_ivr_parse_event(), switch_ivr_play_file(), switch_ivr_record_file_event(), switch_ivr_sleep(), and switch_ivr_wait_for_answer().
#define switch_channel_media_up | ( | _channel | ) | (switch_channel_test_flag(_channel, CF_ANSWERED) || switch_channel_test_flag(_channel, CF_EARLY_MEDIA)) |
Definition at line 86 of file switch_channel.h.
Referenced by _switch_core_session_request_video_refresh(), audio_bridge_thread(), switch_channel_perform_audio_sync(), switch_channel_perform_video_sync(), switch_core_media_check_dtls(), switch_core_media_set_smode(), switch_core_session_execute_application_get_flags(), switch_ivr_displace_session(), switch_ivr_eavesdrop_session(), switch_ivr_inband_dtmf_generate_session(), switch_ivr_originate(), switch_ivr_parse_all_events(), switch_ivr_record_session_event(), switch_ivr_uuid_bridge(), text_bridge_thread(), and video_helper_thread().
#define switch_channel_outbound_display | ( | _channel | ) | ((switch_channel_direction(_channel) == SWITCH_CALL_DIRECTION_INBOUND && switch_channel_test_flag(_channel, CF_BLEG)) || (switch_channel_direction(_channel) == SWITCH_CALL_DIRECTION_OUTBOUND && !switch_channel_test_flag(_channel, CF_DIALPLAN))) |
Definition at line 658 of file switch_channel.h.
Referenced by switch_ivr_uuid_bridge().
#define switch_channel_pre_answer | ( | channel | ) | switch_channel_perform_pre_answer(channel, __FILE__, __SWITCH_FUNC__, __LINE__) |
Indicate progress on a channel to attempt early media.
channel | channel to pre-answer |
Definition at line 509 of file switch_channel.h.
Referenced by audio_bridge_thread(), bridge(), fs_channel_pre_answer(), CoreSession::preAnswer(), setup_ringback(), switch_core_media_bug_add(), switch_core_session_execute_application_get_flags(), switch_core_session_send_dtmf_string(), switch_ivr_displace_session(), switch_ivr_eavesdrop_session(), switch_ivr_enterprise_originate(), switch_ivr_gentones(), switch_ivr_inband_dtmf_generate_session(), switch_ivr_inband_dtmf_session(), switch_ivr_originate(), switch_ivr_park(), switch_ivr_phrase_macro_event(), switch_ivr_play_file(), switch_ivr_process_indications(), switch_ivr_read(), switch_ivr_record_file_event(), switch_ivr_record_session_event(), switch_ivr_session_audio(), switch_ivr_session_echo(), switch_ivr_speak_text(), switch_ivr_speak_text_handle(), and switch_ivr_tone_detect_session().
#define switch_channel_presence | ( | _a, | |
_b, | |||
_c, | |||
_d | |||
) | switch_channel_perform_presence(_a, _b, _c, _d, __FILE__, __SWITCH_FUNC__, __LINE__) |
Definition at line 190 of file switch_channel.h.
Referenced by check_presence(), switch_channel_perform_mark_answered(), switch_core_media_toggle_hold(), and switch_core_session_exec().
#define switch_channel_ready | ( | _channel | ) | switch_channel_test_ready(_channel, SWITCH_TRUE, SWITCH_FALSE) |
Definition at line 84 of file switch_channel.h.
Referenced by audio_bridge_thread(), bridge(), check_channel_status(), collect_thread_run(), enterprise_originate_ringback_thread(), CoreSession::ready(), setup_ringback(), signal_bridge_on_hibernate(), switch_channel_wait_for_flag(), switch_core_media_check_dtls(), switch_core_media_write_frame(), switch_core_session_execute_exten(), switch_core_session_wait_for_video_input_params(), switch_core_session_write_frame(), switch_core_standard_on_execute(), 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_enterprise_originate(), switch_ivr_gentones(), switch_ivr_insert_file(), switch_ivr_menu_execute(), switch_ivr_multi_threaded_bridge(), switch_ivr_originate(), switch_ivr_park(), switch_ivr_parse_event(), switch_ivr_play_and_collect_input(), switch_ivr_play_and_detect_speech(), switch_ivr_play_file(), switch_ivr_record_file_event(), switch_ivr_record_session_event(), switch_ivr_session_echo(), switch_ivr_sleep(), switch_ivr_sound_test(), switch_ivr_speak_text_handle(), switch_ivr_wait_for_answer(), switch_ivr_wait_for_silence(), switch_play_and_get_digits(), SWITCH_STANDARD_APP(), and uuid_bridge_on_soft_execute().
#define switch_channel_ring_ready | ( | channel | ) | switch_channel_perform_ring_ready_value(channel, SWITCH_RING_READY_RINGING, __FILE__, __SWITCH_FUNC__, __LINE__) |
Send Ringing message to a channel.
channel | channel to ring |
Definition at line 491 of file switch_channel.h.
Referenced by check_channel_status(), and switch_ivr_process_indications().
#define switch_channel_ring_ready_value | ( | channel, | |
_rv | |||
) | switch_channel_perform_ring_ready_value(channel, _rv, __FILE__, __SWITCH_FUNC__, __LINE__) |
Definition at line 492 of file switch_channel.h.
Referenced by check_channel_status().
#define switch_channel_set_app_flag | ( | _c, | |
_f | |||
) | switch_channel_set_app_flag_key(__FILE__, _c, _f) |
Definition at line 679 of file switch_channel.h.
#define switch_channel_set_callstate | ( | channel, | |
state | |||
) | switch_channel_perform_set_callstate(channel, state, __FILE__, __SWITCH_FUNC__, __LINE__) |
Definition at line 696 of file switch_channel.h.
Referenced by switch_channel_clear_flag(), switch_channel_perform_mark_answered(), switch_channel_perform_mark_pre_answered(), switch_channel_perform_mark_ring_ready_value(), switch_channel_perform_set_running_state(), switch_channel_set_flag_value(), switch_core_session_destroy_state(), switch_core_session_hangup_state(), and switch_core_session_read_frame().
#define switch_channel_set_cap | ( | _c, | |
_cc | |||
) | switch_channel_set_cap_value(_c, _cc, 1) |
Definition at line 413 of file switch_channel.h.
#define switch_channel_set_flag | ( | _c, | |
_f | |||
) | switch_channel_set_flag_value(_c, _f, 1) |
Definition at line 408 of file switch_channel.h.
Referenced by add_uuid(), audio_bridge_thread(), check_channel_status(), check_ice(), check_jb(), check_stream_changes(), collect_thread_run(), enterprise_originate_ringback_thread(), process_device_hup(), process_rtcp_report(), recover_callback(), signal_bridge_on_hangup(), switch_channel_init(), switch_channel_mark_hold(), switch_channel_perform_hangup(), switch_channel_perform_mark_answered(), switch_channel_perform_mark_pre_answered(), switch_channel_set_flag_partner(), switch_channel_set_timestamps(), switch_channel_sort_cid(), switch_channel_transfer_to_extension(), switch_core_media_activate_rtp(), switch_core_media_bug_pause(), switch_core_media_build_crypto(), switch_core_media_check_outgoing_proxy(), switch_core_media_check_video_codecs(), switch_core_media_gen_local_sdp(), switch_core_media_negotiate_sdp(), switch_core_media_patch_sdp(), switch_core_media_proxy_remote_addr(), switch_core_media_read_frame(), switch_core_media_receive_message(), switch_core_media_recover_session(), switch_core_media_set_r_sdp_codec_string(), switch_core_media_set_smode(), switch_core_media_set_video_file(), switch_core_media_toggle_hold(), switch_core_recovery_track(), switch_core_service_session_av(), switch_core_service_thread(), switch_core_session_check_incoming_crypto(), switch_core_session_check_outgoing_crypto(), switch_core_session_execute_application_async(), switch_core_session_get_recovery_crypto_key(), switch_core_session_outgoing_channel(), switch_core_session_perform_receive_message(), switch_core_session_read_text_frame(), switch_core_session_read_video_frame(), switch_core_session_reporting_state(), switch_core_session_request_uuid(), switch_core_session_request_xml(), switch_core_session_run(), switch_core_session_send_dtmf(), switch_core_session_set_ice(), switch_core_session_set_read_codec(), switch_core_session_set_real_read_codec(), switch_core_session_wake_session_thread(), switch_core_standard_on_execute(), switch_ivr_3p_media(), switch_ivr_3p_nomedia(), switch_ivr_activate_unicast(), switch_ivr_bridge_bleg(), switch_ivr_broadcast(), switch_ivr_enterprise_orig_and_bridge(), switch_ivr_enterprise_originate(), switch_ivr_hold(), switch_ivr_intercept_session(), switch_ivr_media(), 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_event(), switch_ivr_parse_signal_data(), switch_ivr_record_file_event(), switch_ivr_session_echo(), switch_ivr_session_transfer(), switch_ivr_signal_bridge(), switch_ivr_sleep(), switch_ivr_uuid_bridge(), switch_media_handle_create(), SWITCH_STANDARD_APP(), text_helper_thread(), video_helper_thread(), and video_write_thread().
#define switch_channel_set_running_state | ( | channel, | |
state | |||
) | switch_channel_perform_set_running_state(channel, state, __FILE__, __SWITCH_FUNC__, __LINE__) |
Definition at line 113 of file switch_channel.h.
Referenced by switch_core_session_destroy_state(), and switch_core_session_run().
#define switch_channel_set_state | ( | channel, | |
state | |||
) | switch_channel_perform_set_state(channel, __FILE__, __SWITCH_FUNC__, __LINE__, state) |
Set the current state of a channel.
channel | channel to set state of |
state | new state |
Definition at line 121 of file switch_channel.h.
Referenced by audio_bridge_on_exchange_media(), audio_bridge_on_routing(), audio_bridge_thread(), CoreSession::CoreSession(), fs_channel_set_state(), CoreSession::originate(), originate_on_routing(), recover_callback(), sb_on_dtmf(), signal_bridge_on_hangup(), switch_channel_restart(), switch_channel_transfer_to_extension(), switch_core_session_run(), switch_core_standard_on_execute(), switch_core_standard_on_init(), switch_core_standard_on_routing(), switch_ivr_3p_nomedia(), switch_ivr_intercept_session(), switch_ivr_multi_threaded_bridge(), switch_ivr_nomedia(), switch_ivr_park_session(), switch_ivr_session_transfer(), switch_ivr_signal_bridge(), switch_ivr_uuid_bridge(), switch_ivr_wait_for_answer(), uuid_bridge_on_hibernate(), uuid_bridge_on_reset(), and uuid_bridge_on_soft_execute().
#define switch_channel_set_variable | ( | _channel, | |
_var, | |||
_val | |||
) | switch_channel_set_variable_var_check(_channel, _var, _val, SWITCH_TRUE) |
Definition at line 299 of file switch_channel.h.
Referenced by audio_bridge_on_exchange_media(), audio_bridge_thread(), check_channel_status(), check_ice(), check_jb(), check_presence(), check_stream_changes(), cleanup_proxy_mode_a(), collect_thread_run(), enterprise_originate_thread(), fs_channel_set_variable(), fs_switch_channel_set_variable(), handle_ice(), inherit_codec(), limit_state_handler(), monitor_callback(), record_callback(), rtp_common_read(), signal_bridge_on_hangup(), signal_bridge_on_hibernate(), switch_channel_alloc(), switch_channel_caller_extension_masquerade(), switch_channel_clear_flag(), switch_channel_clear_flag_recursive(), switch_channel_del_variable_prefix(), switch_channel_export_variable_var_check(), switch_channel_flip_cid(), switch_channel_pass_sdp(), switch_channel_perform_hangup(), switch_channel_perform_mark_answered(), switch_channel_perform_mark_pre_answered(), switch_channel_process_export(), switch_channel_set_direction(), switch_channel_set_flag_recursive(), switch_channel_set_flag_value(), switch_channel_set_name(), switch_channel_set_timestamps(), switch_channel_set_variable_name_printf(), switch_channel_set_variable_printf(), switch_channel_transfer_variable_prefix(), switch_core_media_activate_rtp(), switch_core_media_choose_port(), switch_core_media_gen_local_sdp(), switch_core_media_negotiate_sdp(), switch_core_media_prepare_codecs(), switch_core_media_process_t38_passthru(), switch_core_media_process_udptl(), switch_core_media_receive_message(), switch_core_media_set_codec(), switch_core_media_set_local_sdp(), switch_core_media_set_r_sdp_codec_string(), switch_core_media_set_rmode(), switch_core_media_set_smode(), switch_core_media_set_video_codec(), switch_core_session_apply_crypto(), switch_core_session_check_incoming_crypto(), switch_core_session_clear_crypto(), switch_core_session_exec(), switch_core_session_hangup_state(), switch_core_session_outgoing_channel(), switch_core_session_perform_receive_message(), switch_core_session_request_uuid(), switch_core_session_request_xml(), switch_core_session_send_dtmf_string(), switch_core_session_set_external_id(), switch_core_session_set_read_codec(), switch_core_session_set_real_read_codec(), switch_core_session_set_uuid(), switch_core_session_set_video_read_codec(), switch_core_session_set_video_write_codec(), switch_core_session_set_write_codec(), switch_core_standard_on_execute(), switch_core_standard_on_reset(), switch_core_standard_on_routing(), switch_ivr_3p_media(), switch_ivr_3p_nomedia(), switch_ivr_detect_audio(), switch_ivr_detect_silence(), switch_ivr_enterprise_orig_and_bridge(), switch_ivr_enterprise_originate(), switch_ivr_intercept_session(), switch_ivr_menu_execute(), switch_ivr_multi_threaded_bridge(), switch_ivr_orig_and_bridge(), switch_ivr_originate(), switch_ivr_park(), switch_ivr_parse_event(), switch_ivr_phrase_macro_event(), switch_ivr_play_file(), switch_ivr_read(), switch_ivr_record_file_event(), switch_ivr_record_session_event(), switch_ivr_say(), switch_ivr_say_string(), switch_ivr_session_transfer(), switch_ivr_set_user_xml(), switch_ivr_signal_bridge(), switch_ivr_transfer_recordings(), switch_ivr_transfer_variable(), switch_ivr_uuid_bridge(), switch_ivr_wait_for_silence(), switch_limit_incr(), switch_media_handle_create(), switch_play_and_get_digits(), switch_process_import(), switch_rtp_add_crypto_key(), transfer_after_bridge(), and uuid_bridge_on_soft_execute().
#define switch_channel_set_variable_partner | ( | _channel, | |
_var, | |||
_val | |||
) | switch_channel_set_variable_partner_var_check(_channel, _var, _val, SWITCH_TRUE) |
Definition at line 301 of file switch_channel.h.
Referenced by switch_channel_perform_hangup(), and switch_ivr_intercept_session().
#define switch_channel_set_variable_safe | ( | _channel, | |
_var, | |||
_val | |||
) | switch_channel_set_variable_var_check(_channel, _var, _val, SWITCH_FALSE) |
Definition at line 298 of file switch_channel.h.
#define switch_channel_set_variable_strip_quotes | ( | _channel, | |
_var, | |||
_val | |||
) | switch_channel_set_variable_strip_quotes_var_check(_channel, _var, _val, SWITCH_TRUE) |
Definition at line 300 of file switch_channel.h.
#define switch_channel_stop_broadcast | ( | _channel | ) | for(;;) {if (switch_channel_test_flag(_channel, CF_BROADCAST)) {switch_channel_set_flag(_channel, CF_STOP_BROADCAST); switch_channel_set_flag(_channel, CF_BREAK); } break;} |
Definition at line 664 of file switch_channel.h.
Referenced by audio_bridge_thread(), switch_core_media_toggle_hold(), switch_core_session_hangup_state(), switch_ivr_multi_threaded_bridge(), switch_ivr_parse_event(), switch_ivr_soft_hold(), switch_ivr_unhold(), and switch_ivr_uuid_bridge().
#define switch_channel_test_app_flag | ( | _c, | |
_f | |||
) | switch_channel_test_app_flag_key(__FILE__, _c, _f) |
Definition at line 681 of file switch_channel.h.
#define switch_channel_text_only | ( | _channel | ) | (switch_channel_test_flag(_channel, CF_HAS_TEXT) && !switch_channel_test_flag(_channel, CF_AUDIO)) |
Definition at line 96 of file switch_channel.h.
Referenced by switch_core_session_execute_application_get_flags().
#define switch_channel_up | ( | _channel | ) | (switch_channel_check_signal(_channel, SWITCH_TRUE) || switch_channel_get_state(_channel) < CS_HANGUP) |
Definition at line 88 of file switch_channel.h.
Referenced by audio_bridge_thread(), CoreSession::bridged(), check_channel_status(), CoreSession::destroy(), early_thread_run(), switch_core_media_activate_rtp(), switch_core_standard_on_reset(), switch_ivr_eavesdrop_session(), and switch_ivr_originate().
#define switch_channel_up_nosig | ( | _channel | ) | (switch_channel_get_state(_channel) < CS_HANGUP) |
Definition at line 91 of file switch_channel.h.
Referenced by audio_bridge_thread(), audio_write_thread(), check_per_channel_timeouts(), collect_thread_run(), early_thread_run(), signal_bridge_on_hangup(), speech_thread(), switch_channel_clear_flag(), switch_channel_handle_cause(), switch_channel_perform_presence(), switch_channel_set_flag_value(), switch_core_media_read_frame(), switch_core_media_read_lock_unlock(), switch_core_session_event_send(), switch_core_session_findall_matching_var(), switch_core_session_hupall_matching_vars_ans(), switch_core_session_message_send(), switch_core_session_perform_receive_message(), switch_core_session_receive_event(), switch_core_session_write_frame(), switch_ivr_eavesdrop_session(), switch_ivr_originate(), switch_ivr_signal_bridge(), switch_ivr_wait_for_answer(), text_bridge_thread(), text_helper_thread(), video_helper_thread(), and video_write_thread().
#define switch_channel_video_sync | ( | _c | ) | switch_channel_perform_video_sync(_c, __FILE__, __SWITCH_FUNC__, __LINE__) |
Definition at line 669 of file switch_channel.h.
Referenced by switch_core_media_set_video_file(), and switch_core_standard_on_execute().
int switch_channel_add_state_handler | ( | switch_channel_t * | channel, |
const switch_state_handler_table_t * | state_handler | ||
) |
add a state handler table to a given channel
channel | channel on which to add the state handler table |
state_handler | table of state handler functions |
Definition at line 3043 of file switch_channel.c.
References index, state_handler_index, state_handlers, state_mutex, switch_assert, SWITCH_MAX_STATE_HANDLERS, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_ivr_multi_threaded_bridge(), switch_ivr_originate(), switch_ivr_signal_bridge(), and switch_ivr_uuid_bridge().
switch_status_t switch_channel_add_variable_var_check | ( | switch_channel_t * | channel, |
const char * | varname, | ||
const char * | value, | ||
switch_bool_t | var_check, | ||
switch_stack_t | stack | ||
) |
Definition at line 1562 of file switch_channel.c.
References profile_mutex, switch_assert, SWITCH_CHANNEL_CHANNEL_LOG, switch_event_add_header_string(), switch_event_base_add_header(), switch_event_del_header, SWITCH_LOG_CRIT, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_string_var_check_const(), variables, and zstr.
Referenced by switch_ivr_originate(), switch_ivr_session_transfer(), switch_ivr_uuid_bridge(), and switch_regex_set_var_callback().
switch_status_t switch_channel_alloc | ( | _In_ switch_channel_t ** | channel, |
_In_ switch_call_direction_t | direction, | ||
_In_ switch_memory_pool_t * | pool | ||
) |
Allocate a new channel.
channel | NULL pointer to allocate channel to |
pool | memory_pool to use for allocation |
Referenced by switch_core_session_request_uuid().
char* switch_channel_build_param_string | ( | _In_ switch_channel_t * | channel, |
_In_opt_ switch_caller_profile_t * | caller_profile, | ||
_In_opt_ const char * | prefix | ||
) |
switch_status_t switch_channel_caller_extension_masquerade | ( | switch_channel_t * | orig_channel, |
switch_channel_t * | new_channel, | ||
uint32_t | offset | ||
) |
Definition at line 3139 of file switch_channel.c.
References switch_caller_application::application_data, switch_caller_application::application_name, caller_profile, switch_caller_profile::destination_number, switch_event::headers, switch_event_header::name, switch_event_header::next, switch_caller_application::next, switch_caller_profile::pool, profile_mutex, session, switch_assert, switch_caller_extension_add_application(), switch_caller_extension_new(), switch_caller_profile_clone(), switch_channel_get_caller_extension(), switch_channel_get_variable, switch_channel_set_caller_extension(), switch_channel_set_caller_profile(), switch_channel_set_variable, switch_core_session_strdup, switch_core_strdup, switch_mutex_lock(), switch_mutex_unlock(), switch_separate_string(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_event_header::value, and variables.
Referenced by switch_channel_var_true(), and switch_ivr_originate().
const char* switch_channel_callstate2str | ( | switch_channel_callstate_t | callstate | ) |
Definition at line 315 of file switch_channel.c.
References CALLSTATE_CHART, and switch_callstate_table::name.
Referenced by switch_channel_check_device_state(), switch_channel_event_set_basic_data(), and switch_channel_perform_set_callstate().
const char* switch_channel_cause2str | ( | _In_ switch_call_cause_t | cause | ) |
return a cause string for a given cause
cause | the code to check |
Referenced by CoreSession::hangupCause(), switch_core_session_hangup_state(), switch_core_session_outgoing_channel(), switch_core_session_reporting_state(), switch_core_standard_on_hangup(), switch_core_standard_on_reporting(), switch_ivr_enterprise_orig_and_bridge(), switch_ivr_enterprise_originate(), switch_ivr_multi_threaded_bridge(), switch_ivr_orig_and_bridge(), and switch_ivr_originate().
switch_call_cause_t switch_channel_cause_q850 | ( | switch_call_cause_t | cause | ) |
Definition at line 405 of file switch_channel.c.
References switch_cause_table::cause, SWITCH_CAUSE_INTERWORKING, and SWITCH_CAUSE_NORMAL_CLEARING.
Referenced by switch_channel_get_cause_q850().
int switch_channel_check_signal | ( | switch_channel_t * | channel, |
switch_bool_t | in_thread_only | ||
) |
Definition at line 2264 of file switch_channel.c.
References session, SWITCH_FALSE, and switch_ivr_parse_signal_data().
Referenced by switch_channel_test_ready(), and switch_channel_wait_for_state_timeout().
void switch_channel_clear_app_flag_key | ( | const char * | app, |
switch_channel_t * | channel, | ||
uint32_t | flags | ||
) |
Definition at line 2094 of file switch_channel.c.
References app_flag_hash, flag_mutex, switch_assert, switch_core_hash_find(), switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_core_media_negotiate_sdp(), switch_core_media_reset_t38(), and switch_ivr_eavesdrop_update_display().
void switch_channel_clear_cap | ( | switch_channel_t * | channel, |
switch_channel_cap_t | cap | ||
) |
Definition at line 1864 of file switch_channel.c.
References caps, flag_mutex, switch_assert, switch_mutex_lock(), and switch_mutex_unlock().
void switch_channel_clear_flag | ( | switch_channel_t * | channel, |
switch_channel_flag_t | flag | ||
) |
Clear given flag(s) from a channel.
channel | channel to clear flags from |
flag | flag to clear |
Definition at line 2145 of file switch_channel.c.
References caller_profile, CCS_ACTIVE, CCS_UNHELD, CF_ANSWERED, CF_BRIDGED, CF_DIALPLAN, CF_LEG_HOLDING, CF_NO_RECOVER, CF_ORIGINATOR, CF_OUTBOUND, CF_PROXY_MODE, CF_RECOVERED, CF_RECOVERING, CF_VIDEO, CF_VIDEO_PASSIVE, CF_VIDEO_READY, device_node, device_uuid_node_s::direction, direction, flag_mutex, flags, hangup_cause, switch_channel_timetable::hold_accum, hold_record, switch_channel_timetable::last_hold, logical_direction, switch_hold_record_s::off, profile_mutex, session, switch_assert, SWITCH_CALL_DIRECTION_INBOUND, SWITCH_CALL_DIRECTION_OUTBOUND, switch_channel_set_callstate, switch_channel_set_variable, switch_channel_test_flag(), switch_channel_up_nosig, switch_core_recovery_track(), switch_core_session_wake_video_thread(), switch_mutex_lock(), switch_mutex_unlock(), switch_time_now(), and switch_caller_profile::times.
Referenced by audio_bridge_on_exchange_media(), audio_bridge_thread(), check_channel_status(), check_dtls_reinvite(), check_per_channel_timeouts(), check_stream_changes(), switch_channel_clear_flag_partner(), switch_channel_mark_hold(), switch_channel_perform_hangup(), switch_channel_perform_set_running_state(), switch_channel_sort_cid(), switch_core_media_activate_rtp(), switch_core_media_bug_resume(), switch_core_media_deactivate_rtp(), switch_core_media_gen_local_sdp(), switch_core_media_negotiate_sdp(), switch_core_media_receive_message(), switch_core_media_reset_t38(), switch_core_media_set_udptl_image_sdp(), switch_core_media_set_video_file(), switch_core_media_start_udptl(), switch_core_media_toggle_hold(), switch_core_recovery_untrack(), switch_core_service_thread(), switch_core_session_destroy_state(), switch_core_session_exec(), switch_core_session_outgoing_channel(), switch_core_session_perform_receive_message(), switch_core_session_read_text_frame(), switch_core_session_reset(), switch_core_session_run(), switch_core_session_send_dtmf(), switch_core_session_stop_media(), switch_core_session_video_reset(), switch_core_standard_on_execute(), switch_core_standard_on_hangup(), switch_core_standard_on_init(), switch_core_standard_on_reset(), switch_core_thread_session_end(), switch_ivr_3p_media(), switch_ivr_3p_nomedia(), switch_ivr_blind_transfer_ack(), switch_ivr_bridge_bleg(), switch_ivr_collect_digits_callback(), switch_ivr_deactivate_unicast(), switch_ivr_enterprise_originate(), switch_ivr_gentones(), switch_ivr_media(), switch_ivr_multi_threaded_bridge(), switch_ivr_nomedia(), switch_ivr_originate(), switch_ivr_park(), switch_ivr_parse_all_events(), switch_ivr_parse_event(), switch_ivr_parse_signal_data(), switch_ivr_play_file(), switch_ivr_record_file_event(), switch_ivr_session_echo(), switch_ivr_session_transfer(), switch_ivr_signal_bridge(), switch_ivr_sleep(), switch_ivr_speak_text_handle(), switch_ivr_unhold(), switch_ivr_uuid_bridge(), switch_rtp_break(), SWITCH_STANDARD_APP(), text_bridge_thread(), uuid_bridge_on_reset(), uuid_bridge_on_soft_execute(), and video_write_thread().
switch_bool_t switch_channel_clear_flag_partner | ( | switch_channel_t * | channel, |
switch_channel_flag_t | flag | ||
) |
Clears given flag(s) on a given channel's bridge partner.
channel | channel to derive the partner channel to clear flag(s) from |
flag | the flag to clear |
Definition at line 1726 of file switch_channel.c.
References switch_assert, switch_channel_clear_flag(), switch_channel_get_partner_uuid(), switch_core_session_get_channel(), switch_core_session_locate, switch_core_session_rwunlock(), SWITCH_FALSE, and SWITCH_TRUE.
void switch_channel_clear_flag_recursive | ( | switch_channel_t * | channel, |
switch_channel_flag_t | flag | ||
) |
Definition at line 2219 of file switch_channel.c.
References CF_OUTBOUND, flag_mutex, flags, switch_assert, switch_channel_set_variable, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by eavesdrop_callback(), hanguphook(), signal_bridge_on_hangup(), switch_core_media_bug_close(), switch_core_media_set_video_file(), switch_ivr_multi_threaded_bridge(), switch_ivr_parse_event(), switch_ivr_record_file_event(), switch_ivr_session_echo(), switch_jb_get_packet(), and text_bridge_thread().
void switch_channel_clear_private_flag | ( | switch_channel_t * | channel, |
uint32_t | flags | ||
) |
Definition at line 2056 of file switch_channel.c.
References flag_mutex, private_flags, switch_assert, switch_mutex_lock(), and switch_mutex_unlock().
void switch_channel_clear_state_flag | ( | switch_channel_t * | channel, |
switch_channel_flag_t | flag | ||
) |
Definition at line 2136 of file switch_channel.c.
References flag_mutex, state_flags, switch_assert, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_ivr_uuid_bridge().
void switch_channel_clear_state_handler | ( | switch_channel_t * | channel, |
const switch_state_handler_table_t * | state_handler | ||
) |
clear a state handler table from a given channel
channel | channel from which to clear the state handler table |
state_handler | table of state handler functions |
Definition at line 3086 of file switch_channel.c.
References index, SSH_FLAG_STICKY, state_handler_index, state_handlers, state_mutex, switch_assert, SWITCH_MAX_STATE_HANDLERS, switch_mutex_lock(), switch_mutex_unlock(), and switch_test_flag.
Referenced by audio_bridge_on_exchange_media(), originate_on_consume_media_transmit(), switch_ivr_3p_media(), switch_ivr_media(), switch_ivr_session_transfer(), switch_ivr_signal_bridge(), switch_ivr_uuid_bridge(), and uuid_bridge_on_soft_execute().
uint32_t switch_channel_del_variable_prefix | ( | switch_channel_t * | channel, |
const char * | prefix | ||
) |
Definition at line 1383 of file switch_channel.c.
References switch_event::headers, switch_event_header::name, switch_event_header::next, switch_channel_get_variables(), switch_channel_set_variable, switch_event_destroy(), and zstr.
switch_status_t switch_channel_dequeue_dtmf | ( | _In_ switch_channel_t * | channel, |
_In_ switch_dtmf_t * | dtmf | ||
) |
Retrieve DTMF digits from a given channel.
channel | channel to retrieve digits from |
dtmf | digit |
Referenced by audio_bridge_thread(), switch_ivr_collect_digits_callback(), switch_ivr_collect_digits_count(), 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(), and switch_ivr_wait_for_answer().
switch_size_t switch_channel_dequeue_dtmf_string | ( | _In_ switch_channel_t * | channel, |
_Out_opt_bytecapcount_(len) char * | dtmf_str, | ||
_In_ switch_size_t | len | ||
) |
switch_call_direction_t switch_channel_direction | ( | switch_channel_t * | channel | ) |
Definition at line 440 of file switch_channel.c.
References direction.
Referenced by audio_bridge_thread(), bridge(), generate_m(), switch_channel_alloc(), switch_channel_event_set_basic_data(), switch_channel_perform_answer(), switch_channel_perform_pre_answer(), switch_channel_perform_ring_ready_value(), switch_channel_perform_set_running_state(), switch_channel_set_direction(), switch_channel_sort_cid(), switch_core_media_activate_rtp(), switch_core_media_check_video_codecs(), switch_core_media_gen_local_sdp(), switch_core_media_get_codec_string(), switch_core_media_negotiate_sdp(), switch_core_media_set_r_sdp_codec_string(), switch_core_media_set_rmode(), switch_core_session_execute_application_get_flags(), switch_core_session_parse_crypto_prefs(), switch_core_session_run(), switch_core_standard_on_routing(), switch_ice_direction(), switch_ivr_generate_json_cdr(), switch_ivr_generate_xml_cdr(), switch_ivr_uuid_bridge(), and switch_rtp_add_crypto_key().
switch_status_t switch_channel_dtmf_lock | ( | switch_channel_t * | channel | ) |
Definition at line 477 of file switch_channel.c.
References dtmf_mutex, and switch_mutex_lock().
Referenced by switch_core_session_read_frame().
switch_status_t switch_channel_dtmf_unlock | ( | switch_channel_t * | channel | ) |
Definition at line 487 of file switch_channel.c.
References dtmf_mutex, and switch_mutex_unlock().
Referenced by switch_core_session_read_frame().
void switch_channel_event_set_basic_data | ( | _In_ switch_channel_t * | channel, |
_In_ switch_event_t * | event | ||
) |
void switch_channel_event_set_data | ( | _In_ switch_channel_t * | channel, |
_In_ switch_event_t * | event | ||
) |
Add information about a given channel to an event object.
channel | channel to add information about |
event | event to add information to |
Referenced by api_hook(), generate_on_dtmf(), hanguphook(), ivr_send_event(), record_callback(), rtp_common_write(), send_record_stop_event(), CoreSession::setEventData(), signal_bridge_on_hangup(), signal_bridge_on_hibernate(), speech_thread(), switch_core_media_bug_add(), switch_core_media_bug_destroy(), switch_core_session_exec(), switch_core_session_outgoing_channel(), switch_core_session_perform_destroy(), switch_core_session_read_frame(), switch_core_session_read_text_frame(), switch_core_session_reporting_state(), switch_core_session_run(), switch_core_session_set_read_codec(), switch_core_session_set_real_read_codec(), switch_core_session_set_uuid(), switch_core_session_set_video_read_codec(), switch_core_session_set_video_write_codec(), switch_core_session_set_write_codec(), switch_core_session_thread(), switch_ivr_hold(), switch_ivr_multi_threaded_bridge(), switch_ivr_park(), switch_ivr_parse_next_event(), switch_ivr_phrase_macro_event(), switch_ivr_play_file(), switch_ivr_record_file_event(), switch_ivr_say(), switch_ivr_say_string(), switch_ivr_signal_bridge(), switch_ivr_unhold(), SWITCH_STANDARD_SCHED_FUNC(), and uuid_bridge_on_soft_execute().
void switch_channel_event_set_extended_data | ( | _In_ switch_channel_t * | channel, |
_In_ switch_event_t * | event | ||
) |
char* switch_channel_expand_variables_check | ( | switch_channel_t * | channel, |
const char * | in, | ||
switch_event_t * | var_list, | ||
switch_event_t * | api_list, | ||
uint32_t | recur | ||
) |
Expand varaibles in a string based on the variables in a paticular channel.
channel | channel to expand the variables from |
in | the original string |
Definition at line 3986 of file switch_channel.c.
References switch_stream_handle::data, end_of_p, in, memset(), resize, SCF_API_EXPANSION, session, switch_api_execute(), switch_assert, SWITCH_CHANNEL_CHANNEL_LOG, switch_channel_get_variable_dup(), switch_core_test_flag(), switch_event_check_permission_list(), SWITCH_LOG_CRIT, switch_log_printf(), switch_safe_free, SWITCH_STANDARD_STREAM, SWITCH_STATUS_SUCCESS, switch_string_has_escaped_data(), switch_string_var_check_const(), SWITCH_TRUE, and zstr.
switch_status_t switch_channel_export_variable_printf | ( | switch_channel_t * | channel, |
const char * | varname, | ||
const char * | export_varname, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 1357 of file switch_channel.c.
References switch_assert, switch_channel_export_variable, SWITCH_STATUS_FALSE, and switch_vasprintf().
switch_status_t switch_channel_export_variable_var_check | ( | switch_channel_t * | channel, |
const char * | varname, | ||
const char * | val, | ||
const char * | export_varname, | ||
switch_bool_t | var_check | ||
) |
Definition at line 1309 of file switch_channel.c.
References session, switch_channel_get_variable, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable, switch_channel_set_variable_var_check(), switch_core_session_strdup, SWITCH_LOG_DEBUG, switch_log_printf(), switch_mprintf(), switch_safe_free, and SWITCH_STATUS_SUCCESS.
void switch_channel_flip_cid | ( | switch_channel_t * | channel | ) |
Definition at line 3236 of file switch_channel.c.
References switch_caller_profile::callee_id_name, switch_caller_profile::callee_id_number, switch_caller_profile::caller_id_name, switch_caller_profile::caller_id_number, caller_profile, CF_BRIDGED, CF_RECOVERING, switch_caller_profile::pool, profile_mutex, session, SWITCH_BLANK_STRING, switch_channel_event_set_data(), switch_channel_get_name(), switch_channel_get_partner_uuid(), switch_channel_get_variable, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable, switch_channel_test_flag(), switch_core_strdup, switch_event_add_header_string(), SWITCH_EVENT_CALL_UPDATE, switch_event_create, switch_event_fire, SWITCH_LOG_INFO, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_SUCCESS, switch_str_nil, and switch_true().
Referenced by switch_channel_sort_cid(), switch_channel_var_true(), and switch_ivr_uuid_bridge().
void switch_channel_flush_dtmf | ( | _In_ switch_channel_t * | channel | ) |
Referenced by CoreSession::flushDigits(), and switch_core_session_reset().
switch_caller_extension_t* switch_channel_get_caller_extension | ( | switch_channel_t * | channel | ) |
Retrieve caller extension from a given channel.
channel | channel to retrieve extension from |
Definition at line 3346 of file switch_channel.c.
References switch_caller_profile::caller_extension, caller_profile, profile_mutex, switch_assert, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_channel_caller_extension_masquerade(), switch_channel_var_true(), switch_core_standard_on_execute(), and switch_core_standard_on_hangup().
switch_caller_profile_t* switch_channel_get_caller_profile | ( | switch_channel_t * | channel | ) |
Retrieve the given channel's caller profile.
channel | channel to retrieve the profile from |
Definition at line 2914 of file switch_channel.c.
References caller_profile, switch_caller_profile::hunt_caller_profile, profile_mutex, switch_assert, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by check_bridge_export(), check_channel_status(), send_display(), switch_channel_build_param_string(), switch_channel_get_variable_dup(), switch_channel_invert_cid(), switch_core_session_execute_exten(), switch_core_session_outgoing_channel(), switch_core_session_request_xml(), switch_core_session_set_uuid(), switch_core_standard_on_routing(), switch_ivr_eavesdrop_session(), switch_ivr_enterprise_originate(), switch_ivr_generate_json_cdr(), switch_ivr_generate_xml_cdr(), switch_ivr_originate(), switch_ivr_session_transfer(), switch_ivr_set_user_xml(), and switch_ivr_uuid_bridge().
switch_channel_callstate_t switch_channel_get_callstate | ( | switch_channel_t * | channel | ) |
Definition at line 309 of file switch_channel.c.
References callstate.
Referenced by switch_core_session_read_frame(), switch_ivr_hold(), switch_ivr_hold_toggle_uuid(), and switch_ivr_unhold().
char* switch_channel_get_cap_string | ( | switch_channel_t * | channel | ) |
Definition at line 1924 of file switch_channel.c.
References caps, CC_FLAG_MAX, switch_stream_handle::data, end_of, flag_mutex, if(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STANDARD_STREAM, and switch_stream_handle::write_function.
Referenced by switch_ivr_generate_json_cdr(), and switch_ivr_generate_xml_cdr().
switch_call_cause_t switch_channel_get_cause | ( | _In_ switch_channel_t * | channel | ) |
return the cause code for a given channel
channel | the channel |
Referenced by abort_call(), audio_bridge_thread(), check_channel_status(), check_presence(), hanguphook(), signal_bridge_on_hangup(), switch_core_session_hangup_state(), switch_core_session_reporting_state(), switch_core_standard_on_hangup(), switch_core_standard_on_reporting(), switch_ivr_multi_threaded_bridge(), switch_ivr_originate(), switch_ivr_signal_bridge(), and wait_for_cause().
switch_call_cause_t* switch_channel_get_cause_ptr | ( | switch_channel_t * | channel | ) |
switch_call_cause_t switch_channel_get_cause_q850 | ( | switch_channel_t * | channel | ) |
Definition at line 414 of file switch_channel.c.
References hangup_cause, and switch_channel_cause_q850().
Referenced by switch_core_session_hangup_state().
char* switch_channel_get_flag_string | ( | switch_channel_t * | channel | ) |
Definition at line 1898 of file switch_channel.c.
References CF_FLAG_MAX, switch_stream_handle::data, end_of, flag_mutex, flags, if(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STANDARD_STREAM, and switch_stream_handle::write_function.
Referenced by switch_ivr_generate_json_cdr(), and switch_ivr_generate_xml_cdr().
const char* switch_channel_get_hold_music | ( | switch_channel_t * | channel | ) |
Definition at line 894 of file switch_channel.c.
References session, switch_channel_expand_variables, switch_channel_get_variable, switch_core_session_strdup, SWITCH_HOLD_MUSIC_VARIABLE, SWITCH_TEMP_HOLD_MUSIC_VARIABLE, and zstr.
Referenced by switch_channel_get_hold_music_partner(), switch_core_media_toggle_hold(), switch_ivr_hold(), switch_ivr_parse_event(), and switch_ivr_soft_hold().
const char* switch_channel_get_hold_music_partner | ( | switch_channel_t * | channel | ) |
Definition at line 915 of file switch_channel.c.
References session, switch_channel_get_hold_music(), switch_core_session_get_channel(), switch_core_session_get_partner, switch_core_session_rwunlock(), and SWITCH_STATUS_SUCCESS.
Referenced by switch_ivr_parse_event().
switch_status_t switch_channel_get_log_tags | ( | switch_channel_t * | channel, |
switch_event_t ** | log_tags | ||
) |
Definition at line 1473 of file switch_channel.c.
References log_tags, profile_mutex, switch_assert, switch_event_dup(), switch_mutex_lock(), switch_mutex_unlock(), and SWITCH_STATUS_FALSE.
Referenced by switch_log_meta_vprintf().
char* switch_channel_get_name | ( | switch_channel_t * | channel | ) |
Retrieve the name of a given channel.
channel | channel to get name of |
Definition at line 1148 of file switch_channel.c.
References name, switch_assert, and zstr.
Referenced by _switch_core_session_request_video_refresh(), audio_bridge_on_consume_media(), audio_bridge_on_routing(), audio_bridge_thread(), check_channel_status(), check_ice(), check_jb_sync(), collect_thread_run(), CoreSession::destroy(), do_flush(), exec_cb(), handle_ice(), handle_nack(), inband_dtmf_generate_callback(), inherit_codec(), ip_choose_family(), meta_on_dtmf(), play_and_detect_input_callback(), read_bundle_rtp_packet(), read_rtp_packet(), recover_callback(), rtp_common_write(), setup_ringback(), signal_bridge_on_hibernate(), switch_channel_check_device_state(), switch_channel_dequeue_dtmf(), switch_channel_event_set_basic_data(), switch_channel_flip_cid(), switch_channel_process_export(), switch_channel_queue_dtmf(), switch_channel_queue_dtmf_string(), switch_collect_input_callback(), switch_core_media_activate_rtp(), switch_core_media_bug_add(), switch_core_media_bug_close(), switch_core_media_bug_read(), switch_core_media_choose_ports(), switch_core_media_gen_local_sdp(), switch_core_media_negotiate_sdp(), switch_core_media_patch_sdp(), switch_core_media_process_sdp_filter(), switch_core_media_process_t38_passthru(), switch_core_media_read_frame(), switch_core_media_read_lock_unlock(), switch_core_media_receive_message(), switch_core_media_set_codec(), switch_core_media_set_udptl_image_sdp(), switch_core_media_set_video_codec(), switch_core_session_enable_heartbeat(), switch_core_session_exec(), switch_core_session_execute_application_get_flags(), switch_core_session_execute_exten(), switch_core_session_hangup_state(), switch_core_session_outgoing_channel(), switch_core_session_perform_destroy(), switch_core_session_perform_force_locate(), switch_core_session_perform_kill_channel(), switch_core_session_perform_receive_message(), switch_core_session_read_frame(), switch_core_session_read_lock(), switch_core_session_read_lock_hangup(), switch_core_session_recv_dtmf(), switch_core_session_run(), switch_core_session_send_dtmf(), switch_core_session_send_dtmf_string(), switch_core_session_set_read_codec(), switch_core_session_set_real_read_codec(), switch_core_session_set_uuid(), switch_core_session_thread(), switch_core_session_wake_video_thread(), switch_core_session_write_frame(), switch_core_session_write_lock(), switch_core_session_write_text_frame(), switch_core_session_write_video_frame(), switch_core_standard_on_consume_media(), switch_core_standard_on_destroy(), switch_core_standard_on_exchange_media(), switch_core_standard_on_execute(), switch_core_standard_on_hangup(), switch_core_standard_on_hibernate(), switch_core_standard_on_init(), switch_core_standard_on_park(), switch_core_standard_on_reporting(), switch_core_standard_on_reset(), switch_core_standard_on_routing(), switch_core_standard_on_soft_execute(), switch_ivr_3p_media(), switch_ivr_media(), switch_ivr_multi_threaded_bridge(), switch_ivr_nomedia(), switch_ivr_originate(), switch_ivr_parse_event(), switch_ivr_play_and_collect_input(), switch_ivr_play_and_detect_speech(), switch_ivr_play_file(), switch_ivr_record_file_event(), switch_ivr_session_transfer(), switch_ivr_soft_hold(), switch_ivr_tone_detect_session(), switch_ivr_uuid_bridge(), switch_rtp_write_frame(), text_bridge_thread(), text_helper_thread(), uuid_bridge_on_reset(), uuid_bridge_on_soft_execute(), and video_helper_thread().
switch_caller_profile_t* switch_channel_get_originatee_caller_profile | ( | switch_channel_t * | channel | ) |
Retrieve the given channel's originatee caller profile.
channel | channel to retrieve the profile from |
Definition at line 3022 of file switch_channel.c.
References caller_profile, switch_caller_profile::originatee_caller_profile, profile_mutex, switch_assert, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_core_session_reporting_state().
switch_caller_profile_t* switch_channel_get_origination_caller_profile | ( | switch_channel_t * | channel | ) |
Retrieve the given channel's origination caller profile.
channel | channel to retrieve the profile from |
Definition at line 2976 of file switch_channel.c.
References caller_profile, switch_caller_profile::origination_caller_profile, profile_mutex, switch_assert, switch_mutex_lock(), and switch_mutex_unlock().
switch_caller_profile_t* switch_channel_get_originator_caller_profile | ( | switch_channel_t * | channel | ) |
Retrieve the given channel's originator caller profile.
channel | channel to retrieve the profile from |
Definition at line 3007 of file switch_channel.c.
References caller_profile, switch_caller_profile::originator_caller_profile, profile_mutex, switch_assert, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_core_session_reporting_state().
void* switch_channel_get_private | ( | switch_channel_t * | channel, |
const char * | key | ||
) |
Retrieve private from a given channel.
channel | channel to retrieve data from |
key | unique keyname to retrieve your private data |
Definition at line 1100 of file switch_channel.c.
References private_hash, profile_mutex, switch_assert, and switch_core_hash_find_locked().
Referenced by audio_bridge_on_exchange_media(), block_on_dtmf(), dtmf_callback(), generate_on_dtmf(), CoreSession::getPrivate(), hanguphook(), meta_on_dtmf(), monitor_callback(), rtp_common_read(), sb_on_dtmf(), signal_bridge_on_hangup(), speech_on_dtmf(), switch_core_media_copy_t38_options(), switch_core_media_process_udptl(), switch_core_media_receive_message(), switch_ivr_bind_dtmf_meta_session(), switch_ivr_block_dtmf_session(), switch_ivr_capture_text(), switch_ivr_clear_speech_cache(), switch_ivr_deactivate_unicast(), 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_get_file_handle(), switch_ivr_park(), switch_ivr_pause_detect_speech(), switch_ivr_preprocess_session(), switch_ivr_record_session_event(), switch_ivr_record_session_mask(), switch_ivr_record_session_pause(), switch_ivr_resume_detect_speech(), switch_ivr_session_audio(), switch_ivr_set_param_detect_speech(), switch_ivr_speak_text(), 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_unbind_dtmf_meta_session(), switch_ivr_unblock_dtmf_session(), switch_ivr_video_write_overlay_session(), and tone_on_dtmf().
void* switch_channel_get_private_partner | ( | switch_channel_t * | channel, |
const char * | key | ||
) |
Definition at line 1108 of file switch_channel.c.
References private_hash, profile_mutex, switch_assert, switch_channel_get_partner_uuid(), switch_core_hash_find_locked(), switch_core_session_locate, and switch_core_session_rwunlock().
switch_channel_state_t switch_channel_get_running_state | ( | switch_channel_t * | channel | ) |
Definition at line 2245 of file switch_channel.c.
References running_state, and switch_assert.
Referenced by check_presence(), switch_core_session_run(), and uuid_bridge_on_soft_execute().
switch_status_t switch_channel_get_scope_variables | ( | switch_channel_t * | channel, |
switch_event_t ** | event | ||
) |
Definition at line 946 of file switch_channel.c.
References switch_event::headers, switch_event_header::name, switch_event_header::next, switch_event::next, profile_mutex, scope_variables, switch_event_add_header_string(), SWITCH_EVENT_CHANNEL_DATA, switch_event_create_plain(), switch_event_get_header, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_event_header::value.
switch_core_session_t* switch_channel_get_session | ( | switch_channel_t * | channel | ) |
switch_channel_state_t switch_channel_get_state | ( | switch_channel_t * | channel | ) |
Get the current state of a channel in the state engine.
channel | channel to retrieve state from |
Definition at line 2235 of file switch_channel.c.
References state, and switch_assert.
Referenced by audio_bridge_on_exchange_media(), audio_bridge_thread(), check_channel_status(), check_per_channel_timeouts(), fs_channel_set_state(), CoreSession::getState(), hanguphook(), limit_state_handler(), originate_on_consume_media_transmit(), originate_on_routing(), CoreSession::setHangupHook(), signal_bridge_on_hibernate(), switch_channel_handle_cause(), switch_core_recovery_track(), switch_core_recovery_untrack(), switch_core_session_hangup_state(), switch_core_session_perform_destroy(), switch_core_session_read_frame(), switch_core_session_read_lock_hangup(), switch_core_session_reporting_state(), switch_core_session_run(), switch_core_standard_on_execute(), switch_ivr_generate_json_cdr(), switch_ivr_generate_xml_cdr(), switch_ivr_multi_threaded_bridge(), switch_ivr_originate(), switch_ivr_park(), switch_ivr_uuid_bridge(), switch_ivr_wait_for_answer(), and uuid_bridge_on_soft_execute().
const switch_state_handler_table_t* switch_channel_get_state_handler | ( | switch_channel_t * | channel, |
int | index | ||
) |
Retrieve an state handler tablefrom a given channel at given index level.
channel | channel from which to retrieve the state handler table |
index | the index of the state handler table (start from 0) |
Definition at line 3069 of file switch_channel.c.
References index, state_handler_index, state_handlers, state_mutex, switch_assert, SWITCH_MAX_STATE_HANDLERS, switch_mutex_lock(), and switch_mutex_unlock().
switch_channel_timetable_t* switch_channel_get_timetable | ( | _In_ switch_channel_t * | channel | ) |
View the timetable of a channel.
channel | channel to retrieve timetable from |
char* switch_channel_get_uuid | ( | switch_channel_t * | channel | ) |
Retrieve the given channel's unique id.
channel | channel to retrieve the unique id from |
Definition at line 3036 of file switch_channel.c.
References session, switch_assert, and switch_core_session_get_uuid().
Referenced by switch_channel_perform_hangup(), switch_channel_perform_mark_answered(), switch_channel_perform_mark_pre_answered(), switch_channel_perform_mark_ring_ready_value(), switch_channel_perform_ring_ready_value(), switch_channel_perform_set_callstate(), switch_channel_perform_set_running_state(), switch_channel_perform_set_state(), switch_ivr_originate(), and switch_rtp_add_crypto_key().
switch_status_t switch_channel_get_variable_buf | ( | switch_channel_t * | channel, |
const char * | varname, | ||
char * | buf, | ||
switch_size_t | buflen | ||
) |
Retrieve a variable from a given channel to a pre-allocated buffer without using a memory pool.
channel | channel to retrieve variable from |
varname | the name of the variable |
buf | a pre allocated buffer to put the value to |
buflen | size of the buffer |
Definition at line 1032 of file switch_channel.c.
References switch_channel_get_variable_dup(), switch_copy_string(), SWITCH_FALSE, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and value.
const char* switch_channel_get_variable_dup | ( | switch_channel_t * | channel, |
const char * | varname, | ||
switch_bool_t | dup, | ||
int | idx | ||
) |
Retrieve a variable from a given channel.
channel | channel to retrieve variable from |
varname | the name of the variable |
Definition at line 973 of file switch_channel.c.
References switch_event::next, switch_caller_profile::originatee_caller_profile, switch_caller_profile::originator_caller_profile, profile_mutex, scope_variables, session, switch_assert, switch_caller_get_field_by_name(), switch_channel_get_caller_profile(), switch_core_get_variable_pdup(), switch_core_session_get_pool(), switch_core_session_strdup, switch_event_get_header_idx(), switch_mutex_lock(), switch_mutex_unlock(), variables, and zstr.
Referenced by audio_bridge_thread(), check_ice(), check_jb_sync(), switch_channel_event_set_basic_data(), switch_channel_expand_variables_check(), switch_channel_get_partner_uuid_copy(), switch_channel_get_variable_buf(), switch_channel_get_variable_strdup(), switch_channel_queue_dtmf(), switch_channel_set_presence_data_vals(), switch_channel_var_false(), switch_channel_var_true(), switch_core_media_gen_local_sdp(), switch_core_media_negotiate_sdp(), switch_core_media_prepare_codecs(), switch_core_media_toggle_hold(), switch_core_recovery_track(), switch_core_session_enable_heartbeat(), switch_core_session_findall_matching_var(), switch_core_session_send_dtmf(), switch_jb_set_session(), and switch_rtp_activate_jitter_buffer().
const char* switch_channel_get_variable_partner | ( | switch_channel_t * | channel, |
const char * | varname | ||
) |
Definition at line 1043 of file switch_channel.c.
References session, switch_assert, switch_channel_get_partner_uuid(), switch_channel_get_variable, switch_core_session_get_channel(), switch_core_session_locate, switch_core_session_rwunlock(), switch_core_session_strdup, and zstr.
Referenced by switch_core_media_negotiate_sdp().
const char* switch_channel_get_variable_strdup | ( | switch_channel_t * | channel, |
const char * | varname | ||
) |
Retrieve a copy of a variable from a given channel. switch_safe_free() call will be required.
channel | channel to retrieve variable from |
varname | the name of the variable |
Definition at line 1025 of file switch_channel.c.
References switch_channel_get_variable_dup(), SWITCH_FALSE, and value.
switch_status_t switch_channel_get_variables | ( | switch_channel_t * | channel, |
switch_event_t ** | event | ||
) |
Definition at line 4446 of file switch_channel.c.
References profile_mutex, SWITCH_EVENT_CHANNEL_DATA, switch_event_create, switch_event_dup(), switch_mutex_lock(), switch_mutex_unlock(), and variables.
Referenced by api_hook(), asr_set_json_text_params(), switch_channel_api_on(), switch_channel_del_variable_prefix(), switch_channel_execute_on(), and switch_ivr_transfer_variable().
switch_status_t switch_channel_get_variables_prefix | ( | switch_channel_t * | channel, |
const char * | prefix, | ||
switch_event_t ** | event | ||
) |
Definition at line 4459 of file switch_channel.c.
References switch_event::headers, switch_event_header::name, switch_event_header::next, profile_mutex, switch_event_add_header_string(), SWITCH_EVENT_CHANNEL_DATA, switch_event_create, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_SUCCESS, switch_event_header::value, and variables.
switch_size_t switch_channel_has_dtmf | ( | _In_ switch_channel_t * | channel | ) |
Test for presence of DTMF on a given channel.
channel | channel to test |
Referenced by audio_bridge_thread(), switch_core_session_reset(), switch_ivr_collect_digits_callback(), switch_ivr_collect_digits_count(), 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(), and switch_ivr_wait_for_answer().
switch_status_t switch_channel_init | ( | switch_channel_t * | channel, |
switch_core_session_t * | session, | ||
switch_channel_state_t | state, | ||
switch_channel_flag_t | flag | ||
) |
Connect a newly allocated channel to a session object and setup it's initial state.
channel | the channel to initilize |
session | the session to connect the channel to |
state | the initial state of the channel |
flags | the initial channel flags |
Definition at line 767 of file switch_channel.c.
References CS_NONE, running_state, session, state, switch_assert, switch_channel_set_flag, and SWITCH_STATUS_SUCCESS.
Referenced by switch_core_session_request_uuid().
void switch_channel_invert_cid | ( | switch_channel_t * | channel | ) |
Definition at line 3206 of file switch_channel.c.
References switch_caller_profile::callee_id_name, switch_caller_profile::callee_id_number, switch_caller_profile::caller_id_name, switch_caller_profile::caller_id_number, switch_channel_get_caller_profile(), SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, switch_log_printf(), and zstr.
Referenced by switch_channel_var_true(), and switch_ivr_uuid_bridge().
switch_call_direction_t switch_channel_logical_direction | ( | switch_channel_t * | channel | ) |
Definition at line 445 of file switch_channel.c.
References logical_direction.
void switch_channel_mark_hold | ( | switch_channel_t * | channel, |
switch_bool_t | on | ||
) |
Definition at line 861 of file switch_channel.c.
References CF_LEG_HOLDING, session, switch_channel_clear_flag(), switch_channel_event_set_data(), switch_channel_get_variable, switch_channel_set_flag, switch_channel_test_flag(), switch_core_session_get_partner, switch_core_session_rwunlock(), SWITCH_EVENT_CHANNEL_HOLD, SWITCH_EVENT_CHANNEL_UNHOLD, switch_event_create, switch_event_fire, switch_ivr_transfer_recordings(), SWITCH_STATUS_SUCCESS, and switch_true().
Referenced by audio_bridge_thread(), switch_channel_perform_hangup(), switch_core_media_toggle_hold(), and switch_ivr_intercept_session().
switch_channel_state_t switch_channel_name_state | ( | _In_ const char * | name | ) |
Render the enum of the provided state name.
name | the name of the state |
Referenced by fs_channel_set_state().
switch_status_t switch_channel_pass_callee_id | ( | switch_channel_t * | channel, |
switch_channel_t * | other_channel | ||
) |
Definition at line 4420 of file switch_channel.c.
References switch_caller_profile::callee_id_name, switch_caller_profile::callee_id_number, caller_profile, switch_caller_profile::pool, profile_mutex, switch_assert, switch_core_strdup, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and zstr.
Referenced by audio_bridge_thread(), check_channel_status(), switch_ivr_multi_threaded_bridge(), and switch_ivr_originate().
switch_status_t switch_channel_perform_acknowledge_call | ( | switch_channel_t * | channel, |
const char * | file, | ||
const char * | func, | ||
int | line | ||
) |
Definition at line 3467 of file switch_channel.c.
References send_ind(), SWITCH_MESSAGE_INDICATE_ACKNOWLEDGE_CALL, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_channel_perform_answer | ( | switch_channel_t * | channel, |
const char * | file, | ||
const char * | func, | ||
int | line | ||
) |
Definition at line 3925 of file switch_channel.c.
References CF_ANSWERED, CF_EARLY_MEDIA, CF_HAS_TEXT, CF_PROXY_MODE, CS_HANGUP, switch_core_session_message::from, hangup_cause, switch_core_session_message::message_id, name, session, state, switch_assert, SWITCH_CALL_DIRECTION_OUTBOUND, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION, switch_channel_audio_sync, switch_channel_direction(), switch_channel_get_variable, switch_channel_hangup, switch_channel_perform_mark_answered(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), switch_core_session_in_thread(), switch_core_session_perform_receive_message(), switch_ivr_sleep(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_MESSAGE_INDICATE_ANSWER, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and SWITCH_TRUE.
void switch_channel_perform_audio_sync | ( | switch_channel_t * | channel, |
const char * | file, | ||
const char * | func, | ||
int | line | ||
) |
Definition at line 366 of file switch_channel.c.
References switch_core_session_message::_file, switch_core_session_message::_func, switch_core_session_message::_line, switch_core_session_message::from, switch_core_session_message::message_id, MESSAGE_STAMP_FFL, name, session, switch_channel_media_up, switch_core_session_alloc, switch_core_session_queue_message(), and SWITCH_MESSAGE_INDICATE_AUDIO_SYNC.
switch_channel_state_t switch_channel_perform_hangup | ( | switch_channel_t * | channel, |
const char * | file, | ||
const char * | func, | ||
int | line, | ||
switch_call_cause_t | hangup_cause | ||
) |
Definition at line 3380 of file switch_channel.c.
References CF_BLOCK_STATE, CF_BRIDGE_ORIGINATOR, CF_BRIDGED, CF_HANGUP_HELD, CF_LEG_HOLDING, CS_HANGUP, hangup_cause, hold_record, name, OCF_HANGUP, switch_hold_record_s::off, opaque_flags, profile_mutex, session, state, state_mutex, state_names, switch_assert, switch_channel_cause2str(), switch_channel_clear_flag(), switch_channel_event_set_data(), switch_channel_get_uuid(), switch_channel_get_variable, SWITCH_CHANNEL_ID_LOG, switch_channel_mark_hold(), switch_channel_set_flag, switch_channel_set_variable, switch_channel_set_variable_partner, switch_channel_test_flag(), switch_core_session_hangup_state(), switch_core_session_kill_channel, switch_core_session_running(), switch_core_session_signal_state_change(), switch_core_session_started(), switch_core_session_thread_launch(), SWITCH_EVENT_CHANNEL_HANGUP, switch_event_create, switch_event_fire, SWITCH_FALSE, SWITCH_LOG_NOTICE, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE, SWITCH_SIG_KILL, SWITCH_STATUS_SUCCESS, and switch_time_now().
switch_status_t switch_channel_perform_mark_answered | ( | switch_channel_t * | channel, |
const char * | file, | ||
const char * | func, | ||
int | line | ||
) |
Definition at line 3813 of file switch_channel.c.
References switch_channel_timetable::answered, caller_profile, CCS_ACTIVE, CF_ANSWERED, CF_EARLY_MEDIA, CF_NO_RECOVER, CF_PASSTHRU_PTIME_MISMATCH, CF_RTT, CF_VIDEO_MIRROR_INPUT, CS_HANGUP, hangup_cause, name, profile_mutex, send_ind(), session, state, switch_assert, switch_channel_api_on(), SWITCH_CHANNEL_API_ON_ANSWER_VARIABLE, SWITCH_CHANNEL_API_ON_MEDIA_VARIABLE, switch_channel_event_set_data(), switch_channel_execute_on(), SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE, SWITCH_CHANNEL_EXECUTE_ON_MEDIA_VARIABLE, switch_channel_get_uuid(), switch_channel_get_variable, SWITCH_CHANNEL_ID_LOG, switch_channel_presence, switch_channel_set_callstate, switch_channel_set_flag, switch_channel_set_flag_partner(), switch_channel_set_variable, switch_channel_test_flag(), switch_core_media_check_autoadj(), switch_core_media_check_dtls(), switch_core_recovery_track(), switch_core_session_enable_heartbeat(), switch_core_session_kill_channel, switch_core_session_locate, switch_core_session_rwunlock(), SWITCH_ENABLE_HEARTBEAT_EVENTS_VARIABLE, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, SWITCH_EVENT_CHANNEL_ANSWER, switch_event_create, switch_event_fire, switch_is_number(), SWITCH_LOG_NOTICE, switch_log_printf(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MESSAGE_ANSWER_EVENT, switch_micro_time_now(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_ORIGINATOR_VARIABLE, SWITCH_PASSTHRU_PTIME_MISMATCH_VARIABLE, SWITCH_SIG_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_true(), and switch_caller_profile::times.
Referenced by switch_channel_perform_answer().
switch_status_t switch_channel_perform_mark_pre_answered | ( | switch_channel_t * | channel, |
const char * | file, | ||
const char * | func, | ||
int | line | ||
) |
Definition at line 3523 of file switch_channel.c.
References caller_profile, CCS_EARLY, CF_ANSWERED, CF_EARLY_MEDIA, CF_PASSTHRU_PTIME_MISMATCH, CF_VIDEO_MIRROR_INPUT, name, switch_caller_profile::originator_caller_profile, profile_mutex, switch_channel_timetable::progress_media, send_ind(), session, switch_channel_api_on(), SWITCH_CHANNEL_API_ON_MEDIA_VARIABLE, SWITCH_CHANNEL_API_ON_PRE_ANSWER_VARIABLE, switch_channel_event_set_data(), switch_channel_execute_on(), SWITCH_CHANNEL_EXECUTE_ON_MEDIA_VARIABLE, SWITCH_CHANNEL_EXECUTE_ON_PRE_ANSWER_VARIABLE, switch_channel_get_uuid(), switch_channel_get_variable, SWITCH_CHANNEL_ID_LOG, switch_channel_set_callstate, switch_channel_set_flag, switch_channel_set_variable, switch_channel_test_flag(), switch_core_media_check_autoadj(), switch_core_media_check_dtls(), switch_core_session_get_channel(), switch_core_session_kill_channel, switch_core_session_locate, switch_core_session_rwunlock(), SWITCH_ENDPOINT_DISPOSITION_VARIABLE, SWITCH_EVENT_CHANNEL_PROGRESS_MEDIA, switch_event_create, switch_event_fire, SWITCH_LOG_NOTICE, switch_log_printf(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MESSAGE_PROGRESS_EVENT, switch_micro_time_now(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_ORIGINATOR_VARIABLE, SWITCH_PASSTHRU_PTIME_MISMATCH_VARIABLE, SWITCH_SIG_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_true(), switch_caller_profile::times, and switch_caller_profile::uuid.
Referenced by switch_channel_perform_pre_answer().
switch_status_t switch_channel_perform_mark_ring_ready_value | ( | switch_channel_t * | channel, |
switch_ring_ready_t | rv, | ||
const char * | file, | ||
const char * | func, | ||
int | line | ||
) |
Definition at line 3475 of file switch_channel.c.
References caller_profile, CCS_RINGING, CF_ANSWERED, CF_RING_READY, name, switch_caller_profile::originator_caller_profile, profile_mutex, switch_channel_timetable::progress, send_ind(), switch_channel_api_on(), SWITCH_CHANNEL_API_ON_RING_VARIABLE, switch_channel_event_set_data(), switch_channel_execute_on(), SWITCH_CHANNEL_EXECUTE_ON_RING_VARIABLE, switch_channel_get_uuid(), SWITCH_CHANNEL_ID_LOG, switch_channel_set_callstate, switch_channel_set_flag_value(), switch_channel_test_flag(), switch_core_session_get_channel(), switch_core_session_locate, switch_core_session_rwunlock(), SWITCH_EVENT_CHANNEL_PROGRESS, switch_event_create, switch_event_fire, SWITCH_LOG_NOTICE, switch_log_printf(), SWITCH_MESSAGE_RING_EVENT, switch_micro_time_now(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_caller_profile::times, and switch_caller_profile::uuid.
Referenced by switch_channel_perform_ring_ready_value().
switch_status_t switch_channel_perform_pre_answer | ( | switch_channel_t * | channel, |
const char * | file, | ||
const char * | func, | ||
int | line | ||
) |
Definition at line 3597 of file switch_channel.c.
References CF_ANSWERED, CF_EARLY_MEDIA, CS_HANGUP, switch_core_session_message::from, hangup_cause, switch_core_session_message::message_id, name, session, state, switch_assert, SWITCH_CALL_DIRECTION_INBOUND, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION, switch_channel_audio_sync, switch_channel_direction(), switch_channel_hangup, switch_channel_perform_mark_pre_answered(), switch_channel_test_flag(), switch_core_session_perform_receive_message(), SWITCH_MESSAGE_INDICATE_PROGRESS, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
void switch_channel_perform_presence | ( | switch_channel_t * | channel, |
const char * | rpid, | ||
const char * | status, | ||
const char * | id, | ||
const char * | file, | ||
const char * | func, | ||
int | line | ||
) |
Fire A presence event for the channel.
channel | the channel to initilize |
rpid | the rpid if for the icon to use |
status | the status message |
id | presence id |
Definition at line 778 of file switch_channel.c.
References CF_ANSWERED, CF_NO_PRESENCE, CF_SLA_INTERCEPT, direction, event_count, SWITCH_CALL_DIRECTION_OUTBOUND, switch_channel_event_set_data(), switch_channel_get_variable, switch_channel_test_flag(), switch_channel_up_nosig, switch_event_add_header(), switch_event_add_header_string(), switch_event_create, switch_event_fire, SWITCH_EVENT_PRESENCE_IN, SWITCH_EVENT_PRESENCE_OUT, SWITCH_STACK_BOTTOM, SWITCH_STATUS_SUCCESS, and switch_true().
switch_status_t switch_channel_perform_ring_ready_value | ( | switch_channel_t * | channel, |
switch_ring_ready_t | rv, | ||
const char * | file, | ||
const char * | func, | ||
int | line | ||
) |
Definition at line 3632 of file switch_channel.c.
References CF_ANSWERED, CF_EARLY_MEDIA, CS_HANGUP, switch_core_session_message::from, hangup_cause, switch_core_session_message::message_id, name, switch_core_session_message::numeric_arg, session, state, switch_assert, SWITCH_CALL_DIRECTION_INBOUND, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION, switch_channel_direction(), switch_channel_get_uuid(), switch_channel_hangup, SWITCH_CHANNEL_ID_LOG, switch_channel_perform_mark_ring_ready_value(), switch_channel_test_flag(), switch_core_session_perform_receive_message(), SWITCH_LOG_NOTICE, switch_log_printf(), SWITCH_MESSAGE_INDICATE_RINGING, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
void switch_channel_perform_set_callstate | ( | switch_channel_t * | channel, |
switch_channel_callstate_t | callstate, | ||
const char * | file, | ||
const char * | func, | ||
int | line | ||
) |
Definition at line 283 of file switch_channel.c.
References device_uuid_node_s::callstate, callstate, CCS_HANGUP, device_node, name, switch_channel_callstate2str(), switch_channel_check_device_state(), switch_channel_event_set_data(), switch_channel_get_uuid(), SWITCH_CHANNEL_ID_LOG, switch_event_add_header(), switch_event_add_header_string(), SWITCH_EVENT_CHANNEL_CALLSTATE, switch_event_create, switch_event_fire, SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_STACK_BOTTOM, and SWITCH_STATUS_SUCCESS.
switch_channel_state_t switch_channel_perform_set_running_state | ( | switch_channel_t * | channel, |
switch_channel_state_t | state, | ||
const char * | file, | ||
const char * | func, | ||
int | line | ||
) |
Definition at line 2366 of file switch_channel.c.
References careful_set(), CCS_ACTIVE, CCS_EARLY, CCS_RINGING, CF_ANSWERED, CF_EARLY_MEDIA, CF_FLAG_MAX, CF_TAGGED, CS_DESTROY, CS_HANGUP, CS_ROUTING, flag_mutex, flags, name, running_state, state_flags, state_mutex, state_names, SWITCH_CALL_DIRECTION_INBOUND, switch_channel_clear_flag(), switch_channel_direction(), switch_channel_event_set_data(), switch_channel_get_uuid(), SWITCH_CHANNEL_ID_LOG, switch_channel_set_callstate, switch_channel_test_flag(), switch_core_session_count(), switch_core_session_id(), SWITCH_EVENT_CHANNEL_STATE, switch_event_create, switch_event_fire, SWITCH_LOG_DEBUG, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_SIZE_T_FMT, and SWITCH_STATUS_SUCCESS.
switch_channel_state_t switch_channel_perform_set_state | ( | switch_channel_t * | channel, |
const char * | file, | ||
const char * | func, | ||
int | line, | ||
switch_channel_state_t | state | ||
) |
Definition at line 2419 of file switch_channel.c.
References careful_set(), CS_CONSUME_MEDIA, CS_DESTROY, CS_EXCHANGE_MEDIA, CS_EXECUTE, CS_HANGUP, CS_HIBERNATE, CS_INIT, CS_NEW, CS_PARK, CS_REPORTING, CS_RESET, CS_ROUTING, CS_SOFT_EXECUTE, hangup_cause, name, session, state, state_mutex, state_names, switch_assert, SWITCH_CAUSE_NORMAL_CLEARING, switch_channel_get_uuid(), SWITCH_CHANNEL_ID_LOG, switch_core_session_signal_state_change(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_LOG_WARNING, switch_mutex_lock(), and switch_mutex_unlock().
void switch_channel_perform_video_sync | ( | switch_channel_t * | channel, |
const char * | file, | ||
const char * | func, | ||
int | line | ||
) |
Definition at line 384 of file switch_channel.c.
References switch_core_session_message::_file, switch_core_session_message::_func, switch_core_session_message::_line, switch_core_session_message::from, switch_core_session_message::message_id, MESSAGE_STAMP_FFL, name, session, switch_channel_media_up, switch_core_session_alloc, switch_core_session_queue_message(), switch_core_session_request_video_refresh, and SWITCH_MESSAGE_INDICATE_VIDEO_SYNC.
void switch_channel_process_export | ( | switch_channel_t * | channel, |
switch_channel_t * | peer_channel, | ||
switch_event_t * | var_event, | ||
const char * | export_varname | ||
) |
Definition at line 1252 of file switch_channel.c.
References session, switch_channel_get_name(), switch_channel_get_variable, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable, switch_core_session_strdup, switch_event_add_header_string(), switch_event_del_header, SWITCH_LOG_DEBUG, switch_log_printf(), switch_separate_string(), SWITCH_STACK_BOTTOM, and zstr.
Referenced by check_bridge_export(), switch_ivr_enterprise_originate(), and switch_ivr_originate().
switch_status_t switch_channel_queue_dtmf | ( | _In_ switch_channel_t * | channel, |
_In_ const switch_dtmf_t * | dtmf | ||
) |
Queue DTMF on a given channel.
channel | channel to queue DTMF to |
dtmf | digit |
Referenced by inband_dtmf_callback(), speech_thread(), and switch_core_media_read_frame().
switch_status_t switch_channel_queue_dtmf_string | ( | _In_ switch_channel_t * | channel, |
_In_ const char * | dtmf_string | ||
) |
void switch_channel_restart | ( | switch_channel_t * | channel | ) |
Definition at line 3123 of file switch_channel.c.
References CS_EXECUTE, CS_RESET, switch_channel_set_state, and switch_channel_wait_for_state_timeout().
Referenced by switch_channel_var_true(), and switch_ivr_originate().
void switch_channel_set_app_flag_key | ( | const char * | app, |
switch_channel_t * | channel, | ||
uint32_t | flags | ||
) |
Definition at line 2070 of file switch_channel.c.
References app_flag_hash, flag_mutex, session, switch_assert, switch_core_hash_find(), switch_core_hash_init, switch_core_hash_insert, switch_core_session_alloc, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_core_media_negotiate_sdp(), switch_core_media_process_udptl(), switch_core_media_reset_t38(), and switch_ivr_eavesdrop_update_display().
void switch_channel_set_bridge_time | ( | switch_channel_t * | channel | ) |
Definition at line 3360 of file switch_channel.c.
References switch_channel_timetable::bridged, caller_profile, profile_mutex, switch_micro_time_now(), switch_mutex_lock(), switch_mutex_unlock(), and switch_caller_profile::times.
Referenced by signal_bridge_on_hibernate(), and switch_ivr_multi_threaded_bridge().
void switch_channel_set_caller_extension | ( | switch_channel_t * | channel, |
switch_caller_extension_t * | caller_extension | ||
) |
Assign a caller extension to a given channel.
channel | channel to assign extension to |
caller_extension | extension to assign |
Definition at line 3333 of file switch_channel.c.
References switch_caller_profile::caller_extension, caller_profile, switch_caller_extension::next, profile_mutex, switch_assert, switch_channel_sort_cid(), switch_mutex_lock(), and switch_mutex_unlock().
Referenced by audio_bridge_thread(), recover_callback(), switch_channel_caller_extension_masquerade(), switch_channel_var_true(), and switch_core_standard_on_routing().
void switch_channel_set_caller_profile | ( | switch_channel_t * | channel, |
switch_caller_profile_t * | caller_profile | ||
) |
Set the given channel's caller profile.
channel | channel to assign the profile to |
caller_profile | the profile to assign |
Definition at line 2863 of file switch_channel.c.
References switch_channel_timetable::answered, switch_caller_profile::caller_extension, caller_profile, switch_caller_profile::chan_name, switch_caller_profile::context, switch_channel_timetable::created, switch_caller_profile::direction, direction, switch_channel_timetable::hungup, switch_caller_profile::logical_direction, logical_direction, name, switch_caller_profile::next, switch_caller_profile::pool, switch_channel_timetable::profile_created, switch_caller_profile::profile_index, profile_index, profile_mutex, switch_channel_timetable::progress, switch_channel_timetable::progress_media, session, switch_assert, switch_caller_extension_clone(), switch_core_session_alloc, switch_core_session_get_uuid(), switch_core_session_strdup, switch_core_sprintf(), switch_micro_time_now(), switch_mutex_lock(), switch_mutex_unlock(), switch_caller_profile::times, switch_channel_timetable::transferred, and switch_caller_profile::uuid.
Referenced by switch_channel_caller_extension_masquerade(), switch_channel_step_caller_profile(), switch_core_session_request_xml(), and switch_ivr_session_transfer().
void switch_channel_set_cap_value | ( | switch_channel_t * | channel, |
switch_channel_cap_t | cap, | ||
uint32_t | value | ||
) |
Definition at line 1854 of file switch_channel.c.
References caps, flag_mutex, switch_assert, switch_mutex_lock(), switch_mutex_unlock(), and value.
Referenced by switch_core_session_request_xml().
void switch_channel_set_direction | ( | switch_channel_t * | channel, |
switch_call_direction_t | direction | ||
) |
Definition at line 432 of file switch_channel.c.
References direction, logical_direction, session, SWITCH_CALL_DIRECTION_OUTBOUND, switch_channel_direction(), switch_channel_set_variable, and switch_core_session_in_thread().
switch_bool_t switch_channel_set_flag_partner | ( | switch_channel_t * | channel, |
switch_channel_flag_t | flag | ||
) |
Set given flag(s) on a given channel's bridge partner.
channel | channel to derive the partner channel to set flag on |
flag | to set |
Definition at line 1690 of file switch_channel.c.
References switch_assert, switch_channel_get_partner_uuid(), switch_channel_set_flag, switch_core_session_get_channel(), switch_core_session_locate, switch_core_session_rwunlock(), SWITCH_FALSE, and SWITCH_TRUE.
Referenced by switch_channel_perform_mark_answered().
void switch_channel_set_flag_recursive | ( | switch_channel_t * | channel, |
switch_channel_flag_t | flag | ||
) |
Definition at line 2029 of file switch_channel.c.
References CF_OUTBOUND, CF_RECOVERED, flag_mutex, flags, switch_assert, switch_channel_set_variable, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by eavesdrop_callback(), switch_core_media_bug_add(), switch_core_media_set_video_file(), switch_ivr_multi_threaded_bridge(), switch_ivr_parse_event(), switch_ivr_record_file_event(), switch_ivr_session_echo(), switch_ivr_signal_bridge(), switch_jb_get_packet(), and text_bridge_thread().
void switch_channel_set_flag_value | ( | switch_channel_t * | channel, |
switch_channel_flag_t | flag, | ||
uint32_t | value | ||
) |
Set given flag(s) on a given channel.
channel | channel on which to set flag |
flag | or'd list of flags to set |
Definition at line 1950 of file switch_channel.c.
References caller_profile, CCS_HELD, CCS_RING_WAIT, CF_ANSWERED, CF_DIALPLAN, CF_LEG_HOLDING, CF_ORIGINATOR, CF_OUTBOUND, CF_RECOVERED, CF_VIDEO, CF_VIDEO_BLANK, CF_VIDEO_DECODED_READ, CF_VIDEO_ECHO, CF_VIDEO_PASSIVE, CF_VIDEO_READY, device_node, device_uuid_node_s::direction, direction, flag_mutex, flags, hold_record, switch_channel_timetable::last_hold, logical_direction, switch_hold_record_s::next, switch_hold_record_s::on, profile_mutex, session, switch_assert, SWITCH_CALL_DIRECTION_INBOUND, SWITCH_CALL_DIRECTION_OUTBOUND, switch_channel_get_partner_uuid(), switch_channel_set_callstate, switch_channel_set_variable, switch_channel_test_flag(), switch_channel_up_nosig, switch_core_session_alloc, switch_core_session_request_video_refresh, switch_core_session_start_video_thread(), switch_core_session_strdup, switch_mutex_lock(), switch_mutex_unlock(), switch_time_now(), switch_caller_profile::times, switch_hold_record_s::uuid, and value.
Referenced by switch_channel_perform_mark_ring_ready_value(), switch_channel_var_true(), and switch_core_session_request_xml().
void switch_channel_set_hangup_time | ( | switch_channel_t * | channel | ) |
Definition at line 3370 of file switch_channel.c.
References caller_profile, switch_channel_timetable::hungup, profile_mutex, switch_micro_time_now(), switch_mutex_lock(), switch_mutex_unlock(), and switch_caller_profile::times.
Referenced by switch_core_session_hangup_state().
void switch_channel_set_hunt_caller_profile | ( | switch_channel_t * | channel, |
switch_caller_profile_t * | caller_profile | ||
) |
Definition at line 2945 of file switch_channel.c.
References caller_profile, switch_caller_profile::direction, direction, switch_caller_profile::hunt_caller_profile, switch_caller_profile::logical_direction, logical_direction, profile_mutex, switch_assert, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_core_session_execute_exten().
switch_status_t switch_channel_set_log_tag | ( | switch_channel_t * | channel, |
const char * | tagname, | ||
const char * | tagvalue | ||
) |
Definition at line 1453 of file switch_channel.c.
References log_tags, profile_mutex, switch_assert, switch_event_add_header_string(), SWITCH_EVENT_CHANNEL_DATA, switch_event_create_plain(), switch_event_del_header, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and zstr.
switch_status_t switch_channel_set_name | ( | switch_channel_t * | channel, |
const char * | name | ||
) |
Assign a name to a given channel.
channel | channel to assign name to |
name | name to assign |
Definition at line 1126 of file switch_channel.c.
References name, session, switch_assert, SWITCH_CHANNEL_CHANNEL_LOG, SWITCH_CHANNEL_NAME_VARIABLE, switch_channel_set_variable, switch_core_session_get_uuid(), switch_core_session_strdup, SWITCH_LOG_NOTICE, switch_log_printf(), SWITCH_STATUS_SUCCESS, and zstr.
Referenced by switch_core_session_request_xml(), and switch_ivr_originate().
void switch_channel_set_originatee_caller_profile | ( | switch_channel_t * | channel, |
switch_caller_profile_t * | caller_profile | ||
) |
Set the given channel's originatee caller profile.
channel | channel to assign the profile to |
caller_profile | the profile to assign |
Definition at line 2991 of file switch_channel.c.
References caller_profile, last_profile_type, LP_ORIGINATEE, switch_caller_profile::next, switch_caller_profile::originatee_caller_profile, profile_mutex, switch_assert, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_core_session_request_xml(), switch_ivr_enterprise_originate(), switch_ivr_originate(), and switch_ivr_uuid_bridge().
void switch_channel_set_origination_caller_profile | ( | switch_channel_t * | channel, |
switch_caller_profile_t * | caller_profile | ||
) |
Set the given channel's origination caller profile.
channel | channel to assign the profile to |
caller_profile | the profile to assign |
Definition at line 2961 of file switch_channel.c.
References caller_profile, switch_caller_profile::next, switch_caller_profile::origination_caller_profile, profile_mutex, switch_assert, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_core_session_outgoing_channel().
void switch_channel_set_originator_caller_profile | ( | switch_channel_t * | channel, |
switch_caller_profile_t * | caller_profile | ||
) |
Set the given channel's originator caller profile.
channel | channel to assign the profile to |
caller_profile | the profile to assign |
Definition at line 2926 of file switch_channel.c.
References caller_profile, last_profile_type, LP_ORIGINATOR, switch_caller_profile::next, switch_caller_profile::originator_caller_profile, switch_caller_profile::pool, profile_mutex, switch_assert, switch_core_alloc, switch_mutex_lock(), switch_mutex_unlock(), and switch_caller_profile::times.
Referenced by switch_core_session_outgoing_channel(), switch_core_session_request_xml(), switch_ivr_enterprise_originate(), and switch_ivr_uuid_bridge().
void switch_channel_set_presence_data_vals | ( | switch_channel_t * | channel, |
const char * | presence_data_cols | ||
) |
Takes presence_data_cols as a parameter or as a channel variable and copies them to channel profile variables.
channel | the channel on which to set the channel profile variables |
presence_data_cols | is a colon separated list of channel variables to copy to channel profile variables |
Definition at line 1425 of file switch_channel.c.
References switch_channel_get_variable, switch_channel_get_variable_dup(), switch_channel_set_profile_var(), SWITCH_FALSE, switch_safe_free, switch_snprintf(), switch_split, and zstr.
switch_status_t switch_channel_set_private | ( | switch_channel_t * | channel, |
const char * | key, | ||
const void * | private_info | ||
) |
Set private data on channel.
channel | channel on which to set data |
key | unique keyname to associate your private data to |
private_info | void pointer to private data |
Definition at line 1093 of file switch_channel.c.
References private_hash, profile_mutex, switch_assert, switch_core_hash_insert_locked(), and SWITCH_STATUS_SUCCESS.
Referenced by audio_bridge_on_exchange_media(), check_channel_status(), CoreSession::destroy(), monitor_callback(), preprocess_callback(), read_displace_callback(), record_callback(), session_audio_callback(), CoreSession::setDTMFCallback(), CoreSession::setHangupHook(), CoreSession::setPrivate(), signal_bridge_on_hangup(), signal_bridge_on_hibernate(), speech_callback(), switch_core_media_copy_t38_options(), switch_core_media_process_udptl(), switch_core_media_reset_t38(), switch_ivr_activate_unicast(), switch_ivr_bind_dtmf_meta_session(), switch_ivr_block_dtmf_session(), switch_ivr_capture_text(), switch_ivr_clear_speech_cache(), switch_ivr_detect_speech_init(), switch_ivr_displace_session(), switch_ivr_inband_dtmf_generate_session(), switch_ivr_inband_dtmf_session(), switch_ivr_multi_threaded_bridge(), switch_ivr_originate(), switch_ivr_play_file(), switch_ivr_preprocess_session(), switch_ivr_record_session_event(), switch_ivr_session_audio(), switch_ivr_speak_text(), 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_session_audio(), switch_ivr_stop_tone_detect_session(), switch_ivr_stop_video_write_overlay_session(), switch_ivr_tone_detect_session(), switch_ivr_unbind_dtmf_meta_session(), switch_ivr_unblock_dtmf_session(), switch_ivr_video_write_overlay_session(), switch_rtp_create(), and write_displace_callback().
void switch_channel_set_private_flag | ( | switch_channel_t * | channel, |
uint32_t | flags | ||
) |
Definition at line 2048 of file switch_channel.c.
References flag_mutex, private_flags, switch_assert, switch_mutex_lock(), and switch_mutex_unlock().
switch_status_t switch_channel_set_profile_var | ( | switch_channel_t * | channel, |
const char * | name, | ||
const char * | val | ||
) |
Set a variable on a given channel.
channel | channel to set variable on |
varname | the name of the variable |
value | the value of the variable |
Definition at line 1154 of file switch_channel.c.
References switch_caller_profile::ani, switch_caller_profile::aniii, switch_caller_profile::callee_id_name, switch_caller_profile::callee_id_number, switch_caller_profile::caller_id_name, switch_caller_profile::caller_id_number, switch_caller_profile::caller_numplan, caller_profile, switch_caller_profile::caller_ton, switch_caller_profile::chan_name, switch_caller_profile::context, switch_caller_profile::destination_number, switch_caller_profile::destination_number_numplan, switch_caller_profile::destination_number_ton, switch_caller_profile::dialplan, switch_caller_profile::network_addr, profile_node_s::next, switch_caller_profile::pool, profile_mutex, switch_caller_profile::rdnis, switch_caller_profile::soft, switch_caller_profile::source, SWITCH_BLANK_STRING, switch_channel_set_device_id(), switch_core_alloc, switch_core_strdup, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_SUCCESS, switch_caller_profile::username, switch_caller_profile::uuid, profile_node_s::val, profile_node_s::var, and zstr.
Referenced by switch_channel_set_presence_data_vals(), switch_ivr_originate(), and switch_ivr_set_user_xml().
void switch_channel_set_scope_variables | ( | switch_channel_t * | channel, |
switch_event_t ** | event | ||
) |
Definition at line 928 of file switch_channel.c.
References switch_event::next, profile_mutex, scope_variables, switch_event_destroy(), switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_core_session_exec().
void switch_channel_set_state_flag | ( | switch_channel_t * | channel, |
switch_channel_flag_t | flag | ||
) |
Set given flag(s) on a given channel to be applied on the next state change.
channel | channel on which to set flag(s) |
flag | flag to set |
Definition at line 2126 of file switch_channel.c.
References flag_mutex, state_flags, switch_assert, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_ivr_intercept_session(), switch_ivr_signal_bridge(), and switch_ivr_uuid_bridge().
switch_status_t switch_channel_set_timestamps | ( | _In_ switch_channel_t * | channel | ) |
Referenced by switch_core_session_hangup_state(), and switch_ivr_originate().
switch_status_t switch_channel_set_variable_name_printf | ( | switch_channel_t * | channel, |
const char * | val, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 1626 of file switch_channel.c.
References profile_mutex, switch_assert, switch_channel_set_variable, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_FALSE, SWITCH_STATUS_MEMERR, and switch_vasprintf().
Referenced by switch_core_media_build_crypto(), switch_ivr_multi_threaded_bridge(), and tone_detect_set_total_time().
switch_status_t switch_channel_set_variable_partner_var_check | ( | switch_channel_t * | channel, |
const char * | varname, | ||
const char * | value, | ||
switch_bool_t | var_check | ||
) |
Definition at line 1656 of file switch_channel.c.
References switch_assert, switch_channel_get_partner_uuid(), switch_channel_set_variable_var_check(), switch_core_session_get_channel(), switch_core_session_locate, switch_core_session_rwunlock(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and zstr.
switch_status_t switch_channel_set_variable_printf | ( | switch_channel_t * | channel, |
const char * | varname, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 1595 of file switch_channel.c.
References profile_mutex, switch_assert, switch_channel_set_variable, switch_event_del_header, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_FALSE, SWITCH_STATUS_MEMERR, switch_vasprintf(), variables, and zstr.
Referenced by check_jb_size(), play_and_detect_input_callback(), send_record_stop_event(), switch_core_media_activate_rtp(), switch_core_media_choose_port(), switch_core_media_get_video_fps(), switch_core_media_negotiate_sdp(), switch_core_media_read_frame(), switch_core_media_receive_message(), switch_core_media_recover_session(), switch_core_media_set_codec(), switch_core_media_set_video_codec(), switch_core_session_check_incoming_crypto(), switch_core_session_hangup_state(), switch_core_session_read_video_frame(), switch_core_session_request_uuid(), switch_ivr_detect_audio(), switch_ivr_detect_silence(), switch_ivr_parse_event(), switch_ivr_play_file(), switch_ivr_record_file_event(), switch_ivr_record_session_event(), switch_ivr_wait_for_silence(), switch_jb_reset(), switch_jb_set_jitter_estimator(), switch_limit_incr(), and switch_rtp_sync_stats().
switch_status_t switch_channel_set_variable_strip_quotes_var_check | ( | switch_channel_t * | channel, |
const char * | varname, | ||
const char * | value, | ||
switch_bool_t | var_check | ||
) |
Definition at line 1518 of file switch_channel.c.
References end_of, profile_mutex, switch_assert, SWITCH_CHANNEL_CHANNEL_LOG, switch_event_add_header_string(), switch_event_del_header, SWITCH_LOG_CRIT, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), switch_safe_free, SWITCH_STACK_BOTTOM, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_string_var_check_const(), variables, and zstr.
switch_status_t switch_channel_set_variable_var_check | ( | switch_channel_t * | channel, |
const char * | varname, | ||
const char * | value, | ||
switch_bool_t | var_check | ||
) |
Definition at line 1488 of file switch_channel.c.
References profile_mutex, switch_assert, SWITCH_CHANNEL_CHANNEL_LOG, switch_event_add_header_string(), switch_event_del_header, SWITCH_LOG_CRIT, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_string_var_check_const(), variables, and zstr.
Referenced by CoreSession::setVariable(), switch_channel_export_variable_var_check(), switch_channel_set_variable_partner_var_check(), switch_core_session_exec(), switch_ivr_originate(), and switch_ivr_session_transfer().
void switch_channel_sort_cid | ( | switch_channel_t * | channel | ) |
Definition at line 3299 of file switch_channel.c.
References CF_BLEG, CF_DIALPLAN, SWITCH_CALL_DIRECTION_INBOUND, SWITCH_CALL_DIRECTION_OUTBOUND, switch_channel_clear_flag(), switch_channel_direction(), switch_channel_flip_cid(), switch_channel_set_flag, and switch_channel_test_flag().
Referenced by switch_channel_set_caller_extension(), and switch_channel_var_true().
int switch_channel_state_change_pending | ( | switch_channel_t * | channel | ) |
Definition at line 2255 of file switch_channel.c.
References running_state, session, state, switch_channel_down_nosig, and switch_core_session_in_thread().
Referenced by switch_channel_test_ready(), switch_ivr_eavesdrop_session(), and switch_ivr_originate().
const char* switch_channel_state_name | ( | _In_ switch_channel_state_t | state | ) |
Render the name of the provided state enum.
state | state to get name of |
Referenced by check_presence(), CoreSession::getState(), switch_core_session_perform_destroy(), switch_core_session_run(), switch_ivr_generate_json_cdr(), and switch_ivr_generate_xml_cdr().
void switch_channel_step_caller_profile | ( | switch_channel_t * | channel | ) |
Definition at line 2851 of file switch_channel.c.
References caller_profile, profile_mutex, session, switch_caller_profile_clone(), switch_channel_set_caller_profile(), switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_ivr_uuid_bridge().
switch_channel_callstate_t switch_channel_str2callstate | ( | const char * | str | ) |
Definition at line 346 of file switch_channel.c.
References switch_callstate_table::callstate, CALLSTATE_CHART, switch_cause_table::name, and SWITCH_CAUSE_NONE.
switch_call_cause_t switch_channel_str2cause | ( | _In_ const char * | str | ) |
return a cause code for a given string
str | the string to check |
Referenced by fs_channel_hangup(), CoreSession::hangup(), monitor_callback(), switch_core_session_reporting_state(), switch_ivr_park(), and switch_ivr_parse_event().
int switch_channel_test_app_flag_key | ( | const char * | app, |
switch_channel_t * | channel, | ||
uint32_t | flags | ||
) |
Definition at line 2110 of file switch_channel.c.
References app_flag_hash, flag_mutex, switch_assert, switch_core_hash_find(), switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_channel_wait_for_app_flag(), switch_core_media_negotiate_sdp(), and switch_ivr_eavesdrop_update_display().
uint32_t switch_channel_test_cap | ( | switch_channel_t * | channel, |
switch_channel_cap_t | cap | ||
) |
Definition at line 1874 of file switch_channel.c.
References caps, and switch_assert.
Referenced by switch_channel_test_cap_partner(), switch_core_media_gen_local_sdp(), switch_core_session_outgoing_channel(), switch_core_session_override_io_routines(), switch_core_session_send_dtmf(), switch_core_session_write_text_frame(), and switch_ivr_check_hold().
uint32_t switch_channel_test_cap_partner | ( | switch_channel_t * | channel, |
switch_channel_cap_t | cap | ||
) |
Definition at line 1880 of file switch_channel.c.
References switch_assert, switch_channel_get_partner_uuid(), switch_channel_test_cap(), switch_core_session_get_channel(), switch_core_session_locate, and switch_core_session_rwunlock().
Referenced by switch_core_media_receive_message().
uint32_t switch_channel_test_flag | ( | switch_channel_t * | channel, |
switch_channel_flag_t | flag | ||
) |
Test for presence of given flag on a given channel.
channel | channel to test |
flag | to test |
Definition at line 1677 of file switch_channel.c.
References flag_mutex, flags, switch_assert, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by _switch_core_session_request_video_refresh(), CoreSession::answered(), audio_bridge_on_exchange_media(), audio_bridge_thread(), block_on_dtmf(), CoreSession::bridged(), check_channel_status(), check_dtls_reinvite(), check_ice(), check_jb_sync(), check_per_channel_timeouts(), check_stream_changes(), cleanup_proxy_mode_a(), cleanup_proxy_mode_b(), CoreSession::destroy(), do_dtls(), dtls_ok(), early_thread_run(), generate_m(), generate_on_dtmf(), get_media_profile_name(), hanguphook(), meta_on_dtmf(), originate_on_consume_media_transmit(), perform_write(), read_rtp_packet(), recover_callback(), rtp_common_read(), rtp_common_write(), sb_on_dtmf(), send_display(), setup_ringback(), signal_bridge_on_hangup(), signal_bridge_on_hibernate(), switch_channel_check_device_state(), switch_channel_clear_device_record(), switch_channel_clear_flag(), switch_channel_dequeue_dtmf(), switch_channel_event_set_basic_data(), switch_channel_event_set_extended_data(), switch_channel_flip_cid(), switch_channel_handle_cause(), switch_channel_mark_hold(), switch_channel_perform_answer(), switch_channel_perform_hangup(), switch_channel_perform_mark_answered(), switch_channel_perform_mark_pre_answered(), switch_channel_perform_mark_ring_ready_value(), switch_channel_perform_pre_answer(), switch_channel_perform_presence(), switch_channel_perform_ring_ready_value(), switch_channel_perform_set_running_state(), switch_channel_set_flag_value(), switch_channel_set_timestamps(), switch_channel_sort_cid(), switch_channel_test_flag_partner(), switch_channel_test_ready(), switch_channel_var_true(), switch_channel_wait_for_flag(), switch_core_media_activate_rtp(), switch_core_media_build_crypto(), switch_core_media_check_autoadj(), switch_core_media_check_dtls(), switch_core_media_check_outgoing_proxy(), switch_core_media_check_video_codecs(), switch_core_media_choose_port(), switch_core_media_choose_ports(), switch_core_media_codec_control(), switch_core_media_gen_local_sdp(), switch_core_media_get_video_file(), switch_core_media_get_video_fps(), switch_core_media_lock_video_file(), switch_core_media_media_params(), switch_core_media_negotiate_sdp(), switch_core_media_patch_sdp(), switch_core_media_prepare_codecs(), switch_core_media_proxy_remote_addr(), switch_core_media_read_frame(), switch_core_media_read_lock_unlock(), switch_core_media_receive_message(), switch_core_media_recover_session(), switch_core_media_set_r_sdp_codec_string(), switch_core_media_set_rmode(), switch_core_media_set_smode(), switch_core_media_set_video_file(), switch_core_media_start_udptl(), switch_core_media_toggle_hold(), switch_core_media_unlock_video_file(), switch_core_recovery_track(), switch_core_recovery_untrack(), switch_core_service_thread(), switch_core_session_apply_crypto(), switch_core_session_check_incoming_crypto(), switch_core_session_check_outgoing_crypto(), switch_core_session_dequeue_event(), switch_core_session_dequeue_private_event(), switch_core_session_enable_heartbeat(), switch_core_session_execute_application_async(), switch_core_session_execute_application_get_flags(), switch_core_session_hangup_state(), switch_core_session_hupall_matching_vars_ans(), switch_core_session_outgoing_channel(), switch_core_session_parse_crypto_prefs(), switch_core_session_perform_receive_message(), switch_core_session_print(), switch_core_session_private_event_count(), switch_core_session_read_frame(), switch_core_session_read_lock(), switch_core_session_read_text_frame(), switch_core_session_read_video_frame(), switch_core_session_reporting_state(), switch_core_session_run(), switch_core_session_send_and_request_video_refresh(), switch_core_session_send_dtmf(), switch_core_session_start_audio_write_thread(), switch_core_session_start_text_thread(), switch_core_session_start_video_thread(), switch_core_session_transcoding(), switch_core_session_wait_for_video_input_params(), switch_core_session_write_frame(), switch_core_session_write_text_frame(), switch_core_session_write_video_frame(), switch_core_standard_on_execute(), switch_core_standard_on_hangup(), switch_core_standard_on_init(), switch_core_standard_on_reset(), switch_core_standard_on_routing(), switch_ice_direction(), switch_ivr_3p_media(), switch_ivr_3p_nomedia(), switch_ivr_blind_transfer_ack(), switch_ivr_bridge_bleg(), switch_ivr_broadcast(), switch_ivr_check_hold(), switch_ivr_collect_digits_callback(), switch_ivr_collect_digits_count(), switch_ivr_deactivate_unicast(), switch_ivr_eavesdrop_session(), switch_ivr_enterprise_orig_and_bridge(), switch_ivr_enterprise_originate(), switch_ivr_gentones(), switch_ivr_intercept_session(), switch_ivr_media(), switch_ivr_multi_threaded_bridge(), switch_ivr_nomedia(), switch_ivr_orig_and_bridge(), switch_ivr_originate(), switch_ivr_park(), switch_ivr_parse_all_events(), switch_ivr_parse_event(), switch_ivr_parse_signal_data(), switch_ivr_play_file(), switch_ivr_record_file_event(), switch_ivr_record_session_event(), switch_ivr_session_echo(), switch_ivr_session_transfer(), switch_ivr_signal_bridge(), switch_ivr_sleep(), switch_ivr_soft_hold(), switch_ivr_speak_text_handle(), switch_ivr_uuid_bridge(), switch_ivr_wait_for_answer(), switch_jb_get_packet(), switch_rtp_break(), switch_rtp_write_frame(), text_bridge_thread(), text_helper_thread(), uuid_bridge_on_reset(), uuid_bridge_on_soft_execute(), video_bug_thread(), video_helper_thread(), and video_write_overlay_callback().
uint32_t switch_channel_test_flag_partner | ( | switch_channel_t * | channel, |
switch_channel_flag_t | flag | ||
) |
Definition at line 1708 of file switch_channel.c.
References switch_assert, switch_channel_get_partner_uuid(), switch_channel_test_flag(), switch_core_session_get_channel(), switch_core_session_locate, and switch_core_session_rwunlock().
Referenced by switch_core_media_receive_message().
int switch_channel_test_private_flag | ( | switch_channel_t * | channel, |
uint32_t | flags | ||
) |
int switch_channel_test_ready | ( | switch_channel_t * | channel, |
switch_bool_t | check_ready, | ||
switch_bool_t | check_media | ||
) |
Determine if a channel is ready for io.
channel | channel to test |
Definition at line 2270 of file switch_channel.c.
References CF_ANSWERED, CF_EARLY_MEDIA, CF_NOT_READY, CF_PROXY_MODE, CF_TRANSFER, CS_HANGUP, CS_RESET, CS_ROUTING, hangup_cause, session, state, switch_assert, switch_channel_check_signal(), switch_channel_state_change_pending(), switch_channel_test_flag(), switch_core_session_get_read_codec(), switch_core_session_get_write_codec(), and SWITCH_TRUE.
switch_status_t switch_channel_transfer_variable_prefix | ( | switch_channel_t * | orig_channel, |
switch_channel_t * | new_channel, | ||
const char * | prefix | ||
) |
Definition at line 1404 of file switch_channel.c.
References switch_event_header::name, switch_event_header::next, switch_channel_set_variable, switch_channel_variable_first(), switch_channel_variable_last(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_event_header::value, and zstr.
Referenced by switch_ivr_transfer_recordings().
switch_status_t switch_channel_try_dtmf_lock | ( | switch_channel_t * | channel | ) |
Definition at line 482 of file switch_channel.c.
References dtmf_mutex, and switch_mutex_trylock().
void switch_channel_uninit | ( | switch_channel_t * | channel | ) |
Uninitalize a channel.
channel | the channel to uninit |
Definition at line 740 of file switch_channel.c.
References api_list, app_flag_hash, app_list, dtmf_log_queue, log_tags, private_hash, profile_mutex, switch_channel_flush_dtmf(), switch_core_hash_destroy(), switch_event_destroy(), switch_mutex_lock(), switch_mutex_unlock(), switch_queue_trypop(), switch_safe_free, SWITCH_STATUS_SUCCESS, var_list, and variables.
Referenced by switch_core_session_perform_destroy().
|
inlinestatic |
Definition at line 350 of file switch_channel.h.
References switch_channel_get_variable_dup(), SWITCH_FALSE, and switch_false().
Referenced by switch_core_media_build_crypto().
|
inlinestatic |
Definition at line 354 of file switch_channel.h.
References switch_channel_caller_extension_masquerade(), switch_channel_flip_cid(), switch_channel_get_caller_extension(), switch_channel_get_variable_dup(), switch_channel_invert_cid(), switch_channel_restart(), switch_channel_set_caller_extension(), switch_channel_set_flag_value(), switch_channel_sort_cid(), switch_channel_test_flag(), switch_channel_variable_first(), switch_channel_variable_last(), SWITCH_DECLARE, SWITCH_FALSE, switch_true(), and value.
Referenced by check_dtls_reinvite(), gen_ice(), generate_m(), CoreSession::getDigits(), recover_callback(), switch_core_media_activate_rtp(), switch_core_media_build_crypto(), switch_core_media_gen_local_sdp(), switch_core_media_negotiate_sdp(), switch_core_media_set_r_sdp_codec_string(), switch_core_media_set_smode(), switch_core_session_apply_crypto(), switch_core_session_passthru(), switch_determine_ice_type(), switch_ivr_originate(), switch_ivr_play_and_detect_speech(), switch_ivr_session_echo(), switch_jb_set_session(), switch_rtp_dequeue_dtmf(), and text_helper_thread().
switch_event_header_t* switch_channel_variable_first | ( | switch_channel_t * | channel | ) |
Start iterating over the entries in the channel variable list.
channel | the channel to iterate the variables for |
Definition at line 1078 of file switch_channel.c.
References switch_event::headers, profile_mutex, switch_assert, switch_mutex_lock(), switch_mutex_unlock(), variables, and vi.
Referenced by switch_channel_build_param_string(), switch_channel_transfer_variable_prefix(), switch_channel_var_true(), switch_ivr_originate(), switch_ivr_set_json_chan_vars(), and switch_ivr_set_xml_chan_vars().
void switch_channel_variable_last | ( | switch_channel_t * | channel | ) |
Stop iterating over channel variables.
Definition at line 1067 of file switch_channel.c.
References profile_mutex, switch_assert, switch_mutex_unlock(), and vi.
Referenced by switch_channel_build_param_string(), switch_channel_transfer_variable_prefix(), switch_channel_var_true(), switch_ivr_originate(), switch_ivr_set_json_chan_vars(), and switch_ivr_set_xml_chan_vars().
switch_status_t switch_channel_wait_for_app_flag | ( | switch_channel_t * | channel, |
uint32_t | app_flag, | ||
const char * | key, | ||
switch_bool_t | pres, | ||
uint32_t | to | ||
) |
Definition at line 1818 of file switch_channel.c.
References switch_channel_down, switch_channel_test_app_flag_key(), and switch_cond_next().
Referenced by switch_core_media_negotiate_sdp().
switch_status_t switch_channel_wait_for_flag | ( | switch_channel_t * | channel, |
switch_channel_flag_t | want_flag, | ||
switch_bool_t | pres, | ||
uint32_t | to, | ||
switch_channel_t * | super_channel | ||
) |
Definition at line 1780 of file switch_channel.c.
References switch_channel_down, switch_channel_ready, switch_channel_test_flag(), switch_cond_next(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and SWITCH_STATUS_TIMEOUT.
Referenced by audio_bridge_thread(), switch_core_media_toggle_hold(), switch_core_session_run(), switch_core_standard_on_reset(), switch_ivr_3p_media(), switch_ivr_3p_nomedia(), switch_ivr_bridge_bleg(), switch_ivr_media(), switch_ivr_multi_threaded_bridge(), switch_ivr_nomedia(), switch_ivr_parse_event(), and switch_ivr_unhold().
void switch_channel_wait_for_state | ( | switch_channel_t * | channel, |
switch_channel_t * | other_channel, | ||
switch_channel_state_t | want_state | ||
) |
Definition at line 1744 of file switch_channel.c.
References CS_HANGUP, running_state, state, switch_assert, switch_channel_down, switch_channel_down_nosig, and switch_cond_next().
Referenced by CoreSession::CoreSession(), switch_ivr_3p_nomedia(), switch_ivr_multi_threaded_bridge(), and switch_ivr_nomedia().
void switch_channel_wait_for_state_timeout | ( | switch_channel_t * | other_channel, |
switch_channel_state_t | want_state, | ||
uint32_t | timeout | ||
) |
Definition at line 1759 of file switch_channel.c.
References count, CS_HANGUP, running_state, state, switch_channel_check_signal(), switch_cond_next(), and SWITCH_TRUE.
Referenced by switch_channel_restart(), switch_core_standard_on_reset(), and switch_ivr_originate().