RTS API Documentation
1.10.11
|
Macros | |
#define | switch_ivr_phrase_macro(session, macro_name, data, lang, args) switch_ivr_phrase_macro_event(session, macro_name, data, NULL, lang, args) |
Typedefs | |
typedef switch_ivr_action_t | switch_ivr_menu_action_function_t(struct switch_ivr_menu *, char *, char *, size_t, void *) |
typedef struct switch_ivr_menu | switch_ivr_menu_t |
typedef struct switch_ivr_menu_action | switch_ivr_menu_action_t |
typedef struct switch_ivr_menu_xml_ctx | switch_ivr_menu_xml_ctx_t |
Enumerations | |
enum | switch_ivr_menu_flags { SWITCH_IVR_MENU_FLAG_FALLTOMAIN = (1 << 0), SWITCH_IVR_MENU_FLAG_FREEPOOL = (1 << 1), SWITCH_IVR_MENU_FLAG_STACK = (1 << 2) } |
enum | switch_ivr_action_t { SWITCH_IVR_ACTION_DIE, SWITCH_IVR_ACTION_EXECMENU, SWITCH_IVR_ACTION_EXECAPP, SWITCH_IVR_ACTION_PLAYSOUND, SWITCH_IVR_ACTION_BACK, SWITCH_IVR_ACTION_TOMAIN, SWITCH_IVR_ACTION_NOOP } |
IVR menu functions
#define switch_ivr_phrase_macro | ( | session, | |
macro_name, | |||
data, | |||
lang, | |||
args | |||
) | switch_ivr_phrase_macro_event(session, macro_name, data, NULL, lang, args) |
Definition at line 936 of file switch_ivr.h.
Referenced by play_and_collect(), CoreSession::sayPhrase(), switch_ivr_eavesdrop_session(), switch_ivr_phrase_macro_event(), and switch_ivr_play_file().
typedef switch_ivr_action_t switch_ivr_menu_action_function_t(struct switch_ivr_menu *, char *, char *, size_t, void *) |
Definition at line 816 of file switch_ivr.h.
typedef struct switch_ivr_menu_action switch_ivr_menu_action_t |
Definition at line 818 of file switch_ivr.h.
typedef struct switch_ivr_menu switch_ivr_menu_t |
Definition at line 817 of file switch_ivr.h.
typedef struct switch_ivr_menu_xml_ctx switch_ivr_menu_xml_ctx_t |
Definition at line 904 of file switch_ivr.h.
enum switch_ivr_action_t |
Enumerator | |
---|---|
SWITCH_IVR_ACTION_DIE | |
SWITCH_IVR_ACTION_EXECMENU | |
SWITCH_IVR_ACTION_EXECAPP | |
SWITCH_IVR_ACTION_PLAYSOUND | |
SWITCH_IVR_ACTION_BACK | |
SWITCH_IVR_ACTION_TOMAIN | |
SWITCH_IVR_ACTION_NOOP |
Definition at line 806 of file switch_ivr.h.
Enumerator | |
---|---|
SWITCH_IVR_MENU_FLAG_FALLTOMAIN | |
SWITCH_IVR_MENU_FLAG_FREEPOOL | |
SWITCH_IVR_MENU_FLAG_STACK |
Definition at line 800 of file switch_ivr.h.
void switch_dial_handle_add_global_var | ( | switch_dial_handle_t * | handle, |
const char * | var, | ||
const char * | val | ||
) |
Definition at line 4508 of file switch_ivr_originate.c.
References switch_dial_handle_s::global_vars, switch_assert, switch_event_add_header_string(), SWITCH_EVENT_CHANNEL_DATA, switch_event_create_plain(), and SWITCH_STACK_BOTTOM.
Referenced by switch_dial_handle_add_global_var_printf(), and switch_dial_handle_create_json_obj().
void switch_dial_handle_add_global_var_printf | ( | switch_dial_handle_t * | handle, |
const char * | var, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 4519 of file switch_ivr_originate.c.
References switch_dial_handle_add_global_var(), and switch_vasprintf().
void switch_dial_handle_add_leg_list | ( | switch_dial_handle_t * | handle, |
switch_dial_leg_list_t ** | leg_listP | ||
) |
Definition at line 4459 of file switch_ivr_originate.c.
References switch_dial_leg_list_s::handle, switch_dial_handle_s::leg_list_idx, switch_dial_handle_s::leg_lists, switch_dial_handle_s::pool, switch_assert, and switch_core_alloc.
Referenced by switch_dial_handle_create_json_obj(), and switch_dial_handle_dup().
switch_status_t switch_dial_handle_add_leg_var | ( | switch_dial_leg_t * | leg, |
const char * | var, | ||
const char * | val | ||
) |
Definition at line 4537 of file switch_ivr_originate.c.
References switch_dial_leg_s::leg_vars, switch_event_add_header_string(), SWITCH_EVENT_CHANNEL_DATA, switch_event_create_plain(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_NOTFOUND, and SWITCH_STATUS_SUCCESS.
Referenced by switch_dial_handle_add_leg_var_printf(), and switch_dial_handle_create_json_obj().
switch_status_t switch_dial_handle_add_leg_var_printf | ( | switch_dial_leg_t * | leg, |
const char * | var, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 4551 of file switch_ivr_originate.c.
References switch_dial_handle_add_leg_var(), and switch_vasprintf().
switch_status_t switch_dial_handle_create | ( | switch_dial_handle_t ** | handle | ) |
Definition at line 4418 of file switch_ivr_originate.c.
References pool, switch_dial_handle_s::pool, switch_assert, switch_core_alloc, switch_core_new_memory_pool, and SWITCH_STATUS_SUCCESS.
Referenced by switch_dial_handle_create_json_obj(), switch_dial_handle_dup(), and switch_dial_handle_list_create_handle().
switch_status_t switch_dial_handle_create_json | ( | switch_dial_handle_t ** | handle, |
const char * | handle_string | ||
) |
Definition at line 4769 of file switch_ivr_originate.c.
References switch_dial_handle_create_json_obj(), SWITCH_STATUS_FALSE, and zstr.
switch_status_t switch_dial_handle_create_json_obj | ( | switch_dial_handle_t ** | handle, |
cJSON * | json | ||
) |
Definition at line 4710 of file switch_ivr_originate.c.
References cJSON_Array, cJSON_ArrayForEach, cJSON_GetObjectCstr(), cJSON_Object, cJSON_String, cJSON::string, switch_dial_handle_add_global_var(), switch_dial_handle_add_leg_list(), switch_dial_handle_add_leg_var(), switch_dial_handle_create(), switch_dial_leg_list_add_leg(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, cJSON::type, and cJSON::valuestring.
Referenced by switch_dial_handle_create_json(), and switch_dial_handle_list_create_json_obj().
void switch_dial_handle_destroy | ( | switch_dial_handle_t ** | handle | ) |
Definition at line 4436 of file switch_ivr_originate.c.
References switch_dial_handle_s::global_vars, switch_dial_leg_list_s::handle, 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, pool, switch_dial_handle_s::pool, switch_core_destroy_memory_pool, and switch_event_destroy().
Referenced by switch_dial_handle_list_create_json_obj(), switch_dial_handle_list_destroy(), and switch_ivr_enterprise_originate().
switch_event_t* switch_dial_handle_get_global_vars | ( | switch_dial_handle_t * | handle | ) |
Definition at line 4606 of file switch_ivr_originate.c.
References switch_dial_handle_s::global_vars, and switch_assert.
Referenced by switch_ivr_originate().
int switch_dial_handle_get_peers | ( | switch_dial_handle_t * | handle, |
int | idx, | ||
char ** | array, | ||
int | max | ||
) |
Definition at line 4578 of file switch_ivr_originate.c.
References switch_dial_leg_s::dial_string, switch_dial_handle_s::leg_lists, and switch_dial_leg_list_s::legs.
Referenced by switch_ivr_originate().
int switch_dial_handle_get_total | ( | switch_dial_handle_t * | handle | ) |
Definition at line 4573 of file switch_ivr_originate.c.
References switch_dial_handle_s::leg_list_idx.
Referenced by switch_ivr_originate().
int switch_dial_handle_get_vars | ( | switch_dial_handle_t * | handle, |
int | idx, | ||
switch_event_t ** | array, | ||
int | max | ||
) |
Definition at line 4592 of file switch_ivr_originate.c.
References switch_dial_handle_s::leg_lists, switch_dial_leg_s::leg_vars, and switch_dial_leg_list_s::legs.
Referenced by switch_ivr_originate().
void switch_dial_handle_list_add_global_var | ( | switch_dial_handle_list_t * | hl, |
const char * | var, | ||
const char * | val | ||
) |
Definition at line 4349 of file switch_ivr_originate.c.
References switch_dial_handle_list_s::global_vars, switch_assert, switch_event_add_header_string(), SWITCH_EVENT_CHANNEL_DATA, switch_event_create_plain(), and SWITCH_STACK_BOTTOM.
Referenced by switch_dial_handle_list_add_global_var_printf(), and switch_dial_handle_list_create_json_obj().
void switch_dial_handle_list_add_global_var_printf | ( | switch_dial_handle_list_t * | hl, |
const char * | var, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 4360 of file switch_ivr_originate.c.
References switch_dial_handle_list_add_global_var(), and switch_vasprintf().
switch_status_t switch_dial_handle_list_create | ( | switch_dial_handle_list_t ** | hl | ) |
Definition at line 4291 of file switch_ivr_originate.c.
References pool, switch_dial_handle_list_s::pool, switch_assert, switch_core_alloc, switch_core_new_memory_pool, and SWITCH_STATUS_SUCCESS.
Referenced by switch_dial_handle_list_create_json_obj().
switch_status_t switch_dial_handle_list_create_handle | ( | switch_dial_handle_list_t * | hl, |
switch_dial_handle_t ** | handle | ||
) |
Definition at line 4318 of file switch_ivr_originate.c.
References switch_dial_handle_list_s::handle_idx, switch_dial_handle_list_s::handles, MAX_PEERS, switch_dial_handle_create(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_dial_handle_list_create_json | ( | switch_dial_handle_list_t ** | handle, |
const char * | handle_string | ||
) |
Definition at line 4878 of file switch_ivr_originate.c.
References switch_dial_handle_list_create_json_obj(), SWITCH_STATUS_FALSE, and zstr.
switch_status_t switch_dial_handle_list_create_json_obj | ( | switch_dial_handle_list_t ** | handle, |
cJSON * | json | ||
) |
Definition at line 4828 of file switch_ivr_originate.c.
References cJSON::child, cJSON_ArrayForEach, cJSON_Object, cJSON_String, switch_dial_leg_list_s::handle, MAX_PEERS, cJSON::next, cJSON::string, switch_assert, SWITCH_CHANNEL_LOG, switch_dial_handle_create_json_obj(), switch_dial_handle_destroy(), switch_dial_handle_list_add_global_var(), switch_dial_handle_list_add_handle(), switch_dial_handle_list_create(), switch_dial_handle_list_destroy(), switch_log_printf(), SWITCH_LOG_WARNING, switch_safe_free, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, cJSON::type, and cJSON::valuestring.
Referenced by switch_dial_handle_list_create_json().
void switch_dial_handle_list_destroy | ( | switch_dial_handle_list_t ** | hl | ) |
Definition at line 4329 of file switch_ivr_originate.c.
References switch_dial_handle_list_s::global_vars, switch_dial_handle_list_s::handle_idx, switch_dial_handle_list_s::handles, pool, switch_dial_handle_list_s::pool, switch_core_destroy_memory_pool, switch_dial_handle_destroy(), and switch_event_destroy().
Referenced by switch_dial_handle_list_create_json_obj().
switch_status_t switch_dial_handle_list_serialize_json | ( | switch_dial_handle_list_t * | hl, |
char ** | str | ||
) |
Definition at line 4816 of file switch_ivr_originate.c.
References switch_dial_handle_list_serialize_json_obj(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_dial_handle_list_serialize_json_obj | ( | switch_dial_handle_list_t * | hl, |
cJSON ** | json | ||
) |
Definition at line 4789 of file switch_ivr_originate.c.
References switch_dial_handle_list_s::global_vars, switch_dial_leg_list_s::handle, switch_dial_handle_list_s::handle_idx, switch_dial_handle_list_s::handles, switch_dial_handle_serialize_json_obj(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and vars_serialize_json_obj().
Referenced by switch_dial_handle_list_serialize_json().
switch_status_t switch_dial_handle_serialize_json | ( | switch_dial_handle_t * | handle, |
char ** | str | ||
) |
Definition at line 4698 of file switch_ivr_originate.c.
References switch_dial_handle_serialize_json_obj(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_dial_handle_serialize_json_obj | ( | switch_dial_handle_t * | handle, |
cJSON ** | json | ||
) |
Definition at line 4671 of file switch_ivr_originate.c.
References switch_dial_handle_s::global_vars, switch_dial_handle_s::leg_list_idx, leg_list_serialize_json_obj(), switch_dial_handle_s::leg_lists, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and vars_serialize_json_obj().
Referenced by switch_dial_handle_list_serialize_json_obj(), and switch_dial_handle_serialize_json().
const char* switch_dial_leg_get_var | ( | switch_dial_leg_t * | leg, |
const char * | key | ||
) |
Definition at line 4620 of file switch_ivr_originate.c.
References switch_dial_leg_s::leg_vars, switch_assert, and switch_event_get_header.
switch_event_t* switch_dial_leg_get_vars | ( | switch_dial_leg_t * | leg | ) |
Definition at line 4613 of file switch_ivr_originate.c.
References switch_dial_leg_s::leg_vars, and switch_assert.
void switch_dial_leg_list_add_leg | ( | switch_dial_leg_list_t * | parent, |
switch_dial_leg_t ** | legP, | ||
const char * | dial_string | ||
) |
Definition at line 4491 of file switch_ivr_originate.c.
References switch_dial_leg_s::dial_string, switch_dial_leg_list_s::handle, switch_dial_leg_s::handle, switch_dial_leg_list_s::leg_idx, switch_dial_leg_list_s::legs, switch_dial_handle_s::pool, switch_assert, switch_core_alloc, and switch_core_strdup.
Referenced by switch_dial_handle_create_json_obj(), switch_dial_handle_dup(), and switch_dial_leg_list_add_leg_printf().
void switch_dial_leg_list_add_leg_printf | ( | switch_dial_leg_list_t * | parent, |
switch_dial_leg_t ** | legP, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 4473 of file switch_ivr_originate.c.
References switch_dial_leg_list_add_leg(), and switch_vasprintf().
switch_status_t switch_ivr_bind_dtmf_meta_session | ( | switch_core_session_t * | session, |
uint32_t | key, | ||
switch_bind_flag_t | bind_flags, | ||
const char * | app | ||
) |
Definition at line 4731 of file switch_ivr_async.c.
References dtmf_meta_app_t::app, dtmf_meta_app_t::bind_flags, dtmf_meta_app_t::flags, is_dtmf, switch_ivr_dmachine_binding::key, dtmf_meta_settings_t::map, dtmf_meta_settings_t::meta, meta_on_dtmf(), SBF_DIAL_ALEG, SBF_DIAL_BLEG, SMF_HOLD_BLEG, dtmf_meta_data_t::sr, switch_channel_get_private(), switch_channel_get_variable, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_private(), switch_core_session_alloc, switch_core_session_get_channel(), switch_core_session_strdup, SWITCH_DTMF_RECV, SWITCH_DTMF_SEND, switch_dtmftoi(), switch_itodtmf(), SWITCH_LOG_ERROR, SWITCH_LOG_INFO, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_META_VAR_KEY, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, dtmf_meta_settings_t::up, and zstr.
switch_status_t switch_ivr_blind_transfer_ack | ( | switch_core_session_t * | session, |
switch_bool_t | success | ||
) |
Definition at line 4418 of file switch_ivr.c.
References CF_CONFIRM_BLIND_TRANSFER, switch_core_session_message::from, switch_core_session_message::message_id, switch_core_session_message::numeric_arg, switch_channel_clear_flag(), switch_channel_get_variable, switch_channel_test_flag(), switch_core_session_get_channel(), switch_core_session_locate, switch_core_session_receive_message, switch_core_session_rwunlock(), SWITCH_MESSAGE_INDICATE_BLIND_TRANSFER_RESPONSE, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and zstr.
Referenced by switch_core_standard_on_routing().
switch_status_t switch_ivr_block_dtmf_session | ( | switch_core_session_t * | session | ) |
Definition at line 4717 of file switch_ivr_async.c.
References block_on_dtmf(), SWITCH_BLOCK_DTMF_KEY, switch_channel_get_private(), switch_channel_set_private(), switch_core_session_get_channel(), and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_capture_text | ( | switch_core_session_t * | session, |
switch_bool_t | on | ||
) |
Definition at line 1847 of file switch_ivr_async.c.
References record_helper::bug, SMBF_READ_TEXT_STREAM, switch_channel_get_private(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_private(), switch_core_media_bug_add(), switch_core_media_bug_remove(), switch_core_session_get_channel(), switch_core_session_get_uuid(), SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and text_callback().
char* switch_ivr_check_presence_mapping | ( | const char * | exten_name, |
const char * | domain_name | ||
) |
Definition at line 4340 of file switch_ivr.c.
References switch_xml::next, switch_assert, SWITCH_CHANNEL_LOG, switch_event_add_header_string(), switch_event_create, switch_event_destroy(), SWITCH_EVENT_REQUEST_PARAMS, SWITCH_LOG_DEBUG1, SWITCH_LOG_ERROR, switch_log_printf(), switch_regex_perform(), switch_regex_safe_free, SWITCH_STACK_BOTTOM, switch_xml_attr(), switch_xml_child(), switch_xml_free(), switch_xml_open_cfg(), and zstr.
switch_status_t switch_ivr_create_message_reply | ( | switch_event_t ** | reply, |
switch_event_t * | message, | ||
const char * | new_proto | ||
) |
Definition at line 4327 of file switch_ivr.c.
References switch_event_add_header_string(), switch_event_dup_reply(), SWITCH_STACK_BOTTOM, and SWITCH_STATUS_SUCCESS.
void switch_ivr_delay_echo | ( | switch_core_session_t * | session, |
uint32_t | delay_ms | ||
) |
Definition at line 3579 of file switch_ivr.c.
References switch_rtp_packet_t::body, switch_frame::buflen, switch_frame::codec, switch_frame::data, switch_frame::datalen, debug, switch_rtp_packet_t::header, switch_codec_implementation::microseconds_per_packet, switch_frame::packet, switch_frame::packetlen, switch_codec_implementation::samples_per_packet, switch_rtp_hdr_t::seq, SFF_CNG, SJB_AUDIO, switch_channel_get_variable, switch_channel_ready, SWITCH_CHANNEL_SESSION_LOG, 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_read_frame(), switch_core_session_write_frame(), SWITCH_IO_FLAG_NONE, switch_jb_create(), switch_jb_debug_level(), switch_jb_destroy(), switch_jb_get_packet(), switch_jb_put_packet(), SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_READ_ACCEPTABLE, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_rtp_hdr_t::ts, and switch_rtp_hdr_t::version.
switch_status_t switch_ivr_dmachine_bind | ( | switch_ivr_dmachine_t * | dmachine, |
const char * | realm, | ||
const char * | digits, | ||
switch_byte_t | is_priority, | ||
int32_t | key, | ||
switch_ivr_dmachine_callback_t | callback, | ||
void * | user_data | ||
) |
Definition at line 255 of file switch_ivr_async.c.
References switch_ivr_dmachine::binding_hash, dm_binding_head_t::binding_list, switch_ivr_dmachine_binding::callback, switch_ivr_dmachine_binding::digits, DMACHINE_MAX_DIGIT_LEN, switch_ivr_dmachine_binding::first_match, switch_ivr_dmachine_binding::is_priority, switch_ivr_dmachine_binding::is_regex, switch_ivr_dmachine_binding::key, switch_ivr_dmachine::max_digit_len, dm_binding_head_t::name, switch_ivr_dmachine::name, switch_ivr_dmachine_binding::next, switch_ivr_dmachine::pool, switch_ivr_dmachine::realm, switch_ivr_dmachine_binding::repl, SWITCH_CHANNEL_LOG, switch_core_alloc, switch_core_hash_find(), switch_core_hash_insert, switch_core_strdup, switch_ivr_dmachine_set_realm(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, dm_binding_head_t::tail, switch_ivr_dmachine_binding::user_data, and zstr.
switch_status_t switch_ivr_dmachine_clear | ( | switch_ivr_dmachine_t * | dmachine | ) |
Definition at line 692 of file switch_ivr_async.c.
References switch_ivr_dmachine::cur_digit_len, switch_ivr_dmachine::digits, switch_ivr_dmachine::last_digit_time, memset(), and SWITCH_STATUS_SUCCESS.
Referenced by switch_ivr_dmachine_ping().
switch_status_t switch_ivr_dmachine_clear_realm | ( | switch_ivr_dmachine_t * | dmachine, |
const char * | realm | ||
) |
Definition at line 231 of file switch_ivr_async.c.
References switch_ivr_dmachine::binding_hash, switch_ivr_dmachine::name, switch_ivr_dmachine::realm, SWITCH_CHANNEL_LOG, switch_core_hash_delete(), switch_core_hash_find(), SWITCH_LOG_ERROR, SWITCH_LOG_INFO, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and zstr.
switch_status_t switch_ivr_dmachine_create | ( | switch_ivr_dmachine_t ** | dmachine_p, |
const char * | name, | ||
switch_memory_pool_t * | pool, | ||
uint32_t | digit_timeout, | ||
uint32_t | input_timeout, | ||
switch_ivr_dmachine_callback_t | match_callback, | ||
switch_ivr_dmachine_callback_t | nonmatch_callback, | ||
void * | user_data | ||
) |
Definition at line 132 of file switch_ivr_async.c.
References switch_ivr_dmachine::binding_hash, switch_ivr_dmachine::digit_timeout_ms, switch_ivr_dmachine_match::dmachine, switch_ivr_dmachine::input_timeout_ms, switch_ivr_dmachine::match, switch_ivr_dmachine::match_callback, switch_ivr_dmachine::mutex, switch_ivr_dmachine::my_pool, switch_ivr_dmachine::name, switch_ivr_dmachine::nonmatch_callback, pool, switch_ivr_dmachine::pool, switch_core_alloc, switch_core_hash_init, switch_core_new_memory_pool, switch_core_strdup, switch_mutex_init(), SWITCH_MUTEX_NESTED, SWITCH_STATUS_SUCCESS, switch_ivr_dmachine_binding::user_data, and switch_ivr_dmachine::user_data.
void switch_ivr_dmachine_destroy | ( | switch_ivr_dmachine_t ** | dmachine | ) |
Definition at line 186 of file switch_ivr_async.c.
References pool, switch_core_destroy_memory_pool, and switch_core_hash_destroy().
Referenced by switch_core_session_perform_destroy().
switch_status_t switch_ivr_dmachine_feed | ( | switch_ivr_dmachine_t * | dmachine, |
const char * | digits, | ||
switch_ivr_dmachine_match_t ** | match | ||
) |
Definition at line 654 of file switch_ivr_async.c.
References switch_ivr_dmachine::cur_digit_len, switch_ivr_dmachine::digits, switch_ivr_dmachine::last_digit_time, switch_ivr_dmachine::max_digit_len, switch_ivr_dmachine::mutex, SWITCH_CHANNEL_LOG, switch_ivr_dmachine_ping(), SWITCH_LOG_ERROR, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_time_now(), and zstr.
Referenced by switch_core_session_recv_dtmf(), switch_core_session_send_dtmf(), switch_ivr_collect_digits_callback(), switch_ivr_gentones(), switch_ivr_park(), switch_ivr_play_file(), switch_ivr_record_file_event(), switch_ivr_sleep(), and switch_ivr_speak_text_handle().
const char* switch_ivr_dmachine_get_failed_digits | ( | switch_ivr_dmachine_t * | dmachine | ) |
Definition at line 527 of file switch_ivr_async.c.
References switch_ivr_dmachine::last_failed_digits.
switch_ivr_dmachine_match_t* switch_ivr_dmachine_get_match | ( | switch_ivr_dmachine_t * | dmachine | ) |
Definition at line 517 of file switch_ivr_async.c.
References switch_ivr_dmachine::is_match, and switch_ivr_dmachine::match.
const char* switch_ivr_dmachine_get_name | ( | switch_ivr_dmachine_t * | dmachine | ) |
switch_bool_t switch_ivr_dmachine_is_parsing | ( | switch_ivr_dmachine_t * | dmachine | ) |
Definition at line 687 of file switch_ivr_async.c.
References switch_ivr_dmachine::cur_digit_len.
Referenced by switch_ivr_play_file().
switch_status_t switch_ivr_dmachine_last_ping | ( | switch_ivr_dmachine_t * | dmachine | ) |
Definition at line 93 of file switch_ivr_async.c.
References switch_ivr_dmachine::last_return.
Referenced by switch_ivr_play_and_collect_input(), and switch_ivr_play_and_detect_speech().
switch_status_t switch_ivr_dmachine_ping | ( | switch_ivr_dmachine_t * | dmachine, |
switch_ivr_dmachine_match_t ** | match_p | ||
) |
Definition at line 533 of file switch_ivr_async.c.
References switch_ivr_dmachine_binding::callback, switch_ivr_dmachine::cur_digit_len, switch_ivr_dmachine::digits, DM_MATCH_BOTH, DM_MATCH_EXACT, DM_MATCH_NEGATIVE, DM_MATCH_NEVER, DM_MATCH_NONE, DM_MATCH_POSITIVE, switch_ivr_dmachine::is_match, switch_ivr_dmachine_binding::key, switch_ivr_dmachine::last_failed_digits, switch_ivr_dmachine::last_matching_binding, switch_ivr_dmachine::last_matching_digits, switch_ivr_dmachine::last_return, switch_ivr_dmachine::match, switch_ivr_dmachine::match_callback, switch_ivr_dmachine_match::match_digits, switch_ivr_dmachine_match::match_key, switch_ivr_dmachine::max_digit_len, switch_ivr_dmachine::mutex, switch_ivr_dmachine::nonmatch_callback, switch_ivr_dmachine::pinging, switch_ivr_dmachine_check_match(), switch_ivr_dmachine_check_timeout(), switch_ivr_dmachine_clear(), switch_mutex_trylock(), switch_mutex_unlock(), switch_set_string, SWITCH_STATUS_BREAK, SWITCH_STATUS_CONTINUE, SWITCH_STATUS_FALSE, SWITCH_STATUS_FOUND, SWITCH_STATUS_NOTFOUND, SWITCH_STATUS_SUCCESS, SWITCH_STATUS_TIMEOUT, switch_ivr_dmachine_match::type, switch_ivr_dmachine_binding::user_data, switch_ivr_dmachine::user_data, switch_ivr_dmachine_match::user_data, and zstr.
Referenced by signal_bridge_on_hibernate(), switch_core_session_read_frame(), switch_ivr_collect_digits_callback(), switch_ivr_dmachine_feed(), switch_ivr_gentones(), switch_ivr_park(), switch_ivr_play_file(), switch_ivr_record_file_event(), switch_ivr_sleep(), and switch_ivr_speak_text_handle().
void switch_ivr_dmachine_set_digit_timeout_ms | ( | switch_ivr_dmachine_t * | dmachine, |
uint32_t | digit_timeout_ms | ||
) |
Definition at line 176 of file switch_ivr_async.c.
References switch_ivr_dmachine::digit_timeout_ms.
void switch_ivr_dmachine_set_input_timeout_ms | ( | switch_ivr_dmachine_t * | dmachine, |
uint32_t | input_timeout_ms | ||
) |
Definition at line 181 of file switch_ivr_async.c.
References switch_ivr_dmachine::input_timeout_ms.
void switch_ivr_dmachine_set_match_callback | ( | switch_ivr_dmachine_t * | dmachine, |
switch_ivr_dmachine_callback_t | match_callback | ||
) |
Definition at line 111 of file switch_ivr_async.c.
References switch_ivr_dmachine::match_callback, and switch_assert.
void switch_ivr_dmachine_set_nonmatch_callback | ( | switch_ivr_dmachine_t * | dmachine, |
switch_ivr_dmachine_callback_t | nonmatch_callback | ||
) |
Definition at line 119 of file switch_ivr_async.c.
References switch_ivr_dmachine::nonmatch_callback, and switch_assert.
switch_status_t switch_ivr_dmachine_set_realm | ( | switch_ivr_dmachine_t * | dmachine, |
const char * | realm | ||
) |
Definition at line 216 of file switch_ivr_async.c.
References switch_ivr_dmachine::binding_hash, switch_ivr_dmachine::name, switch_ivr_dmachine::realm, SWITCH_CHANNEL_LOG, switch_core_hash_find(), SWITCH_LOG_ERROR, SWITCH_LOG_INFO, switch_log_printf(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by switch_ivr_dmachine_bind().
switch_status_t switch_ivr_enterprise_orig_and_bridge | ( | switch_core_session_t * | session, |
const char * | data, | ||
switch_dial_handle_list_t * | hl, | ||
switch_call_cause_t * | cause | ||
) |
Definition at line 4912 of file switch_ivr_originate.c.
References CF_BYPASS_MEDIA_AFTER_BRIDGE, CF_PROXY_MODE, fail, o_bridge_on_dtmf(), SOF_NONE, SWITCH_BYPASS_MEDIA_AFTER_BRIDGE_VARIABLE, switch_channel_cause2str(), switch_channel_get_variable, switch_channel_handle_cause(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_set_variable, switch_channel_test_flag(), switch_core_session_get_channel(), switch_core_session_rwunlock(), switch_core_session_strdup, switch_ivr_enterprise_originate(), switch_ivr_multi_threaded_bridge(), switch_ivr_signal_bridge(), SWITCH_LOG_INFO, switch_log_printf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_true().
switch_status_t switch_ivr_find_bridged_uuid | ( | const char * | uuid, |
char * | b_uuid, | ||
switch_size_t | blen | ||
) |
Definition at line 2234 of file switch_ivr_bridge.c.
References switch_assert, switch_channel_get_partner_uuid(), switch_channel_get_variable, switch_copy_string(), switch_core_session_get_channel(), switch_core_session_locate, switch_core_session_rwunlock(), SWITCH_ORIGINATE_SIGNAL_BOND_VARIABLE, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by switch_ivr_intercept_session().
switch_status_t switch_ivr_get_file_handle | ( | switch_core_session_t * | session, |
switch_file_handle_t ** | fh | ||
) |
Definition at line 1214 of file switch_ivr_play_say.c.
References switch_channel_get_private(), switch_core_session_get_channel(), switch_core_session_io_read_lock(), switch_core_session_io_rwunlock(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_say_gender_t switch_ivr_get_say_gender_by_name | ( | const char * | name | ) |
Definition at line 74 of file switch_ivr_say.c.
References SAY_GENDER_NAMES.
Referenced by switch_ivr_phrase_macro_event(), switch_ivr_say(), and switch_ivr_say_string().
switch_say_method_t switch_ivr_get_say_method_by_name | ( | const char * | name | ) |
Definition at line 89 of file switch_ivr_say.c.
References SAY_METHOD_NAMES.
Referenced by switch_ivr_phrase_macro_event(), switch_ivr_say(), and switch_ivr_say_string().
switch_say_type_t switch_ivr_get_say_type_by_name | ( | const char * | name | ) |
Definition at line 104 of file switch_ivr_say.c.
References SAY_TYPE_NAMES.
Referenced by switch_ivr_phrase_macro_event(), switch_ivr_say(), and switch_ivr_say_string().
switch_status_t switch_ivr_insert_file | ( | switch_core_session_t * | session, |
const char * | file, | ||
const char * | insert_file, | ||
switch_size_t | sample_point | ||
) |
Definition at line 4173 of file switch_ivr.c.
References switch_codec_implementation::actual_samples_per_second, switch_file_handle::channels, switch_file_handle::native_rate, switch_codec_implementation::number_of_channels, START_SAMPLES, switch_channel_ready, SWITCH_CHANNEL_SESSION_LOG, switch_core_file_close(), switch_core_file_open, switch_core_file_read(), switch_core_file_seek(), switch_core_file_write(), switch_core_session_get_channel(), switch_core_session_get_pool(), switch_core_session_get_read_impl(), switch_core_session_sprintf(), SWITCH_FILE_DATA_SHORT, SWITCH_FILE_FLAG_READ, SWITCH_FILE_FLAG_WRITE, SWITCH_FILE_NATIVE, SWITCH_FILE_OPEN, switch_file_rename(), SWITCH_GLOBAL_dirs, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_PATH_SEPARATOR, switch_safe_free, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_uuid_format(), SWITCH_UUID_FORMATTED_LENGTH, switch_uuid_get(), switch_zmalloc, and switch_directories::temp_dir.
Referenced by CoreSession::insertFile().
switch_status_t switch_ivr_intercept_session | ( | switch_core_session_t * | session, |
const char * | uuid, | ||
switch_bool_t | bleg | ||
) |
Definition at line 2257 of file switch_ivr_bridge.c.
References CF_ANSWERED, CF_BRIDGED, CF_INTERCEPT, CF_INTERCEPTED, CF_TRANSFER, CS_PARK, SWITCH_CAUSE_PICKED_OFF, switch_channel_answer, switch_channel_get_partner_uuid(), switch_channel_get_variable, switch_channel_hangup, switch_channel_mark_hold(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_set_state, switch_channel_set_state_flag(), switch_channel_set_variable, switch_channel_set_variable_partner, switch_channel_test_flag(), switch_core_session_get_channel(), switch_core_session_get_uuid(), switch_core_session_locate, switch_core_session_rwunlock(), switch_core_session_strdup, SWITCH_FALSE, switch_ivr_find_bridged_uuid(), switch_ivr_uuid_bridge(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_SIGNAL_BOND_VARIABLE, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_true(), SWITCH_UUID_FORMATTED_LENGTH, and zstr.
switch_status_t switch_ivr_kill_uuid | ( | const char * | uuid, |
switch_call_cause_t | cause | ||
) |
Definition at line 4404 of file switch_ivr.c.
References switch_channel_hangup, switch_core_session_get_channel(), switch_core_session_locate, switch_core_session_rwunlock(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and zstr.
switch_status_t switch_ivr_menu_bind_action | ( | switch_ivr_menu_t * | menu, |
switch_ivr_action_t | ivr_action, | ||
const char * | arg, | ||
const char * | bind | ||
) |
switch_ivr_menu_bind_action: Bind a keystroke to an action.
menu | The menu obj you wish to bind to. |
ivr_action | switch_ivr_action_t enum of what you want to do. |
arg | Optional (sometimes necessary) string arguement. |
bind | KeyStrokes to bind the action to. |
Definition at line 245 of file switch_ivr_menu.c.
References actions, switch_ivr_menu_action::arg, switch_ivr_menu_action::bind, inlen, switch_ivr_menu_action::ivr_action, switch_ivr_menu_action::next, pool, switch_ivr_menu_action::re, switch_core_alloc, switch_core_strdup, SWITCH_STATUS_MEMERR, and SWITCH_STATUS_SUCCESS.
Referenced by IVRMenu::bindAction(), and switch_ivr_menu_stack_xml_build().
switch_status_t switch_ivr_menu_bind_function | ( | switch_ivr_menu_t * | menu, |
switch_ivr_menu_action_function_t * | function, | ||
const char * | arg, | ||
const char * | bind | ||
) |
Bind a keystroke to a callback function.
menu | The menu obj you wish to bind to. |
function | The function to call [int proto(struct switch_ivr_menu *, char *, size_t, void *)] |
arg | Optional (sometimes necessary) string arguement. |
bind | KeyStrokes to bind the action to. |
Definition at line 276 of file switch_ivr_menu.c.
References actions, switch_ivr_menu_action::arg, switch_ivr_menu_action::bind, switch_ivr_menu_action::function, inlen, switch_ivr_menu_action::next, pool, switch_ivr_menu_action::re, switch_core_alloc, switch_core_strdup, SWITCH_STATUS_MEMERR, and SWITCH_STATUS_SUCCESS.
Referenced by switch_ivr_menu_stack_xml_build().
switch_status_t switch_ivr_menu_execute | ( | switch_core_session_t * | session, |
switch_ivr_menu_t * | stack, | ||
char * | name, | ||
void * | obj | ||
) |
Execute a menu.
session | The session running the menu. |
stack | The top-level menu object (the first one you created.) |
name | A pointer to the name of the menu. |
obj | A void pointer to an object you want to make avaliable to your callback functions that you may have binded with switch_ivr_menu_bind_function. |
Definition at line 451 of file switch_ivr_menu.c.
References actions, switch_ivr_menu_action::arg, bad_pin_file, switch_ivr_menu_action::bind, buf, exec_app(), exec_on_max_fail, exec_on_max_timeout, exit_sound, switch_ivr_menu_action::function, greeting_sound, inlen, invalid_sound, switch_ivr_menu_action::ivr_action, ivr_send_event(), max_failures, max_timeouts, memset(), MENU_EVENT_ENTER, MENU_EVENT_EXIT, name, switch_ivr_menu_action::next, pin, play_and_collect(), prompt_pin_file, switch_ivr_menu_action::re, running, short_greeting_sound, stack_count, switch_assert, switch_channel_ready, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable, switch_clear_flag, switch_core_session_exec(), switch_core_session_get_channel(), switch_core_session_sprintf(), switch_core_session_strdup, switch_goto_status, SWITCH_IVR_ACTION_BACK, SWITCH_IVR_ACTION_DIE, SWITCH_IVR_ACTION_EXECAPP, SWITCH_IVR_ACTION_EXECMENU, SWITCH_IVR_ACTION_NOOP, SWITCH_IVR_ACTION_PLAYSOUND, SWITCH_IVR_ACTION_TOMAIN, switch_ivr_menu_find(), SWITCH_IVR_MENU_FLAG_FALLTOMAIN, SWITCH_IVR_MENU_FLAG_STACK, switch_ivr_play_file(), switch_loadable_module_get_application_interface(), SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_LOG_WARNING, switch_perform_substitution(), switch_play_and_get_digits(), switch_regex_perform(), switch_regex_safe_free, switch_set_flag, SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_IS_BREAK, SWITCH_STATUS_SUCCESS, SWITCH_STATUS_TIMEOUT, switch_test_flag, transfer_sound, tts_engine, tts_voice, UNPROTECT_INTERFACE, and zstr.
Referenced by IVRMenu::execute().
switch_status_t switch_ivr_menu_init | ( | switch_ivr_menu_t ** | new_menu, |
switch_ivr_menu_t * | main, | ||
const char * | name, | ||
const char * | greeting_sound, | ||
const char * | short_greeting_sound, | ||
const char * | invalid_sound, | ||
const char * | exit_sound, | ||
const char * | transfer_sound, | ||
const char * | confirm_macro, | ||
const char * | confirm_key, | ||
const char * | tts_engine, | ||
const char * | tts_voice, | ||
int | confirm_attempts, | ||
int | inter_timeout, | ||
int | digit_len, | ||
int | timeout, | ||
int | max_failures, | ||
int | max_timeouts, | ||
switch_memory_pool_t * | pool | ||
) |
Create a new menu object.
new_menu | the pointer to the new menu |
main | The top level menu, (NULL if this is the top level one). |
name | A pointer to the name of this menu. |
greeting_sound | Optional pointer to a main sound (press 1 for this 2 for that). |
short_greeting_sound | Optional pointer to a shorter main sound for subsequent loops. |
invalid_sound | Optional pointer to a sound to play after invalid input. |
exit_sound | Optional pointer to a sound to play upon exiting the menu. |
transfer_sound | Optional pointer to a sound to play upon transfer away from the menu. |
confirm_macro | phrase macro name to confirm input |
confirm_key | the dtmf key required for positive confirmation |
tts_engine | the tts engine to use for this menu |
tts_voice | the tts voice to use for this menu |
confirm_attempts | number of times to prompt to confirm input before failure |
inter_timeout | inter-digit timeout |
digit_len | max number of digits |
timeout | A number of milliseconds to pause before looping. |
max_failures | Maximum number of failures to withstand before hangingup This resets everytime you enter the menu. |
pool | memory pool (NULL to create one). |
Definition at line 116 of file switch_ivr_menu.c.
References actions, buf, confirm_attempts, confirm_key, confirm_macro, digit_len, exit_sound, greeting_sound, inlen, inter_timeout, invalid_sound, max_failures, max_timeouts, name, pool, short_greeting_sound, SWITCH_CHANNEL_LOG, switch_core_alloc, switch_core_destroy_memory_pool, switch_core_new_memory_pool, switch_core_strdup, SWITCH_IVR_MENU_FLAG_FREEPOOL, SWITCH_IVR_MENU_FLAG_STACK, switch_ivr_menu_stack_add(), SWITCH_LOG_CRIT, switch_log_printf(), switch_set_flag, SWITCH_STATUS_MEMERR, SWITCH_STATUS_SUCCESS, timeout, transfer_sound, tts_engine, tts_voice, and zstr.
Referenced by IVRMenu::IVRMenu(), and switch_ivr_menu_stack_xml_build().
switch_status_t switch_ivr_menu_stack_free | ( | switch_ivr_menu_t * | stack | ) |
free a stack of menu objects.
stack | The top level menu you wish to destroy. |
Definition at line 310 of file switch_ivr_menu.c.
References pool, switch_core_destroy_memory_pool, SWITCH_IVR_MENU_FLAG_FREEPOOL, SWITCH_IVR_MENU_FLAG_STACK, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_test_flag.
Referenced by IVRMenu::IVRMenu().
switch_status_t switch_ivr_menu_stack_xml_add_custom | ( | switch_ivr_menu_xml_ctx_t * | xml_menu_ctx, |
const char * | name, | ||
switch_ivr_menu_action_function_t * | function | ||
) |
xml_menu_ctx | The XML menu parser context previously created by switch_ivr_menu_stack_xml_init |
name | The xml tag name to add to the parser engine |
function | The menu function callback that will be executed when menu digits are bound to this name |
Definition at line 843 of file switch_ivr_menu.c.
References switch_ivr_menu_stack_xml_add().
switch_status_t switch_ivr_menu_stack_xml_build | ( | switch_ivr_menu_xml_ctx_t * | xml_menu_ctx, |
switch_ivr_menu_t ** | menu_stack, | ||
switch_xml_t | xml_menus, | ||
switch_xml_t | xml_menu | ||
) |
Build a menu stack from an xml source.
xml_menu_ctx | The XML menu parser context previously created by switch_ivr_menu_stack_xml_init |
menu_stack | The menu stack object that will be created for you |
xml_menus | The xml Menus source |
xml_menu | The xml Menu source of the menu to be created |
Definition at line 849 of file switch_ivr_menu.c.
References switch_ivr_menu_xml_map::action, switch_ivr_menu_xml_ctx::autocreated, bad_pin_file, confirm_attempts, confirm_key, confirm_macro, digit_len, exec_on_max_fail, exec_on_max_timeout, exit_sound, switch_ivr_menu_xml_map::function, inter_timeout, invalid_sound, is_valid_action(), switch_ivr_menu_xml_ctx::map, max_failures, max_timeouts, switch_ivr_menu_xml_map::name, switch_xml::next, switch_ivr_menu_xml_map::next, pin, pool, switch_ivr_menu_xml_ctx::pool, prompt_pin_file, switch_assert, SWITCH_CHANNEL_LOG, switch_core_strdup, SWITCH_IVR_ACTION_EXECMENU, switch_ivr_menu_bind_action(), switch_ivr_menu_bind_function(), switch_ivr_menu_find(), SWITCH_IVR_MENU_FLAG_FREEPOOL, switch_ivr_menu_init(), SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), switch_set_flag, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_xml_attr(), switch_xml_attr_soft(), switch_xml_child(), switch_xml_find_child(), timeout, transfer_sound, tts_engine, tts_voice, and zstr.
switch_status_t switch_ivr_menu_stack_xml_init | ( | switch_ivr_menu_xml_ctx_t ** | xml_menu_ctx, |
switch_memory_pool_t * | pool | ||
) |
xml_menu_ctx | A pointer of a XML menu parser context to be created |
pool | memory pool (NULL to create one) |
Definition at line 808 of file switch_ivr_menu.c.
References iam, name, iam_s::name, pool, SWITCH_CHANNEL_LOG, switch_core_alloc, switch_core_new_memory_pool, switch_ivr_menu_stack_xml_add(), SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_menu_str2action | ( | const char * | action_name, |
switch_ivr_action_t * | action | ||
) |
Definition at line 768 of file switch_ivr_menu.c.
References iam_s::action, iam, name, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and zstr.
Referenced by IVRMenu::bindAction().
switch_status_t switch_ivr_orig_and_bridge | ( | switch_core_session_t * | session, |
const char * | data, | ||
switch_dial_handle_t * | dh, | ||
switch_call_cause_t * | cause | ||
) |
Definition at line 4975 of file switch_ivr_originate.c.
References CF_BYPASS_MEDIA_AFTER_BRIDGE, CF_PROXY_MODE, fail, o_bridge_on_dtmf(), SOF_NONE, SWITCH_BYPASS_MEDIA_AFTER_BRIDGE_VARIABLE, switch_channel_cause2str(), switch_channel_get_variable, switch_channel_handle_cause(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_set_variable, switch_channel_test_flag(), switch_core_session_get_channel(), switch_core_session_rwunlock(), switch_core_session_strdup, switch_ivr_multi_threaded_bridge(), switch_ivr_originate(), switch_ivr_signal_bridge(), SWITCH_LOG_INFO, switch_log_printf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_true().
void switch_ivr_park_session | ( | switch_core_session_t * | session | ) |
Definition at line 3571 of file switch_ivr.c.
References CF_TRANSFER, CS_PARK, switch_channel_set_flag, switch_channel_set_state, and switch_core_session_get_channel().
Referenced by audio_bridge_on_exchange_media(), signal_bridge_on_hangup(), switch_ivr_multi_threaded_bridge(), and uuid_bridge_on_soft_execute().
switch_status_t switch_ivr_phrase_macro_event | ( | switch_core_session_t * | session, |
const char * | macro_name, | ||
const char * | data, | ||
switch_event_t * | event, | ||
const char * | lang, | ||
switch_input_args_t * | args | ||
) |
Definition at line 39 of file switch_ivr_play_say.c.
References arg_recursion_check_start, arg_recursion_check_stop, switch_say_args_t::gender, memset(), switch_say_args_t::method, name, switch_xml::next, switch_say_interface::say_function, switch_assert, switch_channel_event_set_data(), switch_channel_expand_variables, switch_channel_get_variable, switch_channel_pre_answer, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable, switch_core_session_exec(), switch_core_session_get_channel(), switch_core_session_strdup, switch_event_add_header_string(), switch_event_create, switch_event_destroy(), switch_event_expand_headers, SWITCH_EVENT_REQUEST_PARAMS, SWITCH_FALSE, switch_is_number(), switch_ivr_get_say_gender_by_name(), switch_ivr_get_say_method_by_name(), switch_ivr_get_say_type_by_name(), switch_ivr_phrase_macro, switch_ivr_play_file(), switch_ivr_sleep(), switch_ivr_speak_text(), switch_loadable_module_get_application_interface(), switch_loadable_module_get_say_interface(), SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_LOG_WARNING, switch_normalize_volume_granular, switch_perform_substitution(), switch_regex_perform(), switch_regex_safe_free, switch_safe_free, switch_separate_paren_args(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, switch_str_nil, SWITCH_TRUE, switch_true(), switch_xml_attr(), switch_xml_attr_soft(), switch_xml_child(), switch_xml_find_child(), switch_xml_free(), switch_xml_locate_language(), switch_say_args_t::type, UNPROTECT_INTERFACE, switch_file_handle::volgranular, and zstr.
switch_status_t switch_ivr_play_and_collect_input | ( | switch_core_session_t * | session, |
const char * | prompt, | ||
const char * | recognizer_mod_name, | ||
const char * | recognizer_grammar, | ||
int | min_digits, | ||
int | max_digits, | ||
const char * | terminators, | ||
uint32_t | digit_timeout, | ||
cJSON ** | recognition_result, | ||
char ** | digits_collected, | ||
char * | terminator_collected, | ||
switch_input_args_t * | args | ||
) |
Play prompt and collect input.
Returns collect status
[in] | session | the current session |
Definition at line 3411 of file switch_ivr_play_say.c.
References arg_recursion_check_start, arg_recursion_check_stop, switch_input_args_t::buf, switch_input_args_t::buflen, switch_collect_input_state_t::digits, switch_input_args_t::dmachine, switch_input_args_t::input_callback, switch_collect_input_state_t::is_speech, switch_collect_input_state_t::last_digit_time, switch_collect_input_state_t::max_digits, switch_collect_input_state_t::min_digits, switch_collect_input_state_t::original_args, switch_input_args_t::read_frame_callback, switch_collect_input_state_t::recognition_result, switch_channel_get_name(), switch_channel_ready, SWITCH_CHANNEL_SESSION_LOG, switch_clear_flag, switch_collect_input_callback(), SWITCH_COLLECT_INPUT_DIGITS, SWITCH_COLLECT_INPUT_DIGITS_DONE, SWITCH_COLLECT_INPUT_PROMPT, SWITCH_COLLECT_INPUT_SPEECH, SWITCH_COLLECT_INPUT_SPEECH_DONE, switch_core_session_alloc, switch_core_session_get_channel(), SWITCH_FALSE, SWITCH_INT64_T_FMT, switch_ivr_detect_speech(), switch_ivr_detect_speech_start_input_timers(), switch_ivr_dmachine_last_ping(), switch_ivr_pause_detect_speech(), switch_ivr_play_file(), switch_ivr_sleep(), SWITCH_LOG_DEBUG, SWITCH_LOG_INFO, switch_log_printf(), switch_micro_time_now(), switch_set_flag, SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_collect_input_state_t::terminator, switch_collect_input_state_t::terminators, switch_input_args_t::user_data, and zstr.
switch_status_t switch_ivr_process_fh | ( | switch_core_session_t * | session, |
const char * | cmd, | ||
switch_file_handle_t * | fhp | ||
) |
Definition at line 4052 of file switch_ivr.c.
References if(), switch_file_handle::native_rate, switch_file_handle::offset_pos, SCFC_PAUSE_READ, switch_file_handle::speed, switch_atoui(), SWITCH_CHANNEL_SESSION_LOG, switch_clear_flag_locked, switch_core_file_command(), switch_core_file_seek(), switch_core_file_truncate(), SWITCH_FILE_DONE, SWITCH_FILE_OPEN, SWITCH_FILE_PAUSE, SWITCH_LOG_DEBUG, switch_log_printf(), switch_normalize_volume, switch_set_flag_locked, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_test_flag, target, switch_file_handle::vol, and zstr.
Referenced by CoreSession::process_callback_result().
switch_status_t switch_ivr_read | ( | switch_core_session_t * | session, |
uint32_t | min_digits, | ||
uint32_t | max_digits, | ||
const char * | prompt_audio_file, | ||
const char * | var_name, | ||
char * | digit_buffer, | ||
switch_size_t | digit_buffer_length, | ||
uint32_t | timeout, | ||
const char * | valid_terminators, | ||
uint32_t | digit_timeout | ||
) |
Definition at line 2502 of file switch_ivr_play_say.c.
References switch_input_args_t::buf, switch_input_args_t::buflen, memset(), switch_assert, switch_channel_pre_answer, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable, switch_core_session_get_channel(), switch_ivr_collect_digits_count(), switch_ivr_play_file(), SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_READ_RESULT_VARIABLE, SWITCH_READ_TERMINATOR_USED_VARIABLE, switch_snprintf(), SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_RESTART, SWITCH_STATUS_SUCCESS, SWITCH_STATUS_TIMEOUT, SWITCH_STATUS_TOO_SMALL, and zstr.
Referenced by collect_thread_run(), CoreSession::read(), and switch_play_and_get_digits().
switch_status_t switch_ivr_record_session_mask | ( | switch_core_session_t * | session, |
const char * | file, | ||
switch_bool_t | on | ||
) |
Definition at line 1888 of file switch_ivr_async.c.
References record_helper::bug, SMBF_MASK, switch_channel_get_private(), switch_core_media_bug_clear_flag(), switch_core_media_bug_set_flag(), switch_core_session_get_channel(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_record_session_pause | ( | switch_core_session_t * | session, |
const char * | file, | ||
switch_bool_t | on | ||
) |
Definition at line 1904 of file switch_ivr_async.c.
References record_helper::bug, SMBF_PAUSE, switch_channel_get_private(), switch_core_media_bug_clear_flag(), switch_core_media_bug_set_flag(), switch_core_session_get_channel(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_release_file_handle | ( | switch_core_session_t * | session, |
switch_file_handle_t ** | fh | ||
) |
Definition at line 1232 of file switch_ivr_play_say.c.
References switch_core_session_io_rwunlock(), and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_say | ( | switch_core_session_t * | session, |
const char * | tosay, | ||
const char * | module_name, | ||
const char * | say_type, | ||
const char * | say_method, | ||
const char * | say_gender, | ||
switch_input_args_t * | args | ||
) |
Definition at line 3667 of file switch_ivr.c.
References arg_recursion_check_start, arg_recursion_check_stop, switch_say_args_t::gender, switch_say_args_t::method, switch_say_interface::say_function, switch_assert, switch_channel_event_set_data(), switch_channel_get_variable, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable, switch_core_session_get_channel(), switch_core_session_strdup, switch_event_add_header_string(), switch_event_create, switch_event_destroy(), SWITCH_EVENT_REQUEST_PARAMS, switch_ivr_get_say_gender_by_name(), switch_ivr_get_say_method_by_name(), switch_ivr_get_say_type_by_name(), switch_loadable_module_get_say_interface(), SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_STACK_BOTTOM, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_true(), switch_xml_attr(), switch_xml_free(), switch_xml_locate_language(), switch_say_args_t::type, and zstr.
Referenced by CoreSession::say().
switch_status_t switch_ivr_say_ip | ( | switch_core_session_t * | session, |
char * | tosay, | ||
switch_say_callback_t | number_func, | ||
switch_say_args_t * | say_args, | ||
switch_input_args_t * | args | ||
) |
Definition at line 172 of file switch_ivr_say.c.
References arg_recursion_check_start, arg_recursion_check_stop, b, switch_say_args_t::method, say_file, say_num, switch_core_session_strdup, switch_goto_status, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_say_spell | ( | switch_core_session_t * | session, |
char * | tosay, | ||
switch_say_args_t * | say_args, | ||
switch_input_args_t * | args | ||
) |
Definition at line 133 of file switch_ivr_say.c.
References arg_recursion_check_start, arg_recursion_check_stop, say_file, SST_NAME_PHONETIC, SST_NAME_SPELLED, SWITCH_STATUS_SUCCESS, and switch_say_args_t::type.
switch_status_t switch_ivr_say_string | ( | switch_core_session_t * | session, |
const char * | lang, | ||
const char * | ext, | ||
const char * | tosay, | ||
const char * | module_name, | ||
const char * | say_type, | ||
const char * | say_method, | ||
const char * | say_gender, | ||
char ** | rstr | ||
) |
Definition at line 3789 of file switch_ivr.c.
References switch_say_args_t::ext, switch_say_args_t::gender, switch_say_args_t::method, switch_say_interface::say_string_function, switch_assert, switch_channel_event_set_data(), switch_channel_get_variable, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable, switch_core_session_get_channel(), switch_event_add_header_string(), switch_event_create, switch_event_destroy(), SWITCH_EVENT_REQUEST_PARAMS, switch_ivr_get_say_gender_by_name(), switch_ivr_get_say_method_by_name(), switch_ivr_get_say_type_by_name(), switch_loadable_module_get_say_interface(), SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_STACK_BOTTOM, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_true(), switch_xml_attr(), switch_xml_free(), switch_xml_locate_language(), and switch_say_args_t::type.
switch_status_t switch_ivr_send_prompt | ( | switch_core_session_t * | session, |
const char * | type, | ||
const char * | text, | ||
const char * | regex | ||
) |
Definition at line 1510 of file switch_ivr.c.
References switch_core_session_message::from, switch_core_session_message::message_id, switch_core_session_message::string_array_arg, switch_core_session_receive_message, SWITCH_MESSAGE_INDICATE_PROMPT, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_set_user | ( | switch_core_session_t * | session, |
const char * | data | ||
) |
Definition at line 3976 of file switch_ivr.c.
References switch_ivr_set_user_extended().
switch_status_t switch_ivr_set_user_extended | ( | switch_core_session_t * | session, |
const char * | data, | ||
switch_event_t * | params | ||
) |
Definition at line 3981 of file switch_ivr.c.
References SWITCH_CHANNEL_SESSION_LOG, switch_core_session_strdup, switch_ivr_set_user_xml(), SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_xml_free(), switch_xml_locate_user_merged(), and zstr.
Referenced by switch_ivr_set_user().
switch_status_t switch_ivr_set_user_xml | ( | switch_core_session_t * | session, |
const char * | prefix, | ||
const char * | user, | ||
const char * | domain, | ||
switch_xml_t | x_user | ||
) |
Definition at line 3921 of file switch_ivr.c.
References get_prefixed_str(), switch_xml::next, switch_channel_get_caller_profile(), switch_channel_set_profile_var(), switch_channel_set_variable, switch_core_session_alloc, switch_core_session_get_channel(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_xml_attr(), switch_xml_child(), and zstr.
Referenced by switch_ivr_set_user_extended().
switch_status_t switch_ivr_soft_hold | ( | switch_core_session_t * | session, |
const char * | unhold_key, | ||
const char * | moh_a, | ||
const char * | moh_b | ||
) |
Definition at line 3198 of file switch_ivr_play_say.c.
References switch_input_args_t::buf, switch_input_args_t::buflen, CF_BROADCAST, hold_on_dtmf(), switch_input_args_t::input_callback, SMF_ECHO_ALEG, SMF_LOOP, switch_assert, switch_channel_get_hold_music(), switch_channel_get_name(), switch_channel_get_partner_uuid(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_stop_broadcast, switch_channel_test_flag(), switch_core_session_get_channel(), switch_core_session_locate, switch_core_session_rwunlock(), switch_ivr_broadcast(), switch_ivr_collect_digits_callback(), switch_ivr_play_file(), switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and zstr.
switch_status_t switch_ivr_sound_test | ( | switch_core_session_t * | session | ) |
Definition at line 41 of file switch_ivr.c.
References switch_codec_implementation::actual_samples_per_second, switch_frame::data, switch_codec_implementation::microseconds_per_packet, switch_codec_implementation::number_of_channels, switch_frame::samples, switch_codec_implementation::samples_per_packet, switch_codec_implementation::samples_per_second, SFF_CNG, switch_channel_ready, SWITCH_CHANNEL_SESSION_LOG, SWITCH_CODEC_FLAG_DECODE, SWITCH_CODEC_FLAG_ENCODE, switch_core_codec_destroy(), switch_core_codec_init, switch_core_session_get_channel(), switch_core_session_get_pool(), switch_core_session_get_read_impl(), switch_core_session_read_frame(), SWITCH_IO_FLAG_NONE, SWITCH_LOG_CONSOLE, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_READ_ACCEPTABLE, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_test_flag.
switch_status_t switch_ivr_stop_video_write_overlay_session | ( | switch_core_session_t * | session | ) |
Definition at line 5821 of file switch_ivr_async.c.
References switch_channel_get_private(), switch_channel_set_private(), switch_core_media_bug_remove(), switch_core_session_get_channel(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_unbind_dtmf_meta_session | ( | switch_core_session_t * | session, |
uint32_t | key | ||
) |
Definition at line 4669 of file switch_ivr_async.c.
References dtmf_meta_settings_t::map, memset(), dtmf_meta_data_t::sr, switch_channel_get_private(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_private(), switch_core_session_get_channel(), SWITCH_DTMF_RECV, SWITCH_DTMF_SEND, SWITCH_LOG_ERROR, SWITCH_LOG_INFO, switch_log_printf(), SWITCH_META_VAR_KEY, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_unblock_dtmf_session | ( | switch_core_session_t * | session | ) |
Definition at line 4705 of file switch_ivr_async.c.
References SWITCH_BLOCK_DTMF_KEY, switch_channel_get_private(), switch_channel_set_private(), switch_core_session_get_channel(), and SWITCH_STATUS_SUCCESS.
switch_bool_t switch_ivr_uuid_exists | ( | const char * | uuid | ) |
Definition at line 4026 of file switch_ivr.c.
References switch_core_session_locate, switch_core_session_rwunlock(), and SWITCH_FALSE.
Referenced by core_event_handler().
switch_bool_t switch_ivr_uuid_force_exists | ( | const char * | uuid | ) |
Definition at line 4039 of file switch_ivr.c.
References switch_core_session_force_locate, switch_core_session_rwunlock(), and SWITCH_FALSE.
switch_status_t switch_ivr_video_write_overlay_session | ( | switch_core_session_t * | session, |
const char * | img_path, | ||
switch_img_position_t | pos, | ||
uint8_t | alpha | ||
) |
Definition at line 5835 of file switch_ivr_async.c.
References oht_s::alpha, oht_s::img, oht_s::pos, SMBF_NO_PAUSE, SMBF_WRITE_VIDEO_PING, switch_channel_get_private(), SWITCH_CHANNEL_LOG, switch_channel_set_private(), switch_core_media_bug_add(), switch_core_session_alloc, switch_core_session_get_channel(), SWITCH_IMG_FMT_ARGB, switch_img_free(), switch_img_read_png(), SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and video_write_overlay_callback().
switch_status_t switch_ivr_wait_for_answer | ( | switch_core_session_t * | session, |
switch_core_session_t * | peer_session | ||
) |
Definition at line 943 of file switch_ivr_originate.c.
References switch_codec_implementation::actual_samples_per_second, ringback::asis, ringback::audio_buffer, switch_frame::buflen, CF_ANSWERED, CF_DISABLE_RINGBACK, CF_EARLY_MEDIA, CF_PROXY_MEDIA, CF_PROXY_MODE, CF_XFER_ZOMBIE, switch_file_handle::channels, ringback::channels, switch_frame::codec, CS_RESET, CS_SOFT_EXECUTE, switch_frame::data, switch_frame::datalen, switch_codec_implementation::decoded_bytes_per_packet, switch_dtmf_t::digit, switch_codec_implementation::encoded_bytes_per_packet, ringback::fh, ringback::fhb, switch_file_handle::file_path, switch_codec_implementation::iananame, switch_codec::implementation, memset(), switch_codec_implementation::microseconds_per_packet, ringback::mux_buf, switch_codec_implementation::number_of_channels, teletone_generation_session::rate, switch_file_handle::samplerate, switch_frame::samples, switch_codec_implementation::samples_per_packet, ringback::silence, switch_file_handle::speed, switch_assert, switch_buffer_create_dynamic(), switch_buffer_destroy(), switch_buffer_read_loop(), switch_buffer_set_loops(), SWITCH_CALL_TIMEOUT_VARIABLE, SWITCH_CAUSE_BEARERCAPABILITY_NOTIMPL, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, SWITCH_CHANNEL_CHANNEL_LOG, switch_channel_dequeue_dtmf(), switch_channel_get_state(), switch_channel_get_variable, switch_channel_hangup, switch_channel_has_dtmf(), switch_channel_media_ready, switch_channel_ready, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_state, switch_channel_test_flag(), switch_channel_up_nosig, SWITCH_CODEC_FLAG_DECODE, SWITCH_CODEC_FLAG_ENCODE, SWITCH_CODEC_FLAG_PASSTHROUGH, switch_cond_next(), switch_core_codec_destroy(), switch_core_codec_init, switch_core_codec_ready(), switch_core_file_close(), switch_core_file_open, switch_core_file_read(), switch_core_file_seek(), switch_core_session_get_channel(), switch_core_session_get_pool(), switch_core_session_get_read_codec(), switch_core_session_read_frame(), switch_core_session_reset(), switch_core_session_set_read_codec(), switch_core_session_sprintf(), switch_core_session_write_frame(), SWITCH_DEFAULT_TIMEOUT, SWITCH_FILE_DATA_SHORT, SWITCH_FILE_FLAG_READ, switch_generate_sln_silence(), SWITCH_IO_FLAG_NONE, switch_is_file_path(), switch_ivr_parse_all_events(), switch_ivr_parse_all_messages(), SWITCH_IVR_VERIFY_SILENCE_DIVISOR, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), switch_micro_time_now(), switch_mprintf(), SWITCH_READ_ACCEPTABLE, SWITCH_RECOMMENDED_BUFFER_SIZE, switch_safe_free, SWITCH_SEND_SILENCE_WHEN_IDLE_VARIABLE, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, SWITCH_STATUS_TIMEOUT, switch_test_flag, SWITCH_TRUE, SWITCH_URL_SEPARATOR, switch_yield, switch_zmalloc, teletone_destroy_session(), teletone_handler(), teletone_init_session(), teletone_run(), ringback::ts, and zstr.
Referenced by switch_ivr_multi_threaded_bridge(), uuid_bridge_on_soft_execute(), and CoreSession::waitForAnswer().
void switch_process_import | ( | switch_core_session_t * | session, |
switch_channel_t * | peer_channel, | ||
const char * | varname, | ||
const char * | prefix | ||
) |
Definition at line 1261 of file switch_ivr_originate.c.
References switch_assert, switch_channel_get_variable, switch_channel_set_variable, switch_core_session_get_channel(), switch_core_session_strdup, switch_mprintf(), and switch_separate_string().
Referenced by switch_ivr_originate().