FreeSWITCH API Documentation
1.7.0
|
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 3829 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 130 of file switch_channel.c.
Enumerator | |
---|---|
LP_NEITHER | |
LP_ORIGINATOR | |
LP_ORIGINATEE |
Definition at line 134 of file switch_channel.c.
|
static |
Definition at line 5202 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 2190 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 5229 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 3555 of file switch_channel.c.
References switch_stream_handle::data, switch_channel::name, switch_channel::session, switch_api_execute(), SWITCH_CHANNEL_CHANNEL_LOG, switch_core_session_strdup, SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_STANDARD_STREAM, and switch_str_nil.
Referenced by switch_channel_api_on().
|
static |
Definition at line 3607 of file switch_channel.c.
References switch_channel::session, switch_core_session_execute_application, switch_core_session_execute_application_async(), and switch_core_session_strdup.
Referenced by switch_channel_execute_on().
|
static |
Definition at line 4826 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 4975 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 3296 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_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 437 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 3575 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_thread(), check_channel_status(), 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(), 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 5294 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 4129 of file switch_channel.c.
References switch_stream_handle::data, switch_event_header::name, profile_node_s::next, switch_event_header::next, switch_assert, switch_channel_get_caller_profile(), switch_channel_variable_first(), switch_channel_variable_last(), switch_safe_free, SWITCH_STANDARD_STREAM, switch_url_encode(), 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 189 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 5031 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 4910 of file switch_channel.c.
References CF_FINAL_DEVICE_LEG, device_uuid_node_s::event, globals, device_uuid_node_s::hup_profile, device_uuid_node_s::next, device_uuid_node_s::parent, pool, 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_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 623 of file switch_channel.c.
References CF_DIVERT_EVENTS, DTMF_FLAG_SENSITIVE, 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 694 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 317 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 2507 of file switch_channel.c.
References switch_codec_implementation::actual_samples_per_second, switch_codec_implementation::bits_per_second, CF_ANSWERED, CF_DIALPLAN, CF_EARLY_MEDIA, switch_codec_implementation::iananame, LP_ORIGINATEE, LP_ORIGINATOR, switch_caller_profile::originatee_caller_profile, switch_caller_profile::originator_caller_profile, 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_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 2689 of file switch_channel.c.
References 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 2607 of file switch_channel.c.
References buf, CF_VERBOSE_EVENTS, ep, switch_event::headers, switch_event_header::name, switch_event_header::next, switch_event::next, 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_ORIGINATE, SWITCH_EVENT_CHANNEL_PARK, SWITCH_EVENT_CHANNEL_PROGRESS, SWITCH_EVENT_CHANNEL_PROGRESS_MEDIA, SWITCH_EVENT_CHANNEL_UNBRIDGE, 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_mutex_lock(), switch_mutex_unlock(), switch_snprintf(), SWITCH_STACK_BOTTOM, and switch_event_header::value.
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 3638 of file switch_channel.c.
References switch_event_header::array, do_execute_on(), switch_event::headers, switch_event_header::idx, switch_event_header::name, switch_event_header::next, 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_thread(), check_channel_status(), record_callback(), switch_channel_perform_mark_answered(), switch_channel_perform_mark_pre_answered(), switch_channel_perform_mark_ring_ready_value(), switch_core_media_process_udptl(), switch_core_media_read_frame(), switch_ivr_originate(), switch_ivr_session_transfer(), tone_detect_callback(), and tone_on_dtmf().
void switch_channel_flush_dtmf | ( | switch_channel_t * | channel | ) |
Definition at line 709 of file switch_channel.c.
References CS_HANGUP, 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 | ) |
Definition at line 225 of file switch_channel.c.
switch_device_record_t* switch_channel_get_device_record | ( | switch_channel_t * | channel | ) |
Definition at line 5276 of file switch_channel.c.
References switch_mutex_lock().
switch_hold_record_t* switch_channel_get_hold_record | ( | switch_channel_t * | channel | ) |
const char* switch_channel_get_partner_uuid | ( | switch_channel_t * | channel | ) |
Definition at line 4659 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_gen_local_sdp(), switch_core_media_receive_message(), switch_core_session_pass_indication(), switch_core_session_perform_get_partner(), 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(), switch_ivr_unhold(), switch_rtp_write_frame(), and switch_rtp_zerocopy_read_frame().
switch_caller_extension_t* switch_channel_get_queued_extension | ( | switch_channel_t * | channel | ) |
Definition at line 3149 of file switch_channel.c.
References 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 406 of file switch_channel.c.
References switch_mutex_lock(), and switch_mutex_unlock().
void switch_channel_global_init | ( | switch_memory_pool_t * | pool | ) |
Definition at line 4811 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 4820 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 4670 of file switch_channel.c.
References CF_CONFIRM_BLIND_TRANSFER, CF_TRANSFER, CS_ROUTING, 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_originate(), and switch_ivr_multi_threaded_bridge().
switch_size_t switch_channel_has_dtmf | ( | switch_channel_t * | channel | ) |
Definition at line 479 of file switch_channel.c.
References switch_mutex_lock(), switch_mutex_unlock(), and switch_queue_size().
switch_channel_state_t switch_channel_name_state | ( | const char * | name | ) |
Definition at line 2178 of file switch_channel.c.
References CS_DESTROY.
switch_status_t switch_channel_pass_sdp | ( | switch_channel_t * | from_channel, |
switch_channel_t * | to_channel, | ||
const char * | sdp | ||
) |
Definition at line 5345 of file switch_channel.c.
References 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 4967 of file switch_channel.c.
References 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 490 of file switch_channel.c.
References switch_dtmf_t::digit, DTMF_FLAG_SENSITIVE, switch_dtmf_t::duration, is_dtmf, 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 562 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_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_SUCCESS, and zstr.
void switch_channel_release_device_record | ( | switch_device_record_t ** | drecp | ) |
Definition at line 5286 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 5248 of file switch_channel.c.
References add_uuid(), create_device_record(), switch_device_record_s::device_id, globals, 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 4304 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, CF_TIMESTAMP_SET, switch_channel_timetable::created, switch_stream_handle::data, switch_dtmf_t::digit, end_of, switch_channel_timetable::hold_accum, 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_timetable::progress, switch_channel_timetable::progress_media, switch_channel_timetable::resurrected, 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_stream_handle::write_function, and zstr.
const char* switch_channel_state_name | ( | switch_channel_state_t | state | ) |
Definition at line 2172 of file switch_channel.c.
Referenced by switch_channel_event_set_basic_data().
void switch_channel_state_thread_lock | ( | switch_channel_t * | channel | ) |
Definition at line 2490 of file switch_channel.c.
References switch_mutex_lock().
Referenced by switch_core_session_run().
switch_status_t switch_channel_state_thread_trylock | ( | switch_channel_t * | channel | ) |
Definition at line 2496 of file switch_channel.c.
References switch_mutex_trylock().
Referenced by switch_core_session_wake_session_thread().
void switch_channel_state_thread_unlock | ( | switch_channel_t * | channel | ) |
Definition at line 2502 of file switch_channel.c.
References switch_mutex_unlock().
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 204 of file switch_channel.c.
References switch_cause_table::cause, CAUSE_CHART, 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 3161 of file switch_channel.c.
References CF_TRANSFER, CS_ROUTING, 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 5320 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 | ||
) |
|
static |
Definition at line 241 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 258 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(), EventConsumer::cleanup(), create_device_record(), create_handle(), destroy_thread(), main(), new_job(), record_callback(), sql_in_thread(), switch_caller_profile_clone(), switch_caller_profile_dup(), switch_caller_profile_new(), switch_channel_clear_device_record(), switch_channel_global_init(), switch_core_asr_open(), switch_core_codec_destroy(), switch_core_codec_init_with_bitrate(), switch_core_directory_open(), switch_core_launch_thread(), switch_core_media_bug_add(), switch_core_media_ext_address_lookup(), switch_core_memory_reclaim(), switch_core_perform_file_open(), switch_core_port_allocator_destroy(), switch_core_port_allocator_new(), switch_core_session_findall_matching_var(), switch_core_session_hupall(), switch_core_session_hupall_endpoint(), switch_core_session_hupall_matching_var_ans(), switch_core_session_init(), switch_core_session_perform_destroy(), switch_core_session_request_uuid(), switch_core_session_start_video_thread(), switch_core_session_thread_pool_worker(), switch_core_speech_open(), switch_core_sqldb_start(), switch_core_timer_init(), 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_digit_stream_parser_new(), switch_ivr_dmachine_create(), switch_ivr_dmachine_destroy(), switch_ivr_enterprise_originate(), switch_ivr_menu_init(), switch_ivr_menu_stack_free(), switch_ivr_menu_stack_xml_init(), switch_ivr_play_file(), switch_ivr_speak_text(), switch_jb_create(), switch_live_array_create(), switch_live_array_destroy(), switch_log_init(), SWITCH_MODULE_LOAD_FUNCTION(), switch_nat_init(), switch_network_list_create(), switch_rtp_create(), switch_sockaddr_create(), switch_sql_queue_manager_destroy(), switch_sql_queue_manager_init_name(), switch_system_thread(), switch_xml_free_in_thread(), switch_xml_init(), task_own_thread(), and test_port().
|
static |
Definition at line 2154 of file switch_channel.c.