This commit is contained in:
Mike Jerris 2016-12-30 15:57:28 -06:00
parent 4c543f883b
commit 47619cd01d
10 changed files with 270 additions and 378 deletions

View File

@ -126,6 +126,10 @@ public class CoreSession {
return freeswitchJNI.CoreSession_answer(swigCPtr, this);
}
public int print(String txt) {
return freeswitchJNI.CoreSession_print(swigCPtr, this, txt);
}
public int preAnswer() {
return freeswitchJNI.CoreSession_preAnswer(swigCPtr, this);
}
@ -219,10 +223,6 @@ public class CoreSession {
return freeswitchJNI.CoreSession_getDigits__SWIG_1(swigCPtr, this, maxdigits, terminators, timeout, interdigit);
}
public String getDigits(int maxdigits, String terminators, int timeout, int interdigit, int abstimeout) {
return freeswitchJNI.CoreSession_getDigits__SWIG_2(swigCPtr, this, maxdigits, terminators, timeout, interdigit, abstimeout);
}
public int transfer(String extension, String dialplan, String context) {
return freeswitchJNI.CoreSession_transfer(swigCPtr, this, extension, dialplan, context);
}

View File

@ -113,6 +113,7 @@ public class freeswitchJNI {
public final static native String CoreSession_voice_name_get(long jarg1, CoreSession jarg1_);
public final static native int CoreSession_insertFile(long jarg1, CoreSession jarg1_, String jarg2, String jarg3, int jarg4);
public final static native int CoreSession_answer(long jarg1, CoreSession jarg1_);
public final static native int CoreSession_print(long jarg1, CoreSession jarg1_, String jarg2);
public final static native int CoreSession_preAnswer(long jarg1, CoreSession jarg1_);
public final static native void CoreSession_hangup(long jarg1, CoreSession jarg1_, String jarg2);
public final static native void CoreSession_hangupState(long jarg1, CoreSession jarg1_);
@ -136,7 +137,6 @@ public class freeswitchJNI {
public final static native int CoreSession_collectDigits__SWIG_1(long jarg1, CoreSession jarg1_, int jarg2, int jarg3);
public final static native String CoreSession_getDigits__SWIG_0(long jarg1, CoreSession jarg1_, int jarg2, String jarg3, int jarg4);
public final static native String CoreSession_getDigits__SWIG_1(long jarg1, CoreSession jarg1_, int jarg2, String jarg3, int jarg4, int jarg5);
public final static native String CoreSession_getDigits__SWIG_2(long jarg1, CoreSession jarg1_, int jarg2, String jarg3, int jarg4, int jarg5, int jarg6);
public final static native int CoreSession_transfer(long jarg1, CoreSession jarg1_, String jarg2, String jarg3, String jarg4);
public final static native String CoreSession_read(long jarg1, CoreSession jarg1_, int jarg2, int jarg3, String jarg4, int jarg5, String jarg6, int jarg7);
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, int jarg11, String jarg12);

View File

@ -2166,6 +2166,28 @@ SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1answ
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1print(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
int result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
arg2 = 0;
if (jarg2) {
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return 0;
}
result = (int)(arg1)->print(arg2);
jresult = (jint)result;
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
return jresult;
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1preAnswer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
@ -2679,36 +2701,6 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1g
}
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1getDigits_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jstring jarg3, jint jarg4, jint jarg5, jint jarg6) {
jstring jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
int arg4 ;
int arg5 ;
int arg6 ;
char *result = 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
arg2 = (int)jarg2;
arg3 = 0;
if (jarg3) {
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
if (!arg3) return 0;
}
arg4 = (int)jarg4;
arg5 = (int)jarg5;
arg6 = (int)jarg6;
result = (char *)(arg1)->getDigits(arg2,arg3,arg4,arg5,arg6);
if (result) jresult = jenv->NewStringUTF((const char *)result);
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
return jresult;
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1transfer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;

View File

@ -4967,6 +4967,33 @@ fail:
}
static int _wrap_CoreSession_print(lua_State* L) {
int SWIG_arg = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
int result;
SWIG_check_num_args("CoreSession::print",2,2)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("CoreSession::print",1,"CoreSession *");
if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("CoreSession::print",2,"char *");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
SWIG_fail_ptr("CoreSession_print",1,SWIGTYPE_p_CoreSession);
}
arg2 = (char *)lua_tostring(L, 2);
result = (int)(arg1)->print(arg2);
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
return SWIG_arg;
if(0) SWIG_fail;
fail:
lua_error(L);
return SWIG_arg;
}
static int _wrap_CoreSession_preAnswer(lua_State* L) {
int SWIG_arg = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
@ -5718,49 +5745,10 @@ fail:
}
static int _wrap_CoreSession_getDigits__SWIG_2(lua_State* L) {
int SWIG_arg = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
int arg4 ;
int arg5 ;
int arg6 ;
char *result = 0 ;
SWIG_check_num_args("CoreSession::getDigits",6,6)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("CoreSession::getDigits",1,"CoreSession *");
if(!lua_isnumber(L,2)) SWIG_fail_arg("CoreSession::getDigits",2,"int");
if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("CoreSession::getDigits",3,"char *");
if(!lua_isnumber(L,4)) SWIG_fail_arg("CoreSession::getDigits",4,"int");
if(!lua_isnumber(L,5)) SWIG_fail_arg("CoreSession::getDigits",5,"int");
if(!lua_isnumber(L,6)) SWIG_fail_arg("CoreSession::getDigits",6,"int");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
SWIG_fail_ptr("CoreSession_getDigits",1,SWIGTYPE_p_CoreSession);
}
arg2 = (int)lua_tonumber(L, 2);
arg3 = (char *)lua_tostring(L, 3);
arg4 = (int)lua_tonumber(L, 4);
arg5 = (int)lua_tonumber(L, 5);
arg6 = (int)lua_tonumber(L, 6);
result = (char *)(arg1)->getDigits(arg2,arg3,arg4,arg5,arg6);
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_getDigits(lua_State* L) {
int argc;
int argv[7]={
1,2,3,4,5,6,7
int argv[6]={
1,2,3,4,5,6
};
argc = lua_gettop(L);
@ -5827,51 +5815,11 @@ static int _wrap_CoreSession_getDigits(lua_State* L) {
}
}
}
if (argc == 6) {
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 = SWIG_lua_isnilstring(L,argv[2]);
}
if (_v) {
{
_v = lua_isnumber(L,argv[3]);
}
if (_v) {
{
_v = lua_isnumber(L,argv[4]);
}
if (_v) {
{
_v = lua_isnumber(L,argv[5]);
}
if (_v) {
return _wrap_CoreSession_getDigits__SWIG_2(L);
}
}
}
}
}
}
}
SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'CoreSession_getDigits'\n"
" Possible C/C++ prototypes are:\n"
" CoreSession::getDigits(int,char *,int)\n"
" CoreSession::getDigits(int,char *,int,int)\n"
" CoreSession::getDigits(int,char *,int,int,int)\n");
" CoreSession::getDigits(int,char *,int,int)\n");
lua_error(L);return 0;
}
@ -6658,6 +6606,7 @@ delete arg1;
static swig_lua_method swig_CoreSession_methods[] = {
{"insertFile", _wrap_CoreSession_insertFile},
{"answer", _wrap_CoreSession_answer},
{"print", _wrap_CoreSession_print},
{"preAnswer", _wrap_CoreSession_preAnswer},
{"hangup", _wrap_CoreSession_hangup},
{"hangupState", _wrap_CoreSession_hangupState},

View File

@ -16124,6 +16124,66 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_core_debug_level() {
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_sps() {
int jresult ;
int32_t result;
result = (int32_t)switch_core_sps();
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_sps_last() {
int jresult ;
int32_t result;
result = (int32_t)switch_core_sps_last();
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_sps_peak() {
int jresult ;
int32_t result;
result = (int32_t)switch_core_sps_peak();
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_sps_peak_fivemin() {
int jresult ;
int32_t result;
result = (int32_t)switch_core_sps_peak_fivemin();
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_sessions_peak() {
int jresult ;
int32_t result;
result = (int32_t)switch_core_sessions_peak();
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_sessions_peak_fivemin() {
int jresult ;
int32_t result;
result = (int32_t)switch_core_sessions_peak_fivemin();
jresult = result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_cache_db_flush_handles() {
switch_cache_db_flush_handles();
}
@ -39702,6 +39762,22 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_set_user(void * jarg1, char * jarg2
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_set_user_extended(void * jarg1, char * jarg2, void * jarg3) {
int jresult ;
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
char *arg2 = (char *) 0 ;
switch_event_t *arg3 = (switch_event_t *) 0 ;
switch_status_t result;
arg1 = (switch_core_session_t *)jarg1;
arg2 = (char *)jarg2;
arg3 = (switch_event_t *)jarg3;
result = (switch_status_t)switch_ivr_set_user_extended(arg1,(char const *)arg2,arg3);
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_set_user_xml(void * jarg1, char * jarg2, char * jarg3, char * jarg4, void * jarg5) {
int jresult ;
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;

View File

@ -3148,6 +3148,36 @@ else
return ret;
}
public static int switch_core_sps() {
int ret = freeswitchPINVOKE.switch_core_sps();
return ret;
}
public static int switch_core_sps_last() {
int ret = freeswitchPINVOKE.switch_core_sps_last();
return ret;
}
public static int switch_core_sps_peak() {
int ret = freeswitchPINVOKE.switch_core_sps_peak();
return ret;
}
public static int switch_core_sps_peak_fivemin() {
int ret = freeswitchPINVOKE.switch_core_sps_peak_fivemin();
return ret;
}
public static int switch_core_sessions_peak() {
int ret = freeswitchPINVOKE.switch_core_sessions_peak();
return ret;
}
public static int switch_core_sessions_peak_fivemin() {
int ret = freeswitchPINVOKE.switch_core_sessions_peak_fivemin();
return ret;
}
public static void switch_cache_db_flush_handles() {
freeswitchPINVOKE.switch_cache_db_flush_handles();
}
@ -6299,6 +6329,11 @@ else
return ret;
}
public static switch_status_t switch_ivr_set_user_extended(SWIGTYPE_p_switch_core_session session, string data, switch_event arg2) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_set_user_extended(SWIGTYPE_p_switch_core_session.getCPtr(session), data, switch_event.getCPtr(arg2));
return ret;
}
public static switch_status_t switch_ivr_set_user_xml(SWIGTYPE_p_switch_core_session session, string prefix, string user, string domain, switch_xml x_user) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_set_user_xml(SWIGTYPE_p_switch_core_session.getCPtr(session), prefix, user, domain, switch_xml.getCPtr(x_user));
return ret;
@ -11862,6 +11897,24 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_debug_level")]
public static extern uint switch_core_debug_level();
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_sps")]
public static extern int switch_core_sps();
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_sps_last")]
public static extern int switch_core_sps_last();
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_sps_peak")]
public static extern int switch_core_sps_peak();
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_sps_peak_fivemin")]
public static extern int switch_core_sps_peak_fivemin();
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_sessions_peak")]
public static extern int switch_core_sessions_peak();
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_sessions_peak_fivemin")]
public static extern int switch_core_sessions_peak_fivemin();
[DllImport("mod_managed", EntryPoint="CSharp_switch_cache_db_flush_handles")]
public static extern void switch_cache_db_flush_handles();
@ -17484,6 +17537,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_set_user")]
public static extern int switch_ivr_set_user(HandleRef jarg1, string jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_set_user_extended")]
public static extern int switch_ivr_set_user_extended(HandleRef jarg1, string jarg2, HandleRef jarg3);
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_set_user_xml")]
public static extern int switch_ivr_set_user_xml(HandleRef jarg1, string jarg2, string jarg3, string jarg4, HandleRef jarg5);

View File

@ -418,6 +418,7 @@ sub DESTROY {
*swig_voice_name_set = *freeswitchc::CoreSession_voice_name_set;
*insertFile = *freeswitchc::CoreSession_insertFile;
*answer = *freeswitchc::CoreSession_answer;
*print = *freeswitchc::CoreSession_print;
*preAnswer = *freeswitchc::CoreSession_preAnswer;
*hangup = *freeswitchc::CoreSession_hangup;
*hangupState = *freeswitchc::CoreSession_hangupState;

View File

@ -5941,6 +5941,45 @@ XS(_wrap_CoreSession_answer) {
}
XS(_wrap_CoreSession_print) {
{
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
char *buf2 = 0 ;
int alloc2 = 0 ;
int argvi = 0;
int result;
dXSARGS;
if ((items < 2) || (items > 2)) {
SWIG_croak("Usage: CoreSession_print(self,txt);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_print" "', argument " "1"" of type '" "CoreSession *""'");
}
arg1 = reinterpret_cast< CoreSession * >(argp1);
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_print" "', argument " "2"" of type '" "char *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
result = (int)(arg1)->print(arg2);
ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
XSRETURN(argvi);
fail:
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
SWIG_croak_null();
}
}
XS(_wrap_CoreSession_preAnswer) {
{
CoreSession *arg1 = (CoreSession *) 0 ;
@ -7116,85 +7155,6 @@ XS(_wrap_CoreSession_getDigits__SWIG_1) {
}
XS(_wrap_CoreSession_getDigits__SWIG_2) {
{
CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
int arg4 ;
int arg5 ;
int arg6 ;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
int res3 ;
char *buf3 = 0 ;
int alloc3 = 0 ;
int val4 ;
int ecode4 = 0 ;
int val5 ;
int ecode5 = 0 ;
int val6 ;
int ecode6 = 0 ;
int argvi = 0;
char *result = 0 ;
dXSARGS;
if ((items < 6) || (items > 6)) {
SWIG_croak("Usage: CoreSession_getDigits(self,maxdigits,terminators,timeout,interdigit,abstimeout);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getDigits" "', 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_getDigits" "', argument " "2"" of type '" "int""'");
}
arg2 = static_cast< int >(val2);
res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_getDigits" "', argument " "3"" of type '" "char *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
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_getDigits" "', 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_getDigits" "', argument " "5"" of type '" "int""'");
}
arg5 = static_cast< int >(val5);
ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
if (!SWIG_IsOK(ecode6)) {
SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CoreSession_getDigits" "', argument " "6"" of type '" "int""'");
}
arg6 = static_cast< int >(val6);
result = (char *)(arg1)->getDigits(arg2,arg3,arg4,arg5,arg6);
ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
XSRETURN(argvi);
fail:
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
SWIG_croak_null();
}
}
XS(_wrap_CoreSession_getDigits) {
dXSARGS;
@ -7309,83 +7269,12 @@ XS(_wrap_CoreSession_getDigits) {
}
check_2:
if (items == 6) {
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_3;
_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_3;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_3;
_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_3;
_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_3;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
{
int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
_v = SWIG_CheckState(res);
}
}
if (!_v) goto check_3;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
if (!_index || (_ranki < _rank)) {
_rank = _ranki; _index = 3;
if (_rank == _rankm) goto dispatch;
}
}
check_3:
dispatch:
switch(_index) {
case 1:
PUSHMARK(MARK); SWIG_CALLXS(_wrap_CoreSession_getDigits__SWIG_0); return;
case 2:
PUSHMARK(MARK); SWIG_CALLXS(_wrap_CoreSession_getDigits__SWIG_1); return;
case 3:
PUSHMARK(MARK); SWIG_CALLXS(_wrap_CoreSession_getDigits__SWIG_2); return;
}
}
@ -10417,6 +10306,7 @@ static swig_command_info swig_commands[] = {
{"freeswitchc::CoreSession_voice_name_get", _wrap_CoreSession_voice_name_get},
{"freeswitchc::CoreSession_insertFile", _wrap_CoreSession_insertFile},
{"freeswitchc::CoreSession_answer", _wrap_CoreSession_answer},
{"freeswitchc::CoreSession_print", _wrap_CoreSession_print},
{"freeswitchc::CoreSession_preAnswer", _wrap_CoreSession_preAnswer},
{"freeswitchc::CoreSession_hangup", _wrap_CoreSession_hangup},
{"freeswitchc::CoreSession_hangupState", _wrap_CoreSession_hangupState},

View File

@ -317,6 +317,7 @@ class CoreSession(_object):
if _newclass:voice_name = _swig_property(_freeswitch.CoreSession_voice_name_get, _freeswitch.CoreSession_voice_name_set)
def insertFile(self, *args): return _freeswitch.CoreSession_insertFile(self, *args)
def answer(self): return _freeswitch.CoreSession_answer(self)
def _print(self, *args): return _freeswitch.CoreSession__print(self, *args)
def preAnswer(self): return _freeswitch.CoreSession_preAnswer(self)
def hangup(self, cause="normal_clearing"): return _freeswitch.CoreSession_hangup(self, cause)
def hangupState(self): return _freeswitch.CoreSession_hangupState(self)

View File

@ -6897,6 +6897,40 @@ fail:
}
SWIGINTERN PyObject *_wrap_CoreSession__print(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
char *buf2 = 0 ;
int alloc2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
int result;
if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession__print",&obj0,&obj1)) 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__print" "', argument " "1"" of type '" "CoreSession *""'");
}
arg1 = reinterpret_cast< CoreSession * >(argp1);
res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession__print" "', argument " "2"" of type '" "char *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
result = (int)(arg1)->print(arg2);
resultobj = SWIG_From_int(static_cast< int >(result));
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
return resultobj;
fail:
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
return NULL;
}
SWIGINTERN PyObject *_wrap_CoreSession_preAnswer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
@ -7907,84 +7941,14 @@ fail:
}
SWIGINTERN PyObject *_wrap_CoreSession_getDigits__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ;
char *arg3 = (char *) 0 ;
int arg4 ;
int arg5 ;
int arg6 ;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
int res3 ;
char *buf3 = 0 ;
int alloc3 = 0 ;
int val4 ;
int ecode4 = 0 ;
int val5 ;
int ecode5 = 0 ;
int val6 ;
int ecode6 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
PyObject * obj3 = 0 ;
PyObject * obj4 = 0 ;
PyObject * obj5 = 0 ;
char *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"OOOOOO:CoreSession_getDigits",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) 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_getDigits" "', 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_getDigits" "', argument " "2"" of type '" "int""'");
}
arg2 = static_cast< int >(val2);
res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_getDigits" "', argument " "3"" of type '" "char *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
ecode4 = SWIG_AsVal_int(obj3, &val4);
if (!SWIG_IsOK(ecode4)) {
SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_getDigits" "', 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_getDigits" "', argument " "5"" of type '" "int""'");
}
arg5 = static_cast< int >(val5);
ecode6 = SWIG_AsVal_int(obj5, &val6);
if (!SWIG_IsOK(ecode6)) {
SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CoreSession_getDigits" "', argument " "6"" of type '" "int""'");
}
arg6 = static_cast< int >(val6);
result = (char *)(arg1)->getDigits(arg2,arg3,arg4,arg5,arg6);
resultobj = SWIG_FromCharPtr((const char *)result);
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
return resultobj;
fail:
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
return NULL;
}
SWIGINTERN PyObject *_wrap_CoreSession_getDigits(PyObject *self, PyObject *args) {
int argc;
PyObject *argv[7];
PyObject *argv[6];
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? (int)PyObject_Length(args) : 0;
for (ii = 0; (ii < 6) && (ii < argc); ii++) {
for (ii = 0; (ii < 5) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
if (argc == 4) {
@ -8043,50 +8007,12 @@ SWIGINTERN PyObject *_wrap_CoreSession_getDigits(PyObject *self, PyObject *args)
}
}
}
if (argc == 6) {
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_AsCharPtrAndSize(argv[2], 0, NULL, 0);
_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_AsVal_int(argv[5], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_CoreSession_getDigits__SWIG_2(self, args);
}
}
}
}
}
}
}
fail:
SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CoreSession_getDigits'.\n"
" Possible C/C++ prototypes are:\n"
" CoreSession::getDigits(int,char *,int)\n"
" CoreSession::getDigits(int,char *,int,int)\n"
" CoreSession::getDigits(int,char *,int,int,int)\n");
" CoreSession::getDigits(int,char *,int,int)\n");
return 0;
}
@ -10262,6 +10188,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"CoreSession_voice_name_get", _wrap_CoreSession_voice_name_get, METH_VARARGS, NULL},
{ (char *)"CoreSession_insertFile", _wrap_CoreSession_insertFile, METH_VARARGS, NULL},
{ (char *)"CoreSession_answer", _wrap_CoreSession_answer, METH_VARARGS, NULL},
{ (char *)"CoreSession__print", _wrap_CoreSession__print, METH_VARARGS, NULL},
{ (char *)"CoreSession_preAnswer", _wrap_CoreSession_preAnswer, METH_VARARGS, NULL},
{ (char *)"CoreSession_hangup", _wrap_CoreSession_hangup, METH_VARARGS, NULL},
{ (char *)"CoreSession_hangupState", _wrap_CoreSession_hangupState, METH_VARARGS, NULL},