FreeSWITCH API Documentation
1.7.0
|
#include <switch.h>
Go to the source code of this file.
Data Structures | |
class | IVRMenu |
class | API |
struct | input_callback_state |
class | DTMF |
class | Stream |
class | Event |
class | EventConsumer |
class | CoreSession |
Macros | |
#define | this_check(x) do { if (!this) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "object is not initalized\n"); return x;}} while(0) |
#define | this_check_void() do { if (!this) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "object is not initalized\n"); return;}} while(0) |
#define | sanity_check(x) do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid),SWITCH_LOG_ERROR, "session is not initalized\n"); return x;}} while(0) |
#define | sanity_check_noreturn do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid),SWITCH_LOG_ERROR, "session is not initalized\n"); return;}} while(0) |
#define | init_vars() |
Typedefs | |
typedef struct input_callback_state | input_callback_state_t |
Enumerations | |
enum | session_flag_t { S_HUP = (1 << 0), S_FREE = (1 << 1), S_RDLOCK = (1 << 2), S_HUP = (1 << 0), S_FREE = (1 << 1), S_RDLOCK = (1 << 2) } |
Functions | |
void | setGlobalVariable (char *var_name, char *var_val) |
char * | getGlobalVariable (char *var_name) |
void | consoleLog (char *level_str, char *msg) |
void | consoleLog2 (char *level_str, char *file, char *func, int line, char *msg) |
void | consoleCleanLog (char *msg) |
bool | running (void) |
bool | email (char *to, char *from, char *headers=NULL, char *body=NULL, char *file=NULL, char *convert_cmd=NULL, char *convert_ext=NULL) |
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) |
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) |
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, void *input, switch_input_type_t itype, void *buf, unsigned int buflen) |
#define init_vars | ( | ) |
Definition at line 16 of file switch_cpp.h.
Referenced by CoreSession::CoreSession(), and CoreSession::destroy().
#define sanity_check | ( | x | ) | do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid),SWITCH_LOG_ERROR, "session is not initalized\n"); return x;}} while(0) |
Definition at line 14 of file switch_cpp.h.
Referenced by CoreSession::answer(), CoreSession::answered(), CoreSession::bridged(), CoreSession::collectDigits(), CoreSession::flushDigits(), CoreSession::flushEvents(), CoreSession::getDigits(), CoreSession::getPrivate(), CoreSession::getVariable(), CoreSession::getXMLCDR(), CoreSession::insertFile(), CoreSession::mediaReady(), CoreSession::playAndGetDigits(), CoreSession::preAnswer(), CoreSession::process_callback_result(), CoreSession::read(), CoreSession::ready(), CoreSession::recordFile(), CoreSession::setAutoHangup(), CoreSession::sleep(), CoreSession::speak(), CoreSession::streamFile(), and CoreSession::transfer().
#define sanity_check_noreturn do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid),SWITCH_LOG_ERROR, "session is not initalized\n"); return;}} while(0) |
Definition at line 15 of file switch_cpp.h.
Referenced by CoreSession::execute(), CoreSession::hangup(), CoreSession::hangupState(), CoreSession::say(), CoreSession::sayPhrase(), CoreSession::sendEvent(), CoreSession::set_tts_params(), CoreSession::set_tts_parms(), CoreSession::setDTMFCallback(), CoreSession::setEventData(), CoreSession::setHangupHook(), CoreSession::setPrivate(), CoreSession::setVariable(), and CoreSession::waitForAnswer().
#define this_check | ( | x | ) | do { if (!this) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "object is not initalized\n"); return x;}} while(0) |
Definition at line 12 of file switch_cpp.h.
Referenced by Event::addBody(), Event::addHeader(), CoreSession::answer(), CoreSession::answered(), CoreSession::bridged(), CoreSession::collectDigits(), Event::delHeader(), API::execute(), API::executeString(), Event::fire(), CoreSession::flushDigits(), CoreSession::flushEvents(), Stream::get_data(), Event::getBody(), CoreSession::getDigits(), Event::getHeader(), CoreSession::getPrivate(), CoreSession::getState(), Event::getType(), CoreSession::getVariable(), CoreSession::getXMLCDR(), CoreSession::hangupCause(), CoreSession::insertFile(), CoreSession::mediaReady(), CoreSession::originate(), CoreSession::playAndGetDigits(), CoreSession::preAnswer(), CoreSession::process_callback_result(), Stream::read(), CoreSession::read(), CoreSession::ready(), CoreSession::recordFile(), Event::serialize(), CoreSession::setAutoHangup(), Event::setPriority(), CoreSession::sleep(), CoreSession::speak(), CoreSession::streamFile(), and CoreSession::transfer().
#define this_check_void | ( | ) | do { if (!this) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "object is not initalized\n"); return;}} while(0) |
Definition at line 13 of file switch_cpp.h.
Referenced by IVRMenu::bindAction(), CoreSession::destroy(), IVRMenu::execute(), CoreSession::execute(), CoreSession::hangup(), Stream::raw_write(), CoreSession::say(), CoreSession::sayPhrase(), CoreSession::sendEvent(), CoreSession::set_tts_params(), CoreSession::set_tts_parms(), CoreSession::setDTMFCallback(), CoreSession::setEventData(), CoreSession::setHangupHook(), CoreSession::setPrivate(), CoreSession::setVariable(), CoreSession::waitForAnswer(), Stream::write(), and CoreSession::~CoreSession().
typedef struct input_callback_state input_callback_state_t |
enum session_flag_t |
Enumerator | |
---|---|
S_HUP | |
S_FREE | |
S_RDLOCK | |
S_HUP | |
S_FREE | |
S_RDLOCK |
Definition at line 129 of file switch_cpp.h.
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.
Referenced by switch_channel_set_timestamps().
void console_clean_log | ( | char * | msg | ) |
Definition at line 1375 of file switch_cpp.cpp.
void console_log | ( | char * | level_str, |
char * | msg | ||
) |
Definition at line 1351 of file switch_cpp.cpp.
void console_log2 | ( | char * | level_str, |
char * | file, | ||
char * | func, | ||
int | line, | ||
char * | msg | ||
) |
Definition at line 1363 of file switch_cpp.cpp.
void consoleCleanLog | ( | char * | msg | ) |
Definition at line 1346 of file switch_cpp.cpp.
void consoleLog | ( | char * | level_str, |
char * | msg | ||
) |
Definition at line 1336 of file switch_cpp.cpp.
void consoleLog2 | ( | char * | level_str, |
char * | file, | ||
char * | func, | ||
int | line, | ||
char * | msg | ||
) |
Definition at line 1341 of file switch_cpp.cpp.
switch_status_t dtmf_callback | ( | switch_core_session_t * | session, |
void * | input, | ||
switch_input_type_t | itype, | ||
void * | buf, | ||
unsigned int | buflen | ||
) |
Definition at line 1451 of file switch_cpp.cpp.
bool email | ( | char * | to, |
char * | from, | ||
char * | headers = NULL , |
||
char * | body = NULL , |
||
char * | file = NULL , |
||
char * | convert_cmd = NULL , |
||
char * | convert_ext = NULL |
||
) |
Definition at line 1380 of file switch_cpp.cpp.
char* getGlobalVariable | ( | char * | var_name | ) |
Definition at line 1325 of file switch_cpp.cpp.
switch_status_t hanguphook | ( | switch_core_session_t * | session | ) |
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.
bool running | ( | void | ) |
Definition at line 1331 of file switch_cpp.cpp.
void setGlobalVariable | ( | char * | var_name, |
char * | var_val | ||
) |
Definition at line 1320 of file switch_cpp.cpp.
void switch_msleep | ( | unsigned | ms | ) |
Definition at line 1388 of file switch_cpp.cpp.