try not to break backwards and api compatibility refer to rev 11211

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11224 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West 2009-01-15 15:38:32 +00:00
parent 21cdd48aa6
commit dbb40708c5
10 changed files with 807 additions and 22 deletions

View File

@ -303,7 +303,7 @@ SWITCH_DECLARE(void) consoleCleanLog(char *msg);
int max_digits,
int max_tries,
int timeout, char *terminators, char *audio_files, char *bad_input_audio_files,
char *var_name, char *digits_regex);
char *digits_regex, const char *var_name = NULL);
/** \brief Play a file that resides on disk into the channel
*

View File

@ -233,8 +233,12 @@ public class CoreSession {
return freeswitchJNI.CoreSession_read(swigCPtr, this, min_digits, max_digits, prompt_audio_file, timeout, valid_terminators);
}
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 var_name, String digits_regex) {
return freeswitchJNI.CoreSession_playAndGetDigits(swigCPtr, this, min_digits, max_digits, max_tries, timeout, terminators, audio_files, bad_input_audio_files, var_name, digits_regex);
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);
}
public int streamFile(String file, int starting_sample_count) {

View File

@ -133,7 +133,8 @@ class freeswitchJNI {
public final static native int CoreSession_transfer__SWIG_1(long jarg1, CoreSession jarg1_, String jarg2, String jarg3);
public final static native int CoreSession_transfer__SWIG_2(long jarg1, CoreSession jarg1_, String jarg2);
public final static native String CoreSession_read(long jarg1, CoreSession jarg1_, int jarg2, int jarg3, String jarg4, int jarg5, String jarg6);
public final static native String CoreSession_playAndGetDigits(long jarg1, CoreSession jarg1_, int jarg2, int jarg3, int jarg4, int jarg5, String jarg6, String jarg7, String jarg8, String jarg9, String jarg10);
public final static native String CoreSession_playAndGetDigits__SWIG_0(long jarg1, CoreSession jarg1_, int jarg2, int jarg3, int jarg4, int jarg5, String jarg6, String jarg7, String jarg8, String jarg9, String jarg10);
public final static native String CoreSession_playAndGetDigits__SWIG_1(long jarg1, CoreSession jarg1_, int jarg2, int jarg3, int jarg4, int jarg5, String jarg6, String jarg7, String jarg8, String jarg9);
public final static native int CoreSession_streamFile__SWIG_0(long jarg1, CoreSession jarg1_, String jarg2, int jarg3);
public final static native int CoreSession_streamFile__SWIG_1(long jarg1, CoreSession jarg1_, String jarg2);
public final static native int CoreSession_sleep__SWIG_0(long jarg1, CoreSession jarg1_, int jarg2, int jarg3);

View File

@ -2577,7 +2577,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1r
}
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1playAndGetDigits(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4, jint jarg5, jstring jarg6, jstring jarg7, jstring jarg8, jstring jarg9, jstring jarg10) {
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1playAndGetDigits_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4, jint jarg5, jstring jarg6, jstring jarg7, jstring jarg8, jstring jarg9, jstring jarg10) {
jstring jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ;
@ -2624,7 +2624,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1p
arg10 = (char *)jenv->GetStringUTFChars(jarg10, 0);
if (!arg10) return 0;
}
result = (char *)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
result = (char *)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(char const *)arg10);
if(result) jresult = jenv->NewStringUTF((const char *)result);
if (arg6) jenv->ReleaseStringUTFChars(jarg6, (const char *)arg6);
if (arg7) jenv->ReleaseStringUTFChars(jarg7, (const char *)arg7);
@ -2635,6 +2635,57 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1p
}
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1playAndGetDigits_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4, jint jarg5, jstring jarg6, jstring jarg7, jstring jarg8, jstring jarg9) {
jstring jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ;
int arg3 ;
int arg4 ;
int arg5 ;
char *arg6 = (char *) 0 ;
char *arg7 = (char *) 0 ;
char *arg8 = (char *) 0 ;
char *arg9 = (char *) 0 ;
char *result = 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
arg2 = (int)jarg2;
arg3 = (int)jarg3;
arg4 = (int)jarg4;
arg5 = (int)jarg5;
arg6 = 0;
if (jarg6) {
arg6 = (char *)jenv->GetStringUTFChars(jarg6, 0);
if (!arg6) return 0;
}
arg7 = 0;
if (jarg7) {
arg7 = (char *)jenv->GetStringUTFChars(jarg7, 0);
if (!arg7) return 0;
}
arg8 = 0;
if (jarg8) {
arg8 = (char *)jenv->GetStringUTFChars(jarg8, 0);
if (!arg8) return 0;
}
arg9 = 0;
if (jarg9) {
arg9 = (char *)jenv->GetStringUTFChars(jarg9, 0);
if (!arg9) return 0;
}
result = (char *)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
if(result) jresult = jenv->NewStringUTF((const char *)result);
if (arg6) jenv->ReleaseStringUTFChars(jarg6, (const char *)arg6);
if (arg7) jenv->ReleaseStringUTFChars(jarg7, (const char *)arg7);
if (arg8) jenv->ReleaseStringUTFChars(jarg8, (const char *)arg8);
if (arg9) jenv->ReleaseStringUTFChars(jarg9, (const char *)arg9);
return jresult;
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1streamFile_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;

View File

@ -5913,7 +5913,7 @@ fail:
}
static int _wrap_CoreSession_playAndGetDigits(lua_State* L) {
static int _wrap_CoreSession_playAndGetDigits__SWIG_0(lua_State* L) {
int SWIG_arg = -1;
CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ;
@ -5937,7 +5937,7 @@ static int _wrap_CoreSession_playAndGetDigits(lua_State* L) {
if(!lua_isstring(L,7)) SWIG_fail_arg("playAndGetDigits",7,"char *");
if(!lua_isstring(L,8)) SWIG_fail_arg("playAndGetDigits",8,"char *");
if(!lua_isstring(L,9)) SWIG_fail_arg("playAndGetDigits",9,"char *");
if(!lua_isstring(L,10)) SWIG_fail_arg("playAndGetDigits",10,"char *");
if(!lua_isstring(L,10)) SWIG_fail_arg("playAndGetDigits",10,"char const *");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
SWIG_fail_ptr("CoreSession_playAndGetDigits",1,SWIGTYPE_p_CoreSession);
@ -5952,7 +5952,7 @@ static int _wrap_CoreSession_playAndGetDigits(lua_State* L) {
arg8 = (char *)lua_tostring(L, 8);
arg9 = (char *)lua_tostring(L, 9);
arg10 = (char *)lua_tostring(L, 10);
result = (char *)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
result = (char *)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(char const *)arg10);
SWIG_arg=0;
lua_pushstring(L,(const char*)result); SWIG_arg++;
return SWIG_arg;
@ -5965,6 +5965,181 @@ fail:
}
static int _wrap_CoreSession_playAndGetDigits__SWIG_1(lua_State* L) {
int SWIG_arg = -1;
CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ;
int arg3 ;
int arg4 ;
int arg5 ;
char *arg6 = (char *) 0 ;
char *arg7 = (char *) 0 ;
char *arg8 = (char *) 0 ;
char *arg9 = (char *) 0 ;
char *result = 0 ;
SWIG_check_num_args("playAndGetDigits",9,9)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("playAndGetDigits",1,"CoreSession *");
if(!lua_isnumber(L,2)) SWIG_fail_arg("playAndGetDigits",2,"int");
if(!lua_isnumber(L,3)) SWIG_fail_arg("playAndGetDigits",3,"int");
if(!lua_isnumber(L,4)) SWIG_fail_arg("playAndGetDigits",4,"int");
if(!lua_isnumber(L,5)) SWIG_fail_arg("playAndGetDigits",5,"int");
if(!lua_isstring(L,6)) SWIG_fail_arg("playAndGetDigits",6,"char *");
if(!lua_isstring(L,7)) SWIG_fail_arg("playAndGetDigits",7,"char *");
if(!lua_isstring(L,8)) SWIG_fail_arg("playAndGetDigits",8,"char *");
if(!lua_isstring(L,9)) SWIG_fail_arg("playAndGetDigits",9,"char *");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
SWIG_fail_ptr("CoreSession_playAndGetDigits",1,SWIGTYPE_p_CoreSession);
}
arg2 = (int)lua_tonumber(L, 2);
arg3 = (int)lua_tonumber(L, 3);
arg4 = (int)lua_tonumber(L, 4);
arg5 = (int)lua_tonumber(L, 5);
arg6 = (char *)lua_tostring(L, 6);
arg7 = (char *)lua_tostring(L, 7);
arg8 = (char *)lua_tostring(L, 8);
arg9 = (char *)lua_tostring(L, 9);
result = (char *)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
SWIG_arg=0;
lua_pushstring(L,(const char*)result); SWIG_arg++;
return SWIG_arg;
if(0) SWIG_fail;
fail:
lua_error(L);
return SWIG_arg;
}
static int _wrap_CoreSession_playAndGetDigits(lua_State* L) {
int argc;
int argv[11]={
1,2,3,4,5,6,7,8,9,10,11
};
argc = lua_gettop(L);
if (argc == 9) {
int _v;
{
void *ptr;
if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) {
_v = 0;
} else {
_v = 1;
}
}
if (_v) {
{
_v = lua_isnumber(L,argv[1]);
}
if (_v) {
{
_v = lua_isnumber(L,argv[2]);
}
if (_v) {
{
_v = lua_isnumber(L,argv[3]);
}
if (_v) {
{
_v = lua_isnumber(L,argv[4]);
}
if (_v) {
{
_v = lua_isstring(L,argv[5]);
}
if (_v) {
{
_v = lua_isstring(L,argv[6]);
}
if (_v) {
{
_v = lua_isstring(L,argv[7]);
}
if (_v) {
{
_v = lua_isstring(L,argv[8]);
}
if (_v) {
return _wrap_CoreSession_playAndGetDigits__SWIG_1(L);
}
}
}
}
}
}
}
}
}
}
if (argc == 10) {
int _v;
{
void *ptr;
if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) {
_v = 0;
} else {
_v = 1;
}
}
if (_v) {
{
_v = lua_isnumber(L,argv[1]);
}
if (_v) {
{
_v = lua_isnumber(L,argv[2]);
}
if (_v) {
{
_v = lua_isnumber(L,argv[3]);
}
if (_v) {
{
_v = lua_isnumber(L,argv[4]);
}
if (_v) {
{
_v = lua_isstring(L,argv[5]);
}
if (_v) {
{
_v = lua_isstring(L,argv[6]);
}
if (_v) {
{
_v = lua_isstring(L,argv[7]);
}
if (_v) {
{
_v = lua_isstring(L,argv[8]);
}
if (_v) {
{
_v = lua_isstring(L,argv[9]);
}
if (_v) {
return _wrap_CoreSession_playAndGetDigits__SWIG_0(L);
}
}
}
}
}
}
}
}
}
}
}
lua_pushstring(L,"No matching function for overloaded 'CoreSession_playAndGetDigits'");
lua_error(L);return 0;
}
static int _wrap_CoreSession_streamFile__SWIG_0(lua_State* L) {
int SWIG_arg = -1;
CoreSession *arg1 = (CoreSession *) 0 ;

View File

@ -27368,7 +27368,7 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_CoreSession_PlayAndGetDigits(void * jarg1,
char *arg7 = (char *) 0 ;
char *arg8 = (char *) 0 ;
char *arg9 = (char *) 0 ;
char *arg10 = (char *) 0 ;
char *arg10 = (char *) NULL ;
char *result = 0 ;
arg1 = (CoreSession *)jarg1;
@ -27381,7 +27381,7 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_CoreSession_PlayAndGetDigits(void * jarg1,
arg8 = (char *)jarg8;
arg9 = (char *)jarg9;
arg10 = (char *)jarg10;
result = (char *)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
result = (char *)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(char const *)arg10);
jresult = SWIG_csharp_string_callback((const char *)result);
return jresult;
}

View File

@ -282,8 +282,8 @@ public class CoreSession : IDisposable {
return ret;
}
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 var_name, string digits_regex) {
string ret = freeswitchPINVOKE.CoreSession_PlayAndGetDigits(swigCPtr, min_digits, max_digits, max_tries, timeout, terminators, audio_files, bad_input_audio_files, var_name, digits_regex);
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) {
string ret = freeswitchPINVOKE.CoreSession_PlayAndGetDigits(swigCPtr, min_digits, max_digits, max_tries, timeout, terminators, audio_files, bad_input_audio_files, digits_regex, var_name);
return ret;
}

View File

@ -7858,7 +7858,7 @@ XS(_wrap_CoreSession_read) {
}
XS(_wrap_CoreSession_playAndGetDigits) {
XS(_wrap_CoreSession_playAndGetDigits__SWIG_0) {
{
CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ;
@ -7900,7 +7900,7 @@ XS(_wrap_CoreSession_playAndGetDigits) {
dXSARGS;
if ((items < 10) || (items > 10)) {
SWIG_croak("Usage: CoreSession_playAndGetDigits(self,min_digits,max_digits,max_tries,timeout,terminators,audio_files,bad_input_audio_files,var_name,digits_regex);");
SWIG_croak("Usage: CoreSession_playAndGetDigits(self,min_digits,max_digits,max_tries,timeout,terminators,audio_files,bad_input_audio_files,digits_regex,var_name);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
if (!SWIG_IsOK(res1)) {
@ -7949,10 +7949,10 @@ XS(_wrap_CoreSession_playAndGetDigits) {
arg9 = reinterpret_cast< char * >(buf9);
res10 = SWIG_AsCharPtrAndSize(ST(9), &buf10, NULL, &alloc10);
if (!SWIG_IsOK(res10)) {
SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "CoreSession_playAndGetDigits" "', argument " "10"" of type '" "char *""'");
SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "CoreSession_playAndGetDigits" "', argument " "10"" of type '" "char const *""'");
}
arg10 = reinterpret_cast< char * >(buf10);
result = (char *)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
result = (char *)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(char const *)arg10);
ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
@ -7981,6 +7981,332 @@ XS(_wrap_CoreSession_playAndGetDigits) {
}
XS(_wrap_CoreSession_playAndGetDigits__SWIG_1) {
{
CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ;
int arg3 ;
int arg4 ;
int arg5 ;
char *arg6 = (char *) 0 ;
char *arg7 = (char *) 0 ;
char *arg8 = (char *) 0 ;
char *arg9 = (char *) 0 ;
char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
int val3 ;
int ecode3 = 0 ;
int val4 ;
int ecode4 = 0 ;
int val5 ;
int ecode5 = 0 ;
int res6 ;
char *buf6 = 0 ;
int alloc6 = 0 ;
int res7 ;
char *buf7 = 0 ;
int alloc7 = 0 ;
int res8 ;
char *buf8 = 0 ;
int alloc8 = 0 ;
int res9 ;
char *buf9 = 0 ;
int alloc9 = 0 ;
int argvi = 0;
dXSARGS;
if ((items < 9) || (items > 9)) {
SWIG_croak("Usage: CoreSession_playAndGetDigits(self,min_digits,max_digits,max_tries,timeout,terminators,audio_files,bad_input_audio_files,digits_regex);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_playAndGetDigits" "', argument " "1"" of type '" "CoreSession *""'");
}
arg1 = reinterpret_cast< CoreSession * >(argp1);
ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_playAndGetDigits" "', argument " "2"" of type '" "int""'");
}
arg2 = static_cast< int >(val2);
ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_playAndGetDigits" "', argument " "3"" of type '" "int""'");
}
arg3 = static_cast< int >(val3);
ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
if (!SWIG_IsOK(ecode4)) {
SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_playAndGetDigits" "', argument " "4"" of type '" "int""'");
}
arg4 = static_cast< int >(val4);
ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
if (!SWIG_IsOK(ecode5)) {
SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoreSession_playAndGetDigits" "', argument " "5"" of type '" "int""'");
}
arg5 = static_cast< int >(val5);
res6 = SWIG_AsCharPtrAndSize(ST(5), &buf6, NULL, &alloc6);
if (!SWIG_IsOK(res6)) {
SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "CoreSession_playAndGetDigits" "', argument " "6"" of type '" "char *""'");
}
arg6 = reinterpret_cast< char * >(buf6);
res7 = SWIG_AsCharPtrAndSize(ST(6), &buf7, NULL, &alloc7);
if (!SWIG_IsOK(res7)) {
SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CoreSession_playAndGetDigits" "', argument " "7"" of type '" "char *""'");
}
arg7 = reinterpret_cast< char * >(buf7);
res8 = SWIG_AsCharPtrAndSize(ST(7), &buf8, NULL, &alloc8);
if (!SWIG_IsOK(res8)) {
SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CoreSession_playAndGetDigits" "', argument " "8"" of type '" "char *""'");
}
arg8 = reinterpret_cast< char * >(buf8);
res9 = SWIG_AsCharPtrAndSize(ST(8), &buf9, NULL, &alloc9);
if (!SWIG_IsOK(res9)) {
SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "CoreSession_playAndGetDigits" "', argument " "9"" of type '" "char *""'");
}
arg9 = reinterpret_cast< char * >(buf9);
result = (char *)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
if (alloc8 == SWIG_NEWOBJ) delete[] buf8;
if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
XSRETURN(argvi);
fail:
if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
if (alloc8 == SWIG_NEWOBJ) delete[] buf8;
if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
SWIG_croak_null();
}
}
XS(_wrap_CoreSession_playAndGetDigits) {
dXSARGS;
{
unsigned long _index = 0;
SWIG_TypeRank _rank = 0;
if (items == 9) {
SWIG_TypeRank _ranki = 0;
SWIG_TypeRank _rankm = 0;
SWIG_TypeRank _pi = 1;
int _v = 0;
{
void *vptr = 0;
int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_1;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
{
int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
_v = SWIG_CheckState(res);
}
}
if (!_v) goto check_1;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
{
int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
_v = SWIG_CheckState(res);
}
}
if (!_v) goto check_1;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
{
int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
_v = SWIG_CheckState(res);
}
}
if (!_v) goto check_1;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
{
int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
_v = SWIG_CheckState(res);
}
}
if (!_v) goto check_1;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
int res = SWIG_AsCharPtrAndSize(ST(5), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_1;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
int res = SWIG_AsCharPtrAndSize(ST(6), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_1;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
int res = SWIG_AsCharPtrAndSize(ST(7), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_1;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
int res = SWIG_AsCharPtrAndSize(ST(8), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_1;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
if (!_index || (_ranki < _rank)) {
_rank = _ranki; _index = 1;
if (_rank == _rankm) goto dispatch;
}
}
check_1:
if (items == 10) {
SWIG_TypeRank _ranki = 0;
SWIG_TypeRank _rankm = 0;
SWIG_TypeRank _pi = 1;
int _v = 0;
{
void *vptr = 0;
int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_2;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
{
int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
_v = SWIG_CheckState(res);
}
}
if (!_v) goto check_2;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
{
int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
_v = SWIG_CheckState(res);
}
}
if (!_v) goto check_2;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
{
int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
_v = SWIG_CheckState(res);
}
}
if (!_v) goto check_2;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
{
int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
_v = SWIG_CheckState(res);
}
}
if (!_v) goto check_2;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
int res = SWIG_AsCharPtrAndSize(ST(5), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_2;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
int res = SWIG_AsCharPtrAndSize(ST(6), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_2;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
int res = SWIG_AsCharPtrAndSize(ST(7), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_2;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
int res = SWIG_AsCharPtrAndSize(ST(8), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_2;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
int res = SWIG_AsCharPtrAndSize(ST(9), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_2;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
if (!_index || (_ranki < _rank)) {
_rank = _ranki; _index = 2;
if (_rank == _rankm) goto dispatch;
}
}
check_2:
dispatch:
switch(_index) {
case 1:
++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_playAndGetDigits__SWIG_1); return;
case 2:
++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_playAndGetDigits__SWIG_0); return;
}
}
croak("No matching function for overloaded 'CoreSession_playAndGetDigits'");
XSRETURN(0);
}
XS(_wrap_CoreSession_streamFile__SWIG_0) {
{
CoreSession *arg1 = (CoreSession *) 0 ;

View File

@ -7783,7 +7783,7 @@ fail:
}
SWIGINTERN PyObject *_wrap_CoreSession_playAndGetDigits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
SWIGINTERN PyObject *_wrap_CoreSession_playAndGetDigits__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ;
@ -7880,10 +7880,10 @@ SWIGINTERN PyObject *_wrap_CoreSession_playAndGetDigits(PyObject *SWIGUNUSEDPARM
arg9 = reinterpret_cast< char * >(buf9);
res10 = SWIG_AsCharPtrAndSize(obj9, &buf10, NULL, &alloc10);
if (!SWIG_IsOK(res10)) {
SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "CoreSession_playAndGetDigits" "', argument " "10"" of type '" "char *""'");
SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "CoreSession_playAndGetDigits" "', argument " "10"" of type '" "char const *""'");
}
arg10 = reinterpret_cast< char * >(buf10);
result = (char *)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
result = (char *)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(char const *)arg10);
resultobj = SWIG_FromCharPtr((const char *)result);
if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
@ -7901,6 +7901,234 @@ fail:
}
SWIGINTERN PyObject *_wrap_CoreSession_playAndGetDigits__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ;
int arg3 ;
int arg4 ;
int arg5 ;
char *arg6 = (char *) 0 ;
char *arg7 = (char *) 0 ;
char *arg8 = (char *) 0 ;
char *arg9 = (char *) 0 ;
char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
int val3 ;
int ecode3 = 0 ;
int val4 ;
int ecode4 = 0 ;
int val5 ;
int ecode5 = 0 ;
int res6 ;
char *buf6 = 0 ;
int alloc6 = 0 ;
int res7 ;
char *buf7 = 0 ;
int alloc7 = 0 ;
int res8 ;
char *buf8 = 0 ;
int alloc8 = 0 ;
int res9 ;
char *buf9 = 0 ;
int alloc9 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
PyObject * obj3 = 0 ;
PyObject * obj4 = 0 ;
PyObject * obj5 = 0 ;
PyObject * obj6 = 0 ;
PyObject * obj7 = 0 ;
PyObject * obj8 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:CoreSession_playAndGetDigits",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_playAndGetDigits" "', argument " "1"" of type '" "CoreSession *""'");
}
arg1 = reinterpret_cast< CoreSession * >(argp1);
ecode2 = SWIG_AsVal_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_playAndGetDigits" "', argument " "2"" of type '" "int""'");
}
arg2 = static_cast< int >(val2);
ecode3 = SWIG_AsVal_int(obj2, &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_playAndGetDigits" "', argument " "3"" of type '" "int""'");
}
arg3 = static_cast< int >(val3);
ecode4 = SWIG_AsVal_int(obj3, &val4);
if (!SWIG_IsOK(ecode4)) {
SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_playAndGetDigits" "', argument " "4"" of type '" "int""'");
}
arg4 = static_cast< int >(val4);
ecode5 = SWIG_AsVal_int(obj4, &val5);
if (!SWIG_IsOK(ecode5)) {
SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoreSession_playAndGetDigits" "', argument " "5"" of type '" "int""'");
}
arg5 = static_cast< int >(val5);
res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
if (!SWIG_IsOK(res6)) {
SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "CoreSession_playAndGetDigits" "', argument " "6"" of type '" "char *""'");
}
arg6 = reinterpret_cast< char * >(buf6);
res7 = SWIG_AsCharPtrAndSize(obj6, &buf7, NULL, &alloc7);
if (!SWIG_IsOK(res7)) {
SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CoreSession_playAndGetDigits" "', argument " "7"" of type '" "char *""'");
}
arg7 = reinterpret_cast< char * >(buf7);
res8 = SWIG_AsCharPtrAndSize(obj7, &buf8, NULL, &alloc8);
if (!SWIG_IsOK(res8)) {
SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CoreSession_playAndGetDigits" "', argument " "8"" of type '" "char *""'");
}
arg8 = reinterpret_cast< char * >(buf8);
res9 = SWIG_AsCharPtrAndSize(obj8, &buf9, NULL, &alloc9);
if (!SWIG_IsOK(res9)) {
SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "CoreSession_playAndGetDigits" "', argument " "9"" of type '" "char *""'");
}
arg9 = reinterpret_cast< char * >(buf9);
result = (char *)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
resultobj = SWIG_FromCharPtr((const char *)result);
if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
if (alloc8 == SWIG_NEWOBJ) delete[] buf8;
if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
return resultobj;
fail:
if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
if (alloc8 == SWIG_NEWOBJ) delete[] buf8;
if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
return NULL;
}
SWIGINTERN PyObject *_wrap_CoreSession_playAndGetDigits(PyObject *self, PyObject *args) {
int argc;
PyObject *argv[11];
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = (int)PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 10); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
if (argc == 9) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_int(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_int(argv[2], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_int(argv[3], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_int(argv[4], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
int res = SWIG_AsCharPtrAndSize(argv[6], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
int res = SWIG_AsCharPtrAndSize(argv[7], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
int res = SWIG_AsCharPtrAndSize(argv[8], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_CoreSession_playAndGetDigits__SWIG_1(self, args);
}
}
}
}
}
}
}
}
}
}
if (argc == 10) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_int(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_int(argv[2], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_int(argv[3], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_int(argv[4], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
int res = SWIG_AsCharPtrAndSize(argv[6], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
int res = SWIG_AsCharPtrAndSize(argv[7], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
int res = SWIG_AsCharPtrAndSize(argv[8], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
int res = SWIG_AsCharPtrAndSize(argv[9], 0, NULL, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_CoreSession_playAndGetDigits__SWIG_0(self, args);
}
}
}
}
}
}
}
}
}
}
}
fail:
SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_playAndGetDigits'.\n"
" Possible C/C++ prototypes are:\n"
" playAndGetDigits(CoreSession *,int,int,int,int,char *,char *,char *,char *,char const *)\n"
" playAndGetDigits(CoreSession *,int,int,int,int,char *,char *,char *,char *)\n");
return NULL;
}
SWIGINTERN PyObject *_wrap_CoreSession_streamFile__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ;

View File

@ -749,8 +749,8 @@ SWITCH_DECLARE(char *) CoreSession::playAndGetDigits(int min_digits,
char *terminators,
char *audio_files,
char *bad_input_audio_files,
char *var_name,
char *digits_regex)
char *digits_regex,
const char *var_name)
{
switch_status_t status;
sanity_check((char *)"");