FreeSWITCH API Documentation
1.7.0
|
#include <switch_cpp.h>
Public Member Functions | |
CoreSession () | |
CoreSession (char *nuuid, CoreSession *a_leg=NULL) | |
CoreSession (switch_core_session_t *new_session) | |
virtual | ~CoreSession () |
int | insertFile (const char *file, const char *insert_file, int sample_point) |
int | answer () |
int | preAnswer () |
void | hangup (const char *cause="normal_clearing") |
void | hangupState (void) |
void | setVariable (char *var, char *val) |
void | setPrivate (char *var, void *val) |
void * | getPrivate (char *var) |
const char * | getVariable (char *var) |
switch_status_t | process_callback_result (char *result) |
void | say (const char *tosay, const char *module_name, const char *say_type, const char *say_method, const char *say_gender=NULL) |
void | sayPhrase (const char *phrase_name, const char *phrase_data="", const char *phrase_lang=NULL) |
const char * | hangupCause () |
const char * | getState () |
int | recordFile (char *file_name, int time_limit=0, int silence_threshold=0, int silence_hits=0) |
Record to a file. More... | |
int | originate (CoreSession *a_leg_session, char *dest, int timeout=60, switch_state_handler_table_t *handlers=NULL) |
Set attributes of caller data for purposes of outgoing calls. More... | |
virtual void | destroy (void) |
void | setDTMFCallback (void *cbfunc, char *funcargs) |
set a DTMF callback function More... | |
int | speak (char *text) |
void | set_tts_parms (char *tts_name, char *voice_name) |
void | set_tts_params (char *tts_name, char *voice_name) |
int | collectDigits (int abs_timeout) |
int | collectDigits (int digit_timeout, int abs_timeout) |
char * | getDigits (int maxdigits, char *terminators, int timeout) |
char * | getDigits (int maxdigits, char *terminators, int timeout, int interdigit) |
int | transfer (char *extension, char *dialplan=NULL, char *context=NULL) |
char * | read (int min_digits, int max_digits, const char *prompt_audio_file, int timeout, const char *valid_terminators, int digit_timeout=0) |
char * | playAndGetDigits (int min_digits, int max_digits, int max_tries, int timeout, char *terminators, char *audio_files, char *bad_input_audio_files, char *digits_regex, const char *var_name=NULL, int digit_timeout=0, const char *transfer_on_failure=NULL) |
Play a file into channel and collect dtmfs. More... | |
int | streamFile (char *file, int starting_sample_count=0) |
Play a file that resides on disk into the channel. More... | |
int | sleep (int ms, int sync=0) |
int | flushEvents () |
flush any pending events More... | |
int | flushDigits () |
flush any pending digits More... | |
int | setAutoHangup (bool val) |
void | setHangupHook (void *hangup_func) |
Set the hangup callback function. More... | |
bool | ready () |
bool | bridged () |
bool | answered () |
bool | mediaReady () |
void | waitForAnswer (CoreSession *calling_session) |
void | execute (const char *app, const char *data=NULL) |
void | sendEvent (Event *sendME) |
void | setEventData (Event *e) |
char * | getXMLCDR () |
virtual bool | begin_allow_threads ()=0 |
virtual bool | end_allow_threads ()=0 |
const char * | get_uuid () const |
Get the uuid of this session. More... | |
const switch_input_args_t & | get_cb_args () const |
Get the callback function arguments associated with this session. More... | |
virtual void | check_hangup_hook ()=0 |
Callback to the language specific hangup callback. More... | |
virtual switch_status_t | run_dtmf_callback (void *input, switch_input_type_t itype)=0 |
void | consoleLog (char *level_str, char *msg) |
void | consoleLog2 (char *level_str, char *file, char *func, int line, char *msg) |
CoreSession () | |
CoreSession (char *nuuid, CoreSession *a_leg=NULL) | |
CoreSession (switch_core_session_t *new_session) | |
virtual | ~CoreSession () |
int | insertFile (const char *file, const char *insert_file, int sample_point) |
int | answer () |
int | preAnswer () |
void | hangup (const char *cause="normal_clearing") |
void | hangupState (void) |
void | setVariable (char *var, char *val) |
void | setPrivate (char *var, void *val) |
void * | getPrivate (char *var) |
const char * | getVariable (char *var) |
switch_status_t | process_callback_result (char *result) |
void | say (const char *tosay, const char *module_name, const char *say_type, const char *say_method, const char *say_gender=NULL) |
void | sayPhrase (const char *phrase_name, const char *phrase_data="", const char *phrase_lang=NULL) |
const char * | hangupCause () |
const char * | getState () |
int | recordFile (char *file_name, int time_limit=0, int silence_threshold=0, int silence_hits=0) |
Record to a file. More... | |
int | originate (CoreSession *a_leg_session, char *dest, int timeout=60, switch_state_handler_table_t *handlers=NULL) |
Set attributes of caller data for purposes of outgoing calls. More... | |
virtual void | destroy (void) |
void | setDTMFCallback (void *cbfunc, char *funcargs) |
set a DTMF callback function More... | |
int | speak (char *text) |
void | set_tts_parms (char *tts_name, char *voice_name) |
void | set_tts_params (char *tts_name, char *voice_name) |
int | collectDigits (int abs_timeout) |
int | collectDigits (int digit_timeout, int abs_timeout) |
char * | getDigits (int maxdigits, char *terminators, int timeout) |
char * | getDigits (int maxdigits, char *terminators, int timeout, int interdigit) |
int | transfer (char *extension, char *dialplan=NULL, char *context=NULL) |
char * | read (int min_digits, int max_digits, const char *prompt_audio_file, int timeout, const char *valid_terminators, int digit_timeout=0) |
char * | playAndGetDigits (int min_digits, int max_digits, int max_tries, int timeout, char *terminators, char *audio_files, char *bad_input_audio_files, char *digits_regex, const char *var_name=NULL, int digit_timeout=0, const char *transfer_on_failure=NULL) |
Play a file into channel and collect dtmfs. More... | |
int | streamFile (char *file, int starting_sample_count=0) |
Play a file that resides on disk into the channel. More... | |
int | sleep (int ms, int sync=0) |
int | flushEvents () |
flush any pending events More... | |
int | flushDigits () |
flush any pending digits More... | |
int | setAutoHangup (bool val) |
void | setHangupHook (void *hangup_func) |
Set the hangup callback function. More... | |
bool | ready () |
bool | bridged () |
bool | answered () |
bool | mediaReady () |
void | waitForAnswer (CoreSession *calling_session) |
void | execute (const char *app, const char *data=NULL) |
void | sendEvent (Event *sendME) |
void | setEventData (Event *e) |
char * | getXMLCDR () |
virtual bool | begin_allow_threads ()=0 |
virtual bool | end_allow_threads ()=0 |
const char * | get_uuid () const |
Get the uuid of this session. More... | |
const switch_input_args_t & | get_cb_args () const |
Get the callback function arguments associated with this session. More... | |
virtual void | check_hangup_hook ()=0 |
Callback to the language specific hangup callback. More... | |
virtual switch_status_t | run_dtmf_callback (void *input, switch_input_type_t itype)=0 |
void | consoleLog (char *level_str, char *msg) |
void | consoleLog2 (char *level_str, char *file, char *func, int line, char *msg) |
Data Fields | |
switch_core_session_t * | session |
switch_channel_t * | channel |
unsigned int | flags |
int | allocated |
input_callback_state | cb_state |
switch_channel_state_t | hook_state |
switch_call_cause_t | cause |
char * | uuid |
char * | tts_name |
char * | voice_name |
Protected Member Functions | |
void | store_file_handle (switch_file_handle_t *fh) |
void | store_file_handle (switch_file_handle_t *fh) |
Protected Attributes | |
switch_input_args_t | args |
switch_input_args_t * | ap |
char * | xml_cdr_text |
void * | on_hangup |
switch_file_handle_t * | fhp |
char | dtmf_buf [512] |
Definition at line 205 of file switch_cpp.h.
CoreSession::CoreSession | ( | ) |
Definition at line 601 of file switch_cpp.cpp.
References init_vars.
CoreSession::CoreSession | ( | char * | nuuid, |
CoreSession * | a_leg = NULL |
||
) |
Definition at line 606 of file switch_cpp.cpp.
References allocated, cause, channel, CS_SOFT_EXECUTE, init_vars, S_HUP, session, SOF_NONE, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, switch_channel_set_state, switch_channel_wait_for_state(), switch_core_session_force_locate, switch_core_session_get_channel(), switch_core_session_get_uuid(), switch_ivr_originate(), switch_set_flag, SWITCH_STATUS_SUCCESS, and uuid.
CoreSession::CoreSession | ( | switch_core_session_t * | new_session | ) |
Definition at line 634 of file switch_cpp.cpp.
References allocated, channel, init_vars, session, switch_core_session_get_channel(), switch_core_session_get_uuid(), switch_core_session_read_lock_hangup(), and uuid.
|
virtual |
Definition at line 647 of file switch_cpp.cpp.
References allocated, destroy(), and this_check_void.
CoreSession::CoreSession | ( | ) |
CoreSession::CoreSession | ( | char * | nuuid, |
CoreSession * | a_leg = NULL |
||
) |
CoreSession::CoreSession | ( | switch_core_session_t * | new_session | ) |
|
virtual |
int CoreSession::answer | ( | ) |
Definition at line 681 of file switch_cpp.cpp.
References sanity_check, switch_channel_answer, SWITCH_STATUS_SUCCESS, and this_check.
int CoreSession::answer | ( | ) |
bool CoreSession::answered | ( | ) |
Definition at line 1079 of file switch_cpp.cpp.
References CF_ANSWERED, sanity_check, switch_channel_test_flag(), and this_check.
bool CoreSession::answered | ( | ) |
|
pure virtual |
|
pure virtual |
bool CoreSession::bridged | ( | ) |
Definition at line 1060 of file switch_cpp.cpp.
References CF_BRIDGED, sanity_check, switch_channel_test_flag(), switch_channel_up, and this_check.
bool CoreSession::bridged | ( | ) |
|
pure virtual |
Callback to the language specific hangup callback.
Referenced by hanguphook().
|
pure virtual |
Callback to the language specific hangup callback.
int CoreSession::collectDigits | ( | int | abs_timeout | ) |
For timeout milliseconds, call the dtmf function set previously by setDTMFCallback whenever a dtmf or event is received
Definition at line 853 of file switch_cpp.cpp.
int CoreSession::collectDigits | ( | int | abs_timeout | ) |
For timeout milliseconds, call the dtmf function set previously by setDTMFCallback whenever a dtmf or event is received
int CoreSession::collectDigits | ( | int | digit_timeout, |
int | abs_timeout | ||
) |
int CoreSession::collectDigits | ( | int | digit_timeout, |
int | abs_timeout | ||
) |
Definition at line 857 of file switch_cpp.cpp.
References sanity_check, switch_ivr_collect_digits_callback(), SWITCH_STATUS_SUCCESS, and this_check.
void CoreSession::consoleLog | ( | char * | level_str, |
char * | msg | ||
) |
Definition at line 1279 of file switch_cpp.cpp.
References SWITCH_CHANNEL_SESSION_LOG, SWITCH_LOG_DEBUG, SWITCH_LOG_INVALID, switch_log_printf(), switch_log_str2level(), and switch_str_nil.
void CoreSession::consoleLog | ( | char * | level_str, |
char * | msg | ||
) |
void CoreSession::consoleLog2 | ( | char * | level_str, |
char * | file, | ||
char * | func, | ||
int | line, | ||
char * | msg | ||
) |
void CoreSession::consoleLog2 | ( | char * | level_str, |
char * | file, | ||
char * | func, | ||
int | line, | ||
char * | msg | ||
) |
Definition at line 1291 of file switch_cpp.cpp.
References SWITCH_CHANNEL_ID_SESSION, SWITCH_LOG_DEBUG, SWITCH_LOG_INVALID, switch_log_printf(), switch_log_str2level(), and switch_str_nil.
|
virtual |
|
virtual |
Definition at line 1086 of file switch_cpp.cpp.
References CF_TRANSFER, init_vars, S_HUP, SWITCH_CAUSE_NORMAL_CLEARING, switch_channel_get_name(), switch_channel_hangup, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_private(), switch_channel_test_flag(), switch_channel_up, switch_core_session_get_channel(), switch_core_session_rwunlock(), SWITCH_LOG_DEBUG, switch_log_printf(), switch_safe_free, switch_test_flag, and this_check_void.
Referenced by ~CoreSession().
|
pure virtual |
|
pure virtual |
void CoreSession::execute | ( | const char * | app, |
const char * | data = NULL |
||
) |
Definition at line 757 of file switch_cpp.cpp.
References sanity_check_noreturn, SWITCH_CHANNEL_SESSION_LOG, switch_core_session_execute_application, SWITCH_LOG_ERROR, switch_log_printf(), this_check_void, and zstr.
void CoreSession::execute | ( | const char * | app, |
const char * | data = NULL |
||
) |
int CoreSession::flushDigits | ( | ) |
flush any pending digits
Definition at line 1232 of file switch_cpp.cpp.
References sanity_check, switch_channel_flush_dtmf(), switch_core_session_get_channel(), SWITCH_STATUS_SUCCESS, and this_check.
int CoreSession::flushDigits | ( | ) |
flush any pending digits
int CoreSession::flushEvents | ( | ) |
flush any pending events
Definition at line 1215 of file switch_cpp.cpp.
References sanity_check, switch_core_session_dequeue_event(), switch_event_destroy(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, SWITCH_TRUE, and this_check.
int CoreSession::flushEvents | ( | ) |
flush any pending events
|
inline |
Get the callback function arguments associated with this session.
Definition at line 385 of file switch_swigable_cpp.h.
References args.
|
inline |
Get the callback function arguments associated with this session.
Definition at line 385 of file switch_cpp.h.
|
inline |
Get the uuid of this session.
Definition at line 378 of file switch_cpp.h.
|
inline |
Get the uuid of this session.
Definition at line 378 of file switch_swigable_cpp.h.
char* CoreSession::getDigits | ( | int | maxdigits, |
char * | terminators, | ||
int | timeout | ||
) |
Collect up to maxdigits digits worth of digits and store them in dtmf_buf. In the case of mod_python, the dtmf_buf parameter is configured to act as a return value, (see mod_python.i). This does NOT call any callbacks upon receiving dtmf digits. For that, use collectDigits.
char * CoreSession::getDigits | ( | int | maxdigits, |
char * | terminators, | ||
int | timeout | ||
) |
Collect up to maxdigits digits worth of digits and store them in dtmf_buf. In the case of mod_python, the dtmf_buf parameter is configured to act as a return value, (see mod_python.i). This does NOT call any callbacks upon receiving dtmf digits. For that, use collectDigits.
Definition at line 866 of file switch_cpp.cpp.
char* CoreSession::getDigits | ( | int | maxdigits, |
char * | terminators, | ||
int | timeout, | ||
int | interdigit | ||
) |
char * CoreSession::getDigits | ( | int | maxdigits, |
char * | terminators, | ||
int | timeout, | ||
int | interdigit | ||
) |
Definition at line 871 of file switch_cpp.cpp.
References memset(), sanity_check, SWITCH_CHANNEL_SESSION_LOG, switch_ivr_collect_digits_count(), SWITCH_LOG_DEBUG, switch_log_printf(), and this_check.
void * CoreSession::getPrivate | ( | char * | var | ) |
Definition at line 735 of file switch_cpp.cpp.
References sanity_check, switch_channel_get_private(), and this_check.
void* CoreSession::getPrivate | ( | char * | var | ) |
const char* CoreSession::getState | ( | ) |
const char * CoreSession::getState | ( | ) |
Definition at line 1130 of file switch_cpp.cpp.
References switch_channel_get_state(), switch_channel_state_name(), and this_check.
const char * CoreSession::getVariable | ( | char * | var | ) |
Definition at line 750 of file switch_cpp.cpp.
References sanity_check, switch_channel_get_variable, and this_check.
const char* CoreSession::getVariable | ( | char * | var | ) |
char * CoreSession::getXMLCDR | ( | ) |
Definition at line 653 of file switch_cpp.cpp.
References sanity_check, SWITCH_FALSE, switch_ivr_generate_xml_cdr(), switch_safe_free, SWITCH_STATUS_SUCCESS, switch_xml_free(), switch_xml_toxml(), and this_check.
char* CoreSession::getXMLCDR | ( | ) |
void CoreSession::hangup | ( | const char * | cause = "normal_clearing" | ) |
Definition at line 718 of file switch_cpp.cpp.
References sanity_check_noreturn, switch_channel_hangup, SWITCH_CHANNEL_SESSION_LOG, switch_channel_str2cause(), SWITCH_LOG_DEBUG, switch_log_printf(), and this_check_void.
void CoreSession::hangup | ( | const char * | cause = "normal_clearing" | ) |
const char* CoreSession::hangupCause | ( | ) |
const char * CoreSession::hangupCause | ( | ) |
Definition at line 1124 of file switch_cpp.cpp.
References switch_channel_cause2str(), and this_check.
void CoreSession::hangupState | ( | void | ) |
void CoreSession::hangupState | ( | void | ) |
Definition at line 708 of file switch_cpp.cpp.
References sanity_check_noreturn, switch_channel_down, switch_core_session_hangup_state(), and SWITCH_FALSE.
int CoreSession::insertFile | ( | const char * | file, |
const char * | insert_file, | ||
int | sample_point | ||
) |
Definition at line 690 of file switch_cpp.cpp.
References sanity_check, switch_ivr_insert_file(), SWITCH_STATUS_SUCCESS, and this_check.
int CoreSession::insertFile | ( | const char * | file, |
const char * | insert_file, | ||
int | sample_point | ||
) |
bool CoreSession::mediaReady | ( | ) |
Definition at line 1072 of file switch_cpp.cpp.
References sanity_check, switch_channel_media_ready, and this_check.
bool CoreSession::mediaReady | ( | ) |
int CoreSession::originate | ( | CoreSession * | a_leg_session, |
char * | dest, | ||
int | timeout = 60 , |
||
switch_state_handler_table_t * | handlers = NULL |
||
) |
Set attributes of caller data for purposes of outgoing calls.
var | - the variable name, eg, "caller_id_name" |
val | - the data to set, eg, "bob"Originate a call to a destination |
a_leg_session | - the session where the call is originating from and also the session in which this session was created |
dest | - a string representing destination, eg, sofia/mydomain.com/foo@bar.com |
timeout | - time to wait for call to be answered |
Definition at line 1142 of file switch_cpp.cpp.
References CS_SOFT_EXECUTE, SOF_NONE, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, SWITCH_CHANNEL_LOG, switch_channel_set_state, switch_core_session_get_channel(), switch_core_session_get_uuid(), switch_ivr_originate(), switch_log_printf(), SWITCH_LOG_WARNING, switch_safe_free, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and this_check.
int CoreSession::originate | ( | CoreSession * | a_leg_session, |
char * | dest, | ||
int | timeout = 60 , |
||
switch_state_handler_table_t * | handlers = NULL |
||
) |
Set attributes of caller data for purposes of outgoing calls.
var | - the variable name, eg, "caller_id_name" |
val | - the data to set, eg, "bob"Originate a call to a destination |
a_leg_session | - the session where the call is originating from and also the session in which this session was created |
dest | - a string representing destination, eg, sofia/mydomain.com/foo@bar.com |
timeout | - time to wait for call to be answered |
char* CoreSession::playAndGetDigits | ( | int | min_digits, |
int | max_digits, | ||
int | max_tries, | ||
int | timeout, | ||
char * | terminators, | ||
char * | audio_files, | ||
char * | bad_input_audio_files, | ||
char * | digits_regex, | ||
const char * | var_name = NULL , |
||
int | digit_timeout = 0 , |
||
const char * | transfer_on_failure = NULL |
||
) |
Play a file into channel and collect dtmfs.
See API docs in switch_ivr.h: switch_play_and_get_digits(..)
NOTE: this does not call any dtmf callbacks set by setDTMFCallback(..) as it uses its own internal callback handler.
char * CoreSession::playAndGetDigits | ( | int | min_digits, |
int | max_digits, | ||
int | max_tries, | ||
int | timeout, | ||
char * | terminators, | ||
char * | audio_files, | ||
char * | bad_input_audio_files, | ||
char * | digits_regex, | ||
const char * | var_name = NULL , |
||
int | digit_timeout = 0 , |
||
const char * | transfer_on_failure = NULL |
||
) |
Play a file into channel and collect dtmfs.
See API docs in switch_ivr.h: switch_play_and_get_digits(..)
NOTE: this does not call any dtmf callbacks set by setDTMFCallback(..) as it uses its own internal callback handler.
Definition at line 937 of file switch_cpp.cpp.
References memset(), sanity_check, switch_play_and_get_digits(), and this_check.
int CoreSession::preAnswer | ( | ) |
Definition at line 699 of file switch_cpp.cpp.
References sanity_check, switch_channel_pre_answer, SWITCH_STATUS_SUCCESS, and this_check.
int CoreSession::preAnswer | ( | ) |
switch_status_t CoreSession::process_callback_result | ( | char * | result | ) |
Definition at line 1470 of file switch_cpp.cpp.
References sanity_check, switch_ivr_process_fh(), SWITCH_STATUS_FALSE, and this_check.
switch_status_t CoreSession::process_callback_result | ( | char * | result | ) |
char* CoreSession::read | ( | int | min_digits, |
int | max_digits, | ||
const char * | prompt_audio_file, | ||
int | timeout, | ||
const char * | valid_terminators, | ||
int | digit_timeout = 0 |
||
) |
char * CoreSession::read | ( | int | min_digits, |
int | max_digits, | ||
const char * | prompt_audio_file, | ||
int | timeout, | ||
const char * | valid_terminators, | ||
int | digit_timeout = 0 |
||
) |
Definition at line 908 of file switch_cpp.cpp.
References sanity_check, switch_ivr_read(), and this_check.
bool CoreSession::ready | ( | ) |
Definition at line 1047 of file switch_cpp.cpp.
References sanity_check, switch_channel_ready, and this_check.
bool CoreSession::ready | ( | ) |
int CoreSession::recordFile | ( | char * | file_name, |
int | time_limit = 0 , |
||
int | silence_threshold = 0 , |
||
int | silence_hits = 0 |
||
) |
Record to a file.
file_name | |
<[max_len]> | maximum length of the recording in seconds |
<[silence_threshold]> | energy level audio must fall below to be considered silence (500 is a good starting point). |
<[silence_secs]> | seconds of silence to interrupt the record. |
Definition at line 1192 of file switch_cpp.cpp.
References memset(), sanity_check, switch_file_handle::silence_hits, switch_ivr_record_file(), SWITCH_STATUS_SUCCESS, this_check, and switch_file_handle::thresh.
int CoreSession::recordFile | ( | char * | file_name, |
int | time_limit = 0 , |
||
int | silence_threshold = 0 , |
||
int | silence_hits = 0 |
||
) |
Record to a file.
file_name | |
<[max_len]> | maximum length of the recording in seconds |
<[silence_threshold]> | energy level audio must fall below to be considered silence (500 is a good starting point). |
<[silence_secs]> | seconds of silence to interrupt the record. |
|
pure virtual |
Referenced by dtmf_callback().
|
pure virtual |
void CoreSession::say | ( | const char * | tosay, |
const char * | module_name, | ||
const char * | say_type, | ||
const char * | say_method, | ||
const char * | say_gender = NULL |
||
) |
void CoreSession::say | ( | const char * | tosay, |
const char * | module_name, | ||
const char * | say_type, | ||
const char * | say_method, | ||
const char * | say_gender = NULL |
||
) |
Definition at line 972 of file switch_cpp.cpp.
References sanity_check_noreturn, SWITCH_CHANNEL_SESSION_LOG, switch_ivr_say(), SWITCH_LOG_ERROR, switch_log_printf(), and this_check_void.
void CoreSession::sayPhrase | ( | const char * | phrase_name, |
const char * | phrase_data = "" , |
||
const char * | phrase_lang = NULL |
||
) |
void CoreSession::sayPhrase | ( | const char * | phrase_name, |
const char * | phrase_data = "" , |
||
const char * | phrase_lang = NULL |
||
) |
Definition at line 985 of file switch_cpp.cpp.
References sanity_check_noreturn, SWITCH_CHANNEL_SESSION_LOG, switch_ivr_phrase_macro, SWITCH_LOG_ERROR, switch_log_printf(), and this_check_void.
void CoreSession::sendEvent | ( | Event * | sendME | ) |
void CoreSession::sendEvent | ( | Event * | sendME | ) |
Definition at line 795 of file switch_cpp.cpp.
References sanity_check_noreturn, switch_core_session_receive_event(), switch_event_dup(), SWITCH_STATUS_SUCCESS, and this_check_void.
void CoreSession::set_tts_params | ( | char * | tts_name, |
char * | voice_name | ||
) |
Definition at line 843 of file switch_cpp.cpp.
References sanity_check_noreturn, switch_safe_free, and this_check_void.
void CoreSession::set_tts_params | ( | char * | tts_name, |
char * | voice_name | ||
) |
void CoreSession::set_tts_parms | ( | char * | tts_name, |
char * | voice_name | ||
) |
void CoreSession::set_tts_parms | ( | char * | tts_name, |
char * | voice_name | ||
) |
Definition at line 832 of file switch_cpp.cpp.
References sanity_check_noreturn, SWITCH_CHANNEL_SESSION_LOG, SWITCH_LOG_ERROR, switch_log_printf(), switch_safe_free, and this_check_void.
int CoreSession::setAutoHangup | ( | bool | val | ) |
int CoreSession::setAutoHangup | ( | bool | val | ) |
Definition at line 1240 of file switch_cpp.cpp.
References S_HUP, sanity_check, switch_clear_flag, switch_set_flag, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and this_check.
void CoreSession::setDTMFCallback | ( | void * | cbfunc, |
char * | funcargs | ||
) |
set a DTMF callback function
The DTMF callback function will be set and persist for the life of the session, and be called when a dtmf is pressed by user during streamfile(), collectDigits(), and certain other methods are executing.
void CoreSession::setDTMFCallback | ( | void * | cbfunc, |
char * | funcargs | ||
) |
set a DTMF callback function
The DTMF callback function will be set and persist for the life of the session, and be called when a dtmf is pressed by user during streamfile(), collectDigits(), and certain other methods are executing.
Definition at line 772 of file switch_cpp.cpp.
References dtmf_callback(), sanity_check_noreturn, switch_channel_set_private(), and this_check_void.
void CoreSession::setEventData | ( | Event * | e | ) |
void CoreSession::setEventData | ( | Event * | e | ) |
Definition at line 671 of file switch_cpp.cpp.
References sanity_check_noreturn, switch_channel_event_set_data(), and this_check_void.
void CoreSession::setHangupHook | ( | void * | hangup_func | ) |
Set the hangup callback function.
hangup_func | - language specific function ptr cast into void * |
void CoreSession::setHangupHook | ( | void * | hangup_func | ) |
Set the hangup callback function.
hangup_func | - language specific function ptr cast into void * |
Definition at line 1265 of file switch_cpp.cpp.
References hanguphook(), sanity_check_noreturn, switch_channel_get_state(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_private(), switch_core_session_get_channel(), SWITCH_LOG_DEBUG, switch_log_printf(), and this_check_void.
void CoreSession::setPrivate | ( | char * | var, |
void * | val | ||
) |
void CoreSession::setPrivate | ( | char * | var, |
void * | val | ||
) |
Definition at line 728 of file switch_cpp.cpp.
References sanity_check_noreturn, switch_channel_set_private(), and this_check_void.
void CoreSession::setVariable | ( | char * | var, |
char * | val | ||
) |
void CoreSession::setVariable | ( | char * | var, |
char * | val | ||
) |
Definition at line 742 of file switch_cpp.cpp.
References sanity_check_noreturn, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable_var_check(), SWITCH_FALSE, SWITCH_LOG_DEBUG, switch_log_printf(), and this_check_void.
int CoreSession::sleep | ( | int | ms, |
int | sync = 0 |
||
) |
Definition at line 1032 of file switch_cpp.cpp.
References sanity_check, switch_ivr_sleep(), SWITCH_STATUS_SUCCESS, and this_check.
int CoreSession::sleep | ( | int | ms, |
int | sync = 0 |
||
) |
int CoreSession::speak | ( | char * | text | ) |
Definition at line 808 of file switch_cpp.cpp.
References sanity_check, SWITCH_CHANNEL_SESSION_LOG, switch_ivr_speak_text(), SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and this_check.
int CoreSession::speak | ( | char * | text | ) |
|
protected |
|
protected |
int CoreSession::streamFile | ( | char * | file, |
int | starting_sample_count = 0 |
||
) |
Play a file that resides on disk into the channel.
file | - the path to the .wav/.mp3 to be played |
starting_sample_count | - the index of the sample to start playing from |
Definition at line 1000 of file switch_cpp.cpp.
References memset(), switch_file_handle::prebuf, switch_file_handle::samples, sanity_check, switch_channel_get_variable, switch_ivr_play_file(), SWITCH_STATUS_SUCCESS, and this_check.
int CoreSession::streamFile | ( | char * | file, |
int | starting_sample_count = 0 |
||
) |
Play a file that resides on disk into the channel.
file | - the path to the .wav/.mp3 to be played |
starting_sample_count | - the index of the sample to start playing from |
int CoreSession::transfer | ( | char * | extension, |
char * | dialplan = NULL , |
||
char * | context = NULL |
||
) |
Definition at line 895 of file switch_cpp.cpp.
References sanity_check, SWITCH_CHANNEL_SESSION_LOG, switch_ivr_session_transfer(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_STATUS_SUCCESS, and this_check.
int CoreSession::transfer | ( | char * | extension, |
char * | dialplan = NULL , |
||
char * | context = NULL |
||
) |
void CoreSession::waitForAnswer | ( | CoreSession * | calling_session | ) |
Definition at line 1256 of file switch_cpp.cpp.
References sanity_check_noreturn, switch_ivr_wait_for_answer(), and this_check_void.
void CoreSession::waitForAnswer | ( | CoreSession * | calling_session | ) |
int CoreSession::allocated |
Definition at line 226 of file switch_cpp.h.
Referenced by CoreSession(), and ~CoreSession().
|
protected |
Definition at line 210 of file switch_cpp.h.
|
protected |
Definition at line 208 of file switch_cpp.h.
Referenced by get_cb_args().
switch_call_cause_t CoreSession::cause |
Definition at line 230 of file switch_cpp.h.
Referenced by CoreSession(), and hanguphook().
input_callback_state CoreSession::cb_state |
Definition at line 227 of file switch_cpp.h.
switch_channel_t * CoreSession::channel |
Definition at line 224 of file switch_cpp.h.
Referenced by CoreSession().
|
protected |
Definition at line 216 of file switch_cpp.h.
|
protected |
Definition at line 215 of file switch_cpp.h.
unsigned int CoreSession::flags |
Definition at line 225 of file switch_cpp.h.
switch_channel_state_t CoreSession::hook_state |
Definition at line 229 of file switch_cpp.h.
Referenced by hanguphook().
|
protected |
Definition at line 214 of file switch_cpp.h.
switch_core_session_t * CoreSession::session |
Definition at line 223 of file switch_cpp.h.
Referenced by API::API(), and CoreSession().
char * CoreSession::tts_name |
Definition at line 233 of file switch_cpp.h.
char * CoreSession::uuid |
Definition at line 232 of file switch_cpp.h.
Referenced by CoreSession().
char * CoreSession::voice_name |
Definition at line 234 of file switch_cpp.h.
|
protected |
Definition at line 212 of file switch_cpp.h.