FreeSWITCH API Documentation
1.7.0
|
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_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 426 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(), and switch_ivr_process_indications().
#define switch_channel_audio_sync | ( | _c | ) | switch_channel_perform_audio_sync(_c, __FILE__, __SWITCH_FUNC__, __LINE__) |
Definition at line 626 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_ivr_multi_threaded_bridge(), switch_ivr_originate(), switch_ivr_parse_event(), switch_ivr_play_file(), 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 639 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_flag(), switch_channel_wait_for_state(), switch_core_media_activate_rtp(), switch_core_media_patch_sdp(), switch_core_media_receive_message(), 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_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_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 613 of file switch_channel.h.
Referenced by exec_app(), play_and_collect(), record_callback(), switch_channel_get_hold_music(), switch_core_session_exec(), switch_core_standard_on_routing(), switch_ivr_phrase_macro_event(), and switch_ivr_record_file().
#define switch_channel_export_variable | ( | _channel, | |
_varname, | |||
_value, | |||
_ev | |||
) | switch_channel_export_variable_var_check(_channel, _varname, _value, _ev, SWITCH_TRUE) |
Definition at line 300 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 314 of file switch_channel.h.
Referenced by audio_bridge_on_exchange_media(), audio_bridge_thread(), check_channel_status(), check_ice(), check_jb(), fs_channel_get_variable(), fs_switch_channel_get_variable(), fs_switch_ivr_originate(), CoreSession::getVariable(), handle_ice(), hanguphook(), inherit_codec(), limit_state_handler(), monitor_callback(), play_and_collect(), play_and_detect_input_callback(), record_callback(), recover_callback(), rtp_common_read(), 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_bug_transfer_recordings(), 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_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_var_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_originate(), switch_ivr_find_bridged_uuid(), switch_ivr_intercept_session(), switch_ivr_media(), switch_ivr_multi_threaded_bridge(), switch_ivr_nomedia(), switch_ivr_originate(), switch_ivr_park(), switch_ivr_phrase_macro_event(), switch_ivr_play_and_detect_speech(), switch_ivr_play_file(), switch_ivr_record_file(), switch_ivr_record_session(), switch_ivr_say(), switch_ivr_say_string(), switch_ivr_session_echo(), 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_play_and_get_digits(), switch_process_import(), switch_rtp_add_crypto_key(), switch_rtp_create(), switch_rtp_enable_vad(), switch_rtp_set_flag(), switch_rtp_set_flags(), switch_rtp_set_local_address(), SWITCH_STANDARD_SCHED_FUNC(), uuid_bridge_on_soft_execute(), and video_helper_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 548 of file switch_channel.h.
Referenced by abort_call(), audio_bridge_on_exchange_media(), audio_bridge_thread(), check_channel_status(), check_per_channel_timeouts(), 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_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_var_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(), switch_ivr_record_session(), switch_ivr_session_transfer(), switch_ivr_signal_bridge(), switch_ivr_wait_for_answer(), SWITCH_STANDARD_SCHED_FUNC(), 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 615 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 433 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 440 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 475 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 478 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_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(), 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 audio_bridge_thread(), switch_channel_perform_audio_sync(), switch_channel_perform_video_sync(), switch_core_media_check_dtls(), switch_core_session_execute_application_get_flags(), switch_ivr_displace_session(), switch_ivr_eavesdrop_session(), switch_ivr_inband_dtmf_generate_session(), switch_ivr_parse_all_events(), switch_ivr_record_session(), switch_ivr_uuid_bridge(), 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 617 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 468 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(), switch_ivr_record_session(), 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 184 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_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_detect_speech(), switch_ivr_play_file(), switch_ivr_record_file(), 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(), 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 450 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 451 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 638 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 655 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 375 of file switch_channel.h.
#define switch_channel_set_flag | ( | _c, | |
_f | |||
) | switch_channel_set_flag_value(_c, _f, 1) |
Definition at line 370 of file switch_channel.h.
Referenced by add_uuid(), audio_bridge_thread(), check_channel_status(), check_ice(), check_jb(), collect_thread_run(), enterprise_originate_ringback_thread(), process_device_hup(), recover_callback(), signal_bridge_on_hangup(), switch_channel_check_zrtp(), 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_codec_control(), switch_core_media_find_zrtp_hash(), 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_receive_message(), switch_core_media_recover_session(), 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_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_standard_on_execute(), switch_ivr_3p_media(), switch_ivr_3p_nomedia(), switch_ivr_activate_unicast(), switch_ivr_broadcast(), switch_ivr_enterprise_originate(), switch_ivr_hold(), switch_ivr_intercept_session(), switch_ivr_media(), switch_ivr_multi_threaded_bridge(), switch_ivr_nomedia(), switch_ivr_originate(), switch_ivr_park(), switch_ivr_park_session(), switch_ivr_parse_event(), switch_ivr_parse_signal_data(), switch_ivr_record_file(), switch_ivr_session_echo(), switch_ivr_session_transfer(), switch_ivr_signal_bridge(), switch_ivr_sleep(), switch_ivr_uuid_bridge(), switch_jb_get_packet(), switch_media_handle_create(), 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 107 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 115 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 288 of file switch_channel.h.
Referenced by _switch_core_media_pass_zrtp_hash2(), audio_bridge_on_exchange_media(), audio_bridge_thread(), check_channel_status(), check_ice(), check_jb(), check_presence(), 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_check_zrtp(), 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_bug_transfer_recordings(), switch_core_media_choose_port(), switch_core_media_find_zrtp_hash(), 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_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_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_enterprise_originate(), switch_ivr_intercept_session(), switch_ivr_menu_execute(), switch_ivr_multi_threaded_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(), switch_ivr_record_session(), 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(), switch_rtp_create(), 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 289 of file switch_channel.h.
Referenced by switch_channel_perform_hangup().
#define switch_channel_set_variable_safe | ( | _channel, | |
_var, | |||
_val | |||
) | switch_channel_set_variable_var_check(_channel, _var, _val, SWITCH_FALSE) |
Definition at line 287 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 623 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 640 of file switch_channel.h.
#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(), and switch_ivr_eavesdrop_session().
#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(), check_per_channel_timeouts(), collect_thread_run(), early_thread_run(), recording_thread(), 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_var_ans(), switch_core_session_message_send(), switch_core_session_perform_receive_message(), switch_core_session_receive_event(), switch_ivr_eavesdrop_session(), switch_ivr_originate(), switch_ivr_signal_bridge(), switch_ivr_wait_for_answer(), 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 628 of file switch_channel.h.
Referenced by switch_core_media_set_video_file().
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 2889 of file switch_channel.c.
References 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 1447 of file switch_channel.c.
References 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_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_string_var_check_const(), 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 2985 of file switch_channel.c.
References switch_caller_application::application_data, switch_caller_application::application_name, switch_caller_profile::destination_number, switch_event_header::name, switch_event_header::next, switch_caller_application::next, switch_caller_profile::pool, 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, and switch_event_header::value.
Referenced by switch_ivr_originate().
const char* switch_channel_callstate2str | ( | switch_channel_callstate_t | callstate | ) |
Definition at line 302 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_originate(), switch_ivr_multi_threaded_bridge(), and switch_ivr_originate().
switch_call_cause_t switch_channel_cause_q850 | ( | switch_call_cause_t | cause | ) |
Definition at line 392 of file switch_channel.c.
References 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 2114 of file switch_channel.c.
References SWITCH_FALSE, and switch_ivr_parse_signal_data().
Referenced by switch_channel_test_ready(), and switch_channel_wait_for_state_timeout().
void switch_channel_check_zrtp | ( | switch_channel_t * | channel | ) |
Definition at line 3353 of file switch_channel.c.
References CF_ZRTP_HASH, CF_ZRTP_PASSTHRU, CF_ZRTP_PASSTHRU_REQ, switch_channel_clear_flag(), switch_channel_get_name(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_set_variable, switch_channel_test_flag(), switch_core_session_get_channel(), switch_core_session_get_partner, switch_core_session_rwunlock(), SWITCH_LOG_INFO, switch_log_printf(), and SWITCH_STATUS_SUCCESS.
Referenced by switch_channel_perform_mark_answered(), and switch_channel_perform_mark_pre_answered().
void switch_channel_clear_app_flag_key | ( | const char * | app, |
switch_channel_t * | channel, | ||
uint32_t | flags | ||
) |
Definition at line 1944 of file switch_channel.c.
References switch_assert, switch_core_hash_find(), switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_core_media_negotiate_sdp(), and switch_ivr_eavesdrop_update_display().
void switch_channel_clear_cap | ( | switch_channel_t * | channel, |
switch_channel_cap_t | cap | ||
) |
Definition at line 1714 of file switch_channel.c.
References 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 1995 of file switch_channel.c.
References CCS_ACTIVE, CCS_UNHELD, CF_ANSWERED, CF_BRIDGED, CF_DIALPLAN, CF_LEG_HOLDING, CF_ORIGINATOR, CF_OUTBOUND, CF_PROXY_MODE, CF_RECOVERED, CF_RECOVERING, CF_VIDEO, CF_VIDEO_PASSIVE, CF_VIDEO_READY, 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(), and switch_time_now().
Referenced by audio_bridge_on_exchange_media(), audio_bridge_thread(), check_channel_status(), check_per_channel_timeouts(), switch_channel_check_zrtp(), 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_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_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_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(), 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_jb_get_packet(), switch_rtp_break(), 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 1611 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 2069 of file switch_channel.c.
References CF_OUTBOUND, 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(), and switch_ivr_record_file().
void switch_channel_clear_private_flag | ( | switch_channel_t * | channel, |
uint32_t | flags | ||
) |
Definition at line 1906 of file switch_channel.c.
References 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 1986 of file switch_channel.c.
References 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 2932 of file switch_channel.c.
References SSH_FLAG_STICKY, 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 1345 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(), 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 427 of file switch_channel.c.
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_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(), switch_rtp_add_crypto_key(), switch_rtp_create(), and switch_rtp_zerocopy_read_frame().
switch_status_t switch_channel_dtmf_lock | ( | switch_channel_t * | channel | ) |
Definition at line 464 of file switch_channel.c.
References switch_mutex_lock().
Referenced by switch_core_session_read_frame().
switch_status_t switch_channel_dtmf_unlock | ( | switch_channel_t * | channel | ) |
Definition at line 474 of file switch_channel.c.
References 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_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(), 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 3839 of file switch_channel.c.
References switch_stream_handle::data, end_of_p, in, memset(), resize, SCF_API_EXPANSION, 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 1319 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 1271 of file switch_channel.c.
References 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 3082 of file switch_channel.c.
References CF_BRIDGED, 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, and switch_str_nil.
Referenced by switch_channel_sort_cid(), 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 3184 of file switch_channel.c.
References switch_assert, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_channel_caller_extension_masquerade(), 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 2760 of file switch_channel.c.
References switch_caller_profile::hunt_caller_profile, 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 296 of file switch_channel.c.
Referenced by switch_core_session_read_frame(), and switch_ivr_hold_toggle_uuid().
char* switch_channel_get_cap_string | ( | switch_channel_t * | channel | ) |
Definition at line 1774 of file switch_channel.c.
References CC_FLAG_MAX, switch_stream_handle::data, end_of, 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 | ) |
Definition at line 231 of file switch_channel.c.
switch_call_cause_t switch_channel_get_cause_q850 | ( | switch_channel_t * | channel | ) |
Definition at line 401 of file switch_channel.c.
References switch_channel_cause_q850().
Referenced by switch_core_session_hangup_state().
char* switch_channel_get_flag_string | ( | switch_channel_t * | channel | ) |
Definition at line 1748 of file switch_channel.c.
References CF_FLAG_MAX, switch_stream_handle::data, end_of, 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 874 of file switch_channel.c.
References 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 895 of file switch_channel.c.
References 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().
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 1110 of file switch_channel.c.
References switch_assert, and zstr.
Referenced by 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_nack(), inband_dtmf_generate_callback(), inherit_codec(), ip_choose_family(), meta_on_dtmf(), play_and_detect_input_callback(), read_rtp_packet(), recover_callback(), rtp_common_write(), setup_ringback(), signal_bridge_on_hibernate(), switch_channel_check_device_state(), switch_channel_check_zrtp(), 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_core_media_activate_rtp(), switch_core_media_bug_add(), switch_core_media_bug_close(), switch_core_media_bug_read(), switch_core_media_bug_remove_all_function(), 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_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_detect_speech(), switch_ivr_play_file(), switch_ivr_record_file(), switch_ivr_session_transfer(), switch_ivr_soft_hold(), switch_ivr_tone_detect_session(), switch_ivr_uuid_bridge(), 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 2868 of file switch_channel.c.
References switch_caller_profile::originatee_caller_profile, 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 2822 of file switch_channel.c.
References switch_caller_profile::origination_caller_profile, 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 2853 of file switch_channel.c.
References switch_caller_profile::originator_caller_profile, 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 1062 of file switch_channel.c.
References 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_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(), switch_ivr_record_session_mask(), 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(), switch_rtp_create(), switch_rtp_write_frame(), switch_rtp_zerocopy_read_frame(), and tone_on_dtmf().
void* switch_channel_get_private_partner | ( | switch_channel_t * | channel, |
const char * | key | ||
) |
Definition at line 1070 of file switch_channel.c.
References 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 2095 of file switch_channel.c.
References 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 926 of file switch_channel.c.
References ep, switch_event::headers, switch_event_header::name, switch_event_header::next, switch_event::next, 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 2085 of file switch_channel.c.
References 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 2915 of file switch_channel.c.
References 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 2882 of file switch_channel.c.
References 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(), and switch_rtp_add_crypto_key().
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 953 of file switch_channel.c.
References ep, switch_event::next, switch_caller_profile::originatee_caller_profile, switch_caller_profile::originator_caller_profile, 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(), and zstr.
Referenced by audio_bridge_thread(), check_jb_sync(), switch_channel_event_set_basic_data(), switch_channel_expand_variables_check(), switch_channel_queue_dtmf(), switch_channel_set_presence_data_vals(), switch_core_media_gen_local_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 1005 of file switch_channel.c.
References 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_gen_local_sdp().
switch_status_t switch_channel_get_variables | ( | switch_channel_t * | channel, |
switch_event_t ** | event | ||
) |
Definition at line 4285 of file switch_channel.c.
References SWITCH_EVENT_CHANNEL_DATA, switch_event_create, switch_event_dup(), switch_mutex_lock(), and switch_mutex_unlock().
Referenced by api_hook(), switch_channel_api_on(), switch_channel_del_variable_prefix(), switch_channel_execute_on(), and switch_ivr_transfer_variable().
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(), 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 747 of file switch_channel.c.
References CS_NONE, 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 3052 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_ivr_uuid_bridge().
switch_call_direction_t switch_channel_logical_direction | ( | switch_channel_t * | channel | ) |
Definition at line 432 of file switch_channel.c.
void switch_channel_mark_hold | ( | switch_channel_t * | channel, |
switch_bool_t | on | ||
) |
Definition at line 841 of file switch_channel.c.
References CF_LEG_HOLDING, switch_channel_clear_flag(), switch_channel_event_set_data(), switch_channel_get_variable, switch_channel_set_flag, switch_channel_test_flag(), switch_core_media_bug_transfer_recordings(), switch_core_session_get_partner, switch_core_session_rwunlock(), SWITCH_EVENT_CHANNEL_HOLD, SWITCH_EVENT_CHANNEL_UNHOLD, switch_event_create, switch_event_fire, 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 4259 of file switch_channel.c.
References 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_answer | ( | switch_channel_t * | channel, |
const char * | file, | ||
const char * | func, | ||
int | line | ||
) |
Definition at line 3779 of file switch_channel.c.
References CF_ANSWERED, CF_EARLY_MEDIA, CF_PROXY_MODE, CS_HANGUP, switch_core_session_message::from, switch_core_session_message::message_id, 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 353 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, 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 3218 of file switch_channel.c.
References CF_BLOCK_STATE, CF_BRIDGE_ORIGINATOR, CF_BRIDGED, CF_HANGUP_HELD, CF_LEG_HOLDING, CS_HANGUP, OCF_HANGUP, 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 3672 of file switch_channel.c.
References CCS_ACTIVE, CF_ANSWERED, CF_EARLY_MEDIA, CF_PASSTHRU_PTIME_MISMATCH, CF_VIDEO_MIRROR_INPUT, CS_HANGUP, send_ind(), switch_assert, switch_channel_api_on(), SWITCH_CHANNEL_API_ON_ANSWER_VARIABLE, SWITCH_CHANNEL_API_ON_MEDIA_VARIABLE, switch_channel_check_zrtp(), 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_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, and switch_true().
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 3408 of file switch_channel.c.
References caller_profile, CCS_EARLY, CF_ANSWERED, CF_EARLY_MEDIA, CF_PASSTHRU_PTIME_MISMATCH, CF_VIDEO_MIRROR_INPUT, switch_channel_timetable::progress_media, send_ind(), switch_channel_api_on(), SWITCH_CHANNEL_API_ON_MEDIA_VARIABLE, SWITCH_CHANNEL_API_ON_PRE_ANSWER_VARIABLE, switch_channel_check_zrtp(), 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(), and switch_caller_profile::times.
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 3306 of file switch_channel.c.
References caller_profile, CCS_RINGING, CF_ANSWERED, CF_RING_READY, 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, and switch_caller_profile::times.
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 3483 of file switch_channel.c.
References CF_ANSWERED, CF_EARLY_MEDIA, CS_HANGUP, switch_core_session_message::from, switch_core_session_message::message_id, 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 758 of file switch_channel.c.
References CF_ANSWERED, CF_NO_PRESENCE, CF_SLA_INTERCEPT, 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 3518 of file switch_channel.c.
References CF_ANSWERED, CF_EARLY_MEDIA, CS_HANGUP, switch_core_session_message::from, switch_core_session_message::message_id, switch_core_session_message::numeric_arg, 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 270 of file switch_channel.c.
References CCS_HANGUP, 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 2216 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, 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_EVENT_CHANNEL_STATE, switch_event_create, switch_event_fire, SWITCH_LOG_DEBUG, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), 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 2269 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, 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 371 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, 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 1214 of file switch_channel.c.
References 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 2969 of file switch_channel.c.
References CS_EXECUTE, CS_RESET, switch_channel_set_state, and switch_channel_wait_for_state_timeout().
Referenced by switch_ivr_originate().
void switch_channel_set_app_flag_key | ( | const char * | app, |
switch_channel_t * | channel, | ||
uint32_t | flags | ||
) |
Definition at line 1920 of file switch_channel.c.
References 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_process_udptl(), and switch_ivr_eavesdrop_update_display().
void switch_channel_set_bridge_time | ( | switch_channel_t * | channel | ) |
Definition at line 3198 of file switch_channel.c.
References switch_micro_time_now(), switch_mutex_lock(), and switch_mutex_unlock().
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 3171 of file switch_channel.c.
References 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(), 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 2709 of file switch_channel.c.
References 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(), and switch_mutex_unlock().
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 1704 of file switch_channel.c.
References switch_assert, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_core_session_request_xml().
void switch_channel_set_direction | ( | switch_channel_t * | channel, |
switch_call_direction_t | direction | ||
) |
Definition at line 419 of file switch_channel.c.
References 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 1575 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.
void switch_channel_set_flag_recursive | ( | switch_channel_t * | channel, |
switch_channel_flag_t | flag | ||
) |
Definition at line 1879 of file switch_channel.c.
References CF_OUTBOUND, CF_RECOVERED, 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(), and switch_ivr_signal_bridge().
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 1800 of file switch_channel.c.
References 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, switch_hold_record_s::next, switch_hold_record_s::on, 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(), and switch_hold_record_s::uuid.
Referenced by switch_channel_perform_mark_ring_ready_value(), and switch_core_session_request_xml().
void switch_channel_set_hangup_time | ( | switch_channel_t * | channel | ) |
Definition at line 3208 of file switch_channel.c.
References switch_micro_time_now(), switch_mutex_lock(), and switch_mutex_unlock().
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 2791 of file switch_channel.c.
References switch_assert, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_core_session_execute_exten().
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 1088 of file switch_channel.c.
References 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 2837 of file switch_channel.c.
References LP_ORIGINATEE, switch_assert, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_core_session_request_xml(), 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 2807 of file switch_channel.c.
References 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 2772 of file switch_channel.c.
References LP_ORIGINATOR, switch_assert, switch_core_alloc, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_core_session_outgoing_channel(), switch_core_session_request_xml(), 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 1387 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 1055 of file switch_channel.c.
References 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(), switch_core_media_copy_t38_options(), switch_core_media_process_udptl(), switch_ivr_activate_unicast(), switch_ivr_bind_dtmf_meta_session(), switch_ivr_block_dtmf_session(), 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(), 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 1898 of file switch_channel.c.
References 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 1116 of file switch_channel.c.
References profile_node_s::next, SWITCH_BLANK_STRING, switch_channel_set_device_id(), switch_core_alloc, switch_core_strdup, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_SUCCESS, 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 908 of file switch_channel.c.
References switch_event::next, 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 1976 of file switch_channel.c.
References 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 1511 of file switch_channel.c.
References 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 1541 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 1480 of file switch_channel.c.
References switch_assert, switch_channel_set_variable, switch_event_del_header, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_FALSE, SWITCH_STATUS_MEMERR, switch_vasprintf(), and zstr.
Referenced by 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_parse_event(), switch_ivr_play_file(), switch_ivr_record_file(), switch_ivr_wait_for_silence(), switch_limit_incr(), and switch_rtp_sync_stats().
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 1416 of file switch_channel.c.
References 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(), 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 3137 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().
int switch_channel_state_change_pending | ( | switch_channel_t * | channel | ) |
Definition at line 2105 of file switch_channel.c.
References 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 2697 of file switch_channel.c.
References 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 333 of file switch_channel.c.
References switch_callstate_table::callstate, CALLSTATE_CHART, switch_device_state_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 1960 of file switch_channel.c.
References switch_assert, switch_core_hash_find(), switch_mutex_lock(), and switch_mutex_unlock().
Referenced by 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 1724 of file switch_channel.c.
References switch_assert.
Referenced by switch_channel_test_cap_partner(), switch_core_session_outgoing_channel(), and switch_core_session_send_dtmf().
uint32_t switch_channel_test_cap_partner | ( | switch_channel_t * | channel, |
switch_channel_cap_t | cap | ||
) |
Definition at line 1730 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 1562 of file switch_channel.c.
References switch_assert, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by _switch_core_media_pass_zrtp_hash2(), 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(), cleanup_proxy_mode_a(), cleanup_proxy_mode_b(), CoreSession::destroy(), 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(), recover_callback(), sb_on_dtmf(), send_display(), setup_ringback(), signal_bridge_on_hangup(), signal_bridge_on_hibernate(), switch_channel_check_device_state(), switch_channel_check_zrtp(), 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_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_negotiate_sdp(), switch_core_media_pass_zrtp_hash(), 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_video_file(), switch_core_media_start_udptl(), switch_core_media_toggle_hold(), switch_core_media_unlock_video_file(), switch_core_media_write_frame(), 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_var_ans(), switch_core_session_outgoing_channel(), switch_core_session_parse_crypto_prefs(), switch_core_session_perform_receive_message(), switch_core_session_private_event_count(), switch_core_session_read_frame(), switch_core_session_read_lock(), switch_core_session_read_video_frame(), switch_core_session_reporting_state(), switch_core_session_request_video_refresh(), switch_core_session_run(), switch_core_session_send_and_request_video_refresh(), switch_core_session_send_dtmf(), switch_core_session_start_video_thread(), switch_core_session_wait_for_video_input_params(), switch_core_session_write_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_broadcast(), switch_ivr_collect_digits_callback(), switch_ivr_collect_digits_count(), switch_ivr_deactivate_unicast(), switch_ivr_eavesdrop_session(), switch_ivr_enterprise_originate(), switch_ivr_gentones(), switch_ivr_intercept_session(), 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(), switch_ivr_record_session(), switch_ivr_session_echo(), 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_create(), uuid_bridge_on_reset(), uuid_bridge_on_soft_execute(), 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 1593 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 2120 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, 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 1366 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 469 of file switch_channel.c.
References switch_mutex_trylock().
void switch_channel_uninit | ( | switch_channel_t * | channel | ) |
Uninitalize a channel.
channel | the channel to uninit |
Definition at line 723 of file switch_channel.c.
References switch_channel_flush_dtmf(), switch_core_hash_destroy(), switch_event_destroy(), switch_mutex_lock(), switch_mutex_unlock(), switch_queue_trypop(), switch_safe_free, and SWITCH_STATUS_SUCCESS.
Referenced by switch_core_session_perform_destroy().
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 1040 of file switch_channel.c.
References switch_assert, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_channel_build_param_string(), switch_channel_transfer_variable_prefix(), 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 1029 of file switch_channel.c.
References switch_assert, and switch_mutex_unlock().
Referenced by switch_channel_build_param_string(), switch_channel_transfer_variable_prefix(), switch_ivr_originate(), switch_ivr_set_json_chan_vars(), and switch_ivr_set_xml_chan_vars().
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 1665 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_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 1629 of file switch_channel.c.
References CS_HANGUP, 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 1644 of file switch_channel.c.
References CS_HANGUP, switch_channel_check_signal(), switch_cond_next(), and SWITCH_TRUE.
Referenced by switch_channel_restart(), switch_core_standard_on_reset(), and switch_ivr_originate().