char *tts_name;
char *voice_name;
+ SWITCH_DECLARE(int) insertFile(const char *file, const char *insert_file, int sample_point);
SWITCH_DECLARE(int) answer();
SWITCH_DECLARE(int) preAnswer();
SWITCH_DECLARE(void) hangup(const char *cause = "normal_clearing");
return freeswitchJNI.CoreSession_voice_name_get(swigCPtr, this);
}
+ public int insertFile(String file, String insert_file, int sample_point) {
+ return freeswitchJNI.CoreSession_insertFile(swigCPtr, this, file, insert_file, sample_point);
+ }
+
public int answer() {
return freeswitchJNI.CoreSession_answer(swigCPtr, this);
}
public final static native String CoreSession_tts_name_get(long jarg1, CoreSession jarg1_);
public final static native void CoreSession_voice_name_set(long jarg1, CoreSession jarg1_, String jarg2);
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_preAnswer(long jarg1, CoreSession jarg1_);
public final static native void CoreSession_hangup(long jarg1, CoreSession jarg1_, String jarg2);
}
+SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1insertFile(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jint jarg4) {
+ jint jresult = 0 ;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ int arg4 ;
+ 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;
+ }
+ arg3 = 0;
+ if (jarg3) {
+ arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
+ if (!arg3) return 0;
+ }
+ arg4 = (int)jarg4;
+ result = (int)(arg1)->insertFile((char const *)arg2,(char const *)arg3,arg4);
+ jresult = (jint)result;
+ if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
+ if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
+ return jresult;
+}
+
+
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1answer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
}
+static int _wrap_CoreSession_insertFile(lua_State* L) {
+ int SWIG_arg = -1;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ int arg4 ;
+ int result;
+
+ SWIG_check_num_args("insertFile",4,4)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("insertFile",1,"CoreSession *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("insertFile",2,"char const *");
+ if(!lua_isstring(L,3)) SWIG_fail_arg("insertFile",3,"char const *");
+ if(!lua_isnumber(L,4)) SWIG_fail_arg("insertFile",4,"int");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
+ SWIG_fail_ptr("CoreSession_insertFile",1,SWIGTYPE_p_CoreSession);
+ }
+
+ arg2 = (char *)lua_tostring(L, 2);
+ arg3 = (char *)lua_tostring(L, 3);
+ arg4 = (int)lua_tonumber(L, 4);
+ result = (int)(arg1)->insertFile((char const *)arg2,(char const *)arg3,arg4);
+ SWIG_arg=0;
+ 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_answer(lua_State* L) {
int SWIG_arg = -1;
CoreSession *arg1 = (CoreSession *) 0 ;
delete arg1;
}
static swig_lua_method swig_CoreSession_methods[] = {
+ {"insertFile", _wrap_CoreSession_insertFile},
{"answer", _wrap_CoreSession_answer},
{"preAnswer", _wrap_CoreSession_preAnswer},
{"hangup", _wrap_CoreSession_hangup},
}
+SWIGEXPORT int SWIGSTDCALL CSharp_CoreSession_insertFile(void * jarg1, char * jarg2, char * jarg3, int jarg4) {
+ int jresult ;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ int arg4 ;
+ int result;
+
+ arg1 = (CoreSession *)jarg1;
+ arg2 = (char *)jarg2;
+ arg3 = (char *)jarg3;
+ arg4 = (int)jarg4;
+ result = (int)(arg1)->insertFile((char const *)arg2,(char const *)arg3,arg4);
+ jresult = result;
+ return jresult;
+}
+
+
SWIGEXPORT int SWIGSTDCALL CSharp_CoreSession_Answer(void * jarg1) {
int jresult ;
CoreSession *arg1 = (CoreSession *) 0 ;
}
}
+ public int insertFile(string file, string insert_file, int sample_point) {
+ int ret = freeswitchPINVOKE.CoreSession_insertFile(swigCPtr, file, insert_file, sample_point);
+ return ret;
+ }
+
public int Answer() {
int ret = freeswitchPINVOKE.CoreSession_Answer(swigCPtr);
return ret;
[DllImport("mod_managed", EntryPoint="CSharp_CoreSession_voice_name_get")]
public static extern string CoreSession_voice_name_get(HandleRef jarg1);
+ [DllImport("mod_managed", EntryPoint="CSharp_CoreSession_insertFile")]
+ public static extern int CoreSession_insertFile(HandleRef jarg1, string jarg2, string jarg3, int jarg4);
+
[DllImport("mod_managed", EntryPoint="CSharp_CoreSession_Answer")]
public static extern int CoreSession_Answer(HandleRef jarg1);
SWITCH_MESSAGE_INDICATE_UDPTL_MODE,
SWITCH_MESSAGE_INDICATE_CLEAR_PROGRESS,
SWITCH_MESSAGE_INDICATE_JITTER_BUFFER,
+ SWITCH_MESSAGE_INDICATE_RECOVERY_REFRESH,
SWITCH_MESSAGE_INVALID
}
*swig_tts_name_set = *freeswitchc::CoreSession_tts_name_set;
*swig_voice_name_get = *freeswitchc::CoreSession_voice_name_get;
*swig_voice_name_set = *freeswitchc::CoreSession_voice_name_set;
+*insertFile = *freeswitchc::CoreSession_insertFile;
*answer = *freeswitchc::CoreSession_answer;
*preAnswer = *freeswitchc::CoreSession_preAnswer;
*hangup = *freeswitchc::CoreSession_hangup;
}
+XS(_wrap_CoreSession_insertFile) {
+ {
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ int arg4 ;
+ int result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int res3 ;
+ char *buf3 = 0 ;
+ int alloc3 = 0 ;
+ int val4 ;
+ int ecode4 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 4) || (items > 4)) {
+ SWIG_croak("Usage: CoreSession_insertFile(self,file,insert_file,sample_point);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_insertFile" "', 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_insertFile" "', argument " "2"" of type '" "char const *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_insertFile" "', argument " "3"" of type '" "char const *""'");
+ }
+ 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_insertFile" "', argument " "4"" of type '" "int""'");
+ }
+ arg4 = static_cast< int >(val4);
+ result = (int)(arg1)->insertFile((char const *)arg2,(char const *)arg3,arg4);
+ ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+
+ XSRETURN(argvi);
+ fail:
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+
+ SWIG_croak_null();
+ }
+}
+
+
XS(_wrap_CoreSession_answer) {
{
CoreSession *arg1 = (CoreSession *) 0 ;
{"freeswitchc::CoreSession_tts_name_get", _wrap_CoreSession_tts_name_get},
{"freeswitchc::CoreSession_voice_name_set", _wrap_CoreSession_voice_name_set},
{"freeswitchc::CoreSession_voice_name_get", _wrap_CoreSession_voice_name_get},
+{"freeswitchc::CoreSession_insertFile", _wrap_CoreSession_insertFile},
{"freeswitchc::CoreSession_answer", _wrap_CoreSession_answer},
{"freeswitchc::CoreSession_preAnswer", _wrap_CoreSession_preAnswer},
{"freeswitchc::CoreSession_hangup", _wrap_CoreSession_hangup},
SWIG_TypeClientData(SWIGTYPE_p_IVRMenu, (void*) "freeswitch::IVRMenu");
SWIG_TypeClientData(SWIGTYPE_p_API, (void*) "freeswitch::API");
SWIG_TypeClientData(SWIGTYPE_p_input_callback_state, (void*) "freeswitch::input_callback_state_t");
- /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
+ /*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "S_HUP", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_HUP)));
SvREADONLY_on(sv);
} while(0) /*@SWIG@*/;
- /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
+ /*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "S_FREE", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_FREE)));
SvREADONLY_on(sv);
} while(0) /*@SWIG@*/;
- /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
+ /*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "S_RDLOCK", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_RDLOCK)));
SvREADONLY_on(sv);
__swig_setmethods__["voice_name"] = _freeswitch.CoreSession_voice_name_set
__swig_getmethods__["voice_name"] = _freeswitch.CoreSession_voice_name_get
if _newclass:voice_name = _swig_property(_freeswitch.CoreSession_voice_name_get, _freeswitch.CoreSession_voice_name_set)
+ def insertFile(*args): return _freeswitch.CoreSession_insertFile(*args)
def answer(*args): return _freeswitch.CoreSession_answer(*args)
def preAnswer(*args): return _freeswitch.CoreSession_preAnswer(*args)
def hangup(*args): return _freeswitch.CoreSession_hangup(*args)
}
+SWIGINTERN PyObject *_wrap_CoreSession_insertFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ CoreSession *arg1 = (CoreSession *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ int arg4 ;
+ int result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int res3 ;
+ char *buf3 = 0 ;
+ int alloc3 = 0 ;
+ int val4 ;
+ int ecode4 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+ PyObject * obj3 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOOO:CoreSession_insertFile",&obj0,&obj1,&obj2,&obj3)) 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_insertFile" "', 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_insertFile" "', argument " "2"" of type '" "char const *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_insertFile" "', argument " "3"" of type '" "char const *""'");
+ }
+ arg3 = reinterpret_cast< char * >(buf3);
+ ecode4 = SWIG_AsVal_int(obj3, &val4);
+ if (!SWIG_IsOK(ecode4)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_insertFile" "', argument " "4"" of type '" "int""'");
+ }
+ arg4 = static_cast< int >(val4);
+ result = (int)(arg1)->insertFile((char const *)arg2,(char const *)arg3,arg4);
+ resultobj = SWIG_From_int(static_cast< int >(result));
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ return resultobj;
+fail:
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_CoreSession_answer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CoreSession *arg1 = (CoreSession *) 0 ;
{ (char *)"CoreSession_tts_name_get", _wrap_CoreSession_tts_name_get, METH_VARARGS, NULL},
{ (char *)"CoreSession_voice_name_set", _wrap_CoreSession_voice_name_set, METH_VARARGS, NULL},
{ (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_preAnswer", _wrap_CoreSession_preAnswer, METH_VARARGS, NULL},
{ (char *)"CoreSession_hangup", _wrap_CoreSession_hangup, METH_VARARGS, NULL},
return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
}
+SWITCH_DECLARE(int) CoreSession::insertFile(const char *file, const char *insert_file, int sample_point)
+{
+ switch_status_t status;
+ this_check(-1);
+ sanity_check(-1);
+ status = switch_ivr_insert_file(session, file, insert_file, (switch_size_t)sample_point);
+ return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
+}
+
SWITCH_DECLARE(int) CoreSession::preAnswer()
{
switch_status_t status;