FreeSWITCH API Documentation
1.7.0
|
Go to the source code of this file.
Functions | |
static void | event_handler (switch_event_t *event) |
int | globalSetVariable (const char *var, const char *val, const char *val2) |
void | setGlobalVariable (char *var_name, char *var_val) |
char * | getGlobalVariable (char *var_name) |
bool | running (void) |
void | consoleLog (char *level_str, char *msg) |
void | consoleLog2 (char *level_str, char *file, char *func, int line, char *msg) |
void | consoleCleanLog (char *msg) |
void | console_log (char *level_str, char *msg) |
void | console_log2 (char *level_str, char *file, char *func, int line, char *msg) |
void | console_clean_log (char *msg) |
bool | email (char *to, char *from, char *headers, char *body, char *file, char *convert_cmd, char *convert_ext) |
void | switch_msleep (unsigned ms) |
void | bridge (CoreSession &session_a, CoreSession &session_b) |
bridge the audio of session_b into session_a More... | |
switch_status_t | hanguphook (switch_core_session_t *session_hungup) |
the actual hangup hook called back by freeswitch core which in turn gets the session and calls the appropriate instance method to complete the callback. More... | |
switch_status_t | dtmf_callback (switch_core_session_t *session_cb, void *input, switch_input_type_t itype, void *buf, unsigned int buflen) |
void bridge | ( | CoreSession & | session_a, |
CoreSession & | session_b | ||
) |
bridge the audio of session_b into session_a
NOTE: the stuff regarding the dtmf callback might be completely wrong and has not been reviewed or tested
Definition at line 1394 of file switch_cpp.cpp.
References switch_input_args_t::buf, switch_input_args_t::input_callback, SWITCH_CALL_DIRECTION_INBOUND, switch_channel_direction(), switch_channel_media_ready, switch_channel_pre_answer, switch_channel_ready, SWITCH_CHANNEL_SESSION_LOG, switch_core_session_get_channel(), switch_ivr_multi_threaded_bridge(), SWITCH_LOG_ERROR, and switch_log_printf().
Referenced by switch_channel_set_timestamps().
void console_clean_log | ( | char * | msg | ) |
Definition at line 1375 of file switch_cpp.cpp.
References SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, switch_log_printf(), and switch_str_nil.
Referenced by consoleCleanLog().
void console_log | ( | char * | level_str, |
char * | msg | ||
) |
Definition at line 1351 of file switch_cpp.cpp.
References SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, SWITCH_LOG_INVALID, switch_log_printf(), switch_log_str2level(), and switch_str_nil.
Referenced by consoleLog().
void console_log2 | ( | char * | level_str, |
char * | file, | ||
char * | func, | ||
int | line, | ||
char * | msg | ||
) |
Definition at line 1363 of file switch_cpp.cpp.
References SWITCH_CHANNEL_ID_LOG, SWITCH_LOG_DEBUG, SWITCH_LOG_INVALID, switch_log_printf(), switch_log_str2level(), and switch_str_nil.
Referenced by consoleLog2().
void consoleCleanLog | ( | char * | msg | ) |
void consoleLog | ( | char * | level_str, |
char * | msg | ||
) |
void consoleLog2 | ( | char * | level_str, |
char * | file, | ||
char * | func, | ||
int | line, | ||
char * | msg | ||
) |
Definition at line 1341 of file switch_cpp.cpp.
References console_log2().
switch_status_t dtmf_callback | ( | switch_core_session_t * | session_cb, |
void * | input, | ||
switch_input_type_t | itype, | ||
void * | buf, | ||
unsigned int | buflen | ||
) |
Definition at line 1451 of file switch_cpp.cpp.
References CoreSession::run_dtmf_callback(), switch_channel_get_private(), switch_core_session_get_channel(), and SWITCH_STATUS_FALSE.
Referenced by CoreSession::setDTMFCallback().
bool email | ( | char * | to, |
char * | from, | ||
char * | headers, | ||
char * | body, | ||
char * | file, | ||
char * | convert_cmd, | ||
char * | convert_ext | ||
) |
Definition at line 1380 of file switch_cpp.cpp.
References switch_simple_email(), and SWITCH_TRUE.
|
static |
Definition at line 40 of file switch_cpp.cpp.
References switch_event::bind_user_data, EventConsumer::events, SWITCH_CHANNEL_LOG, switch_event_destroy(), switch_event_dup(), SWITCH_LOG_ERROR, switch_log_printf(), switch_queue_trypush(), and SWITCH_STATUS_SUCCESS.
Referenced by EventConsumer::bind().
char* getGlobalVariable | ( | char * | var_name | ) |
Definition at line 1325 of file switch_cpp.cpp.
References switch_core_get_variable_dup().
int globalSetVariable | ( | const char * | var, |
const char * | val, | ||
const char * | val2 | ||
) |
Definition at line 1307 of file switch_cpp.cpp.
References switch_core_set_var_conditional(), switch_core_set_variable(), SWITCH_STATUS_SUCCESS, and zstr.
switch_status_t hanguphook | ( | switch_core_session_t * | session_hungup | ) |
the actual hangup hook called back by freeswitch core which in turn gets the session and calls the appropriate instance method to complete the callback.
Definition at line 1428 of file switch_cpp.cpp.
References CoreSession::cause, CoreSession::check_hangup_hook(), CoreSession::hook_state, switch_channel_get_cause(), switch_channel_get_private(), switch_channel_get_state(), SWITCH_CHANNEL_LOG, switch_core_session_get_channel(), SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by CoreSession::setHangupHook().
bool running | ( | void | ) |
void setGlobalVariable | ( | char * | var_name, |
char * | var_val | ||
) |
Definition at line 1320 of file switch_cpp.cpp.
References switch_core_set_variable().
void switch_msleep | ( | unsigned | ms | ) |