FreeSWITCH API Documentation
1.7.0
|
Go to the source code of this file.
Variables | |
static char * | SIG_NAMES [] |
|
static |
Definition at line 948 of file switch_core_io.c.
References switch_core_session::bug_rwlock, switch_core_session::bugs, switch_media_bug::callback, CF_ANSWERED, CF_PAUSE_BUGS, switch_core_session::channel, switch_core_session::endpoint_interface, switch_core_session::event_hooks, switch_frame::flags, switch_endpoint_interface::io_routines, switch_media_bug::native_write_frame, switch_io_event_hook_write_frame::next, switch_media_bug::next, switch_media_bug::ready, SFF_NOT_AUDIO, SMBF_ANSWER_REQ, SMBF_NO_PAUSE, SMBF_PRUNE, SMBF_TAP_NATIVE_WRITE, switch_media_bug::stop_time, SWITCH_ABC_TYPE_TAP_NATIVE_WRITE, switch_channel_test_flag(), switch_core_media_bug_prune(), switch_core_media_bug_test_flag(), switch_epoch_time_now(), SWITCH_FALSE, switch_set_flag, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_thread_rwlock_rdlock(), switch_thread_rwlock_unlock(), SWITCH_TRUE, switch_media_bug::user_data, switch_io_event_hook_write_frame::write_frame, and switch_io_routines::write_frame.
Referenced by switch_core_session_write_frame().
void switch_core_gen_encoded_silence | ( | unsigned char * | data, |
const switch_codec_implementation_t * | read_impl, | ||
switch_size_t | len | ||
) |
Definition at line 39 of file switch_core_io.c.
References memset(), and switch_stristr().
Referenced by record_callback(), and switch_core_session_read_frame().
switch_status_t switch_core_session_perform_kill_channel | ( | switch_core_session_t * | session, |
const char * | file, | ||
const char * | func, | ||
int | line, | ||
switch_signal_t | sig | ||
) |
Definition at line 1658 of file switch_core_io.c.
References switch_io_event_hook_kill_channel::kill_channel, switch_io_event_hook_kill_channel::next, SIG_NAMES, switch_channel_get_name(), SWITCH_CHANNEL_ID_LOG, switch_core_session_get_uuid(), SWITCH_LOG_DEBUG10, switch_log_printf(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_core_session_read_frame | ( | switch_core_session_t * | session, |
switch_frame_t ** | frame, | ||
switch_io_flag_t | flags, | ||
int | stream_id | ||
) |
Definition at line 67 of file switch_core_io.c.
References switch_codec_implementation::actual_samples_per_second, switch_core_session::bugs, switch_media_bug::callback, CCS_ACTIVE, CCS_UNHELD, CF_ANSWERED, CF_AUDIO_PAUSE, CF_BRIDGED, CF_CNG_PLC, CF_HOLD, CF_JITTERBUFFER_PLC, CF_PAUSE_BUGS, CF_PROXY_MODE, switch_frame::channels, switch_frame::codec, CS_HIBERNATE, switch_codec::cur_frame, switch_frame::data, switch_frame::datalen, switch_codec_implementation::decoded_bytes_per_packet, switch_runtime::dummy_cng_frame, switch_frame::flags, switch_codec_implementation::ianacode, switch_codec_implementation::iananame, if(), switch_codec_implementation::impl_id, switch_codec::implementation, switch_frame::m, memset(), switch_core_session_message::message_id, switch_media_bug::native_read_frame, switch_io_event_hook_read_frame::next, switch_media_bug::next, switch_codec_implementation::number_of_channels, switch_core_session_message::numeric_arg, switch_frame::payload, switch_media_bug::ping_frame, switch_frame::rate, switch_media_bug::raw_read_buffer, switch_media_bug::read_demux_frame, switch_io_event_hook_read_frame::read_frame, switch_media_bug::read_mutex, switch_media_bug::read_replace_frame_in, switch_media_bug::read_replace_frame_out, switch_media_bug::ready, runtime, switch_frame::samples, switch_codec_implementation::samples_per_packet, switch_frame::seq, SFF_CNG, SFF_NOT_AUDIO, SFF_PLC, SFF_PROXY_PACKET, SMBF_ANSWER_REQ, SMBF_BRIDGE_REQ, SMBF_NO_PAUSE, SMBF_PRUNE, SMBF_READ_PING, SMBF_READ_REPLACE, SMBF_READ_STREAM, SMBF_TAP_NATIVE_READ, SSF_MEDIA_BUG_TAP_ONLY, SSF_READ_CODEC_RESET, SSF_READ_TRANSCODE, SSF_WARN_TRANSCODE, SSF_WRITE_CODEC_RESET, switch_frame::ssrc, switch_media_bug::stop_time, SWITCH_ABC_TYPE_READ, SWITCH_ABC_TYPE_READ_PING, SWITCH_ABC_TYPE_READ_REPLACE, SWITCH_ABC_TYPE_TAP_NATIVE_READ, switch_assert, SWITCH_BUFFER_BLOCK_FRAMES, switch_buffer_create_dynamic(), switch_buffer_inuse(), switch_buffer_read(), SWITCH_BUFFER_START_FRAMES, switch_buffer_write(), SWITCH_CAUSE_INCOMPATIBLE_DESTINATION, switch_channel_down, switch_channel_dtmf_lock(), switch_channel_dtmf_unlock(), switch_channel_event_set_data(), switch_channel_get_callstate(), switch_channel_get_name(), switch_channel_get_partner_uuid(), switch_channel_get_state(), switch_channel_hangup, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_callstate, switch_channel_test_flag(), switch_clear_flag, SWITCH_CODEC_FLAG_HAS_PLC, switch_cond_next(), switch_core_codec_copy(), switch_core_codec_decode(), switch_core_codec_encode(), switch_core_codec_ready(), switch_core_codec_reset(), switch_core_gen_encoded_silence(), switch_core_media_bug_prune(), switch_core_media_bug_test_flag(), switch_core_session_get_channel(), switch_core_session_get_name, switch_core_session_get_partner, switch_core_session_locate, switch_core_session_receive_message, switch_core_session_rwunlock(), switch_epoch_time_now(), switch_event_create, switch_event_fire, SWITCH_EVENT_SESSION_HEARTBEAT, SWITCH_FALSE, switch_ivr_dmachine_ping(), SWITCH_LOG_CRIT, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, SWITCH_LOG_NOTICE, switch_log_printf(), SWITCH_MESSAGE_HEARTBEAT_EVENT, SWITCH_MESSAGE_INDICATE_TRANSCODING_NECESSARY, SWITCH_MESSAGE_RESAMPLE_EVENT, switch_mutex_lock(), switch_mutex_trylock(), switch_mutex_unlock(), switch_mux_channels(), switch_os_yield(), SWITCH_READ_ACCEPTABLE, SWITCH_RECOMMENDED_BUFFER_SIZE, switch_resample_create, switch_resample_destroy(), switch_resample_process(), SWITCH_RESAMPLE_QUALITY, switch_set_flag, SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_INUSE, SWITCH_STATUS_MEMERR, SWITCH_STATUS_NOOP, SWITCH_STATUS_NOT_INITALIZED, SWITCH_STATUS_RESAMPLE, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_thread_rwlock_rdlock(), switch_thread_rwlock_unlock(), switch_thread_rwlock_wrlock(), SWITCH_TRUE, switch_unmerge_sln(), switch_yield, switch_frame::timestamp, TRUE, and switch_media_bug::user_data.
switch_status_t switch_core_session_recv_dtmf | ( | switch_core_session_t * | session, |
const switch_dtmf_t * | dtmf | ||
) |
Definition at line 1679 of file switch_core_io.c.
References switch_dtmf_t::digit, DTMF_FLAG_SENSITIVE, DTMF_FLAG_SKIP_PROCESS, switch_dtmf_t::duration, switch_io_event_hook_recv_dtmf::next, switch_io_event_hook_recv_dtmf::recv_dtmf, switch_assert, switch_channel_down, switch_channel_get_name(), SWITCH_CHANNEL_SESSION_LOG, switch_core_default_dtmf_duration(), switch_core_max_dtmf_duration(), switch_core_min_dtmf_duration(), SWITCH_DTMF_RECV, switch_ivr_dmachine_feed(), SWITCH_LOG_DEBUG1, switch_log_printf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_test_flag.
switch_status_t switch_core_session_send_dtmf | ( | switch_core_session_t * | session, |
const switch_dtmf_t * | dtmf | ||
) |
Definition at line 1727 of file switch_core_io.c.
References CC_QUEUEABLE_DTMF_DELAY, CF_DROP_DTMF, switch_dtmf_t::digit, DTMF_FLAG_SENSITIVE, DTMF_FLAG_SKIP_PROCESS, switch_dtmf_t::duration, is_dtmf, switch_io_event_hook_send_dtmf::next, switch_io_event_hook_send_dtmf::send_dtmf, SMF_ECHO_ALEG, switch_assert, switch_channel_clear_flag(), switch_channel_down, switch_channel_get_name(), switch_channel_get_variable_dup(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_test_cap(), switch_channel_test_flag(), switch_core_default_dtmf_duration(), switch_core_max_dtmf_duration(), switch_core_min_dtmf_duration(), switch_core_session_get_uuid(), SWITCH_DTMF_SEND, SWITCH_FALSE, switch_ivr_broadcast(), switch_ivr_dmachine_feed(), switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_yield, and zstr.
Referenced by switch_core_session_send_dtmf_string().
switch_status_t switch_core_session_write_frame | ( | switch_core_session_t * | session, |
switch_frame_t * | frame, | ||
switch_io_flag_t | flags, | ||
int | stream_id | ||
) |
Definition at line 1012 of file switch_core_io.c.
References switch_media_bug::callback, CF_ACCEPT_CNG, CF_ANSWERED, CF_AUDIO_PAUSE, CF_HOLD, CF_PASSTHRU_PTIME_MISMATCH, CF_PAUSE_BUGS, switch_frame::channels, switch_frame::codec, switch_buffer::data, switch_frame::data, switch_frame::datalen, switch_codec_implementation::ianacode, if(), switch_codec::implementation, switch_frame::m, memset(), switch_core_session_message::message_id, switch_media_bug::next, switch_core_session_message::numeric_arg, switch_frame::payload, perform_write(), switch_frame::rate, switch_media_bug::raw_write_buffer, switch_media_bug::ready, switch_frame::samples, switch_frame::seq, SFF_CNG, SFF_NOT_AUDIO, SFF_PLC, SFF_PROXY_PACKET, SMBF_ANSWER_REQ, SMBF_NO_PAUSE, SMBF_PRUNE, SMBF_WRITE_REPLACE, SMBF_WRITE_STREAM, SSF_MEDIA_BUG_TAP_ONLY, SSF_READ_CODEC_RESET, SSF_WARN_TRANSCODE, SSF_WRITE_CODEC_RESET, SSF_WRITE_TRANSCODE, switch_frame::ssrc, switch_media_bug::stop_time, SWITCH_ABC_TYPE_WRITE, SWITCH_ABC_TYPE_WRITE_REPLACE, switch_assert, SWITCH_BUFFER_BLOCK_FRAMES, switch_buffer_create_dynamic(), switch_buffer_inuse(), switch_buffer_read(), SWITCH_BUFFER_START_FRAMES, switch_buffer_write(), SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION, switch_channel_down, switch_channel_get_name(), switch_channel_get_partner_uuid(), switch_channel_hangup, switch_channel_media_ready, switch_channel_ready, SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), switch_clear_flag, SWITCH_CODEC_FLAG_PASSTHROUGH, switch_core_codec_decode(), switch_core_codec_encode(), switch_core_codec_ready(), switch_core_codec_reset(), switch_core_media_bug_flush_all(), switch_core_media_bug_prune(), switch_core_media_bug_test_flag(), switch_core_session_get_channel(), switch_core_session_locate, switch_core_session_receive_message, switch_core_session_rwunlock(), switch_epoch_time_now(), SWITCH_FALSE, SWITCH_LOG_CRIT, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, SWITCH_LOG_NOTICE, switch_log_printf(), SWITCH_MESSAGE_INDICATE_TRANSCODING_NECESSARY, SWITCH_MESSAGE_RESAMPLE_EVENT, switch_mutex_lock(), switch_mutex_trylock(), switch_mutex_unlock(), switch_mux_channels(), SWITCH_RECOMMENDED_BUFFER_SIZE, switch_resample_calc_buffer_size, switch_resample_create, switch_resample_destroy(), switch_resample_process(), SWITCH_RESAMPLE_QUALITY, switch_set_flag, SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_MEMERR, SWITCH_STATUS_NOOP, SWITCH_STATUS_NOT_INITALIZED, SWITCH_STATUS_RESAMPLE, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_thread_rwlock_rdlock(), switch_thread_rwlock_unlock(), SWITCH_TRUE, switch_frame::timestamp, TRUE, switch_media_bug::user_data, switch_media_bug::write_mutex, switch_media_bug::write_replace_frame_in, and switch_media_bug::write_replace_frame_out.
|
static |
Definition at line 1650 of file switch_core_io.c.
Referenced by switch_core_session_perform_kill_channel().