Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

switch_swig.c File Reference


Functions

void fs_core_set_globals (void)
int fs_core_init (char *path)
int fs_core_destroy (void)
int fs_loadable_module_init (void)
int fs_loadable_module_shutdown (void)
int fs_console_loop (void)
void fs_consol_log (char *level_str, char *msg)
void fs_consol_clean (char *msg)
switch_core_session_tfs_core_session_locate (char *uuid)
void fs_channel_answer (switch_core_session_t *session)
void fs_channel_pre_answer (switch_core_session_t *session)
void fs_channel_hangup (switch_core_session_t *session, char *cause)
void fs_channel_set_variable (switch_core_session_t *session, char *var, char *val)
void fs_channel_get_variable (switch_core_session_t *session, char *var)
void fs_channel_set_state (switch_core_session_t *session, char *state)
int fs_ivr_play_file (switch_core_session_t *session, switch_file_handle_t *fh, char *file, switch_input_args_t *args)
int fs_switch_ivr_record_file (switch_core_session_t *session, switch_file_handle_t *fh, char *file, switch_input_args_t *args, unsigned int limit)
int fs_switch_ivr_sleep (switch_core_session_t *session, uint32_t ms)
int fs_ivr_play_file2 (switch_core_session_t *session, char *file)
int fs_switch_ivr_collect_digits_callback (switch_core_session_t *session, switch_input_args_t *args, unsigned int timeout)
int fs_switch_ivr_collect_digits_count (switch_core_session_t *session, char *buf, unsigned int buflen, unsigned int maxdigits, const char *terminators, char *terminator, unsigned int timeout)
int fs_switch_ivr_originate (switch_core_session_t *session, switch_core_session_t **bleg, char *bridgeto, uint32_t timelimit_sec)
int fs_switch_ivr_session_transfer (switch_core_session_t *session, char *extension, char *dialplan, char *context)
int fs_switch_ivr_speak_text (switch_core_session_t *session, char *tts_name, char *voice_name, char *text)
char * fs_switch_channel_get_variable (switch_channel_t *channel, char *varname)
int fs_switch_channel_set_variable (switch_channel_t *channel, char *varname, char *value)


Function Documentation

void fs_channel_answer switch_core_session_t session  ) 
 

00114 {
00115         switch_channel_t *channel = switch_core_session_get_channel(session);
00116         switch_channel_answer(channel);
00117 }

Here is the call graph for this function:

void fs_channel_get_variable switch_core_session_t session,
char *  var
 

00138 {
00139         switch_channel_t *channel = switch_core_session_get_channel(session);
00140         switch_channel_get_variable(channel, var);
00141 }

Here is the call graph for this function:

void fs_channel_hangup switch_core_session_t session,
char *  cause
 

00126 {
00127         switch_channel_t *channel = switch_core_session_get_channel(session);
00128         switch_channel_hangup(channel, switch_channel_str2cause(cause));
00129 }

Here is the call graph for this function:

void fs_channel_pre_answer switch_core_session_t session  ) 
 

00120 {
00121         switch_channel_t *channel = switch_core_session_get_channel(session);
00122         switch_channel_pre_answer(channel);
00123 }

Here is the call graph for this function:

void fs_channel_set_state switch_core_session_t session,
char *  state
 

00144 {
00145         switch_channel_t *channel = switch_core_session_get_channel(session);
00146         switch_channel_state_t fs_state = switch_channel_get_state(channel);
00147 
00148         if ((fs_state = switch_channel_name_state(state)) < CS_HANGUP) {
00149                 switch_channel_set_state(channel, fs_state);
00150         }
00151 }

Here is the call graph for this function:

void fs_channel_set_variable switch_core_session_t session,
char *  var,
char *  val
 

00132 {
00133         switch_channel_t *channel = switch_core_session_get_channel(session);
00134         switch_channel_set_variable(channel, var, val);
00135 }

Here is the call graph for this function:

void fs_consol_clean char *  msg  ) 
 

00098 {
00099         switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, msg);
00100 }

Here is the call graph for this function:

void fs_consol_log char *  level_str,
char *  msg
 

00088 {
00089         switch_log_level_t level = SWITCH_LOG_DEBUG;
00090         if (level_str) {
00091                 level = switch_log_str2level(level_str);
00092         }
00093 
00094         switch_log_printf(SWITCH_CHANNEL_LOG, level, msg);
00095 }

Here is the call graph for this function:

int fs_console_loop void   ) 
 

00082 {
00083         switch_console_loop();
00084         return 0;
00085 }

Here is the call graph for this function:

int fs_core_destroy void   ) 
 

00062 {
00063         switch_status_t status;
00064 
00065         status = switch_core_destroy();
00066 
00067         return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
00068 }

Here is the call graph for this function:

int fs_core_init char *  path  ) 
 

00048 {
00049         switch_status_t status;
00050         const char *err = NULL;
00051 
00052         if (switch_strlen_zero(path)) {
00053                 path = NULL;
00054         }
00055 
00056         status = switch_core_init(path, SCF_NONE, &err);
00057 
00058         return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
00059 }

Here is the call graph for this function:

switch_core_session_t* fs_core_session_locate char *  uuid  ) 
 

00103 {
00104         switch_core_session_t *session;
00105 
00106         if ((session = switch_core_session_locate(uuid))) {
00107                 switch_core_session_rwunlock(session);
00108         }
00109 
00110         return session;
00111 }

Here is the call graph for this function:

void fs_core_set_globals void   ) 
 

00043 {
00044         switch_core_set_globals();
00045 }

Here is the call graph for this function:

int fs_ivr_play_file switch_core_session_t session,
switch_file_handle_t fh,
char *  file,
switch_input_args_t args
 

00158 {
00159         switch_status_t status;
00160 
00161         status = switch_ivr_play_file(session, fh, file, args);
00162         return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
00163 }

Here is the call graph for this function:

int fs_ivr_play_file2 switch_core_session_t session,
char *  file
 

00181 {
00182         switch_status_t status;
00183 
00184         status = switch_ivr_play_file(session, NULL, file, NULL);
00185         return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
00186 }

Here is the call graph for this function:

int fs_loadable_module_init void   ) 
 

00071 {
00072         return switch_loadable_module_init() == SWITCH_STATUS_SUCCESS ? 1 : 0;
00073 }

Here is the call graph for this function:

int fs_loadable_module_shutdown void   ) 
 

00076 {
00077         switch_loadable_module_shutdown();
00078         return 1;
00079 }

Here is the call graph for this function:

char* fs_switch_channel_get_variable switch_channel_t channel,
char *  varname
 

00273 {
00274         return switch_channel_get_variable(channel, varname);
00275 }

Here is the call graph for this function:

int fs_switch_channel_set_variable switch_channel_t channel,
char *  varname,
char *  value
 

00278 {
00279         switch_status_t status;
00280 
00281         status = switch_channel_set_variable(channel, varname, value);
00282         return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
00283 }

Here is the call graph for this function:

int fs_switch_ivr_collect_digits_callback switch_core_session_t session,
switch_input_args_t args,
unsigned int  timeout
 

00190 {
00191         switch_status_t status;
00192 
00193         status = switch_ivr_collect_digits_callback(session, args, timeout);
00194         return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
00195 }

Here is the call graph for this function:

int fs_switch_ivr_collect_digits_count switch_core_session_t session,
char *  buf,
unsigned int  buflen,
unsigned int  maxdigits,
const char *  terminators,
char *  terminator,
unsigned int  timeout
 

00200 {
00201         switch_status_t status;
00202 
00203         status = switch_ivr_collect_digits_count(session, buf, buflen, maxdigits, terminators, terminator, timeout);
00204         return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
00205 }

Here is the call graph for this function:

int fs_switch_ivr_originate switch_core_session_t session,
switch_core_session_t **  bleg,
char *  bridgeto,
uint32_t  timelimit_sec
 

00225 {
00226 
00227         switch_channel_t *caller_channel;
00228         switch_core_session_t *peer_session;
00229         unsigned int timelimit = 60;
00230         char *var;
00231         switch_call_cause_t cause = SWITCH_CAUSE_NORMAL_CLEARING;
00232 
00233         caller_channel = switch_core_session_get_channel(session);
00234         assert(caller_channel != NULL);
00235 
00236         if ((var = switch_channel_get_variable(caller_channel, "call_timeout"))) {
00237                 timelimit = atoi(var);
00238         }
00239 
00240         if (switch_ivr_originate(session, &peer_session, &cause, bridgeto, timelimit, NULL, NULL, NULL, NULL, SOF_NONE) != SWITCH_STATUS_SUCCESS) {
00241                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel!\n");
00242                 switch_channel_hangup(caller_channel, SWITCH_CAUSE_REQUESTED_CHAN_UNAVAIL);
00243                 return;
00244         } else {
00245                 switch_ivr_multi_threaded_bridge(session, peer_session, NULL, NULL, NULL);
00246         switch_core_session_rwunlock(peer_session);
00247         }
00248 }

Here is the call graph for this function:

int fs_switch_ivr_record_file switch_core_session_t session,
switch_file_handle_t fh,
char *  file,
switch_input_args_t args,
unsigned int  limit
 

00166 {
00167         switch_status_t status;
00168 
00169         status = switch_ivr_record_file(session, fh, file, args, limit);
00170         return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
00171 }

Here is the call graph for this function:

int fs_switch_ivr_session_transfer switch_core_session_t session,
char *  extension,
char *  dialplan,
char *  context
 

00251 {
00252         switch_status_t status;
00253 
00254         status = switch_ivr_session_transfer(session, extension, dialplan, context);
00255         return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
00256 }

Here is the call graph for this function:

int fs_switch_ivr_sleep switch_core_session_t session,
uint32_t  ms
 

00174 {
00175         switch_status_t status;
00176         status = switch_ivr_sleep(session, ms);
00177         return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
00178 }

Here is the call graph for this function:

int fs_switch_ivr_speak_text switch_core_session_t session,
char *  tts_name,
char *  voice_name,
char *  text
 

00259 {
00260         switch_status_t status;
00261 
00262         status = switch_ivr_speak_text(session, tts_name, voice_name, text, NULL);
00263         return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
00264 }

Here is the call graph for this function:


Generated on Mon May 26 22:06:53 2008 for FreeSWITCH by  doxygen 1.3.9.1