2007-09-25 13:21:17 +00:00
|
|
|
/* ----------------------------------------------------------------------------
|
|
|
|
* This file was automatically generated by SWIG (http://www.swig.org).
|
2008-04-30 19:42:26 +00:00
|
|
|
* Version 1.3.35
|
2007-09-25 13:21:17 +00:00
|
|
|
*
|
|
|
|
* Do not make changes to this file unless you know what you are doing--modify
|
|
|
|
* the SWIG interface file instead.
|
|
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
package org.freeswitch.swig;
|
|
|
|
|
|
|
|
public class CoreSession {
|
|
|
|
private long swigCPtr;
|
|
|
|
protected boolean swigCMemOwn;
|
|
|
|
|
|
|
|
protected CoreSession(long cPtr, boolean cMemoryOwn) {
|
|
|
|
swigCMemOwn = cMemoryOwn;
|
|
|
|
swigCPtr = cPtr;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected static long getCPtr(CoreSession obj) {
|
|
|
|
return (obj == null) ? 0 : obj.swigCPtr;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected void finalize() {
|
|
|
|
delete();
|
|
|
|
}
|
|
|
|
|
|
|
|
public synchronized void delete() {
|
|
|
|
if(swigCPtr != 0 && swigCMemOwn) {
|
|
|
|
swigCMemOwn = false;
|
|
|
|
freeswitchJNI.delete_CoreSession(swigCPtr);
|
|
|
|
}
|
|
|
|
swigCPtr = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setSession(SWIGTYPE_p_switch_core_session_t value) {
|
|
|
|
freeswitchJNI.CoreSession_session_set(swigCPtr, this, SWIGTYPE_p_switch_core_session_t.getCPtr(value));
|
|
|
|
}
|
|
|
|
|
|
|
|
public SWIGTYPE_p_switch_core_session_t getSession() {
|
|
|
|
long cPtr = freeswitchJNI.CoreSession_session_get(swigCPtr, this);
|
|
|
|
return (cPtr == 0) ? null : new SWIGTYPE_p_switch_core_session_t(cPtr, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setChannel(SWIGTYPE_p_switch_channel_t value) {
|
|
|
|
freeswitchJNI.CoreSession_channel_set(swigCPtr, this, SWIGTYPE_p_switch_channel_t.getCPtr(value));
|
|
|
|
}
|
|
|
|
|
|
|
|
public SWIGTYPE_p_switch_channel_t getChannel() {
|
|
|
|
long cPtr = freeswitchJNI.CoreSession_channel_get(swigCPtr, this);
|
|
|
|
return (cPtr == 0) ? null : new SWIGTYPE_p_switch_channel_t(cPtr, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setFlags(long value) {
|
|
|
|
freeswitchJNI.CoreSession_flags_set(swigCPtr, this, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public long getFlags() {
|
|
|
|
return freeswitchJNI.CoreSession_flags_get(swigCPtr, this);
|
|
|
|
}
|
|
|
|
|
2008-04-30 19:42:26 +00:00
|
|
|
public void setAllocated(int value) {
|
|
|
|
freeswitchJNI.CoreSession_allocated_set(swigCPtr, this, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getAllocated() {
|
|
|
|
return freeswitchJNI.CoreSession_allocated_get(swigCPtr, this);
|
|
|
|
}
|
|
|
|
|
2007-09-25 13:21:17 +00:00
|
|
|
public void setCb_state(input_callback_state_t value) {
|
|
|
|
freeswitchJNI.CoreSession_cb_state_set(swigCPtr, this, input_callback_state_t.getCPtr(value), value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public input_callback_state_t getCb_state() {
|
|
|
|
long cPtr = freeswitchJNI.CoreSession_cb_state_get(swigCPtr, this);
|
|
|
|
return (cPtr == 0) ? null : new input_callback_state_t(cPtr, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setHook_state(SWIGTYPE_p_switch_channel_state_t value) {
|
|
|
|
freeswitchJNI.CoreSession_hook_state_set(swigCPtr, this, SWIGTYPE_p_switch_channel_state_t.getCPtr(value));
|
|
|
|
}
|
|
|
|
|
|
|
|
public SWIGTYPE_p_switch_channel_state_t getHook_state() {
|
|
|
|
return new SWIGTYPE_p_switch_channel_state_t(freeswitchJNI.CoreSession_hook_state_get(swigCPtr, this), true);
|
|
|
|
}
|
|
|
|
|
2009-09-17 23:28:38 +00:00
|
|
|
public void setCause(SWIGTYPE_p_switch_call_cause_t value) {
|
|
|
|
freeswitchJNI.CoreSession_cause_set(swigCPtr, this, SWIGTYPE_p_switch_call_cause_t.getCPtr(value));
|
|
|
|
}
|
|
|
|
|
|
|
|
public SWIGTYPE_p_switch_call_cause_t getCause() {
|
|
|
|
return new SWIGTYPE_p_switch_call_cause_t(freeswitchJNI.CoreSession_cause_get(swigCPtr, this), true);
|
|
|
|
}
|
|
|
|
|
2008-07-16 20:19:11 +00:00
|
|
|
public void setUuid(String value) {
|
|
|
|
freeswitchJNI.CoreSession_uuid_set(swigCPtr, this, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getUuid() {
|
|
|
|
return freeswitchJNI.CoreSession_uuid_get(swigCPtr, this);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setTts_name(String value) {
|
|
|
|
freeswitchJNI.CoreSession_tts_name_set(swigCPtr, this, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getTts_name() {
|
|
|
|
return freeswitchJNI.CoreSession_tts_name_get(swigCPtr, this);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setVoice_name(String value) {
|
|
|
|
freeswitchJNI.CoreSession_voice_name_set(swigCPtr, this, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getVoice_name() {
|
|
|
|
return freeswitchJNI.CoreSession_voice_name_get(swigCPtr, this);
|
|
|
|
}
|
|
|
|
|
2007-09-25 13:21:17 +00:00
|
|
|
public int answer() {
|
|
|
|
return freeswitchJNI.CoreSession_answer(swigCPtr, this);
|
|
|
|
}
|
|
|
|
|
|
|
|
public int preAnswer() {
|
|
|
|
return freeswitchJNI.CoreSession_preAnswer(swigCPtr, this);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void hangup(String cause) {
|
2008-04-30 19:42:26 +00:00
|
|
|
freeswitchJNI.CoreSession_hangup__SWIG_0(swigCPtr, this, cause);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void hangup() {
|
|
|
|
freeswitchJNI.CoreSession_hangup__SWIG_1(swigCPtr, this);
|
2007-09-25 13:21:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void setVariable(String var, String val) {
|
|
|
|
freeswitchJNI.CoreSession_setVariable(swigCPtr, this, var, val);
|
|
|
|
}
|
|
|
|
|
2008-04-30 19:42:26 +00:00
|
|
|
public void setPrivate(String var, SWIGTYPE_p_void val) {
|
|
|
|
freeswitchJNI.CoreSession_setPrivate(swigCPtr, this, var, SWIGTYPE_p_void.getCPtr(val));
|
|
|
|
}
|
|
|
|
|
|
|
|
public SWIGTYPE_p_void getPrivate(String var) {
|
|
|
|
long cPtr = freeswitchJNI.CoreSession_getPrivate(swigCPtr, this, var);
|
|
|
|
return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
|
|
|
|
}
|
|
|
|
|
2007-09-25 13:21:17 +00:00
|
|
|
public String getVariable(String var) {
|
|
|
|
return freeswitchJNI.CoreSession_getVariable(swigCPtr, this, var);
|
|
|
|
}
|
|
|
|
|
2008-05-23 20:25:42 +00:00
|
|
|
public SWIGTYPE_p_switch_status_t process_callback_result(String result) {
|
|
|
|
return new SWIGTYPE_p_switch_status_t(freeswitchJNI.CoreSession_process_callback_result(swigCPtr, this, result), true);
|
2008-05-12 16:58:44 +00:00
|
|
|
}
|
|
|
|
|
2008-05-13 20:36:23 +00:00
|
|
|
public void say(String tosay, String module_name, String say_type, String say_method) {
|
|
|
|
freeswitchJNI.CoreSession_say(swigCPtr, this, tosay, module_name, say_type, say_method);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void sayPhrase(String phrase_name, String phrase_data, String phrase_lang) {
|
|
|
|
freeswitchJNI.CoreSession_sayPhrase__SWIG_0(swigCPtr, this, phrase_name, phrase_data, phrase_lang);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void sayPhrase(String phrase_name, String phrase_data) {
|
|
|
|
freeswitchJNI.CoreSession_sayPhrase__SWIG_1(swigCPtr, this, phrase_name, phrase_data);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void sayPhrase(String phrase_name) {
|
|
|
|
freeswitchJNI.CoreSession_sayPhrase__SWIG_2(swigCPtr, this, phrase_name);
|
2009-09-17 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public String hangupCause() {
|
|
|
|
return freeswitchJNI.CoreSession_hangupCause(swigCPtr, this);
|
2008-05-13 20:36:23 +00:00
|
|
|
}
|
|
|
|
|
2008-08-19 22:25:28 +00:00
|
|
|
public int recordFile(String file_name, int time_limit, int silence_threshold, int silence_hits) {
|
|
|
|
return freeswitchJNI.CoreSession_recordFile__SWIG_0(swigCPtr, this, file_name, time_limit, silence_threshold, silence_hits);
|
2008-04-30 19:42:26 +00:00
|
|
|
}
|
|
|
|
|
2008-08-19 22:25:28 +00:00
|
|
|
public int recordFile(String file_name, int time_limit, int silence_threshold) {
|
|
|
|
return freeswitchJNI.CoreSession_recordFile__SWIG_1(swigCPtr, this, file_name, time_limit, silence_threshold);
|
2008-04-30 19:42:26 +00:00
|
|
|
}
|
|
|
|
|
2008-08-19 22:25:28 +00:00
|
|
|
public int recordFile(String file_name, int time_limit) {
|
|
|
|
return freeswitchJNI.CoreSession_recordFile__SWIG_2(swigCPtr, this, file_name, time_limit);
|
2008-04-30 19:42:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public int recordFile(String file_name) {
|
|
|
|
return freeswitchJNI.CoreSession_recordFile__SWIG_3(swigCPtr, this, file_name);
|
2007-09-25 13:21:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void setCallerData(String var, String val) {
|
|
|
|
freeswitchJNI.CoreSession_setCallerData(swigCPtr, this, var, val);
|
|
|
|
}
|
|
|
|
|
2009-09-15 18:48:12 +00:00
|
|
|
public int originate(CoreSession a_leg_session, String dest, int timeout, SWIGTYPE_p_switch_state_handler_table_t handlers) {
|
|
|
|
return freeswitchJNI.CoreSession_originate__SWIG_0(swigCPtr, this, CoreSession.getCPtr(a_leg_session), a_leg_session, dest, timeout, SWIGTYPE_p_switch_state_handler_table_t.getCPtr(handlers));
|
|
|
|
}
|
|
|
|
|
2007-09-25 13:21:17 +00:00
|
|
|
public int originate(CoreSession a_leg_session, String dest, int timeout) {
|
2009-09-15 18:48:12 +00:00
|
|
|
return freeswitchJNI.CoreSession_originate__SWIG_1(swigCPtr, this, CoreSession.getCPtr(a_leg_session), a_leg_session, dest, timeout);
|
2008-04-30 19:42:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public int originate(CoreSession a_leg_session, String dest) {
|
2009-09-15 18:48:12 +00:00
|
|
|
return freeswitchJNI.CoreSession_originate__SWIG_2(swigCPtr, this, CoreSession.getCPtr(a_leg_session), a_leg_session, dest);
|
2007-09-25 13:21:17 +00:00
|
|
|
}
|
|
|
|
|
2008-09-15 21:44:43 +00:00
|
|
|
public void destroy() {
|
|
|
|
freeswitchJNI.CoreSession_destroy(swigCPtr, this);
|
|
|
|
}
|
|
|
|
|
2007-09-25 13:21:17 +00:00
|
|
|
public void setDTMFCallback(SWIGTYPE_p_void cbfunc, String funcargs) {
|
|
|
|
freeswitchJNI.CoreSession_setDTMFCallback(swigCPtr, this, SWIGTYPE_p_void.getCPtr(cbfunc), funcargs);
|
|
|
|
}
|
|
|
|
|
|
|
|
public int speak(String text) {
|
|
|
|
return freeswitchJNI.CoreSession_speak(swigCPtr, this, text);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void set_tts_parms(String tts_name, String voice_name) {
|
|
|
|
freeswitchJNI.CoreSession_set_tts_parms(swigCPtr, this, tts_name, voice_name);
|
|
|
|
}
|
|
|
|
|
|
|
|
public int collectDigits(int timeout) {
|
|
|
|
return freeswitchJNI.CoreSession_collectDigits(swigCPtr, this, timeout);
|
|
|
|
}
|
|
|
|
|
2008-05-02 18:40:23 +00:00
|
|
|
public String getDigits(int maxdigits, String terminators, int timeout) {
|
2008-06-23 19:19:17 +00:00
|
|
|
return freeswitchJNI.CoreSession_getDigits__SWIG_0(swigCPtr, this, maxdigits, terminators, timeout);
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getDigits(int maxdigits, String terminators, int timeout, int interdigit) {
|
|
|
|
return freeswitchJNI.CoreSession_getDigits__SWIG_1(swigCPtr, this, maxdigits, terminators, timeout, interdigit);
|
2007-09-25 13:21:17 +00:00
|
|
|
}
|
|
|
|
|
2008-08-14 16:57:16 +00:00
|
|
|
public int transfer(String extension, String dialplan, String context) {
|
|
|
|
return freeswitchJNI.CoreSession_transfer__SWIG_0(swigCPtr, this, extension, dialplan, context);
|
|
|
|
}
|
|
|
|
|
|
|
|
public int transfer(String extension, String dialplan) {
|
|
|
|
return freeswitchJNI.CoreSession_transfer__SWIG_1(swigCPtr, this, extension, dialplan);
|
|
|
|
}
|
|
|
|
|
|
|
|
public int transfer(String extension) {
|
|
|
|
return freeswitchJNI.CoreSession_transfer__SWIG_2(swigCPtr, this, extension);
|
2007-09-25 13:21:17 +00:00
|
|
|
}
|
|
|
|
|
2008-05-02 19:04:13 +00:00
|
|
|
public String read(int min_digits, int max_digits, String prompt_audio_file, int timeout, String valid_terminators) {
|
|
|
|
return freeswitchJNI.CoreSession_read(swigCPtr, this, min_digits, max_digits, prompt_audio_file, timeout, valid_terminators);
|
|
|
|
}
|
|
|
|
|
2009-01-15 15:38:32 +00:00
|
|
|
public String playAndGetDigits(int min_digits, int max_digits, int max_tries, int timeout, String terminators, String audio_files, String bad_input_audio_files, String digits_regex, String var_name) {
|
|
|
|
return freeswitchJNI.CoreSession_playAndGetDigits__SWIG_0(swigCPtr, this, min_digits, max_digits, max_tries, timeout, terminators, audio_files, bad_input_audio_files, digits_regex, var_name);
|
|
|
|
}
|
|
|
|
|
|
|
|
public String playAndGetDigits(int min_digits, int max_digits, int max_tries, int timeout, String terminators, String audio_files, String bad_input_audio_files, String digits_regex) {
|
|
|
|
return freeswitchJNI.CoreSession_playAndGetDigits__SWIG_1(swigCPtr, this, min_digits, max_digits, max_tries, timeout, terminators, audio_files, bad_input_audio_files, digits_regex);
|
2007-09-25 13:21:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public int streamFile(String file, int starting_sample_count) {
|
2008-04-30 19:42:26 +00:00
|
|
|
return freeswitchJNI.CoreSession_streamFile__SWIG_0(swigCPtr, this, file, starting_sample_count);
|
|
|
|
}
|
|
|
|
|
|
|
|
public int streamFile(String file) {
|
|
|
|
return freeswitchJNI.CoreSession_streamFile__SWIG_1(swigCPtr, this, file);
|
2007-09-25 13:21:17 +00:00
|
|
|
}
|
|
|
|
|
2008-12-15 03:45:38 +00:00
|
|
|
public int sleep(int ms, int sync) {
|
|
|
|
return freeswitchJNI.CoreSession_sleep__SWIG_0(swigCPtr, this, ms, sync);
|
|
|
|
}
|
|
|
|
|
2008-07-12 18:44:05 +00:00
|
|
|
public int sleep(int ms) {
|
2008-12-15 03:45:38 +00:00
|
|
|
return freeswitchJNI.CoreSession_sleep__SWIG_1(swigCPtr, this, ms);
|
2008-07-08 17:27:02 +00:00
|
|
|
}
|
|
|
|
|
2007-09-25 13:21:17 +00:00
|
|
|
public int flushEvents() {
|
|
|
|
return freeswitchJNI.CoreSession_flushEvents(swigCPtr, this);
|
|
|
|
}
|
|
|
|
|
|
|
|
public int flushDigits() {
|
|
|
|
return freeswitchJNI.CoreSession_flushDigits(swigCPtr, this);
|
|
|
|
}
|
|
|
|
|
|
|
|
public int setAutoHangup(boolean val) {
|
|
|
|
return freeswitchJNI.CoreSession_setAutoHangup(swigCPtr, this, val);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setHangupHook(SWIGTYPE_p_void hangup_func) {
|
|
|
|
freeswitchJNI.CoreSession_setHangupHook(swigCPtr, this, SWIGTYPE_p_void.getCPtr(hangup_func));
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean ready() {
|
|
|
|
return freeswitchJNI.CoreSession_ready(swigCPtr, this);
|
|
|
|
}
|
|
|
|
|
2008-06-02 23:42:59 +00:00
|
|
|
public boolean answered() {
|
|
|
|
return freeswitchJNI.CoreSession_answered(swigCPtr, this);
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean mediaReady() {
|
|
|
|
return freeswitchJNI.CoreSession_mediaReady(swigCPtr, this);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void waitForAnswer(CoreSession calling_session) {
|
|
|
|
freeswitchJNI.CoreSession_waitForAnswer(swigCPtr, this, CoreSession.getCPtr(calling_session), calling_session);
|
|
|
|
}
|
|
|
|
|
2007-09-25 13:21:17 +00:00
|
|
|
public void execute(String app, String data) {
|
2008-05-16 18:40:39 +00:00
|
|
|
freeswitchJNI.CoreSession_execute__SWIG_0(swigCPtr, this, app, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void execute(String app) {
|
|
|
|
freeswitchJNI.CoreSession_execute__SWIG_1(swigCPtr, this, app);
|
2007-09-25 13:21:17 +00:00
|
|
|
}
|
|
|
|
|
2008-04-30 19:42:26 +00:00
|
|
|
public void sendEvent(Event sendME) {
|
|
|
|
freeswitchJNI.CoreSession_sendEvent(swigCPtr, this, Event.getCPtr(sendME), sendME);
|
|
|
|
}
|
|
|
|
|
2008-05-10 17:02:43 +00:00
|
|
|
public void setEventData(Event e) {
|
|
|
|
freeswitchJNI.CoreSession_setEventData(swigCPtr, this, Event.getCPtr(e), e);
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getXMLCDR() {
|
|
|
|
return freeswitchJNI.CoreSession_getXMLCDR(swigCPtr, this);
|
|
|
|
}
|
|
|
|
|
2007-09-25 13:21:17 +00:00
|
|
|
public boolean begin_allow_threads() {
|
|
|
|
return freeswitchJNI.CoreSession_begin_allow_threads(swigCPtr, this);
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean end_allow_threads() {
|
|
|
|
return freeswitchJNI.CoreSession_end_allow_threads(swigCPtr, this);
|
|
|
|
}
|
|
|
|
|
|
|
|
public String get_uuid() {
|
|
|
|
return freeswitchJNI.CoreSession_get_uuid(swigCPtr, this);
|
|
|
|
}
|
|
|
|
|
|
|
|
public SWIGTYPE_p_switch_input_args_t get_cb_args() {
|
|
|
|
return new SWIGTYPE_p_switch_input_args_t(freeswitchJNI.CoreSession_get_cb_args(swigCPtr, this), false);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void check_hangup_hook() {
|
|
|
|
freeswitchJNI.CoreSession_check_hangup_hook(swigCPtr, this);
|
|
|
|
}
|
|
|
|
|
|
|
|
public SWIGTYPE_p_switch_status_t run_dtmf_callback(SWIGTYPE_p_void input, SWIGTYPE_p_switch_input_type_t itype) {
|
|
|
|
return new SWIGTYPE_p_switch_status_t(freeswitchJNI.CoreSession_run_dtmf_callback(swigCPtr, this, SWIGTYPE_p_void.getCPtr(input), SWIGTYPE_p_switch_input_type_t.getCPtr(itype)), true);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|