34 #pragma warning (disable:1418)
39 #pragma comment(lib, PHP_LIB)
50 const char *err = NULL;
198 char *
buf,
unsigned int buflen,
unsigned int maxdigits,
const char *terminators,
char *terminator,
199 unsigned int timeout)
229 unsigned int timelimit = 60;
234 assert(caller_channel != NULL);
237 timelimit = atoi(var);
switch_core_session_t * fs_core_session_locate(char *uuid)
void fs_channel_set_variable(switch_core_session_t *session, char *var, char *val)
switch_channel_state_t switch_channel_get_state(switch_channel_t *channel)
Get the current state of a channel in the state engine.
#define switch_channel_hangup(channel, hangup_cause)
Hangup a channel flagging it's state machine to end.
#define switch_channel_answer(channel)
Answer a channel (initiate/acknowledge a successful connection)
int fs_ivr_play_file2(switch_core_session_t *session, char *file)
#define SWITCH_CHANNEL_SESSION_LOG(x)
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)
#define SWITCH_CHANNEL_LOG
#define switch_channel_set_state(channel, state)
Set the current state of a channel.
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.
switch_status_t switch_core_init(_In_ switch_core_flag_t flags, _In_ switch_bool_t console, _Out_ const char **err)
Initilize the core.
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.
int fs_loadable_module_shutdown(void)
switch_channel_state_t switch_channel_name_state(_In_ const char *name)
Render the enum of the provided state name.
char * fs_switch_channel_get_variable(switch_channel_t *channel, char *varname)
void switch_core_set_globals(void)
Initiate Globals.
int fs_loadable_module_init(void)
switch_status_t switch_core_destroy(void)
Destroy the core.
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
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.
void fs_channel_pre_answer(switch_core_session_t *session)
int fs_core_init(char *path)
void switch_loadable_module_shutdown(void)
Shutdown the module backend and call the shutdown routine in all loaded modules.
void fs_core_set_globals(void)
int fs_switch_ivr_originate(switch_core_session_t *session, switch_core_session_t **bleg, char *bridgeto, uint32_t timelimit_sec)
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.
_Ret_ switch_channel_t * switch_core_session_get_channel(_In_ switch_core_session_t *session)
Retrieve a pointer to the channel object associated with a given session.
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...
void fs_consol_log(char *level_str, char *msg)
switch_byte_t switch_byte_t * buf
int fs_switch_ivr_session_transfer(switch_core_session_t *session, char *extension, char *dialplan, char *context)
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.
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)
switch_log_level_t switch_log_str2level(_In_z_ const char *str)
Return the level number of the specified log level name.
void fs_channel_get_variable(switch_core_session_t *session, char *var)
#define switch_channel_get_variable(_c, _v)
void fs_channel_hangup(switch_core_session_t *session, char *cause)
switch_call_cause_t switch_channel_str2cause(_In_ const char *str)
return a cause code for a given string
#define SWITCH_CHANNEL_LOG_CLEAN
switch_byte_t switch_byte_t uint32_t buflen
int fs_switch_ivr_collect_digits_callback(switch_core_session_t *session, switch_input_args_t *args, unsigned int timeout)
void switch_core_session_rwunlock(_In_ switch_core_session_t *session)
Unlock a read or write lock on as given session.
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
void fs_channel_set_state(switch_core_session_t *session, char *state)
switch_channel_state_t
Channel States (these are the defaults, CS_SOFT_EXECUTE, CS_EXCHANGE_MEDIA, and CS_CONSUME_MEDIA are ...
switch_status_t
Common return values.
void fs_channel_answer(switch_core_session_t *session)
#define switch_core_session_locate(uuid_str)
Locate a session based on it's uuid.
int fs_switch_channel_set_variable(switch_channel_t *channel, char *varname, char *value)
switch_status_t switch_loadable_module_init(switch_bool_t autoload)
Initilize the module backend and load all the modules.
int fs_switch_ivr_sleep(switch_core_session_t *session, uint32_t ms)
void switch_log_printf(_In_ switch_text_channel_t channel, _In_z_ const char *file, _In_z_ const char *func, _In_ int line, _In_opt_z_ const char *userdata, _In_ switch_log_level_t level, _In_z_ _Printf_format_string_ const char *fmt,...) PRINTF_FUNCTION(7
Write log data to the logging engine.
int fs_console_loop(void)
void fs_consol_clean(char *msg)
int fs_switch_ivr_speak_text(switch_core_session_t *session, char *tts_name, char *voice_name, char *text)
#define switch_channel_set_variable(_channel, _var, _val)
int fs_core_destroy(void)
#define switch_channel_pre_answer(channel)
Indicate progress on a channel to attempt early media.
void switch_console_loop(void)
A simple comand loop that reads input from the terminal.
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.
switch_log_level_t
Log Level Enumeration.
int fs_ivr_play_file(switch_core_session_t *session, switch_file_handle_t *fh, char *file, switch_input_args_t *args)