RTS API Documentation
1.10.11
|
#include <switch.h>
#include "private/switch_core_pvt.h"
#include <speex/speex_preprocess.h>
#include <speex/speex_echo.h>
Go to the source code of this file.
Data Structures | |
struct | switch_ivr_dmachine_binding |
struct | dm_binding_head_t |
struct | switch_ivr_dmachine |
struct | displace_helper_t |
struct | record_helper |
struct | eavesdrop_pvt |
struct | exec_cb_data |
struct | pp_cb_t |
struct | switch_session_audio_t |
struct | switch_inband_dtmf_t |
struct | switch_inband_dtmf_generate_t |
struct | switch_tone_detect_t |
struct | switch_tone_container_t |
struct | dtmf_meta_app_t |
struct | dtmf_meta_settings_t |
struct | dtmf_meta_data_t |
struct | bch_t |
struct | play_and_detect_speech_state_t |
struct | speech_thread_handle |
struct | hangup_helper |
struct | transfer_helper |
struct | broadcast_helper |
struct | oht_s |
Macros | |
#define | MAX_TONES 16 |
#define | SWITCH_META_VAR_KEY "__dtmf_meta" |
#define | SWITCH_BLOCK_DTMF_KEY "__dtmf_block" |
#define | PLAY_AND_DETECT_DONE 1 |
#define | PLAY_AND_DETECT_DONE_RECOGNIZING 2 |
Typedefs | |
typedef struct switch_ivr_dmachine_binding | switch_ivr_dmachine_binding_t |
typedef struct oht_s | overly_helper_t |
Enumerations | |
enum | dm_match_t { DM_MATCH_NONE, DM_MATCH_EXACT, DM_MATCH_PARTIAL, DM_MATCH_BOTH, DM_MATCH_NEVER } |
#define MAX_TONES 16 |
Definition at line 4124 of file switch_ivr_async.c.
Referenced by switch_ivr_tone_detect_session().
#define PLAY_AND_DETECT_DONE 1 |
Definition at line 4803 of file switch_ivr_async.c.
Referenced by play_and_detect_input_callback(), and switch_ivr_play_and_detect_speech().
#define PLAY_AND_DETECT_DONE_RECOGNIZING 2 |
Definition at line 4804 of file switch_ivr_async.c.
Referenced by play_and_detect_input_callback(), and switch_ivr_play_and_detect_speech().
#define SWITCH_BLOCK_DTMF_KEY "__dtmf_block" |
Definition at line 4516 of file switch_ivr_async.c.
Referenced by block_on_dtmf(), switch_ivr_block_dtmf_session(), and switch_ivr_unblock_dtmf_session().
#define SWITCH_META_VAR_KEY "__dtmf_meta" |
Definition at line 4515 of file switch_ivr_async.c.
Referenced by meta_on_dtmf(), switch_ivr_bind_dtmf_meta_session(), and switch_ivr_unbind_dtmf_meta_session().
typedef struct oht_s overly_helper_t |
typedef struct switch_ivr_dmachine_binding switch_ivr_dmachine_binding_t |
Definition at line 54 of file switch_ivr_async.c.
enum dm_match_t |
Enumerator | |
---|---|
DM_MATCH_NONE | |
DM_MATCH_EXACT | |
DM_MATCH_PARTIAL | |
DM_MATCH_BOTH | |
DM_MATCH_NEVER |
Definition at line 353 of file switch_ivr_async.c.
|
static |
Definition at line 5434 of file switch_ivr_async.c.
References switch_event::headers, switch_event_header::name, switch_event_header::next, switch_channel_get_variables(), SWITCH_CHANNEL_LOG, switch_core_asr_text_param(), switch_core_get_variables(), switch_core_session_get_channel(), switch_event_destroy(), switch_event_merge(), SWITCH_LOG_DEBUG, switch_log_printf(), switch_event_header::value, and zstr.
Referenced by switch_ivr_detect_speech().
|
static |
Definition at line 4524 of file switch_ivr_async.c.
References bch_t::app, bch_t::flags, bch_t::session, switch_core_session_get_uuid(), switch_core_session_read_lock(), switch_core_session_rwunlock(), switch_ivr_broadcast(), and SWITCH_STATUS_SUCCESS.
Referenced by switch_ivr_broadcast_in_thread().
|
static |
Definition at line 4693 of file switch_ivr_async.c.
References CF_INNER_BRIDGE, SWITCH_BLOCK_DTMF_KEY, switch_channel_get_private(), switch_channel_test_flag(), switch_core_session_get_channel(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by switch_ivr_block_dtmf_session().
|
static |
Definition at line 4811 of file switch_ivr_async.c.
References switch_input_args_t::buf, switch_input_args_t::buflen, switch_input_args_t::input_callback, and SWITCH_INPUT_TYPE_EVENT.
Referenced by play_and_detect_input_callback().
|
static |
Definition at line 2215 of file switch_ivr_async.c.
References exec_cb_data::caller, eavesdrop_pvt::eavesdropper, switch_core_session_message::from, switch_core_session_message::message_id, switch_core_session_message::string_array_arg, switch_core_media_bug_get_user_data(), switch_core_session_receive_message, SWITCH_MESSAGE_INDICATE_DISPLAY, exec_cb_data::val, and exec_cb_data::var.
Referenced by switch_ivr_eavesdrop_update_display().
|
static |
Definition at line 2000 of file switch_ivr_async.c.
References buf, eavesdrop_pvt::buffer, switch_frame::buflen, CF_VIDEO_DECODED_READ, switch_frame::channels, switch_frame::codec, switch_frame::data, eavesdrop_pvt::data, switch_frame::datalen, eavesdrop_pvt::demux_frame, eavesdrop_pvt::eavesdropper, ED_MUX_READ, ED_MUX_WRITE, eavesdrop_pvt::errs, switch_frame::img, eavesdrop_pvt::r_buffer, switch_frame::samples, eavesdrop_pvt::set_decoded_read, SMBF_READ_VIDEO_PING, SMBF_READ_VIDEO_STREAM, SMBF_SPY_VIDEO_STREAM, SMBF_SPY_VIDEO_STREAM_BLEG, SMBF_WRITE_VIDEO_STREAM, SWITCH_ABC_TYPE_CLOSE, SWITCH_ABC_TYPE_INIT, SWITCH_ABC_TYPE_READ, SWITCH_ABC_TYPE_READ_PING, SWITCH_ABC_TYPE_READ_REPLACE, SWITCH_ABC_TYPE_READ_VIDEO_PING, SWITCH_ABC_TYPE_STREAM_VIDEO_PING, SWITCH_ABC_TYPE_TAP_NATIVE_READ, SWITCH_ABC_TYPE_TAP_NATIVE_WRITE, SWITCH_ABC_TYPE_WRITE, SWITCH_ABC_TYPE_WRITE_REPLACE, switch_buffer_inuse(), switch_buffer_lock(), switch_buffer_read(), switch_buffer_unlock(), switch_buffer_zwrite(), SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, switch_channel_clear_flag_recursive(), switch_channel_hangup, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag_recursive(), switch_core_media_bug_get_native_read_frame(), switch_core_media_bug_get_native_write_frame(), switch_core_media_bug_get_read_replace_frame(), switch_core_media_bug_get_session(), switch_core_media_bug_get_write_replace_frame(), switch_core_media_bug_read(), switch_core_media_bug_set_read_demux_frame(), switch_core_media_bug_set_read_replace_frame(), switch_core_media_bug_set_write_replace_frame(), switch_core_media_bug_test_flag(), switch_core_session_get_channel(), switch_core_session_get_name, switch_core_session_read_lock(), switch_core_session_request_video_refresh, switch_core_session_reset(), switch_core_session_rwunlock(), switch_core_session_set_video_read_callback(), switch_core_session_write_frame(), switch_core_session_write_video_frame(), SWITCH_FALSE, SWITCH_IO_FLAG_NONE, SWITCH_LOG_ERROR, switch_log_printf(), switch_merge_sln(), SWITCH_RECOMMENDED_BUFFER_SIZE, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_test_flag, SWITCH_TRUE, video_eavesdrop_callback(), switch_media_bug::video_ping_frame, and eavesdrop_pvt::w_buffer.
Referenced by switch_ivr_eavesdrop_session().
|
static |
Definition at line 2199 of file switch_ivr_async.c.
References b, exec_cb_data::caller, eavesdrop_pvt::eavesdropper, switch_channel_get_name(), SWITCH_CHANNEL_LOG, switch_core_media_bug_get_user_data(), switch_core_session_execute_application, switch_core_session_get_channel(), SWITCH_LOG_DEBUG, switch_log_printf(), exec_cb_data::val, and exec_cb_data::var.
Referenced by switch_ivr_eavesdrop_exec_all().
|
static |
Definition at line 3913 of file switch_ivr_async.c.
References switch_inband_dtmf_generate_t::audio_buffer, CF_DIVERT_EVENTS, switch_dtmf_t::digit, switch_inband_dtmf_generate_t::digit_queue, switch_dtmf_t::duration, switch_inband_dtmf_generate_t::mutex, switch_inband_dtmf_generate_t::ready, switch_inband_dtmf_generate_t::skip, switch_buffer_inuse(), switch_channel_event_set_data(), switch_channel_get_private(), switch_channel_test_flag(), switch_core_media_bug_get_user_data(), switch_core_session_get_channel(), switch_core_session_queue_event(), switch_event_add_header(), switch_event_add_header_string(), switch_event_create, SWITCH_EVENT_DTMF, switch_event_fire, switch_mutex_lock(), switch_mutex_unlock(), switch_queue_trypush(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_zmalloc.
Referenced by inband_dtmf_generate_callback().
|
static |
Definition at line 2913 of file switch_ivr_async.c.
References switch_channel_get_variable, and switch_event_get_header.
Referenced by record_callback(), recording_var_true(), and switch_ivr_record_session_event().
|
static |
Definition at line 3808 of file switch_ivr_async.c.
References switch_frame::data, switch_dtmf_t::digit, switch_inband_dtmf_t::dtmf_detect, switch_dtmf_t::duration, switch_frame::samples, switch_inband_dtmf_t::session, switch_dtmf_t::source, SWITCH_ABC_TYPE_CLOSE, SWITCH_ABC_TYPE_INIT, SWITCH_ABC_TYPE_READ_REPLACE, SWITCH_ABC_TYPE_WRITE, switch_channel_queue_dtmf(), SWITCH_CHANNEL_SESSION_LOG, switch_core_media_bug_get_read_replace_frame(), switch_core_media_bug_get_session(), switch_core_media_bug_set_read_replace_frame(), switch_core_session_get_channel(), SWITCH_DTMF_INBAND_AUDIO, SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_TRUE, teletone_dtmf_detect(), teletone_dtmf_get(), and TT_HIT_END.
Referenced by switch_ivr_inband_dtmf_session().
|
static |
Definition at line 3966 of file switch_ivr_async.c.
References switch_codec_implementation::actual_samples_per_second, switch_inband_dtmf_generate_t::audio_buffer, buf, teletone_generation_session::channels, switch_frame::data, switch_frame::datalen, switch_dtmf_t::digit, switch_inband_dtmf_generate_t::digit_queue, teletone_generation_session::duration, switch_dtmf_t::duration, generate_on_dtmf(), memset(), switch_inband_dtmf_generate_t::mutex, teletone_generation_session::rate, switch_inband_dtmf_generate_t::read, switch_inband_dtmf_generate_t::ready, switch_inband_dtmf_generate_t::session, switch_inband_dtmf_generate_t::skip, switch_dtmf_t::source, SWITCH_ABC_TYPE_CLOSE, SWITCH_ABC_TYPE_INIT, SWITCH_ABC_TYPE_READ_REPLACE, SWITCH_ABC_TYPE_WRITE_REPLACE, switch_buffer_create_dynamic(), switch_buffer_destroy(), switch_buffer_inuse(), switch_buffer_read(), switch_channel_get_name(), SWITCH_CHANNEL_SESSION_LOG, switch_core_default_dtmf_duration(), switch_core_max_dtmf_duration(), switch_core_media_bug_get_read_replace_frame(), switch_core_media_bug_get_session(), switch_core_media_bug_get_write_replace_frame(), switch_core_media_bug_set_read_replace_frame(), switch_core_media_bug_set_write_replace_frame(), switch_core_session_get_channel(), switch_core_session_get_pool(), switch_core_session_get_read_impl(), SWITCH_DTMF_INBAND_AUDIO, SWITCH_FALSE, switch_log_printf(), SWITCH_LOG_WARNING, switch_mutex_init(), switch_mutex_lock(), SWITCH_MUTEX_NESTED, switch_mutex_unlock(), switch_queue_create(), switch_queue_trypop(), SWITCH_STATUS_SUCCESS, SWITCH_TRUE, teletone_destroy_session(), teletone_dtmf_generate_handler(), teletone_init_session(), teletone_run(), and switch_inband_dtmf_generate_t::ts.
Referenced by switch_ivr_inband_dtmf_generate_session().
|
static |
Definition at line 1180 of file switch_ivr_async.c.
References count, switch_frame::data, switch_frame::datalen, switch_codec_implementation::number_of_channels, switch_codec_implementation::samples_per_second, and SWITCH_TRUE.
Referenced by record_callback().
|
static |
Definition at line 1206 of file switch_ivr_async.c.
References buf, switch_event::headers, switch_event_header::name, switch_event_header::next, switch_assert, switch_event_add_header_string(), switch_snprintf(), SWITCH_STACK_BOTTOM, switch_event_header::value, and record_helper::variables.
Referenced by record_callback(), and send_record_stop_event().
|
static |
Definition at line 4563 of file switch_ivr_async.c.
References dtmf_meta_app_t::app, dtmf_meta_app_t::bind_flags, CF_INNER_BRIDGE, CF_PROXY_MODE, switch_dtmf_t::digit, dtmf_meta_app_t::flags, is_dtmf, dtmf_meta_settings_t::last_digit, dtmf_meta_settings_t::map, memset(), dtmf_meta_settings_t::meta, dtmf_meta_settings_t::meta_on, SBF_DIAL_ALEG, SBF_DIAL_BLEG, SBF_EXEC_ALEG, SBF_EXEC_BLEG, SBF_EXEC_INLINE, SBF_EXEC_OPPOSITE, SBF_EXEC_SAME, SBF_ONCE, SMF_ECHO_ALEG, SMF_ECHO_BLEG, SMF_EXEC_INLINE, SMF_REBRIDGE, dtmf_meta_data_t::sr, switch_channel_get_name(), switch_channel_get_private(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), switch_core_session_get_channel(), switch_core_session_get_uuid(), SWITCH_DTMF_RECV, SWITCH_DTMF_SEND, switch_dtmftoi(), switch_epoch_time_now(), SWITCH_FALSE, switch_ivr_broadcast(), switch_ivr_broadcast_in_thread(), SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_META_VAR_KEY, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, SWITCH_TRUE, and dtmf_meta_settings_t::up.
Referenced by switch_ivr_bind_dtmf_meta_session().
|
static |
Definition at line 4818 of file switch_ivr_async.c.
References deliver_asr_event(), switch_dtmf_t::digit, play_and_detect_speech_state_t::done, switch_event::event_id, play_and_detect_speech_state_t::original_args, PLAY_AND_DETECT_DONE, PLAY_AND_DETECT_DONE_RECOGNIZING, play_and_detect_speech_state_t::result, switch_channel_get_name(), switch_channel_get_variable, SWITCH_CHANNEL_LOG, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable_printf(), switch_core_session_get_channel(), switch_core_session_sprintf(), switch_core_session_strdup, SWITCH_EVENT_DETECTED_SPEECH, switch_event_get_body(), switch_event_get_header, SWITCH_INPUT_TYPE_DTMF, SWITCH_INPUT_TYPE_EVENT, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, SWITCH_LOG_INFO, switch_log_printf(), SWITCH_PLAYBACK_TERMINATOR_USED, SWITCH_PLAYBACK_TERMINATORS_VARIABLE, SWITCH_STATUS_BREAK, SWITCH_STATUS_SUCCESS, and zstr.
Referenced by switch_ivr_play_and_detect_speech().
|
static |
Definition at line 3374 of file switch_ivr_async.c.
References switch_frame::data, switch_frame::datalen, pp_cb_t::done, pp_cb_t::read_data, pp_cb_t::read_ec, pp_cb_t::read_mutex, pp_cb_t::read_out, pp_cb_t::read_st, SWITCH_ABC_TYPE_CLOSE, SWITCH_ABC_TYPE_INIT, SWITCH_ABC_TYPE_READ_REPLACE, SWITCH_ABC_TYPE_WRITE_REPLACE, switch_channel_set_private(), switch_core_media_bug_get_read_replace_frame(), switch_core_media_bug_get_session(), switch_core_media_bug_get_write_replace_frame(), switch_core_session_get_channel(), switch_core_session_get_pool(), switch_core_session_get_read_impl(), SWITCH_FALSE, switch_mutex_init(), SWITCH_MUTEX_NESTED, SWITCH_TRUE, pp_cb_t::write_data, pp_cb_t::write_ec, pp_cb_t::write_mutex, pp_cb_t::write_out, and pp_cb_t::write_st.
Referenced by switch_ivr_preprocess_session().
|
static |
Definition at line 880 of file switch_ivr_async.c.
References buf, switch_file_handle::channels, switch_frame::data, switch_frame::datalen, displace_helper_t::fh, displace_helper_t::file, displace_helper_t::loop, memset(), displace_helper_t::mutex, displace_helper_t::mux, switch_frame::samples, SWITCH_ABC_TYPE_CLOSE, SWITCH_ABC_TYPE_INIT, SWITCH_ABC_TYPE_READ_REPLACE, SWITCH_ABC_TYPE_WRITE, SWITCH_ABC_TYPE_WRITE_REPLACE, switch_buffer_destroy(), switch_buffer_inuse(), switch_buffer_read(), switch_buffer_write(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_private(), switch_core_file_close(), switch_core_file_read(), switch_core_file_seek(), switch_core_media_bug_get_read_replace_frame(), switch_core_media_bug_get_session(), switch_core_media_bug_get_write_replace_frame(), switch_core_media_bug_set_read_replace_frame(), switch_core_media_bug_set_write_replace_frame(), switch_core_session_get_channel(), SWITCH_FALSE, switch_log_printf(), SWITCH_LOG_WARNING, switch_mutex_destroy(), switch_mutex_lock(), switch_mutex_unlock(), switch_normalize_to_16bit, SWITCH_RECOMMENDED_BUFFER_SIZE, SWITCH_SIZE_T_FMT, SWITCH_STATUS_SUCCESS, SWITCH_TRUE, and displace_helper_t::wbuffer.
Referenced by switch_ivr_displace_session().
|
static |
Definition at line 1390 of file switch_ivr_async.c.
References switch_codec_implementation::actual_samples_per_second, record_helper::buffer_mutex, switch_frame::buflen, record_helper::bug, switch_frame::channels, record_helper::completion_cause, record_helper::cond, record_helper::cond_mutex, switch_frame::data, switch_frame::datalen, exec_app(), record_helper::fh, record_helper::file, record_helper::final_timeout_ms, get_recording_var(), record_helper::hangup_on_error, record_helper::helper_pool, if(), switch_frame::img, record_helper::in_fh, record_helper::initial_timeout_ms, is_silence_frame(), record_helper::last_read_time, record_helper::last_write_time, merge_recording_variables(), switch_codec_implementation::microseconds_per_packet, record_helper::min_sec, switch_file_handle::mm, record_helper::native, switch_file_handle::native_rate, record_helper::out_fh, record_helper::read_impl, record_helper_destroy(), record_helper_post_process(), record_helper::recording_session, recording_thread(), record_helper::rready, switch_file_handle::samplerate, switch_file_handle::samples_out, send_record_stop_event(), set_completion_cause(), record_helper::silence_threshold, record_helper::silence_time, record_helper::silence_timeout_ms, SMBF_MASK, SMBF_PRUNE, record_helper::speech_detected, record_helper::start_event_sent, SWITCH_ABC_TYPE_CLOSE, SWITCH_ABC_TYPE_INIT, SWITCH_ABC_TYPE_READ_PING, SWITCH_ABC_TYPE_READ_VIDEO_PING, SWITCH_ABC_TYPE_STREAM_VIDEO_PING, SWITCH_ABC_TYPE_TAP_NATIVE_READ, SWITCH_ABC_TYPE_TAP_NATIVE_WRITE, SWITCH_ABC_TYPE_WRITE, SWITCH_AUDIO_COL_STR_FILE_SIZE, SWITCH_AUDIO_COL_STR_FILE_TRIMMED, SWITCH_AUDIO_COL_STR_FILE_TRIMMED_MS, switch_buffer_destroy(), switch_buffer_write(), SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, switch_channel_api_on(), switch_channel_down_nosig, switch_channel_event_set_data(), switch_channel_execute_on(), switch_channel_execute_on_value(), switch_channel_hangup, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_private(), switch_channel_set_variable, switch_core_file_close(), switch_core_file_get_string(), switch_core_file_has_video(), switch_core_file_pre_close(), switch_core_file_write(), switch_core_file_write_video(), switch_core_gen_encoded_silence(), switch_core_media_bug_get_native_read_frame(), switch_core_media_bug_get_native_write_frame(), switch_core_media_bug_get_session(), switch_core_media_bug_read(), switch_core_media_bug_set_flag(), switch_core_media_bug_set_media_params(), switch_core_media_bug_test_flag(), switch_core_media_gen_key_frame, switch_core_session_get_channel(), switch_core_session_get_pool(), switch_core_session_get_read_impl(), switch_core_session_request_video_refresh, switch_core_session_reset(), switch_event_add_header_string(), switch_event_create, switch_event_fire, switch_event_get_header, SWITCH_EVENT_RECORD_START, SWITCH_FALSE, SWITCH_FILE_OPEN, switch_file_remove(), SWITCH_FILE_WRITE_APPEND, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), switch_micro_time_now(), switch_mutex_init(), switch_mutex_lock(), SWITCH_MUTEX_NESTED, switch_mutex_trylock(), switch_mutex_unlock(), SWITCH_PRI_LOW, SWITCH_RECOMMENDED_BUFFER_SIZE, SWITCH_STACK_BOTTOM, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_thread_cond_create(), switch_thread_cond_signal(), switch_thread_create(), switch_thread_join(), SWITCH_THREAD_STACKSIZE, switch_threadattr_create(), switch_threadattr_priority_set(), switch_threadattr_stacksize_set(), switch_time_now(), SWITCH_TRUE, switch_true(), switch_yield, record_helper::thread, record_helper::thread_buffer, record_helper::thread_needs_transfer, record_helper::thread_ready, record_helper::transfer_complete, record_helper::transfer_from_session, record_helper::variables, switch_media_bug::video_ping_frame, record_helper::vwrites, record_helper::wready, record_helper::writes, and zstr.
Referenced by switch_ivr_record_session_event(), switch_ivr_stop_record_session(), and switch_ivr_transfer_recordings().
|
static |
Definition at line 2859 of file switch_ivr_async.c.
References record_helper::helper_pool, pool, record_helper::recording_session, switch_core_alloc, switch_core_destroy_memory_pool, switch_core_new_memory_pool, SWITCH_STATUS_MEMERR, and SWITCH_STATUS_SUCCESS.
Referenced by switch_ivr_record_session_event().
|
static |
Definition at line 2885 of file switch_ivr_async.c.
References pool, SWITCH_CHANNEL_SESSION_LOG, switch_core_destroy_memory_pool, switch_core_file_close(), switch_event_safe_destroy, SWITCH_LOG_ERROR, switch_log_printf(), and SWITCH_STATUS_SUCCESS.
Referenced by record_callback(), and switch_ivr_record_session_event().
|
static |
Definition at line 1356 of file switch_ivr_async.c.
References switch_stream_handle::data, switch_api_execute(), switch_channel_execute_on(), switch_channel_execute_on_value(), switch_channel_expand_variables, switch_channel_get_variable, switch_core_session_get_channel(), switch_core_session_strdup, switch_event_get_header, SWITCH_RECORD_POST_PROCESS_EXEC_API_VARIABLE, SWITCH_RECORD_POST_PROCESS_EXEC_APP_VARIABLE, switch_safe_free, SWITCH_STANDARD_STREAM, and record_helper::variables.
Referenced by record_callback().
|
static |
Definition at line 1265 of file switch_ivr_async.c.
References record_helper::buffer_mutex, record_helper::bug, record_helper::cond, record_helper::cond_mutex, switch_codec_implementation::decoded_bytes_per_packet, record_helper::fh, record_helper::file, record_helper::hangup_on_error, record_helper::helper_pool, switch_codec_implementation::number_of_channels, record_helper::read_impl, record_helper::recording_session, set_completion_cause(), SMBF_STEREO, switch_buffer_create_dynamic(), switch_buffer_inuse(), switch_buffer_read(), SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, switch_channel_down_nosig, switch_channel_hangup, SWITCH_CHANNEL_SESSION_LOG, switch_core_alloc, switch_core_file_has_video(), switch_core_file_write(), switch_core_media_bug_get_session(), switch_core_media_bug_get_user_data(), switch_core_media_bug_test_flag(), switch_core_session_get_channel(), switch_core_session_get_read_impl(), switch_core_session_read_lock(), switch_core_session_reset(), switch_core_session_rwunlock(), SWITCH_FILE_OPEN, SWITCH_LOG_ERROR, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_RECOMMENDED_BUFFER_SIZE, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_thread_cond_wait(), SWITCH_TRUE, record_helper::thread_buffer, record_helper::thread_needs_transfer, and record_helper::thread_ready.
Referenced by record_callback().
|
static |
Definition at line 2922 of file switch_ivr_async.c.
References get_recording_var(), and switch_true().
Referenced by switch_ivr_record_session_event().
|
static |
Definition at line 1224 of file switch_ivr_async.c.
References switch_codec_implementation::actual_samples_per_second, record_helper::completion_cause, exec_app(), record_helper::fh, record_helper::file, merge_recording_variables(), switch_file_handle::samples_out, record_helper::start_event_sent, switch_channel_api_on(), switch_channel_event_set_data(), switch_channel_execute_on(), switch_channel_execute_on_value(), switch_channel_set_variable_printf(), switch_event_add_header_string(), switch_event_create, switch_event_fire, switch_event_get_header, SWITCH_EVENT_RECORD_STOP, SWITCH_STACK_BOTTOM, SWITCH_STATUS_SUCCESS, record_helper::variables, and zstr.
Referenced by record_callback().
|
static |
Definition at line 3665 of file switch_ivr_async.c.
References switch_frame::data, switch_frame::datalen, memset(), switch_codec_implementation::number_of_channels, switch_session_audio_t::read_level, switch_session_audio_t::read_mute, switch_session_audio_t::session, SWITCH_ABC_TYPE_READ_REPLACE, SWITCH_ABC_TYPE_WRITE_REPLACE, switch_change_sln_volume(), switch_channel_set_private(), switch_core_media_bug_get_read_replace_frame(), switch_core_media_bug_get_session(), switch_core_media_bug_get_write_replace_frame(), switch_core_media_bug_set_read_replace_frame(), switch_core_media_bug_set_write_replace_frame(), switch_core_session_get_channel(), switch_core_session_get_read_impl(), SWITCH_FALSE, switch_generate_sln_silence(), SWITCH_TRUE, switch_session_audio_t::write_level, and switch_session_audio_t::write_mute.
Referenced by switch_ivr_session_audio().
|
static |
Set the recording completion cause. The cause can only be set once, to minimize the logic in the record_callback. [The completion_cause strings are essentially those of an MRCP Recorder resource.]
Definition at line 1173 of file switch_ivr_async.c.
References record_helper::completion_cause.
Referenced by record_callback(), recording_thread(), and switch_ivr_record_session_event().
|
static |
Definition at line 5147 of file switch_ivr_async.c.
References speech_thread_handle::ah, switch_frame::buflen, speech_thread_handle::cond, switch_frame::data, switch_frame::datalen, speech_thread_handle::mutex, speech_thread_handle::pool, speech_thread_handle::ready, speech_thread_handle::session, speech_on_dtmf(), speech_thread(), SWITCH_ABC_TYPE_CLOSE, SWITCH_ABC_TYPE_INIT, SWITCH_ABC_TYPE_READ, SWITCH_ABC_TYPE_WRITE, SWITCH_ASR_FLAG_NONE, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_private(), switch_core_asr_check_results(), switch_core_asr_close(), switch_core_asr_feed(), switch_core_media_bug_get_session(), switch_core_media_bug_read(), switch_core_session_get_channel(), SWITCH_FALSE, SWITCH_LOG_DEBUG, switch_log_printf(), switch_mutex_lock(), switch_mutex_trylock(), switch_mutex_unlock(), SWITCH_RECOMMENDED_BUFFER_SIZE, SWITCH_SPEECH_KEY, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_thread_cond_signal(), switch_thread_create(), switch_thread_join(), SWITCH_THREAD_STACKSIZE, switch_threadattr_create(), switch_threadattr_stacksize_set(), SWITCH_TRUE, and speech_thread_handle::thread.
Referenced by switch_ivr_detect_speech_init().
|
static |
Definition at line 5213 of file switch_ivr_async.c.
References speech_thread_handle::ah, SWITCH_ASR_FLAG_NONE, switch_channel_get_private(), SWITCH_CHANNEL_SESSION_LOG, switch_core_asr_feed_dtmf(), switch_core_session_get_channel(), SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_SPEECH_KEY, and SWITCH_STATUS_SUCCESS.
Referenced by speech_callback(), switch_ivr_detect_speech_init(), and switch_ivr_stop_detect_speech().
|
static |
Definition at line 4990 of file switch_ivr_async.c.
References speech_thread_handle::ah, speech_thread_handle::cond, switch_dtmf_t::digit, switch_dtmf_t::duration, is_dtmf, speech_thread_handle::mutex, speech_thread_handle::pool, speech_thread_handle::ready, speech_thread_handle::session, switch_dtmf_t::source, SWITCH_ASR_FLAG_CLOSED, SWITCH_ASR_FLAG_FIRE_EVENTS, SWITCH_ASR_FLAG_NONE, SWITCH_CHANNEL_CHANNEL_LOG, switch_channel_down_nosig, switch_channel_event_set_data(), switch_channel_get_variable, switch_channel_queue_dtmf(), switch_channel_up_nosig, switch_core_asr_check_results(), switch_core_asr_get_result_headers(), switch_core_asr_get_results(), switch_core_default_dtmf_duration(), switch_core_session_get_channel(), switch_core_session_queue_event(), switch_core_session_read_lock(), switch_core_session_rwunlock(), SWITCH_DTMF_INBAND_AUDIO, switch_event_add_body(), switch_event_add_header_string(), switch_event_create, switch_event_destroy(), SWITCH_EVENT_DETECTED_SPEECH, switch_event_dup(), switch_event_fire, switch_event_merge(), switch_ivr_resume_detect_speech(), SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), switch_mutex_init(), switch_mutex_lock(), SWITCH_MUTEX_NESTED, switch_mutex_unlock(), switch_safe_free, SWITCH_STACK_BOTTOM, SWITCH_STATUS_BREAK, SWITCH_STATUS_MORE_DATA, SWITCH_STATUS_SUCCESS, switch_stristr(), switch_test_flag, switch_thread_cond_create(), switch_thread_cond_wait(), and switch_true().
Referenced by speech_callback().
|
static |
|
static |
Definition at line 362 of file switch_ivr_async.c.
References dm_binding_head_t::binding_list, switch_ivr_dmachine::cur_digit_len, switch_ivr_dmachine_binding::digits, switch_ivr_dmachine::digits, DM_MATCH_BOTH, DM_MATCH_EXACT, DM_MATCH_NEVER, DM_MATCH_NONE, DM_MATCH_PARTIAL, switch_ivr_dmachine_binding::first_match, switch_ivr_dmachine_binding::is_priority, switch_ivr_dmachine_binding::is_regex, switch_ivr_dmachine::last_matching_binding, switch_ivr_dmachine::last_matching_digits, switch_ivr_dmachine::max_digit_len, memset(), switch_ivr_dmachine_binding::next, switch_ivr_dmachine::pool, switch_ivr_dmachine::realm, switch_ivr_dmachine_binding::repl, switch_ivr_dmachine_binding::rmatch, switch_ivr_dmachine_binding::substituted, switch_assert, switch_core_strdup, switch_perform_substitution(), switch_regex_match(), switch_regex_perform(), switch_regex_safe_free, switch_set_string, SWITCH_STATUS_SUCCESS, dm_binding_head_t::terminators, and zstr.
Referenced by switch_ivr_dmachine_ping().
|
static |
Definition at line 501 of file switch_ivr_async.c.
References switch_ivr_dmachine::cur_digit_len, switch_ivr_dmachine::digit_timeout_ms, switch_ivr_dmachine::input_timeout_ms, switch_ivr_dmachine::last_digit_time, SWITCH_FALSE, switch_time_now(), and SWITCH_TRUE.
Referenced by switch_ivr_dmachine_ping().
|
static |
Definition at line 1934 of file switch_ivr_async.c.
References record_helper::recording_session, record_helper::transfer_complete, and record_helper::transfer_from_session.
Referenced by switch_ivr_transfer_recordings().
|
static |
Definition at line 2276 of file switch_ivr_async.c.
References switch_gcd().
Referenced by switch_ivr_eavesdrop_session().
SWITCH_STANDARD_SCHED_FUNC | ( | sch_hangup_callback | ) |
Definition at line 5510 of file switch_ivr_async.c.
References hangup_helper::bleg, hangup_helper::cause, if(), switch_assert, switch_channel_hangup, SWITCH_CHANNEL_SESSION_LOG, switch_core_session_get_channel(), switch_core_session_get_partner, switch_core_session_locate, switch_core_session_rwunlock(), switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_STATUS_SUCCESS, and hangup_helper::uuid_str.
SWITCH_STANDARD_SCHED_FUNC | ( | sch_transfer_callback | ) |
Definition at line 5559 of file switch_ivr_async.c.
References transfer_helper::context, transfer_helper::dialplan, transfer_helper::extension, if(), switch_assert, switch_core_session_locate, switch_core_session_rwunlock(), switch_ivr_session_transfer(), and transfer_helper::uuid_str.
SWITCH_STANDARD_SCHED_FUNC | ( | sch_broadcast_callback | ) |
Definition at line 5626 of file switch_ivr_async.c.
References broadcast_helper::flags, broadcast_helper::path, switch_assert, switch_ivr_broadcast(), and broadcast_helper::uuid_str.
|
static |
Definition at line 3898 of file switch_ivr_async.c.
References teletone_generation_session::buffer, switch_buffer_write(), teletone_mux_tones(), and teletone_generation_session::user_data.
Referenced by inband_dtmf_generate_callback().
|
static |
Definition at line 1811 of file switch_ivr_async.c.
References SWITCH_ABC_TYPE_READ_TEXT, switch_core_get_variable(), switch_core_media_bug_get_session(), switch_core_media_bug_get_text(), switch_core_session_queue_event(), switch_event_add_body(), switch_event_create, switch_event_dup(), switch_event_fire, SWITCH_EVENT_TEXT, SWITCH_STATUS_SUCCESS, SWITCH_TRUE, switch_true(), SWITCH_VA_NONE, and zstr.
Referenced by switch_ivr_capture_text().
|
static |
Definition at line 4190 of file switch_ivr_async.c.
References switch_tone_detect_t::app, switch_tone_container_t::bug_running, switch_tone_detect_t::callback, switch_frame::data, switch_tone_detect_t::data, switch_tone_detect_t::default_expires, switch_tone_detect_t::default_sleep, switch_tone_detect_t::expires, switch_tone_detect_t::hits, switch_tone_container_t::index, switch_tone_detect_t::key, switch_tone_container_t::list, switch_tone_detect_t::mt, switch_tone_detect_t::once, switch_frame::samples, switch_tone_container_t::session, switch_tone_detect_t::sleep, SWITCH_ABC_TYPE_CLOSE, SWITCH_ABC_TYPE_INIT, SWITCH_ABC_TYPE_READ_REPLACE, SWITCH_ABC_TYPE_WRITE, SWITCH_ABC_TYPE_WRITE_REPLACE, switch_channel_execute_on(), SWITCH_CHANNEL_EXECUTE_ON_TONE_DETECT_VARIABLE, SWITCH_CHANNEL_SESSION_LOG, switch_core_media_bug_get_read_replace_frame(), switch_core_media_bug_get_session(), switch_core_media_bug_get_write_replace_frame(), switch_core_session_execute_application_async(), switch_core_session_get_channel(), switch_core_session_queue_event(), switch_event_add_header_string(), switch_event_create, SWITCH_EVENT_DETECTED_TONE, switch_event_dup(), switch_event_fire, SWITCH_FALSE, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_SUCCESS, SWITCH_TRUE, teletone_multi_tone_detect(), tone_detect_set_total_time(), switch_tone_detect_t::total_hits, and switch_tone_detect_t::up.
Referenced by switch_ivr_tone_detect_session().
|
static |
Definition at line 4153 of file switch_ivr_async.c.
References switch_tone_detect_t::key, switch_tone_container_t::list, switch_tone_container_t::session, switch_tone_detect_t::start_time, switch_channel_set_variable_name_printf(), switch_core_session_get_channel(), switch_micro_time_now(), switch_mprintf(), and switch_safe_free.
Referenced by tone_detect_callback(), and tone_on_dtmf().
|
static |
Definition at line 4162 of file switch_ivr_async.c.
References switch_tone_detect_t::app, switch_tone_detect_t::callback, switch_tone_detect_t::data, switch_tone_container_t::detect_fax, switch_dtmf_t::digit, switch_tone_container_t::list, switch_tone_container_t::session, switch_channel_api_on(), SWITCH_CHANNEL_API_ON_TONE_DETECT_VARIABLE, switch_channel_execute_on(), SWITCH_CHANNEL_EXECUTE_ON_TONE_DETECT_VARIABLE, switch_channel_get_private(), switch_core_session_execute_application_async(), switch_core_session_get_channel(), SWITCH_STATUS_SUCCESS, and tone_detect_set_total_time().
Referenced by switch_ivr_tone_detect_session().
|
static |
Definition at line 1983 of file switch_ivr_async.c.
References switch_frame::img, SMBF_SPY_VIDEO_STREAM, SMBF_SPY_VIDEO_STREAM_BLEG, switch_core_media_bug_push_spy_frame(), switch_core_media_bug_test_flag(), SWITCH_RW_READ, SWITCH_RW_WRITE, and SWITCH_STATUS_SUCCESS.
Referenced by eavesdrop_callback().
|
static |
Definition at line 5781 of file switch_ivr_async.c.
References oht_s::alpha, CF_VIDEO_DECODED_READ, vpx_image::d_h, vpx_image::d_w, switch_frame::img, oht_s::img, oht_s::pos, SWITCH_ABC_TYPE_CLOSE, SWITCH_ABC_TYPE_INIT, SWITCH_ABC_TYPE_WRITE_VIDEO_PING, switch_channel_test_flag(), switch_core_media_bug_get_session(), switch_core_media_bug_get_video_ping_frame(), switch_core_session_get_channel(), SWITCH_FIT_SIZE, switch_img_copy(), switch_img_find_position(), switch_img_fit(), switch_img_free(), switch_img_overlay(), and SWITCH_TRUE.
Referenced by switch_ivr_video_write_overlay_session().
|
static |
Definition at line 796 of file switch_ivr_async.c.
References buf, switch_file_handle::channels, switch_frame::data, switch_frame::datalen, displace_helper_t::fh, displace_helper_t::file, displace_helper_t::loop, memset(), displace_helper_t::mux, switch_frame::samples, SWITCH_ABC_TYPE_CLOSE, SWITCH_ABC_TYPE_INIT, SWITCH_ABC_TYPE_READ_REPLACE, SWITCH_ABC_TYPE_WRITE, SWITCH_ABC_TYPE_WRITE_REPLACE, switch_channel_set_private(), switch_core_file_close(), switch_core_file_read(), switch_core_file_seek(), switch_core_media_bug_get_read_replace_frame(), switch_core_media_bug_get_session(), switch_core_media_bug_get_write_replace_frame(), switch_core_media_bug_set_read_replace_frame(), switch_core_media_bug_set_write_replace_frame(), switch_core_session_get_channel(), SWITCH_FALSE, switch_normalize_to_16bit, SWITCH_RECOMMENDED_BUFFER_SIZE, SWITCH_STATUS_SUCCESS, and SWITCH_TRUE.
Referenced by switch_ivr_displace_session().