merge changes from branch http://svn.freeswitch.org/svn/freeswitch/branches/greenlizard/ that changes the session container implementation to use the one in the core, and an inherited class in python. Please note that this changes the python script api to more closely match (it is still a subset) the one already in place and documented for spidermonkey, and will break all your scripts that are currently working.. Fix a fatal bug causing segfaults in mod_python when using the callbacks.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5242 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2007-06-01 18:50:34 +00:00
parent f0573f0607
commit fedefcb69f
10 changed files with 5411 additions and 1282 deletions
+26 -7
View File
@@ -1,19 +1,27 @@
#ifndef SWITCH_CPP_H
#define SWITCH_CPP_H
SWITCH_BEGIN_EXTERN_C
#ifdef __cplusplus
extern "C" {
#endif
#ifdef DOH
}
#endif
#include <switch.h>
void console_log(char *level_str, char *msg);
void console_clean_log(char *msg);
char *api_execute(char *cmd, char *arg);
void api_reply_delete(char *reply);
switch_status_t process_callback_result(char *raw_result,
struct input_callback_state *cb_state,
switch_core_session_t *session);
class CoreSession {
private:
char *uuid;
char *tts_name;
char *voice_name;
switch_input_args_t args;
switch_input_args_t *ap;
public:
@@ -33,14 +41,25 @@ class CoreSession {
void set_tts_parms(char *tts_name, char *voice_name);
int getDigits(char *dtmf_buf, int len, char *terminators, char *terminator, int timeout);
int transfer(char *extensions, char *dialplan, char *context);
int playAndgetDigits(int min_digits, int max_digits, int max_tries, int timeout, char *terminators,
char *audio_files, char *bad_input_audio_files, char *dtmf_buf, char *digits_regex);
int playAndGetDigits(int min_digits, int max_digits, int max_tries, int timeout, char *terminators,
char *audio_files, char *bad_input_audio_files, char *dtmf_buf,
char *digits_regex);
int streamfile(char *file, void *cb_func, char *funcargs, int starting_sample_count);
void execute(char *app, char *data);
void begin_allow_threads();
void end_allow_threads();
protected:
char *uuid;
char *tts_name;
char *voice_name;
};
SWITCH_END_EXTERN_C
#ifdef __cplusplus
}
#endif
#endif
/* For Emacs:
* Local Variables: