FreeSWITCH API Documentation
1.7.0
|
Modules | |
IVR Menu Library | |
Typedefs | |
typedef struct switch_ivr_digit_stream_parser | switch_ivr_digit_stream_parser_t |
typedef struct switch_ivr_digit_stream | switch_ivr_digit_stream_t |
Functions | |
switch_status_t | switch_ivr_deactivate_unicast (switch_core_session_t *session) |
switch_status_t | switch_ivr_activate_unicast (switch_core_session_t *session, char *local_ip, switch_port_t local_port, char *remote_ip, switch_port_t remote_port, char *transport, char *flags) |
switch_status_t | switch_ivr_generate_json_cdr (switch_core_session_t *session, cJSON **json_cdr, switch_bool_t urlencode) |
Generate an JSON CDR report. More... | |
switch_status_t | switch_ivr_generate_xml_cdr (switch_core_session_t *session, switch_xml_t *xml_cdr) |
Generate an XML CDR report. More... | |
int | switch_ivr_set_xml_profile_data (switch_xml_t xml, switch_caller_profile_t *caller_profile, int off) |
int | switch_ivr_set_xml_chan_vars (switch_xml_t xml, switch_channel_t *channel, int off) |
switch_status_t | switch_ivr_parse_event (_In_ switch_core_session_t *session, _In_ switch_event_t *event) |
Parse command from an event. More... | |
switch_status_t | switch_ivr_parse_all_events (switch_core_session_t *session) |
Parse all commands from an event. More... | |
switch_status_t | switch_ivr_parse_next_event (switch_core_session_t *session) |
switch_status_t | switch_ivr_parse_all_messages (switch_core_session_t *session) |
switch_status_t | switch_ivr_parse_all_signal_data (switch_core_session_t *session) |
switch_status_t | switch_ivr_parse_signal_data (switch_core_session_t *session, switch_bool_t all, switch_bool_t only_session_thread) |
switch_status_t | switch_ivr_parse_next_signal_data (switch_core_session_t *session) |
switch_status_t | switch_ivr_process_indications (switch_core_session_t *session, switch_core_session_message_t *message) |
switch_status_t | switch_ivr_sleep (switch_core_session_t *session, uint32_t ms, switch_bool_t sync, switch_input_args_t *args) |
Wait for time to pass for a specified number of milliseconds. More... | |
switch_status_t | switch_ivr_park (switch_core_session_t *session, switch_input_args_t *args) |
switch_status_t | switch_ivr_collect_digits_callback (switch_core_session_t *session, switch_input_args_t *args, uint32_t digit_timeout, uint32_t abs_timeout) |
Wait for DTMF digits calling a pluggable callback function when digits are collected. More... | |
switch_status_t | switch_ivr_collect_digits_count (switch_core_session_t *session, char *buf, switch_size_t buflen, switch_size_t maxdigits, const char *terminators, char *terminator, uint32_t first_timeout, uint32_t digit_timeout, uint32_t abs_timeout) |
Wait for specified number of DTMF digits, untile terminator is received or until the channel hangs up. More... | |
switch_status_t | switch_ivr_play_and_detect_speech (switch_core_session_t *session, const char *file, const char *mod_name, const char *grammar, char **result, uint32_t input_timeout, switch_input_args_t *args) |
play a file to the session while doing speech recognition. More... | |
switch_status_t | switch_ivr_detect_speech_init (switch_core_session_t *session, const char *mod_name, const char *dest, switch_asr_handle_t *ah) |
Initialize background Speech detection on a session, so that parameters can be set, and grammars loaded. After calling this function, it is possible to call switch_ivr_set_param_detect_speech() to set recognition parameters. Calling switch_ivr_detect_speech_load_grammar() starts the speech recognition. More... | |
switch_status_t | switch_ivr_detect_speech (switch_core_session_t *session, const char *mod_name, const char *grammar, const char *name, const char *dest, switch_asr_handle_t *ah) |
Engage background Speech detection on a session. More... | |
switch_status_t | switch_ivr_stop_detect_speech (switch_core_session_t *session) |
Stop background Speech detection on a session. More... | |
switch_status_t | switch_ivr_pause_detect_speech (switch_core_session_t *session) |
Pause background Speech detection on a session. More... | |
switch_status_t | switch_ivr_resume_detect_speech (switch_core_session_t *session) |
Resume background Speech detection on a session. More... | |
switch_status_t | switch_ivr_detect_speech_load_grammar (switch_core_session_t *session, const char *grammar, const char *name) |
Load a grammar on a background speech detection handle. More... | |
switch_status_t | switch_ivr_detect_speech_unload_grammar (switch_core_session_t *session, const char *name) |
Unload a grammar on a background speech detection handle. More... | |
switch_status_t | switch_ivr_detect_speech_enable_grammar (switch_core_session_t *session, const char *name) |
Enable a grammar on a background speech detection handle. More... | |
switch_status_t | switch_ivr_detect_speech_disable_grammar (switch_core_session_t *session, const char *name) |
Disable a grammar on a background speech detection handle. More... | |
switch_status_t | switch_ivr_detect_speech_disable_all_grammars (switch_core_session_t *session) |
Disable all grammars on a background speech detection handle. More... | |
switch_status_t | switch_ivr_set_param_detect_speech (switch_core_session_t *session, const char *name, const char *val) |
switch_status_t | switch_ivr_detect_speech_start_input_timers (switch_core_session_t *session) |
Start input timers on a background speech detection handle. More... | |
switch_status_t | switch_ivr_record_session (switch_core_session_t *session, char *file, uint32_t limit, switch_file_handle_t *fh) |
Record a session to disk. More... | |
switch_status_t | switch_ivr_transfer_recordings (switch_core_session_t *orig_session, switch_core_session_t *new_session) |
switch_status_t | switch_ivr_eavesdrop_pop_eavesdropper (switch_core_session_t *session, switch_core_session_t **sessionp) |
switch_status_t | switch_ivr_eavesdrop_exec_all (switch_core_session_t *session, const char *app, const char *arg) |
switch_status_t | switch_ivr_eavesdrop_update_display (switch_core_session_t *session, const char *name, const char *number) |
switch_status_t | switch_ivr_eavesdrop_session (switch_core_session_t *session, const char *uuid, const char *require_group, switch_eavesdrop_flag_t flags) |
Eavesdrop on a another session. More... | |
switch_status_t | switch_ivr_displace_session (switch_core_session_t *session, const char *file, uint32_t limit, const char *flags) |
displace the media for a session with the audio from a file More... | |
switch_status_t | switch_ivr_stop_displace_session (switch_core_session_t *session, const char *file) |
Stop displacing a session. More... | |
switch_status_t | switch_ivr_stop_record_session (switch_core_session_t *session, const char *file) |
Stop Recording a session. More... | |
switch_status_t | switch_ivr_session_audio (switch_core_session_t *session, const char *cmd, const char *direction, int level) |
switch_status_t | switch_ivr_stop_session_audio (switch_core_session_t *session) |
switch_status_t | switch_ivr_inband_dtmf_session (switch_core_session_t *session) |
Start looking for DTMF inband. More... | |
switch_status_t | switch_ivr_stop_inband_dtmf_session (switch_core_session_t *session) |
Stop looking for DTMF inband. More... | |
switch_status_t | switch_ivr_inband_dtmf_generate_session (switch_core_session_t *session, switch_bool_t read_stream) |
Start generating DTMF inband. More... | |
switch_status_t | switch_ivr_stop_inband_dtmf_generate_session (switch_core_session_t *session) |
Stop generating DTMF inband. More... | |
switch_status_t | switch_ivr_session_echo (switch_core_session_t *session, switch_input_args_t *args) |
| |
switch_status_t | switch_ivr_stop_tone_detect_session (switch_core_session_t *session) |
Stop looking for TONES. More... | |
switch_status_t | switch_ivr_tone_detect_session (switch_core_session_t *session, const char *key, const char *tone_spec, const char *flags, time_t timeout, int hits, const char *app, const char *data, switch_tone_detect_callback_t callback) |
Start looking for TONES. More... | |
switch_status_t | switch_ivr_play_file (switch_core_session_t *session, switch_file_handle_t *fh, const char *file, switch_input_args_t *args) |
play a file from the disk to the session More... | |
switch_status_t | switch_ivr_wait_for_silence (switch_core_session_t *session, uint32_t thresh, uint32_t silence_hits, uint32_t listen_hits, uint32_t timeout_ms, const char *file) |
switch_status_t | switch_ivr_gentones (switch_core_session_t *session, const char *script, int32_t loops, switch_input_args_t *args) |
switch_status_t | switch_ivr_record_file (_In_ switch_core_session_t *session, _In_ switch_file_handle_t *fh, _In_z_ const char *file, _In_opt_ switch_input_args_t *args, _In_ uint32_t limit) |
record a file from the session to a file More... | |
switch_status_t | switch_play_and_get_digits (switch_core_session_t *session, uint32_t min_digits, uint32_t max_digits, uint32_t max_tries, uint32_t timeout, const char *valid_terminators, const char *audio_file, const char *bad_input_audio_file, const char *var_name, char *digit_buffer, uint32_t digit_buffer_length, const char *digits_regex, uint32_t digit_timeout, const char *transfer_on_failure) |
Play a sound and gather digits with the number of retries specified if the user doesn't give digits in the set time. More... | |
switch_status_t | switch_ivr_speak_text_handle (switch_core_session_t *session, switch_speech_handle_t *sh, switch_codec_t *codec, switch_timer_t *timer, char *text, switch_input_args_t *args) |
void | switch_ivr_clear_speech_cache (switch_core_session_t *session) |
switch_status_t | switch_ivr_speak_text (switch_core_session_t *session, const char *tts_name, const char *voice_name, char *text, switch_input_args_t *args) |
Speak given text with given tts engine. More... | |
switch_status_t | switch_ivr_originate (switch_core_session_t *session, switch_core_session_t **bleg, switch_call_cause_t *cause, const char *bridgeto, uint32_t timelimit_sec, const switch_state_handler_table_t *table, const char *cid_name_override, const char *cid_num_override, switch_caller_profile_t *caller_profile_override, switch_event_t *ovars, switch_originate_flag_t flags, switch_call_cause_t *cancel_cause) |
Make an outgoing call. More... | |
switch_status_t | switch_ivr_enterprise_originate (switch_core_session_t *session, switch_core_session_t **bleg, switch_call_cause_t *cause, const char *bridgeto, uint32_t timelimit_sec, const switch_state_handler_table_t *table, const char *cid_name_override, const char *cid_num_override, switch_caller_profile_t *caller_profile_override, switch_event_t *ovars, switch_originate_flag_t flags, switch_call_cause_t *cancel_cause) |
void | switch_ivr_bridge_display (switch_core_session_t *session, switch_core_session_t *peer_session) |
switch_status_t | switch_ivr_multi_threaded_bridge (_In_ switch_core_session_t *session, _In_ switch_core_session_t *peer_session, switch_input_callback_function_t dtmf_callback, void *session_data, void *peer_session_data) |
Bridge Audio from one session to another. More... | |
switch_status_t | switch_ivr_signal_bridge (switch_core_session_t *session, switch_core_session_t *peer_session) |
Bridge Signalling from one session to another. More... | |
switch_status_t | switch_ivr_session_transfer (_In_ switch_core_session_t *session, const char *extension, const char *dialplan, const char *context) |
Transfer an existing session to another location. More... | |
uint32_t | switch_ivr_schedule_transfer (time_t runtime, const char *uuid, char *extension, char *dialplan, char *context) |
Transfer an existing session to another location in the future. More... | |
uint32_t | switch_ivr_schedule_hangup (time_t runtime, const char *uuid, switch_call_cause_t cause, switch_bool_t bleg) |
Hangup an existing session in the future. More... | |
switch_status_t | switch_ivr_uuid_bridge (const char *originator_uuid, const char *originatee_uuid) |
Bridge two existing sessions. More... | |
switch_status_t | switch_ivr_media (const char *uuid, switch_media_flag_t flags) |
Signal a session to request direct media access to it's remote end. More... | |
switch_status_t | switch_ivr_3p_media (const char *uuid, switch_media_flag_t flags) |
switch_status_t | switch_ivr_nomedia (const char *uuid, switch_media_flag_t flags) |
Signal a session to request indirect media allowing it to exchange media directly with another device. More... | |
switch_status_t | switch_ivr_3p_nomedia (const char *uuid, switch_media_flag_t flags) |
void | switch_ivr_bg_media (const char *uuid, switch_media_flag_t flags, switch_bool_t on, switch_bool_t is3p, uint32_t delay) |
switch_status_t | switch_ivr_hold_uuid (const char *uuid, const char *message, switch_bool_t moh) |
Signal the session with a protocol specific hold message. More... | |
switch_status_t | switch_ivr_hold_toggle_uuid (const char *uuid, const char *message, switch_bool_t moh) |
Toggles channel hold state of session. More... | |
switch_status_t | switch_ivr_unhold_uuid (const char *uuid) |
Signal the session with a protocol specific unhold message. More... | |
switch_status_t | switch_ivr_hold (switch_core_session_t *session, const char *message, switch_bool_t moh) |
Signal the session with a protocol specific hold message. More... | |
switch_status_t | switch_ivr_unhold (switch_core_session_t *session) |
Signal the session with a protocol specific unhold message. More... | |
uint32_t | switch_ivr_schedule_broadcast (time_t runtime, const char *uuid, const char *path, switch_media_flag_t flags) |
Signal the session to broadcast audio in the future. More... | |
switch_status_t | switch_ivr_broadcast (const char *uuid, const char *path, switch_media_flag_t flags) |
Signal the session to broadcast audio. More... | |
void | switch_ivr_broadcast_in_thread (switch_core_session_t *session, const char *app, int flags) |
switch_status_t | switch_ivr_transfer_variable (switch_core_session_t *sessa, switch_core_session_t *sessb, char *var) |
Transfer variables from one session to another. More... | |
switch_status_t | switch_ivr_digit_stream_parser_new (switch_memory_pool_t *pool, switch_ivr_digit_stream_parser_t **parser) |
Create a digit stream parser object. More... | |
switch_status_t | switch_ivr_digit_stream_parser_destroy (switch_ivr_digit_stream_parser_t *parser) |
Destroy a digit stream parser object. More... | |
switch_status_t | switch_ivr_digit_stream_new (switch_ivr_digit_stream_parser_t *parser, switch_ivr_digit_stream_t **stream) |
Create a new digit stream object. More... | |
switch_status_t | switch_ivr_digit_stream_destroy (switch_ivr_digit_stream_t **stream) |
Destroys a digit stream object. More... | |
switch_status_t | switch_ivr_digit_stream_parser_set_event (switch_ivr_digit_stream_parser_t *parser, char *digits, void *data) |
Set a digit string to action mapping. More... | |
switch_status_t | switch_ivr_digit_stream_parser_del_event (switch_ivr_digit_stream_parser_t *parser, char *digits) |
Delete a string to action mapping. More... | |
void * | switch_ivr_digit_stream_parser_feed (switch_ivr_digit_stream_parser_t *parser, switch_ivr_digit_stream_t *stream, char digit) |
Feed digits collected into the stream for event match testing. More... | |
switch_status_t | switch_ivr_digit_stream_reset (switch_ivr_digit_stream_t *stream) |
Reset the collected digit stream to nothing. More... | |
switch_status_t | switch_ivr_digit_stream_parser_set_terminator (switch_ivr_digit_stream_parser_t *parser, char digit) |
Set a digit string terminator. More... | |
A group of core functions to do IVR related functions designed to be building blocks for a higher level IVR interface.
typedef struct switch_ivr_digit_stream_parser switch_ivr_digit_stream_parser_t |
Definition at line 679 of file switch_ivr.h.
typedef struct switch_ivr_digit_stream switch_ivr_digit_stream_t |
Definition at line 681 of file switch_ivr.h.
switch_status_t switch_ivr_3p_media | ( | const char * | uuid, |
switch_media_flag_t | flags | ||
) |
Definition at line 1564 of file switch_ivr.c.
References CF_3P_MEDIA_REQUESTED, CF_BRIDGE_ORIGINATOR, CF_BRIDGED, CF_EARLY_MEDIA, CF_MEDIA_ACK, CF_MEDIA_SET, CF_MEDIA_TRANS, CF_PROXY_MODE, CF_REQ_MEDIA, switch_core_session_message::from, switch_core_session_message::message_id, switch_core_session_message::numeric_arg, SMF_IMMEDIATE, SMF_REBRIDGE, SMF_REPLYONLY_A, SMF_REPLYONLY_B, switch_assert, switch_channel_clear_flag(), switch_channel_clear_state_handler(), switch_channel_get_name(), switch_channel_get_variable, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_set_variable, switch_channel_test_flag(), switch_channel_wait_for_flag(), switch_core_session_get_channel(), switch_core_session_locate, switch_core_session_receive_message, switch_core_session_rwunlock(), SWITCH_FALSE, switch_ivr_uuid_bridge(), SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_MESSAGE_INDICATE_3P_MEDIA, SWITCH_MESSAGE_INDICATE_CLEAR_PROGRESS, SWITCH_SIGNAL_BRIDGE_VARIABLE, SWITCH_STATUS_GENERR, SWITCH_STATUS_INUSE, SWITCH_STATUS_SUCCESS, SWITCH_TRUE, and switch_yield.
Referenced by media_thread_run().
switch_status_t switch_ivr_3p_nomedia | ( | const char * | uuid, |
switch_media_flag_t | flags | ||
) |
Definition at line 1774 of file switch_ivr.c.
References CF_3P_NOMEDIA_REQUESTED, CF_3P_NOMEDIA_REQUESTED_BLEG, CF_BRIDGE_ORIGINATOR, CF_MEDIA_ACK, CF_MEDIA_TRANS, CF_PROXY_MODE, CF_REDIRECT, CF_REQ_MEDIA, CF_RESET, CS_HIBERNATE, CS_PARK, switch_core_session_message::from, switch_core_session_message::message_id, SMF_FORCE, SMF_REBRIDGE, switch_core_session_message::string_arg, SWITCH_BRIDGE_VARIABLE, switch_channel_clear_flag(), switch_channel_get_variable, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_set_state, switch_channel_set_variable, switch_channel_test_flag(), switch_channel_wait_for_flag(), switch_channel_wait_for_state(), switch_core_session_get_channel(), switch_core_session_in_thread(), switch_core_session_locate, switch_core_session_receive_message, switch_core_session_rwunlock(), SWITCH_FALSE, switch_ivr_signal_bridge(), SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_MESSAGE_INDICATE_3P_NOMEDIA, SWITCH_R_SDP_VARIABLE, SWITCH_STATUS_GENERR, SWITCH_STATUS_INUSE, SWITCH_STATUS_SUCCESS, SWITCH_TRUE, and switch_yield.
Referenced by audio_bridge_thread(), and media_thread_run().
switch_status_t switch_ivr_activate_unicast | ( | switch_core_session_t * | session, |
char * | local_ip, | ||
switch_port_t | local_port, | ||
char * | remote_ip, | ||
switch_port_t | remote_port, | ||
char * | transport, | ||
char * | flags | ||
) |
Definition at line 398 of file switch_ivr.c.
References switch_codec_implementation::actual_samples_per_second, switch_frame::buflen, CF_UNICAST, switch_frame::codec, switch_frame::data, fail, switch_unicast_conninfo::flag_mutex, switch_codec::implementation, switch_unicast_conninfo::local_addr, switch_unicast_conninfo::local_ip, switch_unicast_conninfo::local_port, switch_codec_implementation::microseconds_per_packet, switch_unicast_conninfo::read_codec, switch_unicast_conninfo::remote_addr, switch_unicast_conninfo::remote_ip, switch_unicast_conninfo::remote_port, switch_unicast_conninfo::session, switch_unicast_conninfo::socket, SUF_NATIVE, SUF_READY, switch_assert, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_set_private(), SWITCH_CODEC_FLAG_DECODE, SWITCH_CODEC_FLAG_ENCODE, switch_core_codec_init, switch_core_session_alloc, switch_core_session_get_channel(), switch_core_session_get_pool(), switch_core_session_get_read_codec(), switch_core_session_strdup, SWITCH_LOG_CRIT, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, SWITCH_LOG_INFO, switch_log_printf(), switch_mutex_init(), SWITCH_MUTEX_NESTED, switch_set_flag, switch_set_flag_locked, switch_sockaddr_info_get(), switch_socket_bind(), switch_socket_create(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_test_flag, SWITCH_UNSPEC, switch_unicast_conninfo::transport, switch_unicast_conninfo::type, switch_unicast_conninfo::write_frame, and switch_unicast_conninfo::write_frame_data.
Referenced by switch_ivr_parse_event().
void switch_ivr_bg_media | ( | const char * | uuid, |
switch_media_flag_t | flags, | ||
switch_bool_t | on, | ||
switch_bool_t | is3p, | ||
uint32_t | delay | ||
) |
Definition at line 2014 of file switch_ivr.c.
References media_job_t::delay, media_job_t::flags, switch_thread_data_s::func, media_job_t::is3p, media_thread_run(), switch_thread_data_s::obj, media_job_t::on, pool, switch_thread_data_s::pool, media_job_t::pool, switch_core_alloc, switch_core_new_memory_pool, switch_core_strdup, switch_thread_pool_launch_thread(), and media_job_t::uuid.
Referenced by switch_core_media_toggle_hold().
void switch_ivr_bridge_display | ( | switch_core_session_t * | session, |
switch_core_session_t * | peer_session | ||
) |
Definition at line 293 of file switch_ivr_bridge.c.
References send_display().
Referenced by audio_bridge_thread(), and switch_ivr_signal_bridge().
switch_status_t switch_ivr_broadcast | ( | const char * | uuid, |
const char * | path, | ||
switch_media_flag_t | flags | ||
) |
Signal the session to broadcast audio.
uuid | the uuid of the session to broadcast on |
path | the path data of the broadcast "/path/to/file.wav [<timer name>]" or "speak:<engine>|<voice>|<Text to say>" |
flags | flags to send to the request (SMF_ECHO_BRIDGED to send the broadcast to both sides of the call) |
Definition at line 4963 of file switch_ivr_async.c.
References CF_BROADCAST_DROP_MEDIA, CF_PROXY_MODE, SAF_MEDIA_TAP, SMF_ECHO_ALEG, SMF_ECHO_BLEG, SMF_EXEC_INLINE, SMF_HOLD_BLEG, SMF_LOOP, SMF_PRIORITY, SMF_REBRIDGE, switch_assert, switch_channel_get_partner_uuid(), switch_channel_set_flag, switch_channel_test_flag(), switch_core_session_execute_application, switch_core_session_execute_application_get_flags(), switch_core_session_get_app_flags(), switch_core_session_get_channel(), switch_core_session_locate, switch_core_session_queue_private_event(), switch_core_session_rwunlock(), switch_event_add_header(), switch_event_add_header_string(), SWITCH_EVENT_COMMAND, switch_event_create, switch_ivr_media(), switch_safe_free, SWITCH_STACK_BOTTOM, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by bcast_thread(), meta_on_dtmf(), switch_core_media_toggle_hold(), switch_core_session_send_dtmf(), switch_ivr_hold(), switch_ivr_parse_event(), switch_ivr_soft_hold(), and SWITCH_STANDARD_SCHED_FUNC().
void switch_ivr_broadcast_in_thread | ( | switch_core_session_t * | session, |
const char * | app, | ||
int | flags | ||
) |
Definition at line 3919 of file switch_ivr_async.c.
References bch_t::app, bcast_thread(), bch_t::flags, pool, bch_t::session, switch_assert, switch_core_session_alloc, 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 meta_on_dtmf().
void switch_ivr_clear_speech_cache | ( | switch_core_session_t * | session | ) |
Definition at line 2629 of file switch_ivr_play_say.c.
References cached_speech_handle::codec, switch_timer::interval, cached_speech_handle::sh, switch_speech_handle::speech_interface, SWITCH_CACHE_SPEECH_HANDLES_OBJ_NAME, switch_channel_get_private(), switch_channel_set_private(), switch_core_codec_destroy(), switch_core_session_get_channel(), switch_core_speech_close(), switch_core_timer_destroy(), SWITCH_SPEECH_FLAG_NONE, and cached_speech_handle::timer.
Referenced by switch_core_session_perform_destroy(), and switch_ivr_speak_text().
switch_status_t switch_ivr_collect_digits_callback | ( | switch_core_session_t * | session, |
switch_input_args_t * | args, | ||
uint32_t | digit_timeout, | ||
uint32_t | abs_timeout | ||
) |
Wait for DTMF digits calling a pluggable callback function when digits are collected.
session | the session to read. |
args | arguements to pass for callbacks etc |
timeout | a timeout in milliseconds |
Definition at line 1173 of file switch_ivr.c.
References arg_recursion_check_start, arg_recursion_check_stop, CF_BREAK, CF_SERVICE, switch_dtmf_t::digit, switch_channel_clear_flag(), switch_channel_dequeue_dtmf(), switch_channel_has_dtmf(), switch_channel_ready, switch_channel_test_flag(), switch_cond_next(), switch_core_session_dequeue_event(), switch_core_session_get_channel(), switch_core_session_read_frame(), switch_event_destroy(), SWITCH_FALSE, SWITCH_INPUT_TYPE_DTMF, SWITCH_INPUT_TYPE_EVENT, SWITCH_IO_FLAG_NONE, switch_ivr_dmachine_feed(), switch_ivr_dmachine_ping(), switch_ivr_parse_all_events(), switch_micro_time_now(), SWITCH_READ_ACCEPTABLE, SWITCH_STATUS_BREAK, SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, SWITCH_STATUS_TIMEOUT, and switch_frame::user_data.
Referenced by CoreSession::collectDigits(), enterprise_originate_ringback_thread(), fs_switch_ivr_collect_digits_callback(), and switch_ivr_soft_hold().
switch_status_t switch_ivr_collect_digits_count | ( | switch_core_session_t * | session, |
char * | buf, | ||
switch_size_t | buflen, | ||
switch_size_t | maxdigits, | ||
const char * | terminators, | ||
char * | terminator, | ||
uint32_t | first_timeout, | ||
uint32_t | digit_timeout, | ||
uint32_t | abs_timeout | ||
) |
Wait for specified number of DTMF digits, untile terminator is received or until the channel hangs up.
session | the session to read. |
buf | strig to write to |
buflen | max size of buf |
maxdigits | max number of digits to read |
terminators | digits to end the collection |
terminator | actual digit that caused the collection to end (if any) |
first_timeout | timeout in ms |
digit_timeout | digit timeout in ms |
abs_timeout | abs timeout in ms |
Definition at line 1287 of file switch_ivr.c.
References switch_frame::buflen, CF_SERVICE, switch_frame::codec, switch_frame::data, switch_frame::datalen, switch_codec_implementation::decoded_bytes_per_packet, switch_dtmf_t::digit, switch_codec_implementation::microseconds_per_packet, switch_codec_implementation::number_of_channels, switch_frame::samples, switch_codec_implementation::samples_per_second, switch_channel_dequeue_dtmf(), switch_channel_get_variable, switch_channel_has_dtmf(), switch_channel_ready, SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), SWITCH_CODEC_FLAG_DECODE, SWITCH_CODEC_FLAG_ENCODE, switch_cond_next(), 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_core_session_write_frame(), switch_generate_sln_silence(), SWITCH_IO_FLAG_NONE, switch_ivr_parse_all_events(), SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), switch_micro_time_now(), 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_zmalloc, and zstr.
Referenced by fs_switch_ivr_collect_digits_count(), CoreSession::getDigits(), play_and_collect(), and switch_ivr_read().
switch_status_t switch_ivr_deactivate_unicast | ( | switch_core_session_t * | session | ) |
Definition at line 365 of file switch_ivr.c.
References CF_UNICAST, switch_unicast_conninfo::read_codec, switch_unicast_conninfo::socket, SUF_READY, SUF_THREAD_RUNNING, switch_channel_clear_flag(), switch_channel_get_private(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), switch_clear_flag_locked, switch_core_codec_destroy(), switch_core_codec_ready(), switch_core_session_get_channel(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_SHUTDOWN_READWRITE, switch_socket_close(), switch_socket_shutdown(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_thread_join(), switch_yield, and switch_unicast_conninfo::thread.
Referenced by switch_core_session_perform_destroy(), switch_core_session_reset(), and switch_ivr_park().
switch_status_t switch_ivr_detect_speech | ( | switch_core_session_t * | session, |
const char * | mod_name, | ||
const char * | grammar, | ||
const char * | name, | ||
const char * | dest, | ||
switch_asr_handle_t * | ah | ||
) |
Engage background Speech detection on a session.
session | the session to attach |
mod_name | the module name of the ASR library |
grammar | the grammar text, URI, or local file name |
name | the grammar name |
dest | the destination address |
ah | an ASR handle to use (NULL to create one) |
Definition at line 4778 of file switch_ivr_async.c.
References speech_thread_handle::ah, SWITCH_ASR_FLAG_FIRE_EVENTS, switch_channel_get_private(), switch_channel_get_variable, SWITCH_CHANNEL_SESSION_LOG, switch_core_asr_load_grammar(), switch_core_session_get_channel(), switch_ivr_detect_speech_init(), switch_ivr_stop_detect_speech(), SWITCH_LOG_DEBUG, switch_log_printf(), switch_set_flag, SWITCH_SPEECH_KEY, SWITCH_STATUS_FALSE, SWITCH_STATUS_NOT_INITALIZED, SWITCH_STATUS_SUCCESS, and switch_true().
Referenced by switch_ivr_play_and_detect_speech().
switch_status_t switch_ivr_detect_speech_disable_all_grammars | ( | switch_core_session_t * | session | ) |
Disable all grammars on a background speech detection handle.
session | The session to change the grammar on |
Definition at line 4703 of file switch_ivr_async.c.
References speech_thread_handle::ah, switch_channel_get_private(), SWITCH_CHANNEL_SESSION_LOG, switch_core_asr_disable_all_grammars(), switch_core_session_get_channel(), switch_ivr_stop_detect_speech(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_SPEECH_KEY, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_detect_speech_disable_grammar | ( | switch_core_session_t * | session, |
const char * | name | ||
) |
Disable a grammar on a background speech detection handle.
session | The session to change the grammar on |
name | the grammar name |
Definition at line 4687 of file switch_ivr_async.c.
References speech_thread_handle::ah, switch_channel_get_private(), SWITCH_CHANNEL_SESSION_LOG, switch_core_asr_disable_grammar(), switch_core_session_get_channel(), switch_ivr_stop_detect_speech(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_SPEECH_KEY, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_detect_speech_enable_grammar | ( | switch_core_session_t * | session, |
const char * | name | ||
) |
Enable a grammar on a background speech detection handle.
session | The session to change the grammar on |
name | the grammar name |
Definition at line 4671 of file switch_ivr_async.c.
References speech_thread_handle::ah, switch_channel_get_private(), SWITCH_CHANNEL_SESSION_LOG, switch_core_asr_enable_grammar(), switch_core_session_get_channel(), switch_ivr_stop_detect_speech(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_SPEECH_KEY, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_detect_speech_init | ( | switch_core_session_t * | session, |
const char * | mod_name, | ||
const char * | dest, | ||
switch_asr_handle_t * | ah | ||
) |
Initialize background Speech detection on a session, so that parameters can be set, and grammars loaded. After calling this function, it is possible to call switch_ivr_set_param_detect_speech() to set recognition parameters. Calling switch_ivr_detect_speech_load_grammar() starts the speech recognition.
session | the session to attach |
mod_name | the module name of the ASR library |
dest | the destination address |
ah | an ASR handle to use (NULL to create one) |
Definition at line 4719 of file switch_ivr_async.c.
References switch_codec_implementation::actual_samples_per_second, speech_thread_handle::ah, speech_thread_handle::bug, speech_thread_handle::pool, speech_thread_handle::session, SMBF_NO_PAUSE, SMBF_READ_STREAM, speech_callback(), speech_on_dtmf(), SWITCH_ASR_FLAG_FIRE_EVENTS, SWITCH_ASR_FLAG_NONE, switch_channel_get_private(), switch_channel_get_variable, switch_channel_set_private(), switch_core_asr_close(), switch_core_asr_open(), switch_core_media_bug_add(), switch_core_session_alloc, switch_core_session_get_channel(), switch_core_session_get_pool(), switch_core_session_get_read_impl(), switch_ivr_stop_detect_speech(), switch_set_flag, switch_snprintf(), SWITCH_SPEECH_KEY, SWITCH_STATUS_MEMERR, SWITCH_STATUS_SUCCESS, and switch_true().
Referenced by switch_ivr_detect_speech().
switch_status_t switch_ivr_detect_speech_load_grammar | ( | switch_core_session_t * | session, |
const char * | grammar, | ||
const char * | name | ||
) |
Load a grammar on a background speech detection handle.
session | The session to change the grammar on |
grammar | the grammar text, URI, or local file name |
name | the grammar name |
Definition at line 4614 of file switch_ivr_async.c.
References speech_thread_handle::ah, switch_channel_get_private(), SWITCH_CHANNEL_SESSION_LOG, switch_core_asr_load_grammar(), switch_core_session_get_channel(), switch_ivr_stop_detect_speech(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_SPEECH_KEY, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_detect_speech_start_input_timers | ( | switch_core_session_t * | session | ) |
Start input timers on a background speech detection handle.
session | The session to start the timers on |
Definition at line 4643 of file switch_ivr_async.c.
References speech_thread_handle::ah, switch_channel_get_private(), switch_core_asr_start_input_timers(), switch_core_session_get_channel(), SWITCH_SPEECH_KEY, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by switch_ivr_play_and_detect_speech().
switch_status_t switch_ivr_detect_speech_unload_grammar | ( | switch_core_session_t * | session, |
const char * | name | ||
) |
Unload a grammar on a background speech detection handle.
session | The session to change the grammar on |
name | the grammar name |
Definition at line 4655 of file switch_ivr_async.c.
References speech_thread_handle::ah, switch_channel_get_private(), SWITCH_CHANNEL_SESSION_LOG, switch_core_asr_unload_grammar(), switch_core_session_get_channel(), switch_ivr_stop_detect_speech(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_SPEECH_KEY, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_digit_stream_destroy | ( | switch_ivr_digit_stream_t ** | stream | ) |
Destroys a digit stream object.
stream | a pointer to the stream object |
Definition at line 2311 of file switch_ivr.c.
References switch_safe_free, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_digit_stream_new | ( | switch_ivr_digit_stream_parser_t * | parser, |
switch_ivr_digit_stream_t ** | stream | ||
) |
Create a new digit stream object.
parser | a pointer to the parser object created by switch_ivr_digit_stream_parser_new |
stream | a pointer to the stream object pointer |
Definition at line 2295 of file switch_ivr.c.
References memset(), switch_assert, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_zmalloc.
switch_status_t switch_ivr_digit_stream_parser_del_event | ( | switch_ivr_digit_stream_parser_t * | parser, |
char * | digits | ||
) |
Delete a string to action mapping.
parser | a pointer to the parser object created by switch_ivr_digit_stream_parser_new |
digits | the digit string to be removed from the map |
Definition at line 2367 of file switch_ivr.c.
References SWITCH_CHANNEL_LOG, switch_core_hash_delete(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_digit_stream_parser_destroy | ( | switch_ivr_digit_stream_parser_t * | parser | ) |
Destroy a digit stream parser object.
parser | a pointer to the parser object |
Definition at line 2277 of file switch_ivr.c.
References switch_core_destroy_memory_pool, switch_core_hash_destroy(), and SWITCH_STATUS_FALSE.
void* switch_ivr_digit_stream_parser_feed | ( | switch_ivr_digit_stream_parser_t * | parser, |
switch_ivr_digit_stream_t * | stream, | ||
char | digit | ||
) |
Feed digits collected into the stream for event match testing.
parser | a pointer to the parser object created by switch_ivr_digit_stream_parser_new |
stream | a stream to write data to |
digit | a digit to collect and test against the map of digit strings |
Definition at line 2382 of file switch_ivr.c.
References switch_assert, switch_core_hash_find(), and switch_micro_time_now().
switch_status_t switch_ivr_digit_stream_parser_new | ( | switch_memory_pool_t * | pool, |
switch_ivr_digit_stream_parser_t ** | parser | ||
) |
Create a digit stream parser object.
pool | the pool to use for the new hash |
parser | a pointer to the object pointer |
Definition at line 2237 of file switch_ivr.c.
References memset(), pool, SWITCH_CHANNEL_LOG, switch_core_alloc, switch_core_destroy_memory_pool, switch_core_hash_init, switch_core_new_memory_pool, SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_MEMERR, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_digit_stream_parser_set_event | ( | switch_ivr_digit_stream_parser_t * | parser, |
char * | digits, | ||
void * | data | ||
) |
Set a digit string to action mapping.
parser | a pointer to the parser object created by switch_ivr_digit_stream_parser_new |
digits | a string of digits to associate with an action |
data | consumer data attached to this digit string |
Definition at line 2325 of file switch_ivr.c.
References SWITCH_CHANNEL_LOG, switch_core_hash_insert, SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_digit_stream_parser_set_terminator | ( | switch_ivr_digit_stream_parser_t * | parser, |
char | digit | ||
) |
Set a digit string terminator.
parser | a pointer to the parser object created by switch_ivr_digit_stream_parser_new |
digit | the terminator digit |
Definition at line 2448 of file switch_ivr.c.
References SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_digit_stream_reset | ( | switch_ivr_digit_stream_t * | stream | ) |
Reset the collected digit stream to nothing.
stream | a pointer to the parser stream object created by switch_ivr_digit_stream_new |
Definition at line 2435 of file switch_ivr.c.
References switch_assert, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_displace_session | ( | switch_core_session_t * | session, |
const char * | file, | ||
uint32_t | limit, | ||
const char * | flags | ||
) |
displace the media for a session with the audio from a file
session | the session to displace |
file | filename |
limit | time limit in ms |
flags | m (mux) l (loop) or r(read session instead of write session) |
Definition at line 912 of file switch_ivr_async.c.
References switch_codec_implementation::actual_samples_per_second, switch_directories::base_dir, switch_file_handle::channels, displace_helper_t::fh, displace_helper_t::file, switch_codec_implementation::iananame, displace_helper_t::loop, displace_helper_t::mux, switch_codec_implementation::number_of_channels, read_displace_callback(), switch_file_handle::samplerate, SMBF_NO_PAUSE, SMBF_READ_REPLACE, SMBF_WRITE_REPLACE, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, switch_channel_get_private(), switch_channel_get_variable, switch_channel_hangup, switch_channel_media_up, switch_channel_pre_answer, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_private(), switch_core_file_close(), switch_core_file_open, switch_core_media_bug_add(), switch_core_session_alloc, switch_core_session_get_channel(), switch_core_session_get_read_codec(), switch_core_session_get_read_impl(), switch_core_session_reset(), switch_core_session_sprintf(), switch_core_session_strdup, switch_epoch_time_now(), SWITCH_FALSE, SWITCH_FILE_DATA_SHORT, SWITCH_FILE_FLAG_READ, switch_find_end_paren(), SWITCH_GLOBAL_dirs, switch_is_file_path(), SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_PATH_SEPARATOR, SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_MEMERR, SWITCH_STATUS_SUCCESS, switch_str_nil, SWITCH_TRUE, switch_true(), SWITCH_URL_SEPARATOR, write_displace_callback(), and zstr.
switch_status_t switch_ivr_eavesdrop_exec_all | ( | switch_core_session_t * | session, |
const char * | app, | ||
const char * | arg | ||
) |
Definition at line 1832 of file switch_ivr_async.c.
References exec_cb_data::caller, exec_cb(), switch_core_media_bug_exec_all(), switch_core_session_alloc, switch_core_session_strdup, exec_cb_data::val, and exec_cb_data::var.
switch_status_t switch_ivr_eavesdrop_pop_eavesdropper | ( | switch_core_session_t * | session, |
switch_core_session_t ** | sessionp | ||
) |
Definition at line 1773 of file switch_ivr_async.c.
References eavesdrop_pvt::eavesdropper, ep, SMBF_PRUNE, switch_core_media_bug_get_user_data(), switch_core_media_bug_pop(), switch_core_media_bug_set_flag(), switch_core_session_read_lock(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_ivr_eavesdrop_session | ( | switch_core_session_t * | session, |
const char * | uuid, | ||
const char * | require_group, | ||
switch_eavesdrop_flag_t | flags | ||
) |
Eavesdrop on a another session.
session | our session |
uuid | the uuid of the session to spy on |
require_group | group name to use to limit by group |
flags | tweak read-mux, write-mux and dtmf |
Definition at line 1866 of file switch_ivr_async.c.
References switch_codec_implementation::actual_samples_per_second, buf, eavesdrop_pvt::buffer, switch_frame::buflen, 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, CF_BRIDGED, CF_VIDEO, switch_core_session::channel, switch_frame::codec, switch_frame::data, eavesdrop_pvt::data, switch_frame::datalen, switch_codec_implementation::decoded_bytes_per_packet, switch_dtmf_t::digit, eavesdrop_callback(), eavesdrop_pvt::eavesdropper, ED_BRIDGE_READ, ED_BRIDGE_WRITE, ED_COPY_DISPLAY, ED_DTMF, ED_MUX_READ, ED_MUX_WRITE, ep, eavesdrop_pvt::flags, switch_core_session_message::from, switch_codec::implementation, switch_core_session_message::message_id, switch_codec_implementation::microseconds_per_packet, eavesdrop_pvt::mutex, switch_codec_implementation::number_of_channels, eavesdrop_pvt::r_buffer, eavesdrop_pvt::r_mutex, switch_frame::rate, eavesdrop_pvt::read_impl, switch_frame::samples, SFF_CNG, SMBF_NO_PAUSE, SMBF_READ_PING, SMBF_READ_REPLACE, SMBF_READ_STREAM, SMBF_READ_VIDEO_PING, SMBF_READ_VIDEO_STREAM, SMBF_SPY_VIDEO_STREAM, SMBF_SPY_VIDEO_STREAM_BLEG, SMBF_THREAD_LOCK, SMBF_WRITE_REPLACE, SMBF_WRITE_STREAM, SMBF_WRITE_VIDEO_STREAM, switch_core_session_message::string_arg, switch_buffer_add_mutex(), switch_buffer_create_dynamic(), switch_buffer_destroy(), switch_buffer_inuse(), switch_buffer_lock(), switch_buffer_read(), switch_buffer_unlock(), switch_buffer_zero(), switch_buffer_zwrite(), switch_channel_dequeue_dtmf(), switch_channel_get_caller_profile(), switch_channel_get_variable, switch_channel_has_dtmf(), switch_channel_media_ack, switch_channel_media_up, switch_channel_pre_answer, switch_channel_ready, SWITCH_CHANNEL_SESSION_LOG, switch_channel_state_change_pending(), switch_channel_test_flag(), switch_channel_up, switch_channel_up_nosig, switch_clear_flag, SWITCH_CODEC_FLAG_DECODE, SWITCH_CODEC_FLAG_ENCODE, switch_core_codec_destroy(), switch_core_codec_init, switch_core_media_bug_add(), switch_core_media_bug_clear_flag(), switch_core_media_bug_remove(), switch_core_media_bug_set_flag(), switch_core_media_bug_test_flag(), switch_core_session_alloc, switch_core_session_dequeue_event(), switch_core_session_get_channel(), switch_core_session_get_pool(), switch_core_session_get_read_impl(), switch_core_session_locate, switch_core_session_read_frame(), switch_core_session_receive_message, switch_core_session_request_video_refresh(), switch_core_session_reset(), switch_core_session_rwunlock(), switch_core_session_set_read_codec(), switch_core_session_strdup, switch_core_session_write_frame(), switch_event_destroy(), switch_event_get_header, SWITCH_FALSE, SWITCH_IO_FLAG_NONE, switch_ivr_phrase_macro, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), switch_media_bug_parse_spy_fmt(), switch_media_bug_set_spy_fmt(), SWITCH_MESSAGE_INDICATE_BRIDGE, SWITCH_MESSAGE_INDICATE_DISPLAY, SWITCH_MESSAGE_INDICATE_UNBRIDGE, SWITCH_MESSAGE_INDICATE_VIDEO_REFRESH_REQ, switch_mutex_init(), SWITCH_MUTEX_NESTED, switch_mux_channels(), SWITCH_READ_ACCEPTABLE, SWITCH_RECOMMENDED_BUFFER_SIZE, switch_safe_free, switch_separate_string(), switch_set_flag, switch_snprintf(), SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_test_flag, SWITCH_TRUE, switch_true(), switch_yield, eavesdrop_pvt::tread_impl, eavesdrop_pvt::w_buffer, eavesdrop_pvt::w_mutex, and zstr.
switch_status_t switch_ivr_eavesdrop_update_display | ( | switch_core_session_t * | session, |
const char * | name, | ||
const char * | number | ||
) |
Definition at line 1845 of file switch_ivr_async.c.
References exec_cb_data::caller, display_exec_cb(), switch_channel_clear_app_flag_key(), switch_channel_set_app_flag_key(), switch_channel_test_app_flag_key(), switch_core_media_bug_exec_all(), switch_core_session_alloc, switch_core_session_get_channel(), switch_core_session_strdup, SWITCH_STATUS_FALSE, exec_cb_data::val, and exec_cb_data::var.
switch_status_t switch_ivr_enterprise_originate | ( | switch_core_session_t * | session, |
switch_core_session_t ** | bleg, | ||
switch_call_cause_t * | cause, | ||
const char * | bridgeto, | ||
uint32_t | timelimit_sec, | ||
const switch_state_handler_table_t * | table, | ||
const char * | cid_name_override, | ||
const char * | cid_num_override, | ||
switch_caller_profile_t * | caller_profile_override, | ||
switch_event_t * | ovars, | ||
switch_originate_flag_t | flags, | ||
switch_call_cause_t * | cancel_cause | ||
) |
Definition at line 1454 of file switch_ivr_originate.c.
References enterprise_originate_handle_t::bleg, enterprise_originate_handle_t::cause, CF_ANSWERED, CF_NOT_READY, CF_PROXY_MEDIA, CF_PROXY_MODE, enterprise_originate_handle_t::done, enterprise_originate_ringback_thread(), enterprise_originate_thread(), MAX_PEERS, mutex, enterprise_originate_handle_t::mutex, switch_event_header::name, switch_event_header::next, enterprise_originate_handle_t::ovars, pool, ent_originate_ringback::ringback_data, running, ent_originate_ringback::running, ent_originate_ringback::session, enterprise_originate_handle_t::status, switch_caller_profile_dup(), SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, SWITCH_CAUSE_LOSE_RACE, SWITCH_CAUSE_NO_ANSWER, SWITCH_CAUSE_NO_PICKUP, SWITCH_CAUSE_SUCCESS, switch_channel_cause2str(), switch_channel_clear_flag(), switch_channel_get_caller_profile(), switch_channel_get_variable, switch_channel_handle_cause(), switch_channel_media_ready, switch_channel_pre_answer, switch_channel_process_export(), switch_channel_ready, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_set_variable, switch_channel_test_flag(), switch_core_destroy_memory_pool, switch_core_new_memory_pool, switch_core_session_get_channel(), switch_core_session_get_uuid(), switch_core_strdup, SWITCH_ENT_ORIGINATE_DELIM, switch_event_add_header_string(), SWITCH_EVENT_CHANNEL_DATA, switch_event_create_brackets(), switch_event_create_plain(), switch_event_destroy(), switch_event_dup(), SWITCH_EXPORT_VARS_VARIABLE, SWITCH_FALSE, switch_goto_status, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), switch_mutex_init(), switch_mutex_lock(), SWITCH_MUTEX_NESTED, switch_mutex_unlock(), switch_separate_string_string(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, switch_thread_create(), switch_thread_join(), SWITCH_THREAD_STACKSIZE, switch_threadattr_create(), switch_threadattr_stacksize_set(), switch_yield, thread, enterprise_originate_handle_t::thread, ent_originate_ringback::thread, switch_event_header::value, and zstr.
Referenced by switch_ivr_originate().
switch_status_t switch_ivr_generate_json_cdr | ( | switch_core_session_t * | session, |
cJSON ** | json_cdr, | ||
switch_bool_t | urlencode | ||
) |
Generate an JSON CDR report.
session | the session to get the data from. |
json_cdr | pointer to the json object |
Definition at line 3177 of file switch_ivr.c.
References switch_channel_timetable::answered, switch_app_log::app, switch_caller_application::application_data, switch_caller_application::application_name, switch_caller_extension::applications, switch_app_log::arg, switch_channel_timetable::bridged, switch_caller_profile::caller_extension, switch_caller_extension::children, cJSON_AddItemToArray(), cJSON_AddItemToObject(), cJSON_CreateArray(), cJSON_CreateObject(), cJSON_CreateString(), switch_channel_timetable::created, switch_caller_extension::current_application, switch_caller_profile::dialplan, switch_caller_extension::extension_name, switch_caller_extension::extension_number, switch_channel_timetable::hold_accum, switch_channel_timetable::hungup, switch_channel_timetable::last_hold, switch_app_log::next, switch_caller_profile::next, switch_caller_application::next, switch_caller_profile::originatee_caller_profile, switch_caller_profile::originator_caller_profile, switch_channel_timetable::profile_created, switch_caller_profile::profile_index, switch_channel_timetable::progress, switch_channel_timetable::progress_media, switch_channel_timetable::resurrected, SWITCH_CALL_DIRECTION_OUTBOUND, switch_channel_direction(), switch_channel_get_caller_profile(), switch_channel_get_cap_string(), switch_channel_get_flag_string(), switch_channel_get_state(), switch_channel_state_name(), switch_core_get_switchname(), switch_core_get_uuid(), switch_core_session_get_app_log(), switch_core_session_get_channel(), switch_ivr_set_json_call_stats(), switch_ivr_set_json_chan_vars(), switch_ivr_set_json_profile_data(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, switch_snprintf(), SWITCH_STATUS_SUCCESS, switch_str_nil, SWITCH_TIME_T_FMT, switch_caller_profile::times, switch_channel_timetable::transferred, and zstr.
Referenced by switch_ivr_multi_threaded_bridge(), and switch_ivr_originate().