RTS API Documentation
1.10.11
|
#include <switch.h>
Go to the source code of this file.
Data Structures | |
struct | switch_dial_leg_list_s |
struct | switch_dial_leg_s |
struct | switch_dial_handle_s |
struct | switch_dial_handle_list_s |
struct | originate_status_t |
struct | originate_global_t |
struct | key_collect |
struct | ringback |
struct | enterprise_originate_handle_t |
struct | ent_originate_ringback |
struct | early_state |
Macros | |
#define | QUOTED_ESC_COMMA 1 |
#define | UNQUOTED_ESC_COMMA 2 |
#define | MAX_PEERS 128 |
#define | peer_eligible(_peer) |
Typedefs | |
typedef struct ringback | ringback_t |
typedef struct early_state | early_state_t |
Enumerations | |
enum | abort_t { IDX_XFER = -5, IDX_KEY_CANCEL = -4, IDX_TIMEOUT = -3, IDX_CANCEL = -2, IDX_NADA = -1 } |
Variables | |
static const switch_state_handler_table_t | originate_state_handlers |
#define MAX_PEERS 128 |
Definition at line 83 of file switch_ivr_originate.c.
Referenced by early_thread_run(), switch_dial_handle_list_add_handle(), switch_dial_handle_list_create_handle(), switch_dial_handle_list_create_json_obj(), switch_ivr_enterprise_originate(), and switch_ivr_originate().
#define peer_eligible | ( | _peer | ) |
Definition at line 2047 of file switch_ivr_originate.c.
Referenced by switch_ivr_originate(), and wait_for_cause().
#define QUOTED_ESC_COMMA 1 |
Definition at line 35 of file switch_ivr_originate.c.
Referenced by switch_ivr_originate().
#define UNQUOTED_ESC_COMMA 2 |
Definition at line 36 of file switch_ivr_originate.c.
Referenced by switch_ivr_originate().
typedef struct early_state early_state_t |
Definition at line 1894 of file switch_ivr_originate.c.
typedef struct ringback ringback_t |
Definition at line 906 of file switch_ivr_originate.c.
enum abort_t |
Enumerator | |
---|---|
IDX_XFER | |
IDX_KEY_CANCEL | |
IDX_TIMEOUT | |
IDX_CANCEL | |
IDX_NADA |
Definition at line 170 of file switch_ivr_originate.c.
|
static |
Definition at line 470 of file switch_ivr_originate.c.
References originate_global_t::bridge_early_media, originate_status_t::caller_profile, originate_global_t::cancel_timeout, CF_ANSWERED, CF_BRIDGED, CF_CHANNEL_SWAP, CF_CONSUME_ON_ORIGINATE, CF_EARLY_MEDIA, CF_EARLY_OK, CF_ORIGINATING, CF_PARK, CF_PICKUP, CF_REDIRECT, CF_RING_READY, CF_TAGGED, CF_THREAD_SLEEPING, CF_TRANSFER, CF_WINNER, CF_XFER_ZOMBIE, originate_global_t::confirm_read_timeout, key_collect::confirm_read_timeout, originate_global_t::confirm_timeout, CS_HANGUP, CS_RESET, originate_status_t::early_media, originate_global_t::early_ok, originate_global_t::error_file, key_collect::error_file, originate_global_t::file, key_collect::file, originate_global_t::hups, originate_global_t::idx, IDX_NADA, originate_global_t::ignore_early_media, originate_global_t::ignore_ring_ready, inherit_codec(), key, originate_global_t::key, key_collect::key, launch_collect_thread(), monitor_callback(), originate_global_t::monitor_early_media_fail, originate_global_t::monitor_early_media_ring, originate_global_t::monitor_early_media_ring_total, originate_global_t::originate_status, originate_status_t::peer_channel, originate_status_t::peer_session, originate_status_t::per_channel_progress_timelimit_sec, originate_status_t::per_channel_timelimit_sec, originate_global_t::progress, originate_global_t::return_ring_ready, originate_status_t::ring_ready, originate_global_t::ring_ready, originate_global_t::ringback_ok, originate_global_t::sending_ringback, originate_global_t::sent_ring, originate_global_t::session, key_collect::session, switch_assert, SWITCH_CAUSE_NO_PICKUP, SWITCH_CAUSE_PICKED_OFF, switch_channel_answer, switch_channel_api_on(), switch_channel_audio_sync, SWITCH_CHANNEL_CHANNEL_LOG, switch_channel_clear_flag(), switch_channel_down_nosig, switch_channel_execute_on(), switch_channel_get_caller_profile(), switch_channel_get_cause(), switch_channel_get_name(), switch_channel_get_state(), switch_channel_get_variable, switch_channel_hangup, SWITCH_CHANNEL_LOG, switch_channel_media_ready, switch_channel_pass_callee_id(), switch_channel_ready, switch_channel_ring_ready, switch_channel_ring_ready_value, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_set_private(), switch_channel_set_variable, switch_channel_test_flag(), switch_channel_up, switch_core_session_alloc, switch_core_session_get_channel(), switch_core_session_get_name, switch_core_session_get_uuid(), switch_core_session_locate, switch_core_session_messages_waiting(), switch_core_session_rwunlock(), switch_core_session_strdup, switch_core_session_wake_session_thread(), switch_epoch_time_now(), switch_is_number(), switch_ivr_parse_all_events(), switch_ivr_tone_detect_session(), SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), switch_safe_free, switch_separate_string(), switch_snprintf(), originate_status_t::tagged, TIME_T_FMT, and zstr.
Referenced by switch_ivr_originate().
|
static |
Definition at line 297 of file switch_ivr_originate.c.
References CF_ANSWERED, CF_BLOCK_STATE, CF_EARLY_MEDIA, CF_RING_READY, CS_DESTROY, CS_REPORTING, originate_global_t::monitor_early_media_ring, originate_global_t::originate_status, originate_status_t::peer_channel, originate_status_t::per_channel_delay_start, originate_status_t::per_channel_progress_timelimit_sec, originate_status_t::per_channel_timelimit_sec, SWITCH_CAUSE_ALLOTTED_TIMEOUT, SWITCH_CAUSE_PROGRESS_TIMEOUT, switch_channel_clear_flag(), switch_channel_get_state(), switch_channel_hangup, switch_channel_test_flag(), switch_channel_up_nosig, and switch_epoch_time_now().
Referenced by switch_ivr_originate().
|
static |
Definition at line 186 of file switch_ivr_originate.c.
References switch_application_interface::application_function, buf, CF_WINNER, key_collect::confirm_read_timeout, key_collect::error_file, key_collect::file, key_collect::key, memset(), key_collect::session, SWITCH_BLANK_STRING, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, switch_channel_get_name(), switch_channel_hangup, switch_channel_ready, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_set_variable, switch_channel_up_nosig, switch_core_session_exec(), switch_core_session_get_channel(), switch_core_session_read_lock(), switch_core_session_rwunlock(), switch_ivr_play_file(), switch_ivr_read(), switch_ivr_sleep(), switch_loadable_module_get_application_interface(), SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_STATUS_BREAK, SWITCH_STATUS_SUCCESS, SWITCH_STATUS_TOO_SMALL, SWITCH_TRUE, UNPROTECT_INTERFACE, and zstr.
Referenced by launch_collect_thread().
|
static |
Definition at line 1897 of file switch_ivr_originate.c.
References switch_codec_implementation::actual_samples_per_second, originate_status_t::array_pos, ringback::asis, originate_global_t::bridge_early_media, early_state::buffer, CF_ANSWERED, CF_RING_READY, switch_frame::data, switch_frame::datalen, originate_global_t::early_ok, if(), originate_global_t::ignore_early_media, MAX_PEERS, memset(), switch_codec_implementation::microseconds_per_packet, early_state::mutex, switch_codec_implementation::number_of_channels, early_state::oglobals, originate_global_t::originate_status, originate_status_t::peer_channel, originate_status_t::peer_session, early_state::ready, early_state::ringback, originate_global_t::session, SFF_CNG, switch_buffer_write(), switch_channel_media_ready, SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), switch_channel_up, switch_channel_up_nosig, SWITCH_CODEC_FLAG_DECODE, SWITCH_CODEC_FLAG_ENCODE, switch_core_codec_destroy(), switch_core_codec_init, switch_core_codec_ready(), switch_core_session_get_channel(), switch_core_session_get_pool(), switch_core_session_get_read_impl(), switch_core_session_read_frame(), switch_core_session_read_lock(), switch_core_session_reset(), switch_core_session_rwunlock(), switch_core_session_set_read_codec(), SWITCH_FALSE, SWITCH_IO_FLAG_NONE, SWITCH_LOG_ERROR, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), switch_normalize_to_16bit, SWITCH_READ_ACCEPTABLE, SWITCH_RECOMMENDED_BUFFER_SIZE, SWITCH_STATUS_SUCCESS, switch_test_flag, SWITCH_TRUE, and early_state::ttl.
Referenced by switch_ivr_originate().
|
static |
Definition at line 1531 of file switch_ivr_originate.c.
References CF_NOT_READY, ent_originate_ringback::ringback_data, ent_originate_ringback::running, ent_originate_ringback::session, switch_channel_ready, switch_channel_set_flag, switch_core_session_get_channel(), switch_core_session_read_lock(), switch_core_session_rwunlock(), switch_is_file_path(), switch_ivr_collect_digits_callback(), switch_ivr_gentones(), switch_ivr_parse_all_messages(), switch_ivr_play_file(), SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and zstr.
Referenced by switch_ivr_enterprise_originate().
|
static |
Definition at line 1490 of file switch_ivr_originate.c.
References enterprise_originate_handle_t::bleg, enterprise_originate_handle_t::bridgeto, enterprise_originate_handle_t::caller_profile_override, enterprise_originate_handle_t::cancel_cause, enterprise_originate_handle_t::cause, enterprise_originate_handle_t::cid_name_override, enterprise_originate_handle_t::cid_num_override, enterprise_originate_handle_t::dh, enterprise_originate_handle_t::done, enterprise_originate_handle_t::fence_mutex, enterprise_originate_handle_t::flags, switch_dial_leg_list_s::handle, enterprise_originate_handle_t::mutex, enterprise_originate_handle_t::ovars, enterprise_originate_handle_t::status, SWITCH_CAUSE_LOSE_RACE, switch_channel_hangup, switch_channel_set_variable, switch_core_session_get_channel(), switch_core_session_rwunlock(), switch_ivr_originate(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_SUCCESS, enterprise_originate_handle_t::table, and enterprise_originate_handle_t::timelimit_sec.
Referenced by switch_ivr_enterprise_originate().
|
static |
Definition at line 429 of file switch_ivr_originate.c.
References switch_codec_implementation::iananame, switch_codec_implementation::microseconds_per_packet, switch_codec_implementation::samples_per_second, SWITCH_CHANNEL_CHANNEL_LOG, switch_channel_get_name(), switch_channel_get_variable, switch_channel_set_variable, switch_core_session_get_channel(), switch_core_session_get_read_impl(), switch_core_session_get_video_read_impl(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_LOG_WARNING, switch_snprintf(), SWITCH_STATUS_SUCCESS, switch_stristr(), switch_true(), and zstr.
Referenced by check_channel_status(), and setup_ringback().
|
static |
Definition at line 286 of file switch_ivr_originate.c.
References collect_thread_run(), key_collect::session, switch_core_session_get_pool(), switch_thread_create(), SWITCH_THREAD_STACKSIZE, switch_threadattr_create(), switch_threadattr_detach_set(), switch_threadattr_stacksize_set(), and thread.
Referenced by check_channel_status().
|
static |
Definition at line 4654 of file switch_ivr_originate.c.
References switch_dial_leg_list_s::leg_idx, leg_serialize_json_obj(), switch_dial_leg_list_s::legs, and SWITCH_STATUS_SUCCESS.
Referenced by switch_dial_handle_serialize_json_obj().
|
static |
Definition at line 4640 of file switch_ivr_originate.c.
References switch_dial_leg_s::dial_string, switch_dial_leg_s::leg_vars, SWITCH_STATUS_SUCCESS, and vars_serialize_json_obj().
Referenced by leg_list_serialize_json_obj().
|
static |
Definition at line 381 of file switch_ivr_originate.c.
References originate_global_t::early_ok, originate_global_t::ignore_early_media, originate_global_t::ignore_ring_ready, originate_global_t::monitor_early_media_ring_count, originate_global_t::monitor_early_media_ring_total, originate_global_t::progress, originate_global_t::ring_ready, SWITCH_CAUSE_USER_BUSY, switch_channel_get_private(), switch_channel_get_variable, switch_channel_hangup, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_private(), switch_channel_set_variable, switch_channel_str2cause(), switch_core_session_get_channel(), SWITCH_FALSE, SWITCH_LOG_DEBUG, switch_log_printf(), and SWITCH_TRUE.
Referenced by check_channel_status().
|
static |
Definition at line 4898 of file switch_ivr_originate.c.
References switch_dtmf_t::digit, SWITCH_INPUT_TYPE_DTMF, SWITCH_STATUS_BREAK, and SWITCH_STATUS_SUCCESS.
Referenced by switch_ivr_enterprise_orig_and_bridge(), and switch_ivr_orig_and_bridge().
|
static |
Definition at line 40 of file switch_ivr_originate.c.
References CF_CONSUME_ON_ORIGINATE, CF_ORIGINATING, CF_PROXY_MODE, CF_TAGGED, CS_CONSUME_MEDIA, switch_channel_clear_state_handler(), switch_channel_get_state(), switch_channel_media_ready, switch_channel_test_flag(), switch_core_session_get_channel(), SWITCH_FALSE, switch_ivr_parse_all_messages(), switch_ivr_sleep(), SWITCH_STATUS_FALSE, and switch_yield.
Referenced by originate_on_routing().
|
static |
Definition at line 61 of file switch_ivr_originate.c.
References CS_CONSUME_MEDIA, CS_ROUTING, originate_on_consume_media_transmit(), switch_channel_get_state(), switch_channel_set_state, switch_core_session_get_channel(), and SWITCH_STATUS_FALSE.
|
static |
Definition at line 1291 of file switch_ivr_originate.c.
References switch_codec_implementation::actual_samples_per_second, ringback::asis, ringback::audio_buffer, originate_global_t::bridge_early_media, CF_ANSWERED, CF_EARLY_MEDIA, switch_file_handle::channels, ringback::channels, switch_frame::codec, switch_frame::data, switch_frame::datalen, switch_codec_implementation::decoded_bytes_per_packet, ringback::fh, ringback::fhb, originate_global_t::gen_ringback, switch_codec_implementation::iananame, switch_codec_implementation::impl_id, switch_codec::implementation, inherit_codec(), memset(), switch_codec_implementation::microseconds_per_packet, switch_codec_implementation::number_of_channels, originate_status_t::peer_session, teletone_generation_session::rate, switch_file_handle::samplerate, switch_frame::samples, originate_global_t::session, ringback::silence, switch_buffer_create_dynamic(), switch_buffer_destroy(), switch_buffer_set_loops(), SWITCH_CAUSE_BEARERCAPABILITY_NOTIMPL, SWITCH_CHANNEL_CHANNEL_LOG, switch_channel_get_name(), switch_channel_hangup, switch_channel_media_ready, switch_channel_pre_answer, switch_channel_ready, SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), SWITCH_CODEC_FLAG_DECODE, SWITCH_CODEC_FLAG_ENCODE, SWITCH_CODEC_FLAG_PASSTHROUGH, switch_core_codec_init, switch_core_file_close(), switch_core_file_open, switch_core_session_get_channel(), switch_core_session_get_pool(), switch_core_session_get_read_codec(), switch_core_session_get_read_impl(), switch_core_session_get_write_codec(), switch_core_session_get_write_impl(), switch_core_session_set_read_codec(), SWITCH_FILE_DATA_SHORT, SWITCH_FILE_FLAG_READ, SWITCH_FILE_OPEN, switch_goto_status, switch_is_file_path(), SWITCH_IVR_VERIFY_SILENCE_DIVISOR, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_LOG_WARNING, switch_mprintf(), switch_safe_free, SWITCH_STATUS_BREAK, SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, switch_test_flag, SWITCH_URL_SEPARATOR, teletone_destroy_session(), teletone_handler(), teletone_init_session(), teletone_run(), ringback::ts, and zstr.
Referenced by switch_ivr_originate().
|
static |
Definition at line 4378 of file switch_ivr_originate.c.
References switch_dial_leg_s::dial_string, switch_dial_handle_s::global_vars, switch_dial_handle_s::is_sub, switch_dial_leg_list_s::leg_idx, switch_dial_handle_s::leg_list_idx, switch_dial_handle_s::leg_lists, switch_dial_leg_s::leg_vars, switch_dial_leg_list_s::legs, switch_assert, switch_dial_handle_add_leg_list(), switch_dial_handle_create(), switch_dial_leg_list_add_leg(), switch_event_dup(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by switch_ivr_enterprise_originate().
|
static |
Definition at line 4309 of file switch_ivr_originate.c.
References switch_dial_leg_list_s::handle, switch_dial_handle_list_s::handle_idx, switch_dial_handle_list_s::handles, MAX_PEERS, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by switch_dial_handle_list_create_json_obj().
|
static |
Definition at line 908 of file switch_ivr_originate.c.
References ringback::audio_buffer, buf, teletone_generation_session::buffer, buflen, ringback::channels, ringback::mux_buf, ringback::mux_buflen, switch_buffer_write(), switch_mux_channels(), teletone_mux_tones(), and teletone_generation_session::user_data.
Referenced by setup_ringback(), and switch_ivr_wait_for_answer().
|
static |
Definition at line 4627 of file switch_ivr_originate.c.
References switch_event::headers, switch_event_header::name, switch_event_header::next, SWITCH_STATUS_SUCCESS, and switch_event_header::value.
Referenced by leg_serialize_json_obj(), switch_dial_handle_list_serialize_json_obj(), and switch_dial_handle_serialize_json_obj().
|
static |
Definition at line 2053 of file switch_ivr_originate.c.
References peer_eligible, SWITCH_CAUSE_NONE, switch_channel_get_cause(), and switch_yield.
Referenced by switch_ivr_originate().
|
static |
Definition at line 38 of file switch_ivr_originate.c.