mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
MODAPP-325 part 1
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14981 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -22136,17 +22136,19 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_park(void * jarg1, void * jarg2) {
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_collect_digits_callback(void * jarg1, void * jarg2, unsigned long jarg3) {
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_collect_digits_callback(void * jarg1, void * jarg2, unsigned long jarg3, unsigned long jarg4) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
switch_input_args_t *arg2 = (switch_input_args_t *) 0 ;
|
||||
uint32_t arg3 ;
|
||||
uint32_t arg4 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (switch_input_args_t *)jarg2;
|
||||
arg3 = (uint32_t)jarg3;
|
||||
result = (switch_status_t)switch_ivr_collect_digits_callback(arg1,arg2,arg3);
|
||||
arg4 = (uint32_t)jarg4;
|
||||
result = (switch_status_t)switch_ivr_collect_digits_callback(arg1,arg2,arg3,arg4);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
@@ -28912,7 +28914,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_CoreSession_SetTtsParameters(void * jarg1, ch
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_CoreSession_CollectDigits(void * jarg1, int jarg2) {
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_CoreSession_CollectDigits__SWIG_0(void * jarg1, int jarg2) {
|
||||
int jresult ;
|
||||
CoreSession *arg1 = (CoreSession *) 0 ;
|
||||
int arg2 ;
|
||||
@@ -28926,6 +28928,22 @@ SWIGEXPORT int SWIGSTDCALL CSharp_CoreSession_CollectDigits(void * jarg1, int ja
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_CoreSession_CollectDigits__SWIG_1(void * jarg1, int jarg2, int jarg3) {
|
||||
int jresult ;
|
||||
CoreSession *arg1 = (CoreSession *) 0 ;
|
||||
int arg2 ;
|
||||
int arg3 ;
|
||||
int result;
|
||||
|
||||
arg1 = (CoreSession *)jarg1;
|
||||
arg2 = (int)jarg2;
|
||||
arg3 = (int)jarg3;
|
||||
result = (int)(arg1)->collectDigits(arg2,arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_CoreSession_GetDigits__SWIG_0(void * jarg1, int jarg2, char * jarg3, int jarg4) {
|
||||
char * jresult ;
|
||||
CoreSession *arg1 = (CoreSession *) 0 ;
|
||||
|
||||
@@ -282,8 +282,13 @@ public class CoreSession : IDisposable {
|
||||
freeswitchPINVOKE.CoreSession_SetTtsParameters(swigCPtr, tts_name, voice_name);
|
||||
}
|
||||
|
||||
public int CollectDigits(int timeout) {
|
||||
int ret = freeswitchPINVOKE.CoreSession_CollectDigits(swigCPtr, timeout);
|
||||
public int CollectDigits(int abs_timeout) {
|
||||
int ret = freeswitchPINVOKE.CoreSession_CollectDigits__SWIG_0(swigCPtr, abs_timeout);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public int CollectDigits(int digit_timeout, int abs_timeout) {
|
||||
int ret = freeswitchPINVOKE.CoreSession_CollectDigits__SWIG_1(swigCPtr, digit_timeout, abs_timeout);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -3178,8 +3183,8 @@ public class freeswitch {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_ivr_collect_digits_callback(SWIGTYPE_p_switch_core_session session, switch_input_args_t args, uint timeout) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_collect_digits_callback(SWIGTYPE_p_switch_core_session.getCPtr(session), switch_input_args_t.getCPtr(args), timeout);
|
||||
public static switch_status_t switch_ivr_collect_digits_callback(SWIGTYPE_p_switch_core_session session, switch_input_args_t args, uint digit_timeout, uint abs_timeout) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_collect_digits_callback(SWIGTYPE_p_switch_core_session.getCPtr(session), switch_input_args_t.getCPtr(args), digit_timeout, abs_timeout);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -9901,7 +9906,7 @@ class freeswitchPINVOKE {
|
||||
public static extern int switch_ivr_park(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_collect_digits_callback")]
|
||||
public static extern int switch_ivr_collect_digits_callback(HandleRef jarg1, HandleRef jarg2, uint jarg3);
|
||||
public static extern int switch_ivr_collect_digits_callback(HandleRef jarg1, HandleRef jarg2, uint jarg3, uint jarg4);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_collect_digits_count")]
|
||||
public static extern int switch_ivr_collect_digits_count(HandleRef jarg1, string jarg2, HandleRef jarg3, HandleRef jarg4, string jarg5, string jarg6, uint jarg7, uint jarg8, uint jarg9);
|
||||
@@ -11430,8 +11435,11 @@ class freeswitchPINVOKE {
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_CoreSession_SetTtsParameters")]
|
||||
public static extern void CoreSession_SetTtsParameters(HandleRef jarg1, string jarg2, string jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_CoreSession_CollectDigits")]
|
||||
public static extern int CoreSession_CollectDigits(HandleRef jarg1, int jarg2);
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_CoreSession_CollectDigits__SWIG_0")]
|
||||
public static extern int CoreSession_CollectDigits__SWIG_0(HandleRef jarg1, int jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_CoreSession_CollectDigits__SWIG_1")]
|
||||
public static extern int CoreSession_CollectDigits__SWIG_1(HandleRef jarg1, int jarg2, int jarg3);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_CoreSession_GetDigits__SWIG_0")]
|
||||
public static extern string CoreSession_GetDigits__SWIG_0(HandleRef jarg1, int jarg2, string jarg3, int jarg4);
|
||||
|
||||
@@ -1463,7 +1463,9 @@ static JSBool session_collect_input(JSContext * cx, JSObject * obj, uintN argc,
|
||||
switch_channel_t *channel;
|
||||
void *bp = NULL;
|
||||
int len = 0;
|
||||
int32 to = 0;
|
||||
int32 abs_timeout = 0;
|
||||
int32 digit_timeout = 0;
|
||||
|
||||
switch_input_callback_function_t dtmf_func = NULL;
|
||||
struct input_callback_state cb_state = { 0 };
|
||||
JSFunction *function;
|
||||
@@ -1494,8 +1496,11 @@ static JSBool session_collect_input(JSContext * cx, JSObject * obj, uintN argc,
|
||||
}
|
||||
}
|
||||
|
||||
if (argc > 2) {
|
||||
JS_ValueToInt32(jss->cx, argv[2], &to);
|
||||
if (argc == 3) {
|
||||
JS_ValueToInt32(jss->cx, argv[2], &abs_timeout);
|
||||
} else if (argc > 3) {
|
||||
JS_ValueToInt32(jss->cx, argv[2], &digit_timeout);
|
||||
JS_ValueToInt32(jss->cx, argv[3], &abs_timeout);
|
||||
}
|
||||
|
||||
cb_state.saveDepth = JS_SuspendRequest(cx);
|
||||
@@ -1503,7 +1508,7 @@ static JSBool session_collect_input(JSContext * cx, JSObject * obj, uintN argc,
|
||||
args.buf = bp;
|
||||
args.buflen = len;
|
||||
|
||||
switch_ivr_collect_digits_callback(jss->session, &args, to);
|
||||
switch_ivr_collect_digits_callback(jss->session, &args, digit_timeout, abs_timeout);
|
||||
JS_ResumeRequest(cx, cb_state.saveDepth);
|
||||
check_hangup_hook(jss, &ret);
|
||||
*rval = cb_state.ret;
|
||||
|
||||
Reference in New Issue
Block a user