diff --git a/src/include/switch_core.h b/src/include/switch_core.h index 210b676b1e..7b164af20a 100644 --- a/src/include/switch_core.h +++ b/src/include/switch_core.h @@ -2042,6 +2042,8 @@ SWITCH_DECLARE(FILE *) switch_core_data_channel(switch_text_channel_t channel); */ SWITCH_DECLARE(switch_bool_t) switch_core_ready(void); +SWITCH_DECLARE(switch_bool_t) switch_core_running(void); + /*! \brief Determines if the core is ready to take inbound calls \return SWITCH_TRUE or SWITCH_FALSE diff --git a/src/include/switch_cpp.h b/src/include/switch_cpp.h index 83adac6867..8f50b70fe3 100644 --- a/src/include/switch_cpp.h +++ b/src/include/switch_cpp.h @@ -71,6 +71,7 @@ SWITCH_DECLARE(char *) getGlobalVariable(char *var_name); SWITCH_DECLARE(void) consoleLog(char *level_str, char *msg); SWITCH_DECLARE(void) consoleCleanLog(char *msg); +SWITCH_DECLARE(bool) running(void); SWITCH_DECLARE(bool) email(char *to, char *from, char *headers = NULL, char *body = NULL, char *file = NULL, char *convert_cmd = NULL, char *convert_ext = NULL); diff --git a/src/mod/languages/mod_java/src/org/freeswitch/swig/CoreSession.java b/src/mod/languages/mod_java/src/org/freeswitch/swig/CoreSession.java index 5b192d350d..ca8c27b123 100644 --- a/src/mod/languages/mod_java/src/org/freeswitch/swig/CoreSession.java +++ b/src/mod/languages/mod_java/src/org/freeswitch/swig/CoreSession.java @@ -177,7 +177,7 @@ public class CoreSession { return freeswitchJNI.CoreSession_recordFile(swigCPtr, this, file_name, time_limit, silence_threshold, silence_hits); } - public int originate(CoreSession a_leg_session, String dest, int timeout, SWIGTYPE_p_switch_state_handler_table_t handlers) { + protected int originate(CoreSession a_leg_session, String dest, int timeout, SWIGTYPE_p_switch_state_handler_table_t handlers) { return freeswitchJNI.CoreSession_originate(swigCPtr, this, CoreSession.getCPtr(a_leg_session), a_leg_session, dest, timeout, SWIGTYPE_p_switch_state_handler_table_t.getCPtr(handlers)); } diff --git a/src/mod/languages/mod_java/src/org/freeswitch/swig/JavaSession.java b/src/mod/languages/mod_java/src/org/freeswitch/swig/JavaSession.java index f75f1cafee..b2bf611a4e 100644 --- a/src/mod/languages/mod_java/src/org/freeswitch/swig/JavaSession.java +++ b/src/mod/languages/mod_java/src/org/freeswitch/swig/JavaSession.java @@ -69,4 +69,8 @@ public class JavaSession extends CoreSession { return new SWIGTYPE_p_switch_status_t(freeswitchJNI.JavaSession_run_dtmf_callback(swigCPtr, this, SWIGTYPE_p_void.getCPtr(input), SWIGTYPE_p_switch_input_type_t.getCPtr(itype)), true); } + public int originate(JavaSession aleg, String destination, int timeout) { + return freeswitchJNI.JavaSession_originate(swigCPtr, this, JavaSession.getCPtr(aleg), aleg, destination, timeout); + } + } diff --git a/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitch.java b/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitch.java index 7d832dbea0..48c03c2f10 100644 --- a/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitch.java +++ b/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitch.java @@ -25,6 +25,10 @@ public class freeswitch { freeswitchJNI.consoleCleanLog(msg); } + public static boolean running() { + return freeswitchJNI.running(); + } + public static boolean email(String to, String from, String headers, String body, String file, String convert_cmd, String convert_ext) { return freeswitchJNI.email(to, from, headers, body, file, convert_cmd, convert_ext); } @@ -62,4 +66,8 @@ public class freeswitch { return (cPtr == 0) ? null : new SWIGTYPE_p_JavaVM(cPtr, false); } + public static void setOriginateStateHandler(org.freeswitch.StateHandler stateHandler) throws java.util.TooManyListenersException { + freeswitchJNI.setOriginateStateHandler(stateHandler); + } + } diff --git a/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java b/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java index 40f856cb41..cc2f7f7cf7 100644 --- a/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java +++ b/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java @@ -13,6 +13,7 @@ class freeswitchJNI { public final static native String getGlobalVariable(String jarg1); public final static native void consoleLog(String jarg1, String jarg2); public final static native void consoleCleanLog(String jarg1); + public final static native boolean running(); public final static native boolean email(String jarg1, String jarg2, String jarg3, String jarg4, String jarg5, String jarg6, String jarg7); public final static native long new_IVRMenu(long jarg1, IVRMenu jarg1_, String jarg2, String jarg3, String jarg4, String jarg5, String jarg6, String jarg7, String jarg8, String jarg9, String jarg10, int jarg11, int jarg12, int jarg13, int jarg14, int jarg15, int jarg16); public final static native void delete_IVRMenu(long jarg1); @@ -162,6 +163,7 @@ class freeswitchJNI { public final static native long dtmf_callback(long jarg1, long jarg2, long jarg3, long jarg4, long jarg5); public final static native void javaVM_set(long jarg1); public final static native long javaVM_get(); + public final static native void setOriginateStateHandler(org.freeswitch.StateHandler jarg1) throws java.util.TooManyListenersException; public final static native long new_JavaSession__SWIG_0(); public final static native long new_JavaSession__SWIG_1(String jarg1); public final static native long new_JavaSession__SWIG_2(long jarg1); @@ -172,5 +174,6 @@ class freeswitchJNI { public final static native void JavaSession_setHangupHook(long jarg1, JavaSession jarg1_, org.freeswitch.HangupHook jarg2); public final static native void JavaSession_check_hangup_hook(long jarg1, JavaSession jarg1_); public final static native long JavaSession_run_dtmf_callback(long jarg1, JavaSession jarg1_, long jarg2, long jarg3); + public final static native int JavaSession_originate(long jarg1, JavaSession jarg1_, long jarg2, JavaSession jarg2_, String jarg3, int jarg4); public final static native long SWIGJavaSessionUpcast(long jarg1); } diff --git a/src/mod/languages/mod_java/switch_swig_wrap.cpp b/src/mod/languages/mod_java/switch_swig_wrap.cpp index 93499b61ab..83ddb6db02 100644 --- a/src/mod/languages/mod_java/switch_swig_wrap.cpp +++ b/src/mod/languages/mod_java/switch_swig_wrap.cpp @@ -199,6 +199,7 @@ static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionC #define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else +#include "switch.h" #include "switch_cpp.h" #include "freeswitch_java.h" @@ -286,6 +287,18 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_consoleCleanLog(J } +SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_running(JNIEnv *jenv, jclass jcls) { + jboolean jresult = 0 ; + bool result; + + (void)jenv; + (void)jcls; + result = (bool)running(); + jresult = (jboolean)result; + return jresult; +} + + SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_email(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jstring jarg3, jstring jarg4, jstring jarg5, jstring jarg6, jstring jarg7) { jboolean jresult = 0 ; char *arg1 = (char *) 0 ; @@ -3176,6 +3189,16 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_javaVM_1get(JNIE } +SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_setOriginateStateHandler(JNIEnv *jenv, jclass jcls, jobject jarg1) { + jobject arg1 ; + + (void)jenv; + (void)jcls; + arg1 = jarg1; + setOriginateStateHandler(arg1); +} + + SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1JavaSession_1_1SWIG_10(JNIEnv *jenv, jclass jcls) { jlong jresult = 0 ; JavaSession *result = 0 ; @@ -3331,6 +3354,33 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_JavaSession_1run } +SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_JavaSession_1originate(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jstring jarg3, jint jarg4) { + jint jresult = 0 ; + JavaSession *arg1 = (JavaSession *) 0 ; + JavaSession *arg2 = (JavaSession *) 0 ; + char *arg3 = (char *) 0 ; + int arg4 ; + int result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + (void)jarg2_; + arg1 = *(JavaSession **)&jarg1; + arg2 = *(JavaSession **)&jarg2; + arg3 = 0; + if (jarg3) { + arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0); + if (!arg3) return 0; + } + arg4 = (int)jarg4; + result = (int)(arg1)->originate(arg2,arg3,arg4); + jresult = (jint)result; + if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); + return jresult; +} + + SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_SWIGJavaSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; diff --git a/src/mod/languages/mod_lua/mod_lua_wrap.cpp b/src/mod/languages/mod_lua/mod_lua_wrap.cpp index 679b852a81..3f9ad57fb5 100644 --- a/src/mod/languages/mod_lua/mod_lua_wrap.cpp +++ b/src/mod/languages/mod_lua/mod_lua_wrap.cpp @@ -1627,6 +1627,24 @@ fail: } +static int _wrap_running(lua_State* L) { + int SWIG_arg = -1; + bool result; + + SWIG_check_num_args("running",0,0) + result = (bool)running(); + SWIG_arg=0; + lua_pushboolean(L,(int)(result==true)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + static int _wrap_email(lua_State* L) { int SWIG_arg = -1; char *arg1 = (char *) 0 ; @@ -7774,6 +7792,7 @@ static const struct luaL_reg swig_commands[] = { { "getGlobalVariable", _wrap_getGlobalVariable}, { "consoleLog", _wrap_consoleLog}, { "consoleCleanLog", _wrap_consoleCleanLog}, + { "running", _wrap_running}, { "email", _wrap_email}, { "console_log", _wrap_console_log}, { "console_clean_log", _wrap_console_clean_log}, diff --git a/src/mod/languages/mod_managed/freeswitch_wrap.cxx b/src/mod/languages/mod_managed/freeswitch_wrap.cxx index a1fed17362..4f885e481b 100644 --- a/src/mod/languages/mod_managed/freeswitch_wrap.cxx +++ b/src/mod/languages/mod_managed/freeswitch_wrap.cxx @@ -1267,6 +1267,17 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_CHANNEL_EXECUTE_ON_POST_ORIGINATE_VA } +SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_CHANNEL_EXECUTE_ON_PRE_ORIGINATE_VARIABLE_get() { + char * jresult ; + char *result = 0 ; + + result = (char *) "execute_on_pre_originate"; + + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_CHANNEL_API_ON_ANSWER_VARIABLE_get() { char * jresult ; char *result = 0 ; @@ -1344,6 +1355,17 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_CHANNEL_API_ON_POST_ORIGINATE_VARIAB } +SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_CHANNEL_API_ON_PRE_ORIGINATE_VARIABLE_get() { + char * jresult ; + char *result = 0 ; + + result = (char *) "api_on_pre_originate"; + + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_CALL_TIMEOUT_VARIABLE_get() { char * jresult ; char *result = 0 ; @@ -1982,6 +2004,17 @@ SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_DTMF_LOG_LEN_get() { } +SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_MAX_TRANS_get() { + int jresult ; + int result; + + result = (int) 2000; + + jresult = result; + return jresult; +} + + SWIGEXPORT void SWIGSTDCALL CSharp_switch_dtmf_t_digit_set(void * jarg1, char jarg2) { switch_dtmf_t *arg1 = (switch_dtmf_t *) 0 ; char arg2 ; @@ -2801,6 +2834,36 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_directories_sounds_dir_get(void * ja } +SWIGEXPORT void SWIGSTDCALL CSharp_switch_directories_lib_dir_set(void * jarg1, char * jarg2) { + switch_directories *arg1 = (switch_directories *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_directories *)jarg1; + arg2 = (char *)jarg2; + { + if (arg1->lib_dir) delete [] arg1->lib_dir; + if (arg2) { + arg1->lib_dir = (char *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->lib_dir, (const char *)arg2); + } else { + arg1->lib_dir = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_directories_lib_dir_get(void * jarg1) { + char * jresult ; + switch_directories *arg1 = (switch_directories *) 0 ; + char *result = 0 ; + + arg1 = (switch_directories *)jarg1; + result = (char *) ((arg1)->lib_dir); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_directories() { void * jresult ; switch_directories *result = 0 ; @@ -8237,6 +8300,18 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_core_session_get_channel(void * jarg } +SWIGEXPORT void * SWIGSTDCALL CSharp_switch_core_session_get_mutex(void * jarg1) { + void * jresult ; + switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; + switch_mutex_t *result = 0 ; + + arg1 = (switch_core_session_t *)jarg1; + result = (switch_mutex_t *)switch_core_session_get_mutex(arg1); + jresult = (void *)result; + return jresult; +} + + SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_session_wake_session_thread(void * jarg1) { int jresult ; switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; @@ -8535,15 +8610,21 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_session_hupall(int jarg1) { } -SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_session_hupall_matching_var(char * jarg1, char * jarg2, int jarg3) { +SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_core_session_hupall_matching_var_ans(char * jarg1, char * jarg2, int jarg3, int jarg4) { + unsigned long jresult ; char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; switch_call_cause_t arg3 ; + switch_hup_type_t arg4 ; + uint32_t result; arg1 = (char *)jarg1; arg2 = (char *)jarg2; arg3 = (switch_call_cause_t)jarg3; - switch_core_session_hupall_matching_var((char const *)arg1,(char const *)arg2,arg3); + arg4 = (switch_hup_type_t)jarg4; + result = (uint32_t)switch_core_session_hupall_matching_var_ans((char const *)arg1,(char const *)arg2,arg3,arg4); + jresult = (unsigned long)result; + return jresult; } @@ -10712,6 +10793,16 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_ready() { } +SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_running() { + int jresult ; + switch_bool_t result; + + result = (switch_bool_t)switch_core_running(); + jresult = result; + return jresult; +} + + SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_ready_inbound() { int jresult ; switch_bool_t result; @@ -11390,13 +11481,13 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_preprocess_session(void * jarg1, ch } -SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_sqldb_stop_thread() { - switch_core_sqldb_stop_thread(); +SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_sqldb_pause() { + switch_core_sqldb_pause(); } -SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_sqldb_start_thread() { - switch_core_sqldb_start_thread(); +SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_sqldb_resume() { + switch_core_sqldb_resume(); } @@ -12324,6 +12415,20 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_recovery_flush(char * jarg1, char } +SWIGEXPORT int SWIGSTDCALL CSharp_switch_sql_queue_manager_size(void * jarg1, unsigned long jarg2) { + int jresult ; + switch_sql_queue_manager_t *arg1 = (switch_sql_queue_manager_t *) 0 ; + uint32_t arg2 ; + int result; + + arg1 = (switch_sql_queue_manager_t *)jarg1; + arg2 = (uint32_t)jarg2; + result = (int)switch_sql_queue_manager_size(arg1,arg2); + jresult = result; + return jresult; +} + + SWIGEXPORT int SWIGSTDCALL CSharp_switch_sql_queue_manager_push_confirm(void * jarg1, char * jarg2, unsigned long jarg3, int jarg4) { int jresult ; switch_sql_queue_manager_t *arg1 = (switch_sql_queue_manager_t *) 0 ; @@ -12372,27 +12477,29 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_sql_queue_manager_destroy(void * jarg1) } -SWIGEXPORT int SWIGSTDCALL CSharp_switch_sql_queue_manager_init_name(char * jarg1, void * jarg2, unsigned long jarg3, char * jarg4, char * jarg5, char * jarg6, char * jarg7, char * jarg8) { +SWIGEXPORT int SWIGSTDCALL CSharp_switch_sql_queue_manager_init_name(char * jarg1, void * jarg2, unsigned long jarg3, char * jarg4, unsigned long jarg5, char * jarg6, char * jarg7, char * jarg8, char * jarg9) { int jresult ; char *arg1 = (char *) 0 ; switch_sql_queue_manager_t **arg2 = (switch_sql_queue_manager_t **) 0 ; uint32_t arg3 ; char *arg4 = (char *) 0 ; - char *arg5 = (char *) 0 ; + uint32_t arg5 ; char *arg6 = (char *) 0 ; char *arg7 = (char *) 0 ; char *arg8 = (char *) 0 ; + char *arg9 = (char *) 0 ; switch_status_t result; arg1 = (char *)jarg1; arg2 = (switch_sql_queue_manager_t **)jarg2; arg3 = (uint32_t)jarg3; arg4 = (char *)jarg4; - arg5 = (char *)jarg5; + arg5 = (uint32_t)jarg5; arg6 = (char *)jarg6; arg7 = (char *)jarg7; arg8 = (char *)jarg8; - result = (switch_status_t)switch_sql_queue_manager_init_name((char const *)arg1,arg2,arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8); + arg9 = (char *)jarg9; + result = (switch_status_t)switch_sql_queue_manager_init_name((char const *)arg1,arg2,arg3,(char const *)arg4,arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,(char const *)arg9); jresult = result; return jresult; } @@ -23976,6 +24083,29 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_codec_session_get(void * jarg1) { } +SWIGEXPORT void SWIGSTDCALL CSharp_switch_codec_cur_frame_set(void * jarg1, void * jarg2) { + switch_codec *arg1 = (switch_codec *) 0 ; + switch_frame_t *arg2 = (switch_frame_t *) 0 ; + + arg1 = (switch_codec *)jarg1; + arg2 = (switch_frame_t *)jarg2; + if (arg1) (arg1)->cur_frame = arg2; + +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_switch_codec_cur_frame_get(void * jarg1) { + void * jresult ; + switch_codec *arg1 = (switch_codec *) 0 ; + switch_frame_t *result = 0 ; + + arg1 = (switch_codec *)jarg1; + result = (switch_frame_t *) ((arg1)->cur_frame); + jresult = (void *)result; + return jresult; +} + + SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_codec() { void * jresult ; switch_codec *result = 0 ; @@ -27217,6 +27347,42 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_channel_has_dtmf(void * jarg1) { } +SWIGEXPORT int SWIGSTDCALL CSharp_switch_channel_dtmf_lock(void * jarg1) { + int jresult ; + switch_channel_t *arg1 = (switch_channel_t *) 0 ; + switch_status_t result; + + arg1 = (switch_channel_t *)jarg1; + result = (switch_status_t)switch_channel_dtmf_lock(arg1); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_switch_channel_try_dtmf_lock(void * jarg1) { + int jresult ; + switch_channel_t *arg1 = (switch_channel_t *) 0 ; + switch_status_t result; + + arg1 = (switch_channel_t *)jarg1; + result = (switch_status_t)switch_channel_try_dtmf_lock(arg1); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_switch_channel_dtmf_unlock(void * jarg1) { + int jresult ; + switch_channel_t *arg1 = (switch_channel_t *) 0 ; + switch_status_t result; + + arg1 = (switch_channel_t *)jarg1; + result = (switch_status_t)switch_channel_dtmf_unlock(arg1); + jresult = result; + return jresult; +} + + SWIGEXPORT int SWIGSTDCALL CSharp_switch_channel_queue_dtmf(void * jarg1, void * jarg2) { int jresult ; switch_channel_t *arg1 = (switch_channel_t *) 0 ; @@ -27691,6 +27857,22 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_channel_get_hold_record(void * jarg1 } +SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_state_thread_lock(void * jarg1) { + switch_channel_t *arg1 = (switch_channel_t *) 0 ; + + arg1 = (switch_channel_t *)jarg1; + switch_channel_state_thread_lock(arg1); +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_state_thread_unlock(void * jarg1) { + switch_channel_t *arg1 = (switch_channel_t *) 0 ; + + arg1 = (switch_channel_t *)jarg1; + switch_channel_state_thread_unlock(arg1); +} + + SWIGEXPORT int SWIGSTDCALL CSharp_switch_buffer_create(void * jarg1, void * jarg2, void * jarg3) { int jresult ; switch_memory_pool_t *arg1 = (switch_memory_pool_t *) 0 ; @@ -32155,6 +32337,18 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_uuid_exists(char * jarg1) { } +SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_uuid_force_exists(char * jarg1) { + int jresult ; + char *arg1 = (char *) 0 ; + switch_bool_t result; + + arg1 = (char *)jarg1; + result = (switch_bool_t)switch_ivr_uuid_force_exists((char const *)arg1); + jresult = result; + return jresult; +} + + SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_last_ping(void * jarg1) { int jresult ; switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ; @@ -35117,15 +35311,17 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_xml_parse_section_string(char } -SWIGEXPORT int SWIGSTDCALL CSharp_switch_xml_std_datetime_check(void * jarg1, void * jarg2) { +SWIGEXPORT int SWIGSTDCALL CSharp_switch_xml_std_datetime_check(void * jarg1, void * jarg2, char * jarg3) { int jresult ; switch_xml_t arg1 = (switch_xml_t) 0 ; int *arg2 = (int *) 0 ; + char *arg3 = (char *) 0 ; int result; arg1 = (switch_xml_t)jarg1; arg2 = (int *)jarg2; - result = (int)switch_xml_std_datetime_check(arg1,arg2); + arg3 = (char *)jarg3; + result = (int)switch_xml_std_datetime_check(arg1,arg2,(char const *)arg3); jresult = result; return jresult; } @@ -37107,6 +37303,16 @@ SWIGEXPORT void SWIGSTDCALL CSharp_consoleCleanLog(char * jarg1) { } +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_running() { + unsigned int jresult ; + bool result; + + result = (bool)running(); + jresult = result; + return jresult; +} + + SWIGEXPORT unsigned int SWIGSTDCALL CSharp_email(char * jarg1, char * jarg2, char * jarg3, char * jarg4, char * jarg5, char * jarg6, char * jarg7) { unsigned int jresult ; char *arg1 = (char *) 0 ; diff --git a/src/mod/languages/mod_managed/managed/swig.cs b/src/mod/languages/mod_managed/managed/swig.cs index e3eea0582d..e560b2046c 100644 --- a/src/mod/languages/mod_managed/managed/swig.cs +++ b/src/mod/languages/mod_managed/managed/swig.cs @@ -1473,6 +1473,12 @@ public class freeswitch { return ret; } + public static SWIGTYPE_p_switch_mutex_t switch_core_session_get_mutex(SWIGTYPE_p_switch_core_session session) { + IntPtr cPtr = freeswitchPINVOKE.switch_core_session_get_mutex(SWIGTYPE_p_switch_core_session.getCPtr(session)); + SWIGTYPE_p_switch_mutex_t ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_switch_mutex_t(cPtr, false); + return ret; + } + public static switch_status_t switch_core_session_wake_session_thread(SWIGTYPE_p_switch_core_session session) { switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_session_wake_session_thread(SWIGTYPE_p_switch_core_session.getCPtr(session)); return ret; @@ -1594,8 +1600,9 @@ public class freeswitch { freeswitchPINVOKE.switch_core_session_hupall((int)cause); } - public static void switch_core_session_hupall_matching_var(string var_name, string var_val, switch_call_cause_t cause) { - freeswitchPINVOKE.switch_core_session_hupall_matching_var(var_name, var_val, (int)cause); + public static uint switch_core_session_hupall_matching_var_ans(string var_name, string var_val, switch_call_cause_t cause, switch_hup_type_t type) { + uint ret = freeswitchPINVOKE.switch_core_session_hupall_matching_var_ans(var_name, var_val, (int)cause, (int)type); + return ret; } public static switch_console_callback_match switch_core_session_findall_matching_var(string var_name, string var_val) { @@ -2344,6 +2351,11 @@ public class freeswitch { return ret; } + public static switch_bool_t switch_core_running() { + switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_core_running(); + return ret; + } + public static switch_bool_t switch_core_ready_inbound() { switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_core_ready_inbound(); return ret; @@ -2630,12 +2642,12 @@ public class freeswitch { return ret; } - public static void switch_core_sqldb_stop_thread() { - freeswitchPINVOKE.switch_core_sqldb_stop_thread(); + public static void switch_core_sqldb_pause() { + freeswitchPINVOKE.switch_core_sqldb_pause(); } - public static void switch_core_sqldb_start_thread() { - freeswitchPINVOKE.switch_core_sqldb_start_thread(); + public static void switch_core_sqldb_resume() { + freeswitchPINVOKE.switch_core_sqldb_resume(); } public static string switch_cache_db_type_name(switch_cache_db_handle_type_t type) { @@ -2830,6 +2842,11 @@ public class freeswitch { freeswitchPINVOKE.switch_core_recovery_flush(technology, profile_name); } + public static int switch_sql_queue_manager_size(SWIGTYPE_p_switch_sql_queue_manager qm, uint index) { + int ret = freeswitchPINVOKE.switch_sql_queue_manager_size(SWIGTYPE_p_switch_sql_queue_manager.getCPtr(qm), index); + return ret; + } + public static switch_status_t switch_sql_queue_manager_push_confirm(SWIGTYPE_p_switch_sql_queue_manager qm, string sql, uint pos, switch_bool_t dup) { switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_sql_queue_manager_push_confirm(SWIGTYPE_p_switch_sql_queue_manager.getCPtr(qm), sql, pos, (int)dup); return ret; @@ -2845,8 +2862,8 @@ public class freeswitch { return ret; } - public static switch_status_t switch_sql_queue_manager_init_name(string name, SWIGTYPE_p_p_switch_sql_queue_manager qmp, uint numq, string dsn, string pre_trans_execute, string post_trans_execute, string inner_pre_trans_execute, string inner_post_trans_execute) { - switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_sql_queue_manager_init_name(name, SWIGTYPE_p_p_switch_sql_queue_manager.getCPtr(qmp), numq, dsn, pre_trans_execute, post_trans_execute, inner_pre_trans_execute, inner_post_trans_execute); + public static switch_status_t switch_sql_queue_manager_init_name(string name, SWIGTYPE_p_p_switch_sql_queue_manager qmp, uint numq, string dsn, uint max_trans, string pre_trans_execute, string post_trans_execute, string inner_pre_trans_execute, string inner_post_trans_execute) { + switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_sql_queue_manager_init_name(name, SWIGTYPE_p_p_switch_sql_queue_manager.getCPtr(qmp), numq, dsn, max_trans, pre_trans_execute, post_trans_execute, inner_pre_trans_execute, inner_post_trans_execute); return ret; } @@ -4103,6 +4120,21 @@ public class freeswitch { return ret; } + public static switch_status_t switch_channel_dtmf_lock(SWIGTYPE_p_switch_channel channel) { + switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_channel_dtmf_lock(SWIGTYPE_p_switch_channel.getCPtr(channel)); + return ret; + } + + public static switch_status_t switch_channel_try_dtmf_lock(SWIGTYPE_p_switch_channel channel) { + switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_channel_try_dtmf_lock(SWIGTYPE_p_switch_channel.getCPtr(channel)); + return ret; + } + + public static switch_status_t switch_channel_dtmf_unlock(SWIGTYPE_p_switch_channel channel) { + switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_channel_dtmf_unlock(SWIGTYPE_p_switch_channel.getCPtr(channel)); + return ret; + } + public static switch_status_t switch_channel_queue_dtmf(SWIGTYPE_p_switch_channel channel, switch_dtmf_t dtmf) { switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_channel_queue_dtmf(SWIGTYPE_p_switch_channel.getCPtr(channel), switch_dtmf_t.getCPtr(dtmf)); return ret; @@ -4283,6 +4315,14 @@ public class freeswitch { return ret; } + public static void switch_channel_state_thread_lock(SWIGTYPE_p_switch_channel channel) { + freeswitchPINVOKE.switch_channel_state_thread_lock(SWIGTYPE_p_switch_channel.getCPtr(channel)); + } + + public static void switch_channel_state_thread_unlock(SWIGTYPE_p_switch_channel channel) { + freeswitchPINVOKE.switch_channel_state_thread_unlock(SWIGTYPE_p_switch_channel.getCPtr(channel)); + } + public static switch_status_t switch_buffer_create(SWIGTYPE_p_apr_pool_t pool, SWIGTYPE_p_p_switch_buffer buffer, SWIGTYPE_p_switch_size_t max_len) { switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_buffer_create(SWIGTYPE_p_apr_pool_t.getCPtr(pool), SWIGTYPE_p_p_switch_buffer.getCPtr(buffer), SWIGTYPE_p_switch_size_t.getCPtr(max_len)); if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); @@ -5228,6 +5268,11 @@ public class freeswitch { return ret; } + public static switch_bool_t switch_ivr_uuid_force_exists(string uuid) { + switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_ivr_uuid_force_exists(uuid); + return ret; + } + public static switch_status_t switch_ivr_dmachine_last_ping(SWIGTYPE_p_switch_ivr_dmachine dmachine) { switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_dmachine_last_ping(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine)); return ret; @@ -5984,8 +6029,8 @@ public class freeswitch { return ret; } - public static int switch_xml_std_datetime_check(switch_xml xcond, SWIGTYPE_p_int offset) { - int ret = freeswitchPINVOKE.switch_xml_std_datetime_check(switch_xml.getCPtr(xcond), SWIGTYPE_p_int.getCPtr(offset)); + public static int switch_xml_std_datetime_check(switch_xml xcond, SWIGTYPE_p_int offset, string tzname) { + int ret = freeswitchPINVOKE.switch_xml_std_datetime_check(switch_xml.getCPtr(xcond), SWIGTYPE_p_int.getCPtr(offset), tzname); return ret; } @@ -6169,6 +6214,11 @@ public class freeswitch { freeswitchPINVOKE.consoleCleanLog(msg); } + public static bool running() { + bool ret = freeswitchPINVOKE.running(); + return ret; + } + public static bool email(string to, string from, string headers, string body, string file, string convert_cmd, string convert_ext) { bool ret = freeswitchPINVOKE.email(to, from, headers, body, file, convert_cmd, convert_ext); return ret; @@ -6289,6 +6339,7 @@ public class freeswitch { public static readonly string SWITCH_CHANNEL_EXECUTE_ON_TONE_DETECT_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_TONE_DETECT_VARIABLE_get(); public static readonly string SWITCH_CHANNEL_EXECUTE_ON_ORIGINATE_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_ORIGINATE_VARIABLE_get(); public static readonly string SWITCH_CHANNEL_EXECUTE_ON_POST_ORIGINATE_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_POST_ORIGINATE_VARIABLE_get(); + public static readonly string SWITCH_CHANNEL_EXECUTE_ON_PRE_ORIGINATE_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_EXECUTE_ON_PRE_ORIGINATE_VARIABLE_get(); public static readonly string SWITCH_CHANNEL_API_ON_ANSWER_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_API_ON_ANSWER_VARIABLE_get(); public static readonly string SWITCH_CHANNEL_API_ON_PRE_ANSWER_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_API_ON_PRE_ANSWER_VARIABLE_get(); public static readonly string SWITCH_CHANNEL_API_ON_MEDIA_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_API_ON_MEDIA_VARIABLE_get(); @@ -6296,6 +6347,7 @@ public class freeswitch { public static readonly string SWITCH_CHANNEL_API_ON_TONE_DETECT_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_API_ON_TONE_DETECT_VARIABLE_get(); public static readonly string SWITCH_CHANNEL_API_ON_ORIGINATE_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_API_ON_ORIGINATE_VARIABLE_get(); public static readonly string SWITCH_CHANNEL_API_ON_POST_ORIGINATE_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_API_ON_POST_ORIGINATE_VARIABLE_get(); + public static readonly string SWITCH_CHANNEL_API_ON_PRE_ORIGINATE_VARIABLE = freeswitchPINVOKE.SWITCH_CHANNEL_API_ON_PRE_ORIGINATE_VARIABLE_get(); public static readonly string SWITCH_CALL_TIMEOUT_VARIABLE = freeswitchPINVOKE.SWITCH_CALL_TIMEOUT_VARIABLE_get(); public static readonly string SWITCH_HOLDING_UUID_VARIABLE = freeswitchPINVOKE.SWITCH_HOLDING_UUID_VARIABLE_get(); public static readonly string SWITCH_SOFT_HOLDING_UUID_VARIABLE = freeswitchPINVOKE.SWITCH_SOFT_HOLDING_UUID_VARIABLE_get(); @@ -6354,6 +6406,7 @@ public class freeswitch { public static readonly int SWITCH_BITS_PER_BYTE = freeswitchPINVOKE.SWITCH_BITS_PER_BYTE_get(); public static readonly int SWITCH_DEFAULT_FILE_BUFFER_LEN = freeswitchPINVOKE.SWITCH_DEFAULT_FILE_BUFFER_LEN_get(); public static readonly int SWITCH_DTMF_LOG_LEN = freeswitchPINVOKE.SWITCH_DTMF_LOG_LEN_get(); + public static readonly int SWITCH_MAX_TRANS = freeswitchPINVOKE.SWITCH_MAX_TRANS_get(); public static readonly int SWITCH_MAX_STACKS = freeswitchPINVOKE.SWITCH_MAX_STACKS_get(); public static readonly int SWITCH_THREAD_STACKSIZE = freeswitchPINVOKE.SWITCH_THREAD_STACKSIZE_get(); public static readonly int SWITCH_SYSTEM_THREAD_STACKSIZE = freeswitchPINVOKE.SWITCH_SYSTEM_THREAD_STACKSIZE_get(); @@ -6868,6 +6921,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_SWITCH_CHANNEL_EXECUTE_ON_POST_ORIGINATE_VARIABLE_get")] public static extern string SWITCH_CHANNEL_EXECUTE_ON_POST_ORIGINATE_VARIABLE_get(); + [DllImport("mod_managed", EntryPoint="CSharp_SWITCH_CHANNEL_EXECUTE_ON_PRE_ORIGINATE_VARIABLE_get")] + public static extern string SWITCH_CHANNEL_EXECUTE_ON_PRE_ORIGINATE_VARIABLE_get(); + [DllImport("mod_managed", EntryPoint="CSharp_SWITCH_CHANNEL_API_ON_ANSWER_VARIABLE_get")] public static extern string SWITCH_CHANNEL_API_ON_ANSWER_VARIABLE_get(); @@ -6889,6 +6945,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_SWITCH_CHANNEL_API_ON_POST_ORIGINATE_VARIABLE_get")] public static extern string SWITCH_CHANNEL_API_ON_POST_ORIGINATE_VARIABLE_get(); + [DllImport("mod_managed", EntryPoint="CSharp_SWITCH_CHANNEL_API_ON_PRE_ORIGINATE_VARIABLE_get")] + public static extern string SWITCH_CHANNEL_API_ON_PRE_ORIGINATE_VARIABLE_get(); + [DllImport("mod_managed", EntryPoint="CSharp_SWITCH_CALL_TIMEOUT_VARIABLE_get")] public static extern string SWITCH_CALL_TIMEOUT_VARIABLE_get(); @@ -7063,6 +7122,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_SWITCH_DTMF_LOG_LEN_get")] public static extern int SWITCH_DTMF_LOG_LEN_get(); + [DllImport("mod_managed", EntryPoint="CSharp_SWITCH_MAX_TRANS_get")] + public static extern int SWITCH_MAX_TRANS_get(); + [DllImport("mod_managed", EntryPoint="CSharp_switch_dtmf_t_digit_set")] public static extern void switch_dtmf_t_digit_set(HandleRef jarg1, char jarg2); @@ -7255,6 +7317,12 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_directories_sounds_dir_get")] public static extern string switch_directories_sounds_dir_get(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_directories_lib_dir_set")] + public static extern void switch_directories_lib_dir_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_directories_lib_dir_get")] + public static extern string switch_directories_lib_dir_get(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_new_switch_directories")] public static extern IntPtr new_switch_directories(); @@ -8575,6 +8643,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_get_channel")] public static extern IntPtr switch_core_session_get_channel(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_get_mutex")] + public static extern IntPtr switch_core_session_get_mutex(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_wake_session_thread")] public static extern int switch_core_session_wake_session_thread(HandleRef jarg1); @@ -8650,8 +8721,8 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_hupall")] public static extern void switch_core_session_hupall(int jarg1); - [DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_hupall_matching_var")] - public static extern void switch_core_session_hupall_matching_var(string jarg1, string jarg2, int jarg3); + [DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_hupall_matching_var_ans")] + public static extern uint switch_core_session_hupall_matching_var_ans(string jarg1, string jarg2, int jarg3, int jarg4); [DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_findall_matching_var")] public static extern IntPtr switch_core_session_findall_matching_var(string jarg1, string jarg2); @@ -9103,6 +9174,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_core_ready")] public static extern int switch_core_ready(); + [DllImport("mod_managed", EntryPoint="CSharp_switch_core_running")] + public static extern int switch_core_running(); + [DllImport("mod_managed", EntryPoint="CSharp_switch_core_ready_inbound")] public static extern int switch_core_ready_inbound(); @@ -9280,11 +9354,11 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_preprocess_session")] public static extern int switch_ivr_preprocess_session(HandleRef jarg1, string jarg2); - [DllImport("mod_managed", EntryPoint="CSharp_switch_core_sqldb_stop_thread")] - public static extern void switch_core_sqldb_stop_thread(); + [DllImport("mod_managed", EntryPoint="CSharp_switch_core_sqldb_pause")] + public static extern void switch_core_sqldb_pause(); - [DllImport("mod_managed", EntryPoint="CSharp_switch_core_sqldb_start_thread")] - public static extern void switch_core_sqldb_start_thread(); + [DllImport("mod_managed", EntryPoint="CSharp_switch_core_sqldb_resume")] + public static extern void switch_core_sqldb_resume(); [DllImport("mod_managed", EntryPoint="CSharp_CACHE_DB_LEN_get")] public static extern int CACHE_DB_LEN_get(); @@ -9508,6 +9582,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_core_recovery_flush")] public static extern void switch_core_recovery_flush(string jarg1, string jarg2); + [DllImport("mod_managed", EntryPoint="CSharp_switch_sql_queue_manager_size")] + public static extern int switch_sql_queue_manager_size(HandleRef jarg1, uint jarg2); + [DllImport("mod_managed", EntryPoint="CSharp_switch_sql_queue_manager_push_confirm")] public static extern int switch_sql_queue_manager_push_confirm(HandleRef jarg1, string jarg2, uint jarg3, int jarg4); @@ -9518,7 +9595,7 @@ class freeswitchPINVOKE { public static extern int switch_sql_queue_manager_destroy(HandleRef jarg1); [DllImport("mod_managed", EntryPoint="CSharp_switch_sql_queue_manager_init_name")] - public static extern int switch_sql_queue_manager_init_name(string jarg1, HandleRef jarg2, uint jarg3, string jarg4, string jarg5, string jarg6, string jarg7, string jarg8); + public static extern int switch_sql_queue_manager_init_name(string jarg1, HandleRef jarg2, uint jarg3, string jarg4, uint jarg5, string jarg6, string jarg7, string jarg8, string jarg9); [DllImport("mod_managed", EntryPoint="CSharp_switch_sql_queue_manager_start")] public static extern int switch_sql_queue_manager_start(HandleRef jarg1); @@ -12313,6 +12390,12 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_codec_session_get")] public static extern IntPtr switch_codec_session_get(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_codec_cur_frame_set")] + public static extern void switch_codec_cur_frame_set(HandleRef jarg1, HandleRef jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_codec_cur_frame_get")] + public static extern IntPtr switch_codec_cur_frame_get(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_new_switch_codec")] public static extern IntPtr new_switch_codec(); @@ -13078,6 +13161,15 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_channel_has_dtmf")] public static extern IntPtr switch_channel_has_dtmf(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_channel_dtmf_lock")] + public static extern int switch_channel_dtmf_lock(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_channel_try_dtmf_lock")] + public static extern int switch_channel_try_dtmf_lock(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_channel_dtmf_unlock")] + public static extern int switch_channel_dtmf_unlock(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_channel_queue_dtmf")] public static extern int switch_channel_queue_dtmf(HandleRef jarg1, HandleRef jarg2); @@ -13192,6 +13284,12 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_channel_get_hold_record")] public static extern IntPtr switch_channel_get_hold_record(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_channel_state_thread_lock")] + public static extern void switch_channel_state_thread_lock(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_channel_state_thread_unlock")] + public static extern void switch_channel_state_thread_unlock(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_buffer_create")] public static extern int switch_buffer_create(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3); @@ -14101,6 +14199,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_uuid_exists")] public static extern int switch_ivr_uuid_exists(string jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_uuid_force_exists")] + public static extern int switch_ivr_uuid_force_exists(string jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_last_ping")] public static extern int switch_ivr_dmachine_last_ping(HandleRef jarg1); @@ -14762,7 +14863,7 @@ class freeswitchPINVOKE { public static extern uint switch_xml_parse_section_string(string jarg1); [DllImport("mod_managed", EntryPoint="CSharp_switch_xml_std_datetime_check")] - public static extern int switch_xml_std_datetime_check(HandleRef jarg1, HandleRef jarg2); + public static extern int switch_xml_std_datetime_check(HandleRef jarg1, HandleRef jarg2, string jarg3); [DllImport("mod_managed", EntryPoint="CSharp_switch_xml_locate_language")] public static extern int switch_xml_locate_language(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3, HandleRef jarg4, HandleRef jarg5, HandleRef jarg6, string jarg7); @@ -15271,6 +15372,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_consoleCleanLog")] public static extern void consoleCleanLog(string jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_running")] + public static extern bool running(); + [DllImport("mod_managed", EntryPoint="CSharp_email")] public static extern bool email(string jarg1, string jarg2, string jarg3, string jarg4, string jarg5, string jarg6, string jarg7); @@ -21736,7 +21840,8 @@ namespace FreeSWITCH.Native { SAF_SUPPORT_NOMEDIA = (1 << 0), SAF_ROUTING_EXEC = (1 << 1), SAF_MEDIA_TAP = (1 << 2), - SAF_ZOMBIE_EXEC = (1 << 3) + SAF_ZOMBIE_EXEC = (1 << 3), + SAF_NO_LOOPBACK = (1 << 4) } } @@ -24116,6 +24221,7 @@ public enum switch_channel_flag_t { CF_OUTBOUND, CF_EARLY_MEDIA, CF_BRIDGE_ORIGINATOR, + CF_UUID_BRIDGE_ORIGINATOR, CF_TRANSFER, CF_ACCEPT_CNG, CF_REDIRECT, @@ -24197,6 +24303,7 @@ public enum switch_channel_flag_t { CF_NO_CDR, CF_EARLY_OK, CF_MEDIA_TRANS, + CF_HOLD_ON_BRIDGE, CF_FLAG_MAX } @@ -24876,6 +24983,17 @@ public class switch_codec : IDisposable { } } + public switch_frame cur_frame { + set { + freeswitchPINVOKE.switch_codec_cur_frame_set(swigCPtr, switch_frame.getCPtr(value)); + } + get { + IntPtr cPtr = freeswitchPINVOKE.switch_codec_cur_frame_get(swigCPtr); + switch_frame ret = (cPtr == IntPtr.Zero) ? null : new switch_frame(cPtr, false); + return ret; + } + } + public switch_codec() : this(freeswitchPINVOKE.new_switch_codec(), true) { } @@ -26639,6 +26757,16 @@ public class switch_directories : IDisposable { } } + public string lib_dir { + set { + freeswitchPINVOKE.switch_directories_lib_dir_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_directories_lib_dir_get(swigCPtr); + return ret; + } + } + public switch_directories() : this(freeswitchPINVOKE.new_switch_directories(), true) { } @@ -28678,6 +28806,23 @@ public class switch_hold_record_t : IDisposable { namespace FreeSWITCH.Native { +public enum switch_hup_type_t { + SHT_NONE = 0, + SHT_UNANSWERED = (1 << 0), + SHT_ANSWERED = (1 << 1) +} + +} +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.35 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +namespace FreeSWITCH.Native { + using System; using System.Runtime.InteropServices; diff --git a/src/mod/languages/mod_perl/freeswitch.pm b/src/mod/languages/mod_perl/freeswitch.pm index ffae0be801..17fdc67677 100644 --- a/src/mod/languages/mod_perl/freeswitch.pm +++ b/src/mod/languages/mod_perl/freeswitch.pm @@ -52,6 +52,7 @@ package freeswitch; *getGlobalVariable = *freeswitchc::getGlobalVariable; *consoleLog = *freeswitchc::consoleLog; *consoleCleanLog = *freeswitchc::consoleCleanLog; +*running = *freeswitchc::running; *email = *freeswitchc::email; *console_log = *freeswitchc::console_log; *console_clean_log = *freeswitchc::console_clean_log; diff --git a/src/mod/languages/mod_perl/mod_perl_wrap.cpp b/src/mod/languages/mod_perl/mod_perl_wrap.cpp index dd4b385299..e2ffffeea9 100644 --- a/src/mod/languages/mod_perl/mod_perl_wrap.cpp +++ b/src/mod/languages/mod_perl/mod_perl_wrap.cpp @@ -2051,6 +2051,24 @@ XS(_wrap_consoleCleanLog) { } +XS(_wrap_running) { + { + bool result; + int argvi = 0; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: running();"); + } + result = (bool)running(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + XS(_wrap_email) { { char *arg1 = (char *) 0 ; @@ -9642,6 +9660,7 @@ static swig_command_info swig_commands[] = { {"freeswitchc::getGlobalVariable", _wrap_getGlobalVariable}, {"freeswitchc::consoleLog", _wrap_consoleLog}, {"freeswitchc::consoleCleanLog", _wrap_consoleCleanLog}, +{"freeswitchc::running", _wrap_running}, {"freeswitchc::email", _wrap_email}, {"freeswitchc::new_IVRMenu", _wrap_new_IVRMenu}, {"freeswitchc::delete_IVRMenu", _wrap_delete_IVRMenu}, diff --git a/src/mod/languages/mod_python/freeswitch.py b/src/mod/languages/mod_python/freeswitch.py index 1df258dc0c..51e3e652f6 100644 --- a/src/mod/languages/mod_python/freeswitch.py +++ b/src/mod/languages/mod_python/freeswitch.py @@ -52,6 +52,7 @@ setGlobalVariable = _freeswitch.setGlobalVariable getGlobalVariable = _freeswitch.getGlobalVariable consoleLog = _freeswitch.consoleLog consoleCleanLog = _freeswitch.consoleCleanLog +running = _freeswitch.running email = _freeswitch.email class IVRMenu(_object): __swig_setmethods__ = {} diff --git a/src/mod/languages/mod_python/mod_python_wrap.cpp b/src/mod/languages/mod_python/mod_python_wrap.cpp index d2098edd1c..b12d4c7614 100644 --- a/src/mod/languages/mod_python/mod_python_wrap.cpp +++ b/src/mod/languages/mod_python/mod_python_wrap.cpp @@ -3133,6 +3133,19 @@ fail: } +SWIGINTERN PyObject *_wrap_running(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + bool result; + + if (!PyArg_ParseTuple(args,(char *)":running")) SWIG_fail; + result = (bool)running(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_email(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; @@ -9169,6 +9182,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"getGlobalVariable", _wrap_getGlobalVariable, METH_VARARGS, NULL}, { (char *)"consoleLog", _wrap_consoleLog, METH_VARARGS, NULL}, { (char *)"consoleCleanLog", _wrap_consoleCleanLog, METH_VARARGS, NULL}, + { (char *)"running", _wrap_running, METH_VARARGS, NULL}, { (char *)"email", _wrap_email, METH_VARARGS, NULL}, { (char *)"new_IVRMenu", _wrap_new_IVRMenu, METH_VARARGS, NULL}, { (char *)"delete_IVRMenu", _wrap_delete_IVRMenu, METH_VARARGS, NULL}, diff --git a/src/switch_core.c b/src/switch_core.c index 1cc0dd0569..23e08d857a 100644 --- a/src/switch_core.c +++ b/src/switch_core.c @@ -2428,6 +2428,11 @@ SWITCH_DECLARE(switch_core_flag_t) switch_core_flags(void) return runtime.flags; } +SWITCH_DECLARE(switch_bool_t) switch_core_running(void) +{ + return runtime.running ? SWITCH_TRUE : SWITCH_FALSE; +} + SWITCH_DECLARE(switch_bool_t) switch_core_ready(void) { return (switch_test_flag((&runtime), SCF_SHUTTING_DOWN) || switch_test_flag((&runtime), SCF_NO_NEW_SESSIONS) == SCF_NO_NEW_SESSIONS) ? SWITCH_FALSE : SWITCH_TRUE; diff --git a/src/switch_cpp.cpp b/src/switch_cpp.cpp index 64ca2fc120..f1ebe3f4e6 100644 --- a/src/switch_cpp.cpp +++ b/src/switch_cpp.cpp @@ -1205,6 +1205,11 @@ SWITCH_DECLARE(char *) getGlobalVariable(char *var_name) } +SWITCH_DECLARE(bool) running(void) +{ + return switch_core_running() ? true : false; +} + SWITCH_DECLARE(void) consoleLog(char *level_str, char *msg) { return console_log(level_str, msg);