RTS API Documentation
1.10.11
|
Go to the source code of this file.
Data Structures | |
struct | switch_cause_table |
struct | switch_device_state_binding_s |
struct | switch_channel |
struct | switch_callstate_table |
struct | switch_device_state_table |
Macros | |
#define | resize(l) |
Typedefs | |
typedef struct switch_device_state_binding_s | switch_device_state_binding_t |
Enumerations | |
enum | opaque_channel_flag_t { OCF_HANGUP = (1 << 0) } |
enum | switch_originator_type_t { LP_NEITHER, LP_ORIGINATOR, LP_ORIGINATEE } |
Variables | |
struct { | |
switch_memory_pool_t * pool | |
switch_hash_t * device_hash | |
switch_mutex_t * device_mutex | |
switch_device_state_binding_t * device_bindings | |
} | globals |
static struct switch_cause_table | CAUSE_CHART [] |
static struct switch_callstate_table | CALLSTATE_CHART [] |
static struct switch_device_state_table | DEVICE_STATE_CHART [] |
static const char * | state_names [] |
#define resize | ( | l | ) |
Definition at line 3976 of file switch_channel.c.
Referenced by switch_channel_expand_variables_check().
typedef struct switch_device_state_binding_s switch_device_state_binding_t |
Enumerator | |
---|---|
OCF_HANGUP |
Definition at line 142 of file switch_channel.c.
Enumerator | |
---|---|
LP_NEITHER | |
LP_ORIGINATOR | |
LP_ORIGINATEE |
Definition at line 146 of file switch_channel.c.
|
static |
Definition at line 5407 of file switch_channel.c.
References device_uuid_node_s::callstate, switch_channel::callstate, CF_DEVICE_LEG, switch_channel::device_node, device_uuid_node_s::direction, switch_channel::logical_direction, device_uuid_node_s::next, device_uuid_node_s::parent, switch_device_record_s::pool, switch_device_record_s::refs, switch_channel::session, switch_assert, SWITCH_CALL_DIRECTION_INBOUND, SWITCH_CALL_DIRECTION_OUTBOUND, switch_channel_set_flag, switch_core_alloc, switch_core_session_get_uuid(), switch_core_strdup, device_uuid_node_s::uuid, switch_device_record_s::uuid, switch_device_record_s::uuid_list, and switch_device_record_s::uuid_tail.
Referenced by switch_channel_set_device_id().
|
inlinestatic |
Definition at line 2340 of file switch_channel.c.
References mutex, switch_channel::session, switch_cond_next(), switch_core_session_get_mutex(), switch_mutex_trylock(), switch_mutex_unlock(), SWITCH_STATUS_SUCCESS, and switch_channel::thread_mutex.
Referenced by switch_channel_perform_set_running_state(), and switch_channel_perform_set_state().
|
static |
Definition at line 5434 of file switch_channel.c.
References switch_device_record_s::device_id, switch_device_record_s::mutex, pool, switch_device_record_s::pool, switch_assert, switch_core_alloc, switch_core_new_memory_pool, switch_core_strdup, switch_mutex_init(), SWITCH_MUTEX_NESTED, and SWITCH_STATUS_SUCCESS.
Referenced by switch_channel_set_device_id().
|
static |
Definition at line 3669 of file switch_channel.c.
References switch_stream_handle::data, switch_channel::name, switch_channel::session, switch_api_execute(), SWITCH_CHANNEL_CHANNEL_LOG, switch_channel_expand_variables, switch_core_session_strdup, SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_STANDARD_STREAM, switch_str_nil, and zstr.
Referenced by switch_channel_api_on().
|
static |
Definition at line 5031 of file switch_channel.c.
References switch_device_stats_s::active, switch_device_stats_s::active_in, switch_device_stats_s::active_out, device_uuid_node_s::callstate, CCS_DOWN, CCS_EARLY, CCS_HANGUP, CCS_HELD, CCS_RING_WAIT, CCS_RINGING, CCS_UNHELD, device_uuid_node_s::direction, switch_device_stats_s::early, switch_device_stats_s::early_in, switch_device_stats_s::early_out, switch_device_stats_s::held, switch_device_stats_s::held_in, switch_device_stats_s::held_out, switch_device_stats_s::hup, switch_device_stats_s::hup_in, switch_device_stats_s::hup_out, device_uuid_node_s::hup_profile, memset(), switch_device_record_s::mutex, device_uuid_node_s::next, switch_device_stats_s::offhook, switch_device_stats_s::offhook_in, switch_device_stats_s::offhook_out, switch_device_stats_s::ring_wait, switch_device_stats_s::ringing, switch_device_stats_s::ringing_in, switch_device_stats_s::ringing_out, switch_device_record_s::stats, SWITCH_CALL_DIRECTION_INBOUND, switch_mutex_lock(), switch_mutex_unlock(), switch_device_stats_s::total, switch_device_stats_s::total_in, switch_device_stats_s::total_out, switch_device_stats_s::unheld, switch_device_stats_s::unheld_in, switch_device_stats_s::unheld_out, and switch_device_record_s::uuid_list.
Referenced by process_device_hup(), and switch_channel_check_device_state().
|
static |
Definition at line 5180 of file switch_channel.c.
References switch_channel::caller_profile, CF_FINAL_DEVICE_LEG, switch_device_record_s::device_id, switch_channel::device_node, device_uuid_node_s::event, fetch_device_stats(), globals, device_uuid_node_s::hold_record, switch_channel::hold_record, device_uuid_node_s::hup_profile, switch_hold_record_s::next, switch_hold_record_s::off, switch_device_stats_s::offhook, switch_hold_record_s::on, device_uuid_node_s::parent, switch_device_record_s::pool, switch_device_record_s::refs, switch_channel::session, switch_device_record_s::stats, switch_caller_profile_dup(), SWITCH_CHANNEL_CHANNEL_LOG, switch_channel_event_set_extended_data(), switch_channel_set_flag, switch_core_alloc, switch_core_hash_delete(), switch_core_strdup, SWITCH_EVENT_CALL_DETAIL, switch_event_create, switch_ivr_generate_xml_cdr(), SWITCH_LOG_DEBUG, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_SUCCESS, switch_hold_record_s::uuid, and device_uuid_node_s::xml_cdr.
Referenced by switch_channel_process_device_hangup().
|
static |
Definition at line 3458 of file switch_channel.c.
References switch_core_session_message::from, switch_core_session_message::message_id, switch_channel::name, switch_channel::session, and switch_core_session_perform_receive_message().
Referenced by switch_channel_perform_acknowledge_call(), switch_channel_perform_mark_answered(), switch_channel_perform_mark_pre_answered(), and switch_channel_perform_mark_ring_ready_value().
switch_status_t switch_channel_alloc | ( | switch_channel_t ** | channel, |
switch_call_direction_t | direction, | ||
switch_memory_pool_t * | pool | ||
) |
Definition at line 450 of file switch_channel.c.
References switch_assert, SWITCH_CALL_DIRECTION_OUTBOUND, SWITCH_CAUSE_NONE, switch_channel_direction(), switch_channel_set_variable, switch_core_alloc, switch_core_hash_init, SWITCH_DTMF_LOG_LEN, SWITCH_EVENT_CHANNEL_DATA, switch_event_create_plain(), switch_mutex_init(), SWITCH_MUTEX_NESTED, switch_queue_create(), SWITCH_STATUS_MEMERR, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_channel_api_on | ( | switch_channel_t * | channel, |
const char * | variable_prefix | ||
) |
Definition at line 3701 of file switch_channel.c.
References switch_event_header::array, do_api_on(), switch_event::headers, switch_event_header::idx, switch_event_header::name, switch_event_header::next, switch_channel_get_variables(), switch_event_destroy(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_event_header::value.
Referenced by audio_bridge_on_exchange_media(), audio_bridge_thread(), check_channel_status(), record_callback(), send_record_stop_event(), switch_channel_perform_mark_answered(), switch_channel_perform_mark_pre_answered(), switch_channel_perform_mark_ring_ready_value(), switch_core_media_process_udptl(), switch_ivr_originate(), switch_ivr_record_file_event(), and tone_on_dtmf().
switch_status_t switch_channel_bind_device_state_handler | ( | switch_device_state_function_t | function, |
void * | user_data | ||
) |
Definition at line 5499 of file switch_channel.c.
References switch_device_state_binding_s::function, globals, switch_core_alloc, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_MEMERR, SWITCH_STATUS_SUCCESS, and switch_device_state_binding_s::user_data.
char* switch_channel_build_param_string | ( | switch_channel_t * | channel, |
switch_caller_profile_t * | caller_profile, | ||
const char * | prefix | ||
) |
Definition at line 4290 of file switch_channel.c.
References switch_caller_profile::ani, switch_caller_profile::aniii, switch_caller_profile::caller_id_name, switch_caller_profile::caller_id_number, switch_channel::caller_profile, switch_caller_profile::chan_name, switch_caller_profile::context, switch_stream_handle::data, switch_caller_profile::destination_number, switch_event_header::name, switch_caller_profile::network_addr, profile_node_s::next, switch_event_header::next, switch_caller_profile::rdnis, switch_caller_profile::soft, switch_caller_profile::source, switch_assert, switch_channel_get_caller_profile(), switch_channel_variable_first(), switch_channel_variable_last(), switch_safe_free, SWITCH_STANDARD_STREAM, switch_url_encode(), switch_caller_profile::transfer_source, switch_caller_profile::uuid, profile_node_s::val, switch_event_header::value, profile_node_s::var, switch_stream_handle::write_function, and zstr.
const char* switch_channel_cause2str | ( | switch_call_cause_t | cause | ) |
Definition at line 202 of file switch_channel.c.
References CAUSE_CHART, and switch_cause_table::name.
Referenced by switch_channel_event_set_basic_data(), switch_channel_handle_cause(), and switch_channel_perform_hangup().
|
static |
Definition at line 5236 of file switch_channel.c.
References switch_device_stats_s::active, switch_device_record_s::active_start, switch_device_record_s::active_stop, switch_device_record_s::call_start, CCS_UNHELD, CF_FINAL_DEVICE_LEG, switch_device_record_s::device_id, switch_channel::device_node, switch_device_stats_s::early, switch_device_stats_s::early_out, fetch_device_stats(), switch_device_state_binding_s::function, globals, switch_device_stats_s::held, switch_device_record_s::hold_start, switch_device_record_s::hold_stop, switch_device_stats_s::hup, switch_device_record_s::last_call_time, switch_device_record_s::last_state, switch_device_record_s::last_stats, switch_device_record_s::mutex, switch_device_state_binding_s::next, switch_device_stats_s::offhook, device_uuid_node_s::parent, switch_device_record_s::ring_start, switch_device_record_s::ring_stop, switch_device_stats_s::ring_wait, switch_device_stats_s::ringing, switch_device_stats_s::ringing_out, SDS_ACTIVE, SDS_ACTIVE_MULTI, SDS_DOWN, SDS_HANGUP, SDS_HELD, SDS_RINGING, SDS_UNHELD, switch_channel::session, switch_device_record_s::state, switch_device_record_s::stats, switch_channel_callstate2str(), SWITCH_CHANNEL_CHANNEL_LOG, switch_channel_device_state2str(), switch_channel_get_name(), switch_channel_test_flag(), switch_event_add_header(), switch_event_add_header_string(), switch_event_create, SWITCH_EVENT_DEVICE_STATE, switch_event_fire, SWITCH_LOG_DEBUG1, switch_log_printf(), switch_micro_time_now(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_SUCCESS, SWITCH_TIME_T_FMT, switch_device_stats_s::total, and switch_device_stats_s::unheld.
Referenced by switch_channel_perform_set_callstate(), switch_channel_process_device_hangup(), and switch_channel_set_device_id().
void switch_channel_clear_device_record | ( | switch_channel_t * | channel | ) |
Definition at line 5115 of file switch_channel.c.
References CF_FINAL_DEVICE_LEG, switch_device_record_s::device_id, switch_channel::device_node, device_uuid_node_s::event, globals, device_uuid_node_s::hup_profile, switch_device_record_s::mutex, device_uuid_node_s::next, device_uuid_node_s::parent, pool, switch_device_record_s::pool, switch_device_record_s::refs, switch_caller_profile_event_set_data(), SWITCH_CHANNEL_CHANNEL_LOG, switch_channel_test_flag(), switch_core_destroy_memory_pool, switch_event_add_header_string(), SWITCH_EVENT_CALL_DETAIL, switch_event_create, switch_event_destroy(), switch_event_fire, SWITCH_LOG_DEBUG, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), switch_snprintf(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_SUCCESS, switch_xml_free(), switch_yield, switch_device_record_s::uuid, switch_device_record_s::uuid_list, and device_uuid_node_s::xml_cdr.
Referenced by switch_core_session_destroy_state().
switch_status_t switch_channel_dequeue_dtmf | ( | switch_channel_t * | channel, |
switch_dtmf_t * | dtmf | ||
) |
Definition at line 640 of file switch_channel.c.
References CF_DIVERT_EVENTS, switch_dtmf_t::digit, DTMF_FLAG_SENSITIVE, switch_channel::dtmf_log_queue, switch_channel::dtmf_mutex, switch_channel::dtmf_queue, switch_dtmf_t::duration, switch_channel::session, switch_dtmf_t::source, SWITCH_CHANNEL_CHANNEL_LOG, switch_channel_event_set_data(), switch_channel_get_name(), switch_channel_test_flag(), switch_core_default_dtmf_duration(), switch_core_max_dtmf_duration(), switch_core_min_dtmf_duration(), switch_core_session_queue_event(), SWITCH_DTMF_APP, SWITCH_DTMF_ENDPOINT, SWITCH_DTMF_INBAND_AUDIO, SWITCH_DTMF_RTP, SWITCH_DTMF_UNKNOWN, switch_event_add_header(), switch_event_create, SWITCH_EVENT_DTMF, switch_event_fire, switch_log_printf(), SWITCH_LOG_WARNING, switch_mutex_lock(), switch_mutex_unlock(), switch_queue_trypop(), switch_queue_trypush(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_test_flag.
Referenced by switch_channel_dequeue_dtmf_string().
switch_size_t switch_channel_dequeue_dtmf_string | ( | switch_channel_t * | channel, |
char * | dtmf_str, | ||
switch_size_t | len | ||
) |
Definition at line 711 of file switch_channel.c.
References switch_dtmf_t::digit, memset(), switch_channel_dequeue_dtmf(), and SWITCH_STATUS_SUCCESS.
const char* switch_channel_device_state2str | ( | switch_device_state_t | device_state | ) |
Definition at line 330 of file switch_channel.c.
References DEVICE_STATE_CHART, and switch_device_state_table::name.
Referenced by switch_channel_check_device_state().
void switch_channel_event_set_basic_data | ( | switch_channel_t * | channel, |
switch_event_t * | event | ||
) |
Definition at line 2657 of file switch_channel.c.
References switch_codec_implementation::actual_samples_per_second, switch_codec_implementation::bits_per_second, switch_channel::caller_profile, switch_channel::callstate, CF_ANSWERED, CF_DIALPLAN, CF_EARLY_MEDIA, switch_channel::direction, switch_channel::hangup_cause, switch_codec_implementation::iananame, switch_channel::last_profile_type, LP_ORIGINATEE, LP_ORIGINATOR, switch_caller_profile::originatee_caller_profile, switch_caller_profile::originator_caller_profile, switch_channel::profile_mutex, switch_channel::running_state, switch_channel::session, switch_channel::state, SWITCH_CALL_DIRECTION_INBOUND, SWITCH_CALL_DIRECTION_OUTBOUND, switch_caller_profile_event_set_data(), switch_channel_callstate2str(), switch_channel_cause2str(), switch_channel_direction(), switch_channel_down_nosig, switch_channel_get_name(), switch_channel_get_variable_dup(), switch_channel_state_name(), switch_channel_test_flag(), switch_core_session_get_external_id(), switch_core_session_get_read_impl(), switch_core_session_get_uuid(), switch_core_session_get_write_impl(), switch_event_add_header(), switch_event_add_header_string(), switch_event_add_presence_data_cols(), SWITCH_FALSE, switch_mutex_lock(), switch_mutex_unlock(), switch_snprintf(), and SWITCH_STACK_BOTTOM.
Referenced by switch_channel_event_set_data().
void switch_channel_event_set_data | ( | switch_channel_t * | channel, |
switch_event_t * | event | ||
) |
Definition at line 2843 of file switch_channel.c.
References switch_channel::profile_mutex, switch_channel_event_set_basic_data(), switch_channel_event_set_extended_data(), switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_channel_dequeue_dtmf(), switch_channel_flip_cid(), switch_channel_mark_hold(), 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_presence(), switch_channel_perform_set_callstate(), and switch_channel_perform_set_running_state().
void switch_channel_event_set_extended_data | ( | switch_channel_t * | channel, |
switch_event_t * | event | ||
) |
Definition at line 2758 of file switch_channel.c.
References buf, CF_VERBOSE_EVENTS, switch_event::event_id, switch_event::headers, switch_event_header::name, switch_event_header::next, switch_event::next, switch_channel::profile_mutex, switch_channel::scope_variables, SCSC_VERBOSE_EVENTS, switch_assert, switch_channel_test_flag(), switch_core_session_ctl(), switch_event_add_header_string(), SWITCH_EVENT_API, SWITCH_EVENT_CALL_UPDATE, SWITCH_EVENT_CHANNEL_ANSWER, SWITCH_EVENT_CHANNEL_BRIDGE, SWITCH_EVENT_CHANNEL_CREATE, SWITCH_EVENT_CHANNEL_DATA, SWITCH_EVENT_CHANNEL_DESTROY, SWITCH_EVENT_CHANNEL_EXECUTE, SWITCH_EVENT_CHANNEL_EXECUTE_COMPLETE, SWITCH_EVENT_CHANNEL_HANGUP, SWITCH_EVENT_CHANNEL_HANGUP_COMPLETE, SWITCH_EVENT_CHANNEL_HOLD, SWITCH_EVENT_CHANNEL_ORIGINATE, SWITCH_EVENT_CHANNEL_PARK, SWITCH_EVENT_CHANNEL_PROGRESS, SWITCH_EVENT_CHANNEL_PROGRESS_MEDIA, SWITCH_EVENT_CHANNEL_UNBRIDGE, SWITCH_EVENT_CHANNEL_UNHOLD, SWITCH_EVENT_CHANNEL_UNPARK, SWITCH_EVENT_CHANNEL_UUID, SWITCH_EVENT_CUSTOM, switch_event_get_header, SWITCH_EVENT_MEDIA_BUG_START, SWITCH_EVENT_MEDIA_BUG_STOP, SWITCH_EVENT_PLAYBACK_START, SWITCH_EVENT_PLAYBACK_STOP, SWITCH_EVENT_RECORD_START, SWITCH_EVENT_RECORD_STOP, SWITCH_EVENT_REQUEST_PARAMS, SWITCH_EVENT_SESSION_HEARTBEAT, SWITCH_EVENT_TEXT, switch_mutex_lock(), switch_mutex_unlock(), switch_snprintf(), SWITCH_STACK_BOTTOM, switch_event_header::value, and switch_channel::variables.
Referenced by process_device_hup(), and switch_channel_event_set_data().
switch_status_t switch_channel_execute_on | ( | switch_channel_t * | channel, |
const char * | variable_prefix | ||
) |
Definition at line 3779 of file switch_channel.c.
References switch_event_header::array, switch_event::headers, switch_event_header::idx, switch_event_header::name, switch_event_header::next, switch_channel_execute_on_value(), switch_channel_get_variables(), switch_core_get_variables(), switch_event_destroy(), switch_event_merge(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_event_header::value.
Referenced by audio_bridge_on_exchange_media(), audio_bridge_thread(), check_channel_status(), check_timeout(), record_callback(), record_helper_post_process(), send_record_stop_event(), switch_channel_perform_mark_answered(), switch_channel_perform_mark_pre_answered(), switch_channel_perform_mark_ring_ready_value(), switch_core_media_activate_rtp(), switch_core_media_negotiate_sdp(), switch_core_media_process_t38_passthru(), switch_core_media_process_udptl(), switch_core_media_read_frame(), switch_core_media_set_codec(), switch_ivr_originate(), switch_ivr_record_file_event(), switch_ivr_session_transfer(), tone_detect_callback(), and tone_on_dtmf().
switch_status_t switch_channel_execute_on_value | ( | switch_channel_t * | channel, |
const char * | variable_value | ||
) |
Definition at line 3733 of file switch_channel.c.
References switch_channel::session, switch_assert, switch_channel_expand_variables, switch_core_session_execute_application, switch_core_session_execute_application_async(), switch_core_session_strdup, and zstr.
Referenced by record_callback(), record_helper_post_process(), send_record_stop_event(), switch_channel_execute_on(), and switch_ivr_record_file_event().
void switch_channel_flush_dtmf | ( | switch_channel_t * | channel | ) |
Definition at line 726 of file switch_channel.c.
References CS_HANGUP, switch_channel::dtmf_log_queue, switch_channel::dtmf_mutex, switch_channel::dtmf_queue, switch_channel::state, switch_mutex_lock(), switch_mutex_unlock(), switch_queue_trypop(), switch_queue_trypush(), and SWITCH_STATUS_SUCCESS.
Referenced by switch_channel_uninit().
switch_call_cause_t switch_channel_get_cause | ( | switch_channel_t * | channel | ) |
switch_device_record_t* switch_channel_get_device_record | ( | switch_channel_t * | channel | ) |
Definition at line 5481 of file switch_channel.c.
References switch_channel::device_node, switch_device_record_s::mutex, device_uuid_node_s::parent, and switch_mutex_lock().
switch_hold_record_t* switch_channel_get_hold_record | ( | switch_channel_t * | channel | ) |
Definition at line 197 of file switch_channel.c.
References switch_channel::hold_record.
Referenced by switch_ivr_generate_xml_cdr().
const char* switch_channel_get_partner_uuid | ( | switch_channel_t * | channel | ) |
Definition at line 4864 of file switch_channel.c.
References switch_channel_get_variable, SWITCH_ORIGINATE_SIGNAL_BOND_VARIABLE, and SWITCH_SIGNAL_BOND_VARIABLE.
Referenced by recover_callback(), rtp_common_read(), switch_channel_clear_flag_partner(), switch_channel_flip_cid(), switch_channel_get_private_partner(), switch_channel_get_variable_partner(), switch_channel_set_flag_partner(), switch_channel_set_flag_value(), switch_channel_set_variable_partner_var_check(), switch_channel_test_cap_partner(), switch_channel_test_flag_partner(), switch_core_media_receive_message(), switch_core_session_pass_indication(), switch_core_session_read_frame(), switch_core_session_write_frame(), switch_core_standard_on_reset(), switch_ivr_broadcast(), switch_ivr_find_bridged_uuid(), switch_ivr_hold(), switch_ivr_intercept_session(), switch_ivr_parse_event(), switch_ivr_soft_hold(), and switch_ivr_unhold().
const char* switch_channel_get_partner_uuid_copy | ( | switch_channel_t * | channel, |
char * | buf, | ||
switch_size_t | blen | ||
) |
Definition at line 4845 of file switch_channel.c.
References switch_channel::profile_mutex, switch_channel_get_variable_dup(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_ORIGINATE_SIGNAL_BOND_VARIABLE, SWITCH_SIGNAL_BOND_VARIABLE, and SWITCH_TRUE.
Referenced by switch_core_session_perform_get_partner().
switch_caller_extension_t* switch_channel_get_queued_extension | ( | switch_channel_t * | channel | ) |
Definition at line 3311 of file switch_channel.c.
References switch_channel::profile_mutex, switch_channel::queued_extension, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_core_standard_on_routing().
switch_channel_timetable_t* switch_channel_get_timetable | ( | switch_channel_t * | channel | ) |
Definition at line 419 of file switch_channel.c.
References switch_channel::caller_profile, switch_channel::profile_mutex, switch_mutex_lock(), switch_mutex_unlock(), and switch_caller_profile::times.
void switch_channel_global_init | ( | switch_memory_pool_t * | pool | ) |
Definition at line 5016 of file switch_channel.c.
References globals, memset(), pool, switch_core_hash_init, switch_mutex_init(), and SWITCH_MUTEX_NESTED.
Referenced by switch_core_init().
void switch_channel_global_uninit | ( | void | ) |
Definition at line 5025 of file switch_channel.c.
References globals, and switch_core_hash_destroy().
Referenced by switch_core_destroy().
void switch_channel_handle_cause | ( | switch_channel_t * | channel, |
switch_call_cause_t | cause | ||
) |
Definition at line 4875 of file switch_channel.c.
References CF_CONFIRM_BLIND_TRANSFER, CF_TRANSFER, CS_ROUTING, switch_channel::session, SWITCH_CAUSE_ATTENDED_TRANSFER, SWITCH_CAUSE_NO_ANSWER, SWITCH_CAUSE_NO_USER_RESPONSE, SWITCH_CAUSE_ORIGINATOR_CANCEL, switch_channel_cause2str(), switch_channel_get_state(), switch_channel_get_variable, switch_channel_hangup, SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), switch_channel_up_nosig, switch_core_session_strdup, switch_ivr_session_transfer(), SWITCH_LOG_DEBUG, switch_log_printf(), switch_separate_string(), switch_snprintf(), switch_split, and switch_true().
Referenced by signal_bridge_on_hangup(), switch_ivr_enterprise_orig_and_bridge(), switch_ivr_enterprise_originate(), switch_ivr_multi_threaded_bridge(), and switch_ivr_orig_and_bridge().
switch_size_t switch_channel_has_dtmf | ( | switch_channel_t * | channel | ) |
Definition at line 492 of file switch_channel.c.
References switch_channel::dtmf_mutex, switch_channel::dtmf_queue, switch_mutex_lock(), switch_mutex_unlock(), and switch_queue_size().
switch_channel_state_t switch_channel_name_state | ( | const char * | name | ) |
Definition at line 2328 of file switch_channel.c.
References CS_DESTROY, and state_names.
switch_status_t switch_channel_pass_sdp | ( | switch_channel_t * | from_channel, |
switch_channel_t * | to_channel, | ||
const char * | sdp | ||
) |
Definition at line 5550 of file switch_channel.c.
References switch_channel::session, SWITCH_B_SDP_VARIABLE, switch_channel_get_variable, switch_channel_set_variable, switch_core_media_process_sdp_filter(), switch_safe_free, and SWITCH_STATUS_FALSE.
Referenced by switch_core_session_outgoing_channel().
void switch_channel_process_device_hangup | ( | switch_channel_t * | channel | ) |
Definition at line 5172 of file switch_channel.c.
References switch_channel::callstate, process_device_hup(), and switch_channel_check_device_state().
Referenced by switch_core_session_hangup_state().
switch_status_t switch_channel_queue_dtmf | ( | switch_channel_t * | channel, |
const switch_dtmf_t * | dtmf | ||
) |
Definition at line 503 of file switch_channel.c.
References switch_dtmf_t::digit, DTMF_FLAG_SENSITIVE, switch_channel::dtmf_mutex, switch_channel::dtmf_queue, switch_dtmf_t::duration, is_dtmf, switch_channel::session, switch_assert, SWITCH_CHANNEL_CHANNEL_LOG, switch_channel_get_name(), switch_channel_get_variable_dup(), switch_core_default_dtmf_duration(), switch_core_max_dtmf_duration(), switch_core_media_break(), switch_core_min_dtmf_duration(), switch_core_session_recv_dtmf(), SWITCH_FALSE, SWITCH_LOG_DEBUG, SWITCH_LOG_INFO, switch_log_printf(), SWITCH_MEDIA_TYPE_AUDIO, switch_mutex_lock(), switch_mutex_unlock(), switch_queue_trypop(), switch_queue_trypush(), SWITCH_SENSITIVE_DTMF_VARIABLE, switch_set_flag, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_true(), and switch_zmalloc.
Referenced by switch_channel_queue_dtmf_string().
switch_status_t switch_channel_queue_dtmf_string | ( | switch_channel_t * | channel, |
const char * | dtmf_string | ||
) |
Definition at line 575 of file switch_channel.c.
References switch_dtmf_t::digit, DTMF_FLAG_SKIP_PROCESS, switch_dtmf_t::duration, switch_dtmf_t::flags, is_dtmf, switch_channel::session, string, SWITCH_CHANNEL_CHANNEL_LOG, switch_channel_get_name(), switch_channel_queue_dtmf(), switch_core_default_dtmf_duration(), switch_core_max_dtmf_duration(), switch_core_min_dtmf_duration(), switch_core_session_strdup, SWITCH_DTMF_APP, SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_LOG_WARNING, switch_separate_string(), SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, and zstr.
void switch_channel_release_device_record | ( | switch_device_record_t ** | drecp | ) |
Definition at line 5491 of file switch_channel.c.
References switch_mutex_unlock().
const char* switch_channel_set_device_id | ( | switch_channel_t * | channel, |
const char * | device_id | ||
) |
Definition at line 5453 of file switch_channel.c.
References add_uuid(), switch_channel::callstate, create_device_record(), switch_device_record_s::device_id, switch_channel::device_id, switch_channel::device_node, globals, switch_channel::session, SWITCH_CHANNEL_CHANNEL_LOG, switch_channel_check_device_state(), switch_core_hash_find(), switch_core_hash_insert, switch_core_session_strdup, SWITCH_LOG_DEBUG, switch_log_printf(), switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_channel_set_profile_var().
switch_status_t switch_channel_set_timestamps | ( | switch_channel_t * | channel | ) |
Definition at line 4488 of file switch_channel.c.
References switch_channel_timetable::answered, switch_app_log::app, switch_app_log::arg, bridge(), switch_channel_timetable::bridged, switch_caller_profile::caller_id_name, switch_caller_profile::caller_id_number, switch_channel::caller_profile, CF_TIMESTAMP_SET, switch_channel_timetable::created, switch_stream_handle::data, switch_dtmf_t::digit, switch_channel::dtmf_log_queue, end_of, fmt, switch_channel_timetable::hold_accum, switch_channel::hold_record, switch_channel_timetable::hungup, switch_channel_timetable::last_hold, memset(), switch_app_log::next, switch_hold_record_s::next, switch_hold_record_s::off, switch_hold_record_s::on, switch_channel_timetable::profile_created, switch_channel::profile_mutex, switch_channel_timetable::progress, switch_channel_timetable::progress_media, switch_channel_timetable::resurrected, switch_channel::session, switch_channel_get_variable, switch_channel_set_flag, switch_channel_set_variable, switch_channel_test_flag(), switch_core_session_get_app_log(), switch_core_session_sprintf(), SWITCH_DTMF_LOG_LEN, switch_mutex_lock(), switch_mutex_unlock(), switch_queue_trypop(), switch_regex_perform(), switch_regex_safe_free, switch_safe_free, switch_snprintf(), SWITCH_STANDARD_STREAM, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_str_nil, switch_strftime_nocheck(), switch_string_replace(), switch_time_exp_lt(), SWITCH_TIME_T_FMT, SWITCH_VA_NONE, TIME_T_FMT, switch_caller_profile::times, switch_channel::variables, switch_stream_handle::write_function, and zstr.
const char* switch_channel_state_name | ( | switch_channel_state_t | state | ) |
Definition at line 2322 of file switch_channel.c.
References state_names.
Referenced by switch_channel_event_set_basic_data().
void switch_channel_state_thread_lock | ( | switch_channel_t * | channel | ) |
Definition at line 2640 of file switch_channel.c.
References switch_mutex_lock(), and switch_channel::thread_mutex.
Referenced by switch_core_session_run().
switch_status_t switch_channel_state_thread_trylock | ( | switch_channel_t * | channel | ) |
Definition at line 2646 of file switch_channel.c.
References switch_mutex_trylock(), and switch_channel::thread_mutex.
Referenced by switch_core_session_wake_session_thread().
void switch_channel_state_thread_unlock | ( | switch_channel_t * | channel | ) |
Definition at line 2652 of file switch_channel.c.
References switch_mutex_unlock(), and switch_channel::thread_mutex.
Referenced by switch_core_session_run(), and switch_core_session_wake_session_thread().
switch_call_cause_t switch_channel_str2cause | ( | const char * | str | ) |
Definition at line 217 of file switch_channel.c.
References switch_cause_table::cause, CAUSE_CHART, switch_cause_table::name, SWITCH_CAUSE_NORMAL_CLEARING, and zstr.
void switch_channel_transfer_to_extension | ( | switch_channel_t * | channel, |
switch_caller_extension_t * | caller_extension | ||
) |
Definition at line 3323 of file switch_channel.c.
References CF_TRANSFER, CS_ROUTING, switch_channel::profile_mutex, switch_channel::queued_extension, switch_channel_set_flag, switch_channel_set_state, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_ivr_parse_event().
switch_status_t switch_channel_unbind_device_state_handler | ( | switch_device_state_function_t | function | ) |
Definition at line 5525 of file switch_channel.c.
References switch_device_state_binding_s::function, globals, switch_device_state_binding_s::next, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_event_base_add_header | ( | switch_event_t * | event, |
switch_stack_t | stack, | ||
const char * | header_name, | ||
char * | data | ||
) |
Referenced by switch_channel_add_variable_var_check().
|
static |
Definition at line 254 of file switch_channel.c.
Referenced by switch_channel_callstate2str(), and switch_channel_str2callstate().
|
static |
Definition at line 56 of file switch_channel.c.
Referenced by switch_channel_cause2str(), and switch_channel_str2cause().
switch_device_state_binding_t* device_bindings |
Definition at line 53 of file switch_channel.c.
switch_hash_t* device_hash |
Definition at line 51 of file switch_channel.c.
switch_mutex_t* device_mutex |
Definition at line 52 of file switch_channel.c.
|
static |
Definition at line 271 of file switch_channel.c.
Referenced by switch_channel_device_state2str().
struct { ... } globals |
switch_memory_pool_t* pool |
Definition at line 50 of file switch_channel.c.
Referenced by check_queue(), create_device_record(), destroy_thread(), dtls_bio_filter_free(), dtls_bio_filter_new(), main(), preprocess_stun_set(), record_helper_create(), record_helper_destroy(), switch_caller_profile_clone(), switch_caller_profile_dup(), switch_caller_profile_new(), switch_channel_clear_device_record(), switch_channel_global_init(), switch_console_save_history(), switch_core_asr_open(), switch_core_codec_destroy(), switch_core_codec_init_with_bitrate(), switch_core_directory_open(), switch_core_file_handle_dup(), switch_core_launch_thread(), switch_core_media_bug_add(), switch_core_memory_reclaim(), switch_core_perform_destroy_memory_pool(), switch_core_perform_file_open(), switch_core_session_findall_matching_var(), switch_core_session_hupall(), switch_core_session_hupall_endpoint(), switch_core_session_hupall_matching_vars_ans(), switch_core_session_init(), switch_core_session_perform_destroy(), switch_core_session_request_uuid(), switch_core_session_thread_pool_worker(), switch_core_speech_open(), switch_core_timer_init(), switch_dial_handle_create(), switch_dial_handle_destroy(), switch_dial_handle_list_create(), switch_dial_handle_list_destroy(), switch_event_init(), switch_event_launch_dispatch_threads(), switch_frame_buffer_create(), switch_frame_buffer_destroy(), switch_img_txt_handle_create(), switch_img_txt_handle_destroy(), switch_ivr_bg_media(), switch_ivr_broadcast_in_thread(), switch_ivr_dmachine_create(), switch_ivr_dmachine_destroy(), switch_ivr_enterprise_originate(), switch_ivr_play_file(), switch_ivr_speak_text(), switch_jb_create(), switch_known_bitrate(), switch_live_array_create(), switch_live_array_destroy(), switch_log_init(), switch_media_type2str(), SWITCH_MODULE_LOAD_FUNCTION(), switch_nat_init(), switch_needs_url_encode(), switch_network_list_create(), switch_pool_clear(), switch_rtp_create(), switch_sockaddr_create(), switch_sockaddr_new(), switch_system_thread(), switch_xml_free_in_thread(), switch_xml_init(), switch_xml_locate_language(), and xswitch_http_request().
|
static |
Definition at line 2304 of file switch_channel.c.
Referenced by switch_channel_name_state(), switch_channel_perform_hangup(), switch_channel_perform_set_running_state(), switch_channel_perform_set_state(), and switch_channel_state_name().