FreeSWITCH API Documentation
1.7.0
|
#include <switch.h>
Go to the source code of this file.
Data Structures | |
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 1364 of file switch_ivr_originate.c.
Referenced by early_thread_run(), switch_ivr_enterprise_originate(), and switch_ivr_originate().
#define peer_eligible | ( | _peer | ) |
Definition at line 1883 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 1744 of file switch_ivr_originate.c.
typedef struct ringback ringback_t |
Definition at line 824 of file switch_ivr_originate.c.
enum abort_t |
Enumerator | |
---|---|
IDX_XFER | |
IDX_KEY_CANCEL | |
IDX_TIMEOUT | |
IDX_CANCEL | |
IDX_NADA |
Definition at line 133 of file switch_ivr_originate.c.
|
static |
Definition at line 425 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_timeout, key_collect::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(), 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_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_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_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(), SWITCH_TRUE, and zstr.
Referenced by switch_ivr_originate().
|
static |
Definition at line 257 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_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 149 of file switch_ivr_originate.c.
References switch_application_interface::application_function, buf, CF_WINNER, key_collect::confirm_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 1747 of file switch_ivr_originate.c.
References switch_codec_implementation::actual_samples_per_second, 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, early_state::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 1422 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, and zstr.
Referenced by switch_ivr_enterprise_originate().
|
static |
Definition at line 1393 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::done, enterprise_originate_handle_t::flags, 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 384 of file switch_ivr_originate.c.
References ep, 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 246 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 336 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 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.
|
static |
Definition at line 61 of file switch_ivr_originate.c.
References CS_CONSUME_MEDIA, CS_ROUTING, switch_channel_get_state(), switch_channel_set_state, switch_core_session_get_channel(), and SWITCH_STATUS_FALSE.
|
static |
Definition at line 1201 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 826 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 1889 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.