FreeSWITCH API Documentation
1.7.0
|
#include <switch.h>
Go to the source code of this file.
Data Structures | |
struct | switch_ivr_bridge_data |
Macros | |
#define | DEFAULT_LEAD_FRAMES 10 |
Typedefs | |
typedef struct switch_ivr_bridge_data | switch_ivr_bridge_data_t |
Variables | |
static const switch_state_handler_table_t | audio_bridge_peer_state_handlers |
static const switch_state_handler_table_t | uuid_bridge_state_handlers |
static const switch_state_handler_table_t | signal_bridge_state_handlers |
#define DEFAULT_LEAD_FRAMES 10 |
Definition at line 33 of file switch_ivr_bridge.c.
Referenced by audio_bridge_thread().
typedef struct switch_ivr_bridge_data switch_ivr_bridge_data_t |
Definition at line 311 of file switch_ivr_bridge.c.
|
static |
Definition at line 1411 of file switch_ivr_bridge.c.
References SWITCH_CAUSE_ORIGINATOR_CANCEL, switch_channel_get_cause(), and switch_channel_hangup.
Referenced by switch_ivr_multi_threaded_bridge().
|
static |
Definition at line 909 of file switch_ivr_bridge.c.
References switch_channel_get_name(), SWITCH_CHANNEL_SESSION_LOG, switch_core_session_get_channel(), SWITCH_LOG_DEBUG, switch_log_printf(), and SWITCH_STATUS_FALSE.
|
static |
Definition at line 839 of file switch_ivr_bridge.c.
References audio_bridge_thread(), switch_ivr_bridge_data::b_uuid, CF_ANSWERED, CF_INNER_BRIDGE, CF_INTERCEPT, CF_INTERCEPTED, CF_REDIRECT, CF_TRANSFER, CF_XFER_ZOMBIE, switch_ivr_bridge_data::clean_exit, CS_EXCHANGE_MEDIA, CS_HANGUP, CS_PARK, CS_ROUTING, switch_ivr_bridge_data::session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, SWITCH_CAUSE_NORMAL_CLEARING, SWITCH_CAUSE_ORIGINATOR_CANCEL, SWITCH_CAUSE_PICKED_OFF, switch_channel_clear_flag(), switch_channel_clear_state_handler(), switch_channel_get_private(), switch_channel_get_state(), switch_channel_get_variable, switch_channel_hangup, switch_channel_set_private(), switch_channel_set_state, switch_channel_set_variable, switch_channel_test_flag(), switch_core_session_get_channel(), switch_core_session_reset(), switch_ivr_park_session(), SWITCH_PARK_AFTER_BRIDGE_VARIABLE, SWITCH_STATUS_FALSE, SWITCH_TRANSFER_AFTER_BRIDGE_VARIABLE, SWITCH_TRUE, switch_true(), and transfer_after_bridge().
|
static |
Definition at line 898 of file switch_ivr_bridge.c.
References CS_CONSUME_MEDIA, switch_channel_get_name(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_state, switch_core_session_get_channel(), SWITCH_LOG_DEBUG, switch_log_printf(), and SWITCH_STATUS_FALSE.
|
static |
Definition at line 313 of file switch_ivr_bridge.c.
References switch_codec_implementation::actual_samples_per_second, switch_ivr_bridge_data::b_uuid, switch_frame::buflen, CF_3P_NOMEDIA_REQUESTED, CF_ACCEPT_CNG, CF_ANSWERED, CF_BRIDGE_NOWRITE, CF_BRIDGE_ORIGINATOR, CF_BRIDGED, CF_BYPASS_MEDIA_AFTER_BRIDGE, CF_EARLY_MEDIA, CF_HANGUP_HELD, CF_HOLD, CF_HOLD_ON_BRIDGE, CF_INNER_BRIDGE, CF_INTERCEPT, CF_INTERCEPTED, CF_LEG_HOLDING, CF_NOT_READY, CF_REDIRECT, CF_RESET, CF_SUSPEND, CF_TRANSFER, CF_VIDEO, CF_VIDEO_BLANK, CF_VIDEO_BREAK, switch_ivr_bridge_data::clean_exit, switch_frame::codec, CS_EXECUTE, CS_PARK, CS_RESET, switch_frame::data, switch_frame::datalen, switch_codec_implementation::decoded_bytes_per_packet, DEFAULT_LEAD_FRAMES, switch_ivr_bridge_data::done, switch_event::event_id, exec_app(), switch_core_session_message::from, switch_ivr_bridge_data::input_callback, switch_core_session_message::message_id, switch_codec_implementation::microseconds_per_packet, switch_codec_implementation::number_of_channels, switch_core_session_message::numeric_arg, switch_ivr_bridge_data::other_leg_data, switch_frame::samples, switch_ivr_bridge_data::session, switch_ivr_bridge_data::session_data, SFF_CNG, SMF_REBRIDGE, switch_ivr_bridge_data::stream_id, switch_core_session_message::string_arg, SWITCH_API_BRIDGE_END_VARIABLE, SWITCH_API_BRIDGE_START_VARIABLE, SWITCH_BRIDGE_VARIABLE, SWITCH_CALL_DIRECTION_INBOUND, SWITCH_CALL_DIRECTION_OUTBOUND, switch_caller_extension_add_application(), switch_caller_extension_new(), SWITCH_CAUSE_ALLOTTED_TIMEOUT, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, SWITCH_CAUSE_NONE, SWITCH_CAUSE_NORMAL_CLEARING, switch_channel_answer, switch_channel_api_on(), switch_channel_clear_flag(), switch_channel_dequeue_dtmf(), switch_channel_direction(), switch_channel_down_nosig, switch_channel_execute_on(), SWITCH_CHANNEL_EXECUTE_ON_POST_BRIDGE_VARIABLE, SWITCH_CHANNEL_EXECUTE_ON_PRE_BRIDGE_VARIABLE, switch_channel_get_cause(), switch_channel_get_name(), switch_channel_get_state(), switch_channel_get_variable, switch_channel_get_variable_dup(), switch_channel_hangup, switch_channel_has_dtmf(), switch_channel_mark_hold(), switch_channel_media_ack, switch_channel_media_up, switch_channel_pass_callee_id(), switch_channel_pre_answer, switch_channel_ready, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_caller_extension(), switch_channel_set_flag, switch_channel_set_state, switch_channel_set_variable, switch_channel_stop_broadcast, switch_channel_test_flag(), switch_channel_up, switch_channel_up_nosig, switch_channel_wait_for_flag(), SWITCH_CODEC_FLAG_DECODE, SWITCH_CODEC_FLAG_ENCODE, switch_core_codec_destroy(), switch_core_codec_init, switch_core_media_check_video_function(), switch_core_media_end_video_function(), switch_core_session_dequeue_event(), switch_core_session_execute_application_async(), switch_core_session_get_channel(), switch_core_session_get_pool(), switch_core_session_get_read_impl(), switch_core_session_get_uuid(), switch_core_session_kill_channel, switch_core_session_locate, switch_core_session_private_event_count(), switch_core_session_read_frame(), switch_core_session_read_video_frame(), switch_core_session_receive_event(), switch_core_session_receive_message, switch_core_session_reset(), switch_core_session_rwunlock(), switch_core_session_send_dtmf(), switch_core_session_video_reset(), switch_core_session_write_frame(), switch_core_session_write_video_frame(), switch_epoch_time_now(), SWITCH_EVENT_COMMAND, switch_event_destroy(), SWITCH_EVENT_MESSAGE, SWITCH_EXEC_AFTER_BRIDGE_APP_VARIABLE, SWITCH_EXEC_AFTER_BRIDGE_ARG_VARIABLE, SWITCH_FALSE, switch_generate_sln_silence(), SWITCH_INPUT_TYPE_DTMF, SWITCH_INPUT_TYPE_EVENT, SWITCH_IO_FLAG_NONE, switch_ivr_3p_nomedia(), switch_ivr_bridge_display(), switch_ivr_parse_all_messages(), switch_ivr_parse_next_event(), SWITCH_LOG_CRIT, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_MESSAGE_INDICATE_BRIDGE, SWITCH_MESSAGE_INDICATE_HOLD, SWITCH_MESSAGE_INDICATE_UNBRIDGE, SWITCH_READ_ACCEPTABLE, SWITCH_RECOMMENDED_BUFFER_SIZE, SWITCH_SIG_BREAK, SWITCH_STATUS_BREAK, SWITCH_STATUS_IGNORE, SWITCH_STATUS_SUCCESS, switch_stristr(), switch_test_flag, SWITCH_TRANSFER_AFTER_BRIDGE_VARIABLE, SWITCH_TRUE, switch_true(), switch_yield, and zstr.
Referenced by audio_bridge_on_exchange_media(), and switch_ivr_multi_threaded_bridge().
|
static |
Definition at line 1326 of file switch_ivr_bridge.c.
References switch_caller_profile::callee_id_name, switch_caller_profile::callee_id_number, switch_caller_profile::pool, SWITCH_BRIDGE_EXPORT_VARS_VARIABLE, switch_channel_get_caller_profile(), switch_channel_process_export(), and switch_core_strdup.
Referenced by switch_ivr_multi_threaded_bridge(), and switch_ivr_signal_bridge().
|
static |
Definition at line 1776 of file switch_ivr_bridge.c.
References CF_3P_MEDIA_REQUESTED, CF_3P_NOMEDIA_REQUESTED, CF_PROXY_MODE, SWITCH_BRIDGE_UUID_VARIABLE, SWITCH_BRIDGE_VARIABLE, SWITCH_CAUSE_ATTENDED_TRANSFER, switch_channel_hangup, switch_channel_set_variable, switch_channel_test_flag(), switch_core_session_get_channel(), switch_core_session_get_partner, switch_core_session_rwunlock(), SWITCH_SIGNAL_BRIDGE_VARIABLE, and SWITCH_STATUS_SUCCESS.
Referenced by switch_ivr_uuid_bridge().
|
static |
Definition at line 1765 of file switch_ivr_bridge.c.
References CF_3P_MEDIA_REQUESTED, CF_MEDIA_TRANS, CF_PROXY_MODE, SMF_NONE, switch_channel_test_flag(), switch_core_session_get_channel(), switch_core_session_get_uuid(), and switch_ivr_media().
Referenced by uuid_bridge_on_reset().
|
static |
Definition at line 1125 of file switch_ivr_bridge.c.
References CF_BRIDGE_ORIGINATOR, switch_core_session_message::from, switch_core_session_message::message_id, MESSAGE_STAMP_FFL, switch_core_session_message::string_arg, switch_channel_clear_flag_recursive(), switch_channel_event_set_data(), switch_channel_get_variable, switch_channel_test_flag(), switch_core_session_alloc, switch_core_session_get_channel(), switch_core_session_queue_message(), SWITCH_EVENT_CHANNEL_UNBRIDGE, switch_event_create, switch_event_fire, SWITCH_MESSAGE_INDICATE_UNBRIDGE, SWITCH_SIGNAL_BRIDGE_VARIABLE, and SWITCH_STATUS_SUCCESS.
Referenced by signal_bridge_on_hibernate().
|
static |
Definition at line 1095 of file switch_ivr_bridge.c.
References CF_BRIDGE_ORIGINATOR, CS_EXECUTE, switch_dtmf_t::digit, switch_assert, switch_channel_get_private(), switch_channel_get_variable, switch_channel_set_state, switch_channel_test_flag(), switch_core_session_get_channel(), switch_core_session_locate, switch_core_session_rwunlock(), SWITCH_SIGNAL_BRIDGE_VARIABLE, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by signal_bridge_on_hangup(), and signal_bridge_on_hibernate().
|
static |
Definition at line 231 of file switch_ivr_bridge.c.
References switch_caller_profile::callee_id_name, switch_caller_profile::callee_id_number, switch_caller_profile::caller_id_name, switch_caller_profile::caller_id_number, CF_BRIDGE_ORIGINATOR, switch_caller_profile::destination_number, switch_core_session_message::from, switch_core_session_message::message_id, MESSAGE_STAMP_FFL, switch_core_session_message::string_array_arg, switch_channel_get_caller_profile(), switch_channel_test_flag(), switch_core_session_alloc, switch_core_session_get_channel(), switch_core_session_queue_message(), switch_core_session_strdup, SWITCH_MESSAGE_INDICATE_DISPLAY, and zstr.
Referenced by switch_ivr_bridge_display().
|
static |
Definition at line 1227 of file switch_ivr_bridge.c.
References CF_ANSWERED, CF_BRIDGE_ORIGINATOR, CF_INTERCEPT, CF_INTERCEPTED, CS_EXECUTE, sb_on_dtmf(), SWITCH_BRIDGE_VARIABLE, switch_channel_clear_flag_recursive(), switch_channel_event_set_data(), switch_channel_get_cause(), switch_channel_get_private(), switch_channel_get_variable, switch_channel_handle_cause(), switch_channel_hangup, switch_channel_set_flag, switch_channel_set_private(), switch_channel_set_state, switch_channel_set_variable, switch_channel_test_flag(), switch_channel_up_nosig, switch_core_session_get_channel(), switch_core_session_get_uuid(), switch_core_session_locate, switch_core_session_rwunlock(), switch_event_add_header_string(), switch_event_add_presence_data_cols(), SWITCH_EVENT_CHANNEL_UNBRIDGE, switch_event_create, switch_event_fire, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE, switch_ivr_park_session(), SWITCH_PARK_AFTER_BRIDGE_VARIABLE, SWITCH_SIGNAL_BRIDGE_VARIABLE, SWITCH_STACK_BOTTOM, SWITCH_STATUS_SUCCESS, SWITCH_TRANSFER_AFTER_BRIDGE_VARIABLE, switch_true(), transfer_after_bridge(), and zstr.
|
static |
Definition at line 1155 of file switch_ivr_bridge.c.
References CF_BRIDGE_ORIGINATOR, CF_BROADCAST, CS_HIBERNATE, DIGIT_TARGET_PEER, DIGIT_TARGET_SELF, switch_core_session_message::from, hanguphook(), switch_core_session_message::message_id, sb_on_dtmf(), switch_core_session_message::string_arg, switch_assert, SWITCH_BRIDGE_VARIABLE, switch_channel_event_set_data(), switch_channel_get_name(), switch_channel_get_state(), switch_channel_get_variable, switch_channel_ready, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_bridge_time(), switch_channel_set_private(), switch_channel_set_variable, switch_channel_test_flag(), switch_core_session_get_channel(), switch_core_session_get_dmachine(), switch_core_session_get_uuid(), switch_core_session_locate, switch_core_session_receive_message, switch_core_session_rwunlock(), switch_core_session_strdup, switch_event_add_header_string(), switch_event_add_presence_data_cols(), SWITCH_EVENT_CHANNEL_BRIDGE, switch_event_create, switch_event_fire, switch_ivr_dmachine_ping(), switch_ivr_parse_all_messages(), SWITCH_LAST_BRIDGE_VARIABLE, SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_MESSAGE_INDICATE_BRIDGE, SWITCH_SIGNAL_BRIDGE_VARIABLE, SWITCH_STACK_BOTTOM, SWITCH_STATUS_SUCCESS, and switch_yield.
switch_status_t switch_ivr_multi_threaded_bridge | ( | switch_core_session_t * | session, |
switch_core_session_t * | peer_session, | ||
switch_input_callback_function_t | input_callback, | ||
void * | session_data, | ||
void * | peer_session_data | ||
) |
Definition at line 1422 of file switch_ivr_bridge.c.
References abort_call(), audio_bridge_thread(), switch_ivr_bridge_data::b_uuid, CF_ANSWERED, CF_BRIDGE_ORIGINATOR, CF_BRIDGED, CF_BROADCAST, CF_EARLY_MEDIA, CF_INNER_BRIDGE, CF_INTERCEPT, CF_INTERCEPTED, CF_MEDIA_BRIDGE_TTL, CF_PROXY_MODE, CF_REDIRECT, CF_RESET, CF_RING_READY, CF_TRANSFER, CF_XFER_ZOMBIE, check_bridge_export(), cJSON_Delete(), cJSON_PrintUnformatted(), switch_ivr_bridge_data::clean_exit, CS_CONSUME_MEDIA, CS_DESTROY, CS_EXCHANGE_MEDIA, CS_EXECUTE, CS_HANGUP, CS_PARK, CS_RESET, CS_ROUTING, CS_SOFT_EXECUTE, switch_core_session_message::from, switch_ivr_bridge_data::input_callback, switch_core_session_message::message_id, switch_ivr_bridge_data::other_leg_data, switch_ivr_bridge_data::session, switch_ivr_bridge_data::session_data, switch_ivr_bridge_data::stream_id, switch_core_session_message::string_arg, SWITCH_BRIDGE_CHANNEL_VARIABLE, SWITCH_BRIDGE_HANGUP_CAUSE_VARIABLE, SWITCH_BRIDGE_UUID_VARIABLE, SWITCH_BRIDGE_VARIABLE, SWITCH_CAUSE_ALLOTTED_TIMEOUT, SWITCH_CAUSE_NO_ANSWER, SWITCH_CAUSE_NONE, SWITCH_CAUSE_NORMAL_CLEARING, switch_channel_add_state_handler(), switch_channel_answer, switch_channel_audio_sync, switch_channel_cause2str(), switch_channel_clear_flag(), switch_channel_clear_flag_recursive(), switch_channel_down_nosig, switch_channel_event_set_data(), switch_channel_get_cause(), switch_channel_get_name(), switch_channel_get_state(), switch_channel_get_variable, switch_channel_handle_cause(), switch_channel_hangup, switch_channel_media_ready, switch_channel_pass_callee_id(), switch_channel_ready, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_bridge_time(), switch_channel_set_flag, switch_channel_set_flag_recursive(), switch_channel_set_private(), switch_channel_set_state, switch_channel_set_variable, switch_channel_set_variable_name_printf(), switch_channel_stop_broadcast, switch_channel_test_flag(), switch_channel_wait_for_flag(), switch_channel_wait_for_state(), switch_cond_next(), SWITCH_COPY_JSON_CDR_VARIABLE, switch_copy_string(), SWITCH_COPY_XML_CDR_VARIABLE, switch_core_session_alloc, switch_core_session_get_channel(), switch_core_session_get_uuid(), switch_core_session_read_lock(), switch_core_session_receive_message, switch_core_session_rwunlock(), switch_core_session_strdup, switch_event_add_header_string(), switch_event_add_presence_data_cols(), SWITCH_EVENT_CHANNEL_BRIDGE, SWITCH_EVENT_CHANNEL_UNBRIDGE, switch_event_create, switch_event_fire, SWITCH_FALSE, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE, switch_ivr_generate_json_cdr(), switch_ivr_generate_xml_cdr(), switch_ivr_park_session(), switch_ivr_parse_all_events(), switch_ivr_parse_all_messages(), switch_ivr_session_transfer(), switch_ivr_signal_bridge(), switch_ivr_wait_for_answer(), SWITCH_LAST_BRIDGE_VARIABLE, SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_MESSAGE_INDICATE_BRIDGE, SWITCH_MESSAGE_INDICATE_UNBRIDGE, SWITCH_PARK_AFTER_BRIDGE_VARIABLE, SWITCH_PARK_AFTER_EARLY_BRIDGE_VARIABLE, switch_safe_free, SWITCH_SIGNAL_BOND_VARIABLE, SWITCH_STACK_BOTTOM, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, SWITCH_TRANSFER_AFTER_BRIDGE_VARIABLE, SWITCH_TRANSFER_AFTER_EARLY_BRIDGE_VARIABLE, SWITCH_TRUE, switch_true(), switch_xml_free(), switch_xml_toxml(), and transfer_after_bridge().
Referenced by uuid_bridge_on_soft_execute().
|
static |
Definition at line 822 of file switch_ivr_bridge.c.
References SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable, switch_core_session_get_channel(), switch_core_session_strdup, switch_ivr_session_transfer(), SWITCH_LOG_ERROR, switch_log_printf(), switch_separate_string(), SWITCH_TRANSFER_AFTER_BRIDGE_VARIABLE, and zstr.
Referenced by audio_bridge_on_exchange_media(), signal_bridge_on_hangup(), and switch_ivr_multi_threaded_bridge().
|
static |
Definition at line 962 of file switch_ivr_bridge.c.
References CS_RESET, switch_channel_set_state, switch_core_session_get_channel(), and SWITCH_STATUS_FALSE.
|
static |
Definition at line 945 of file switch_ivr_bridge.c.
References CF_ORIGINATING, CF_UUID_BRIDGE_ORIGINATOR, cleanup_proxy_mode_b(), CS_SOFT_EXECUTE, switch_channel_clear_flag(), switch_channel_get_name(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_state, switch_channel_test_flag(), switch_core_session_get_channel(), SWITCH_LOG_DEBUG, switch_log_printf(), and SWITCH_STATUS_SUCCESS.
|
static |
Definition at line 968 of file switch_ivr_bridge.c.
References CF_REDIRECT, CF_TRANSFER, CF_UUID_BRIDGE_ORIGINATOR, CS_EXECUTE, CS_HANGUP, CS_PARK, CS_RESET, CS_ROUTING, CS_SOFT_EXECUTE, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, SWITCH_CAUSE_ORIGINATOR_CANCEL, switch_channel_clear_flag(), switch_channel_clear_state_handler(), switch_channel_down, switch_channel_down_nosig, switch_channel_event_set_data(), switch_channel_get_name(), switch_channel_get_running_state(), switch_channel_get_state(), switch_channel_get_variable, switch_channel_hangup, switch_channel_ready, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_state, switch_channel_set_variable, switch_channel_test_flag(), switch_core_session_get_channel(), switch_core_session_get_uuid(), switch_core_session_locate, switch_core_session_reset(), switch_core_session_rwunlock(), switch_event_add_header_string(), SWITCH_EVENT_CHANNEL_EXECUTE, switch_event_create, switch_event_fire, switch_ivr_multi_threaded_bridge(), switch_ivr_park_session(), switch_ivr_session_transfer(), switch_ivr_wait_for_answer(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, SWITCH_TRUE, switch_true(), SWITCH_UUID_BRIDGE, and switch_yield.
|
static |
Definition at line 35 of file switch_ivr_bridge.c.
|
static |
Definition at line 1315 of file switch_ivr_bridge.c.
|
static |
Definition at line 933 of file switch_ivr_bridge.c.