make tts-engine and tts-voice valid attributes on the menu xml

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12278 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West 2009-02-25 16:49:42 +00:00
parent 5fcbbca37f
commit 85c265666d
12 changed files with 181 additions and 119 deletions

View File

@ -93,6 +93,8 @@ SWITCH_DECLARE(void) consoleCleanLog(char *msg);
const char *exit_sound,
const char *confirm_macro,
const char *confirm_key,
const char *tts_engine,
const char *tts_voice,
int confirm_attempts, int inter_timeout, int digit_len,
int timeout, int max_failures, int max_timeouts);
virtual SWITCH_DECLARE_CONSTRUCTOR ~ IVRMenu();

View File

@ -671,6 +671,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_set_terminator(sw
*\param exit_sound Optional pointer to a sound to play upon exiting the menu.
*\param confirm_macro phrase macro name to confirm input
*\param confirm_key the dtmf key required for positive confirmation
*\param tts_engine the tts engine to use for this menu
*\param tts_voice the tts voice to use for this menu
*\param confirm_attempts number of times to prompt to confirm input before failure
*\param inter_timeout inter-digit timeout
*\param digit_len max number of digits
@ -689,6 +691,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_set_terminator(sw
const char *exit_sound,
const char *confirm_macro,
const char *confirm_key,
const char *tts_engine,
const char *tts_voice,
int confirm_attempts,
int inter_timeout, int digit_len, int timeout, int max_failures,
int max_timeouts, switch_memory_pool_t *pool);

View File

@ -33,8 +33,8 @@ public class IVRMenu {
swigCPtr = 0;
}
public IVRMenu(IVRMenu main, String name, String greeting_sound, String short_greeting_sound, String invalid_sound, String exit_sound, String confirm_macro, String confirm_key, int confirm_attempts, int inter_timeout, int digit_len, int timeout, int max_failures, int max_timeouts) {
this(freeswitchJNI.new_IVRMenu(IVRMenu.getCPtr(main), main, name, greeting_sound, short_greeting_sound, invalid_sound, exit_sound, confirm_macro, confirm_key, confirm_attempts, inter_timeout, digit_len, timeout, max_failures, max_timeouts), true);
public IVRMenu(IVRMenu main, String name, String greeting_sound, String short_greeting_sound, String invalid_sound, String exit_sound, String confirm_macro, String confirm_key, String tts_engine, String tts_voice, int confirm_attempts, int inter_timeout, int digit_len, int timeout, int max_failures, int max_timeouts) {
this(freeswitchJNI.new_IVRMenu(IVRMenu.getCPtr(main), main, name, greeting_sound, short_greeting_sound, invalid_sound, exit_sound, confirm_macro, confirm_key, tts_engine, tts_voice, confirm_attempts, inter_timeout, digit_len, timeout, max_failures, max_timeouts), true);
}
public void bindAction(String action, String arg, String bind) {

View File

@ -11,7 +11,7 @@ package org.freeswitch.swig;
class freeswitchJNI {
public final static native void consoleLog(String jarg1, String jarg2);
public final static native void consoleCleanLog(String jarg1);
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, int jarg9, int jarg10, int jarg11, int jarg12, int jarg13, int jarg14);
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);
public final static native void IVRMenu_bindAction(long jarg1, IVRMenu jarg1_, String jarg2, String jarg3, String jarg4);
public final static native void IVRMenu_execute(long jarg1, IVRMenu jarg1_, long jarg2, CoreSession jarg2_, String jarg3);

View File

@ -244,7 +244,7 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_consoleCleanLog(J
}
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1IVRMenu(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4, jstring jarg5, jstring jarg6, jstring jarg7, jstring jarg8, jint jarg9, jint jarg10, jint jarg11, jint jarg12, jint jarg13, jint jarg14) {
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1IVRMenu(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4, jstring jarg5, jstring jarg6, jstring jarg7, jstring jarg8, jstring jarg9, jstring jarg10, jint jarg11, jint jarg12, jint jarg13, jint jarg14, jint jarg15, jint jarg16) {
jlong jresult = 0 ;
IVRMenu *arg1 = (IVRMenu *) 0 ;
char *arg2 = (char *) 0 ;
@ -254,12 +254,14 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1IVRMenu(JNI
char *arg6 = (char *) 0 ;
char *arg7 = (char *) 0 ;
char *arg8 = (char *) 0 ;
int arg9 ;
int arg10 ;
char *arg9 = (char *) 0 ;
char *arg10 = (char *) 0 ;
int arg11 ;
int arg12 ;
int arg13 ;
int arg14 ;
int arg15 ;
int arg16 ;
IVRMenu *result = 0 ;
(void)jenv;
@ -301,13 +303,23 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1IVRMenu(JNI
arg8 = (char *)jenv->GetStringUTFChars(jarg8, 0);
if (!arg8) return 0;
}
arg9 = (int)jarg9;
arg10 = (int)jarg10;
arg9 = 0;
if (jarg9) {
arg9 = (char *)jenv->GetStringUTFChars(jarg9, 0);
if (!arg9) return 0;
}
arg10 = 0;
if (jarg10) {
arg10 = (char *)jenv->GetStringUTFChars(jarg10, 0);
if (!arg10) return 0;
}
arg11 = (int)jarg11;
arg12 = (int)jarg12;
arg13 = (int)jarg13;
arg14 = (int)jarg14;
result = (IVRMenu *)new IVRMenu(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,arg9,arg10,arg11,arg12,arg13,arg14);
arg15 = (int)jarg15;
arg16 = (int)jarg16;
result = (IVRMenu *)new IVRMenu(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,(char const *)arg9,(char const *)arg10,arg11,arg12,arg13,arg14,arg15,arg16);
*(IVRMenu **)&jresult = result;
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
@ -316,6 +328,8 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1IVRMenu(JNI
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);
if (arg10) jenv->ReleaseStringUTFChars(jarg10, (const char *)arg10);
return jresult;
}

View File

@ -1588,15 +1588,17 @@ static int _wrap_new_IVRMenu(lua_State* L) {
char *arg6 = (char *) 0 ;
char *arg7 = (char *) 0 ;
char *arg8 = (char *) 0 ;
int arg9 ;
int arg10 ;
char *arg9 = (char *) 0 ;
char *arg10 = (char *) 0 ;
int arg11 ;
int arg12 ;
int arg13 ;
int arg14 ;
int arg15 ;
int arg16 ;
IVRMenu *result = 0 ;
SWIG_check_num_args("IVRMenu",14,14)
SWIG_check_num_args("IVRMenu",16,16)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IVRMenu",1,"IVRMenu *");
if(!lua_isstring(L,2)) SWIG_fail_arg("IVRMenu",2,"char const *");
if(!lua_isstring(L,3)) SWIG_fail_arg("IVRMenu",3,"char const *");
@ -1605,12 +1607,14 @@ static int _wrap_new_IVRMenu(lua_State* L) {
if(!lua_isstring(L,6)) SWIG_fail_arg("IVRMenu",6,"char const *");
if(!lua_isstring(L,7)) SWIG_fail_arg("IVRMenu",7,"char const *");
if(!lua_isstring(L,8)) SWIG_fail_arg("IVRMenu",8,"char const *");
if(!lua_isnumber(L,9)) SWIG_fail_arg("IVRMenu",9,"int");
if(!lua_isnumber(L,10)) SWIG_fail_arg("IVRMenu",10,"int");
if(!lua_isstring(L,9)) SWIG_fail_arg("IVRMenu",9,"char const *");
if(!lua_isstring(L,10)) SWIG_fail_arg("IVRMenu",10,"char const *");
if(!lua_isnumber(L,11)) SWIG_fail_arg("IVRMenu",11,"int");
if(!lua_isnumber(L,12)) SWIG_fail_arg("IVRMenu",12,"int");
if(!lua_isnumber(L,13)) SWIG_fail_arg("IVRMenu",13,"int");
if(!lua_isnumber(L,14)) SWIG_fail_arg("IVRMenu",14,"int");
if(!lua_isnumber(L,15)) SWIG_fail_arg("IVRMenu",15,"int");
if(!lua_isnumber(L,16)) SWIG_fail_arg("IVRMenu",16,"int");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IVRMenu,0))){
SWIG_fail_ptr("new_IVRMenu",1,SWIGTYPE_p_IVRMenu);
@ -1623,13 +1627,15 @@ static int _wrap_new_IVRMenu(lua_State* L) {
arg6 = (char *)lua_tostring(L, 6);
arg7 = (char *)lua_tostring(L, 7);
arg8 = (char *)lua_tostring(L, 8);
arg9 = (int)lua_tonumber(L, 9);
arg10 = (int)lua_tonumber(L, 10);
arg9 = (char *)lua_tostring(L, 9);
arg10 = (char *)lua_tostring(L, 10);
arg11 = (int)lua_tonumber(L, 11);
arg12 = (int)lua_tonumber(L, 12);
arg13 = (int)lua_tonumber(L, 13);
arg14 = (int)lua_tonumber(L, 14);
result = (IVRMenu *)new IVRMenu(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,arg9,arg10,arg11,arg12,arg13,arg14);
arg15 = (int)lua_tonumber(L, 15);
arg16 = (int)lua_tonumber(L, 16);
result = (IVRMenu *)new IVRMenu(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,(char const *)arg9,(char const *)arg10,arg11,arg12,arg13,arg14,arg15,arg16);
SWIG_arg=0;
SWIG_NewPointerObj(L,result,SWIGTYPE_p_IVRMenu,1); SWIG_arg++;
return SWIG_arg;

View File

@ -13056,29 +13056,6 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_file_handle_offset_pos_get(vo
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_file_handle_last_pos_set(void * jarg1, unsigned long jarg2) {
switch_file_handle *arg1 = (switch_file_handle *) 0 ;
uint32_t arg2 ;
arg1 = (switch_file_handle *)jarg1;
arg2 = (uint32_t)jarg2;
if (arg1) (arg1)->last_pos = arg2;
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_file_handle_last_pos_get(void * jarg1) {
unsigned long jresult ;
switch_file_handle *arg1 = (switch_file_handle *) 0 ;
uint32_t result;
arg1 = (switch_file_handle *)jarg1;
result = (uint32_t) ((arg1)->last_pos);
jresult = (unsigned long)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_file_handle_vol_set(void * jarg1, int jarg2) {
switch_file_handle *arg1 = (switch_file_handle *) 0 ;
int32_t arg2 ;
@ -21713,10 +21690,10 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_digit_stream_new(void * jarg1, void
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_digit_stream_destroy(void * jarg1) {
int jresult ;
switch_ivr_digit_stream_t *arg1 = (switch_ivr_digit_stream_t *) 0 ;
switch_ivr_digit_stream_t **arg1 = (switch_ivr_digit_stream_t **) 0 ;
switch_status_t result;
arg1 = (switch_ivr_digit_stream_t *)jarg1;
arg1 = (switch_ivr_digit_stream_t **)jarg1;
result = (switch_status_t)switch_ivr_digit_stream_destroy(arg1);
jresult = result;
return jresult;
@ -21795,7 +21772,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_digit_stream_parser_set_terminator(
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_menu_init(void * jarg1, void * jarg2, char * jarg3, char * jarg4, char * jarg5, char * jarg6, char * jarg7, char * jarg8, char * jarg9, int jarg10, int jarg11, int jarg12, int jarg13, int jarg14, int jarg15, void * jarg16) {
SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_menu_init(void * jarg1, void * jarg2, char * jarg3, char * jarg4, char * jarg5, char * jarg6, char * jarg7, char * jarg8, char * jarg9, char * jarg10, char * jarg11, int jarg12, int jarg13, int jarg14, int jarg15, int jarg16, int jarg17, void * jarg18) {
int jresult ;
switch_ivr_menu_t **arg1 = (switch_ivr_menu_t **) 0 ;
switch_ivr_menu_t *arg2 = (switch_ivr_menu_t *) 0 ;
@ -21806,13 +21783,15 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_menu_init(void * jarg1, void * jarg
char *arg7 = (char *) 0 ;
char *arg8 = (char *) 0 ;
char *arg9 = (char *) 0 ;
int arg10 ;
int arg11 ;
char *arg10 = (char *) 0 ;
char *arg11 = (char *) 0 ;
int arg12 ;
int arg13 ;
int arg14 ;
int arg15 ;
switch_memory_pool_t *arg16 = (switch_memory_pool_t *) 0 ;
int arg16 ;
int arg17 ;
switch_memory_pool_t *arg18 = (switch_memory_pool_t *) 0 ;
switch_status_t result;
arg1 = (switch_ivr_menu_t **)jarg1;
@ -21824,14 +21803,16 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_menu_init(void * jarg1, void * jarg
arg7 = (char *)jarg7;
arg8 = (char *)jarg8;
arg9 = (char *)jarg9;
arg10 = (int)jarg10;
arg11 = (int)jarg11;
arg10 = (char *)jarg10;
arg11 = (char *)jarg11;
arg12 = (int)jarg12;
arg13 = (int)jarg13;
arg14 = (int)jarg14;
arg15 = (int)jarg15;
arg16 = (switch_memory_pool_t *)jarg16;
result = (switch_status_t)switch_ivr_menu_init(arg1,arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,(char const *)arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16);
arg16 = (int)jarg16;
arg17 = (int)jarg17;
arg18 = (switch_memory_pool_t *)jarg18;
result = (switch_status_t)switch_ivr_menu_init(arg1,arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,(char const *)arg9,(char const *)arg10,(char const *)arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
jresult = result;
return jresult;
}
@ -26297,7 +26278,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_consoleCleanLog(char * jarg1) {
}
SWIGEXPORT void * SWIGSTDCALL CSharp_new_IvrMenu(void * jarg1, char * jarg2, char * jarg3, char * jarg4, char * jarg5, char * jarg6, char * jarg7, char * jarg8, int jarg9, int jarg10, int jarg11, int jarg12, int jarg13, int jarg14) {
SWIGEXPORT void * SWIGSTDCALL CSharp_new_IvrMenu(void * jarg1, char * jarg2, char * jarg3, char * jarg4, char * jarg5, char * jarg6, char * jarg7, char * jarg8, char * jarg9, char * jarg10, int jarg11, int jarg12, int jarg13, int jarg14, int jarg15, int jarg16) {
void * jresult ;
IVRMenu *arg1 = (IVRMenu *) 0 ;
char *arg2 = (char *) 0 ;
@ -26307,12 +26288,14 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_new_IvrMenu(void * jarg1, char * jarg2, cha
char *arg6 = (char *) 0 ;
char *arg7 = (char *) 0 ;
char *arg8 = (char *) 0 ;
int arg9 ;
int arg10 ;
char *arg9 = (char *) 0 ;
char *arg10 = (char *) 0 ;
int arg11 ;
int arg12 ;
int arg13 ;
int arg14 ;
int arg15 ;
int arg16 ;
IVRMenu *result = 0 ;
arg1 = (IVRMenu *)jarg1;
@ -26323,13 +26306,15 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_new_IvrMenu(void * jarg1, char * jarg2, cha
arg6 = (char *)jarg6;
arg7 = (char *)jarg7;
arg8 = (char *)jarg8;
arg9 = (int)jarg9;
arg10 = (int)jarg10;
arg9 = (char *)jarg9;
arg10 = (char *)jarg10;
arg11 = (int)jarg11;
arg12 = (int)jarg12;
arg13 = (int)jarg13;
arg14 = (int)jarg14;
result = (IVRMenu *)new IVRMenu(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,arg9,arg10,arg11,arg12,arg13,arg14);
arg15 = (int)jarg15;
arg16 = (int)jarg16;
result = (IVRMenu *)new IVRMenu(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,(char const *)arg9,(char const *)arg10,arg11,arg12,arg13,arg14,arg15,arg16);
jresult = (void *)result;
return jresult;
}

View File

@ -3221,8 +3221,8 @@ public class freeswitch {
return ret;
}
public static switch_status_t switch_ivr_digit_stream_destroy(SWIGTYPE_p_switch_ivr_digit_stream stream) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_digit_stream_destroy(SWIGTYPE_p_switch_ivr_digit_stream.getCPtr(stream));
public static switch_status_t switch_ivr_digit_stream_destroy(SWIGTYPE_p_p_switch_ivr_digit_stream stream) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_digit_stream_destroy(SWIGTYPE_p_p_switch_ivr_digit_stream.getCPtr(stream));
return ret;
}
@ -3252,8 +3252,8 @@ public class freeswitch {
return ret;
}
public static switch_status_t switch_ivr_menu_init(SWIGTYPE_p_p_switch_ivr_menu new_menu, SWIGTYPE_p_switch_ivr_menu main, string name, string greeting_sound, string short_greeting_sound, string invalid_sound, string exit_sound, string confirm_macro, string confirm_key, int confirm_attempts, int inter_timeout, int digit_len, int timeout, int max_failures, int max_timeouts, SWIGTYPE_p_apr_pool_t pool) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_menu_init(SWIGTYPE_p_p_switch_ivr_menu.getCPtr(new_menu), SWIGTYPE_p_switch_ivr_menu.getCPtr(main), name, greeting_sound, short_greeting_sound, invalid_sound, exit_sound, confirm_macro, confirm_key, confirm_attempts, inter_timeout, digit_len, timeout, max_failures, max_timeouts, SWIGTYPE_p_apr_pool_t.getCPtr(pool));
public static switch_status_t switch_ivr_menu_init(SWIGTYPE_p_p_switch_ivr_menu new_menu, SWIGTYPE_p_switch_ivr_menu main, string name, string greeting_sound, string short_greeting_sound, string invalid_sound, string exit_sound, string confirm_macro, string confirm_key, string tts_engine, string tts_voice, int confirm_attempts, int inter_timeout, int digit_len, int timeout, int max_failures, int max_timeouts, SWIGTYPE_p_apr_pool_t pool) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_menu_init(SWIGTYPE_p_p_switch_ivr_menu.getCPtr(new_menu), SWIGTYPE_p_switch_ivr_menu.getCPtr(main), name, greeting_sound, short_greeting_sound, invalid_sound, exit_sound, confirm_macro, confirm_key, tts_engine, tts_voice, confirm_attempts, inter_timeout, digit_len, timeout, max_failures, max_timeouts, SWIGTYPE_p_apr_pool_t.getCPtr(pool));
return ret;
}
@ -7497,12 +7497,6 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_file_handle_offset_pos_get")]
public static extern uint switch_file_handle_offset_pos_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_file_handle_last_pos_set")]
public static extern void switch_file_handle_last_pos_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_file_handle_last_pos_get")]
public static extern uint switch_file_handle_last_pos_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_file_handle_vol_set")]
public static extern void switch_file_handle_vol_set(HandleRef jarg1, int jarg2);
@ -9544,7 +9538,7 @@ class freeswitchPINVOKE {
public static extern int switch_ivr_digit_stream_parser_set_terminator(HandleRef jarg1, char jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_menu_init")]
public static extern int switch_ivr_menu_init(HandleRef jarg1, HandleRef jarg2, string jarg3, string jarg4, string jarg5, string jarg6, string jarg7, string jarg8, string jarg9, int jarg10, int jarg11, int jarg12, int jarg13, int jarg14, int jarg15, HandleRef jarg16);
public static extern int switch_ivr_menu_init(HandleRef jarg1, HandleRef jarg2, string jarg3, string jarg4, string jarg5, string jarg6, string jarg7, string jarg8, string jarg9, string jarg10, string jarg11, int jarg12, int jarg13, int jarg14, int jarg15, int jarg16, int jarg17, HandleRef jarg18);
[DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_menu_bind_action")]
public static extern int switch_ivr_menu_bind_action(HandleRef jarg1, int jarg2, string jarg3, string jarg4);
@ -10597,7 +10591,7 @@ class freeswitchPINVOKE {
public static extern void consoleCleanLog(string jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_new_IvrMenu")]
public static extern IntPtr new_IvrMenu(HandleRef jarg1, string jarg2, string jarg3, string jarg4, string jarg5, string jarg6, string jarg7, string jarg8, int jarg9, int jarg10, int jarg11, int jarg12, int jarg13, int jarg14);
public static extern IntPtr new_IvrMenu(HandleRef 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);
[DllImport("mod_managed", EntryPoint="CSharp_delete_IvrMenu")]
public static extern void delete_IvrMenu(HandleRef jarg1);
@ -11125,7 +11119,7 @@ public class IvrMenu : IDisposable {
}
}
public IvrMenu(IvrMenu main, string name, string greeting_sound, string short_greeting_sound, string invalid_sound, string exit_sound, string confirm_macro, string confirm_key, int confirm_attempts, int inter_timeout, int digit_len, int timeout, int max_failures, int max_timeouts) : this(freeswitchPINVOKE.new_IvrMenu(IvrMenu.getCPtr(main), name, greeting_sound, short_greeting_sound, invalid_sound, exit_sound, confirm_macro, confirm_key, confirm_attempts, inter_timeout, digit_len, timeout, max_failures, max_timeouts), true) {
public IvrMenu(IvrMenu main, string name, string greeting_sound, string short_greeting_sound, string invalid_sound, string exit_sound, string confirm_macro, string confirm_key, string tts_engine, string tts_voice, int confirm_attempts, int inter_timeout, int digit_len, int timeout, int max_failures, int max_timeouts) : this(freeswitchPINVOKE.new_IvrMenu(IvrMenu.getCPtr(main), name, greeting_sound, short_greeting_sound, invalid_sound, exit_sound, confirm_macro, confirm_key, tts_engine, tts_voice, confirm_attempts, inter_timeout, digit_len, timeout, max_failures, max_timeouts), true) {
}
public void bindAction(string action, string arg, string bind) {
@ -20437,16 +20431,6 @@ public class switch_file_handle : IDisposable {
}
}
public uint last_pos {
set {
freeswitchPINVOKE.switch_file_handle_last_pos_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_file_handle_last_pos_get(swigCPtr);
return ret;
}
}
public int vol {
set {
freeswitchPINVOKE.switch_file_handle_vol_set(swigCPtr, value);

View File

@ -1990,12 +1990,14 @@ XS(_wrap_new_IVRMenu) {
char *arg6 = (char *) 0 ;
char *arg7 = (char *) 0 ;
char *arg8 = (char *) 0 ;
int arg9 ;
int arg10 ;
char *arg9 = (char *) 0 ;
char *arg10 = (char *) 0 ;
int arg11 ;
int arg12 ;
int arg13 ;
int arg14 ;
int arg15 ;
int arg16 ;
IVRMenu *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@ -2020,10 +2022,12 @@ XS(_wrap_new_IVRMenu) {
int res8 ;
char *buf8 = 0 ;
int alloc8 = 0 ;
int val9 ;
int ecode9 = 0 ;
int val10 ;
int ecode10 = 0 ;
int res9 ;
char *buf9 = 0 ;
int alloc9 = 0 ;
int res10 ;
char *buf10 = 0 ;
int alloc10 = 0 ;
int val11 ;
int ecode11 = 0 ;
int val12 ;
@ -2032,11 +2036,15 @@ XS(_wrap_new_IVRMenu) {
int ecode13 = 0 ;
int val14 ;
int ecode14 = 0 ;
int val15 ;
int ecode15 = 0 ;
int val16 ;
int ecode16 = 0 ;
int argvi = 0;
dXSARGS;
if ((items < 14) || (items > 14)) {
SWIG_croak("Usage: new_IVRMenu(main,name,greeting_sound,short_greeting_sound,invalid_sound,exit_sound,confirm_macro,confirm_key,confirm_attempts,inter_timeout,digit_len,timeout,max_failures,max_timeouts);");
if ((items < 16) || (items > 16)) {
SWIG_croak("Usage: new_IVRMenu(main,name,greeting_sound,short_greeting_sound,invalid_sound,exit_sound,confirm_macro,confirm_key,tts_engine,tts_voice,confirm_attempts,inter_timeout,digit_len,timeout,max_failures,max_timeouts);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IVRMenu, 0 | 0 );
if (!SWIG_IsOK(res1)) {
@ -2078,16 +2086,16 @@ XS(_wrap_new_IVRMenu) {
SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_IVRMenu" "', argument " "8"" of type '" "char const *""'");
}
arg8 = reinterpret_cast< char * >(buf8);
ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
if (!SWIG_IsOK(ecode9)) {
SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_IVRMenu" "', argument " "9"" of type '" "int""'");
}
arg9 = static_cast< int >(val9);
ecode10 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
if (!SWIG_IsOK(ecode10)) {
SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_IVRMenu" "', argument " "10"" of type '" "int""'");
}
arg10 = static_cast< int >(val10);
res9 = SWIG_AsCharPtrAndSize(ST(8), &buf9, NULL, &alloc9);
if (!SWIG_IsOK(res9)) {
SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_IVRMenu" "', argument " "9"" of type '" "char const *""'");
}
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 '" "new_IVRMenu" "', argument " "10"" of type '" "char const *""'");
}
arg10 = reinterpret_cast< char * >(buf10);
ecode11 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
if (!SWIG_IsOK(ecode11)) {
SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_IVRMenu" "', argument " "11"" of type '" "int""'");
@ -2108,7 +2116,17 @@ XS(_wrap_new_IVRMenu) {
SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "new_IVRMenu" "', argument " "14"" of type '" "int""'");
}
arg14 = static_cast< int >(val14);
result = (IVRMenu *)new IVRMenu(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,arg9,arg10,arg11,arg12,arg13,arg14);
ecode15 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(14), &val15);
if (!SWIG_IsOK(ecode15)) {
SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "new_IVRMenu" "', argument " "15"" of type '" "int""'");
}
arg15 = static_cast< int >(val15);
ecode16 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(15), &val16);
if (!SWIG_IsOK(ecode16)) {
SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "new_IVRMenu" "', argument " "16"" of type '" "int""'");
}
arg16 = static_cast< int >(val16);
result = (IVRMenu *)new IVRMenu(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,(char const *)arg9,(char const *)arg10,arg11,arg12,arg13,arg14,arg15,arg16);
ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IVRMenu, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
@ -2118,6 +2136,8 @@ XS(_wrap_new_IVRMenu) {
if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
if (alloc8 == SWIG_NEWOBJ) delete[] buf8;
if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
if (alloc10 == SWIG_NEWOBJ) delete[] buf10;
@ -2134,6 +2154,8 @@ XS(_wrap_new_IVRMenu) {
if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
if (alloc8 == SWIG_NEWOBJ) delete[] buf8;
if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
if (alloc10 == SWIG_NEWOBJ) delete[] buf10;

View File

@ -3079,12 +3079,14 @@ SWIGINTERN PyObject *_wrap_new_IVRMenu(PyObject *SWIGUNUSEDPARM(self), PyObject
char *arg6 = (char *) 0 ;
char *arg7 = (char *) 0 ;
char *arg8 = (char *) 0 ;
int arg9 ;
int arg10 ;
char *arg9 = (char *) 0 ;
char *arg10 = (char *) 0 ;
int arg11 ;
int arg12 ;
int arg13 ;
int arg14 ;
int arg15 ;
int arg16 ;
IVRMenu *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@ -3109,10 +3111,12 @@ SWIGINTERN PyObject *_wrap_new_IVRMenu(PyObject *SWIGUNUSEDPARM(self), PyObject
int res8 ;
char *buf8 = 0 ;
int alloc8 = 0 ;
int val9 ;
int ecode9 = 0 ;
int val10 ;
int ecode10 = 0 ;
int res9 ;
char *buf9 = 0 ;
int alloc9 = 0 ;
int res10 ;
char *buf10 = 0 ;
int alloc10 = 0 ;
int val11 ;
int ecode11 = 0 ;
int val12 ;
@ -3121,6 +3125,10 @@ SWIGINTERN PyObject *_wrap_new_IVRMenu(PyObject *SWIGUNUSEDPARM(self), PyObject
int ecode13 = 0 ;
int val14 ;
int ecode14 = 0 ;
int val15 ;
int ecode15 = 0 ;
int val16 ;
int ecode16 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
@ -3135,8 +3143,10 @@ SWIGINTERN PyObject *_wrap_new_IVRMenu(PyObject *SWIGUNUSEDPARM(self), PyObject
PyObject * obj11 = 0 ;
PyObject * obj12 = 0 ;
PyObject * obj13 = 0 ;
PyObject * obj14 = 0 ;
PyObject * obj15 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOO:new_IVRMenu",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13)) SWIG_fail;
if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOOOOO:new_IVRMenu",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13,&obj14,&obj15)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IVRMenu, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IVRMenu" "', argument " "1"" of type '" "IVRMenu *""'");
@ -3177,16 +3187,16 @@ SWIGINTERN PyObject *_wrap_new_IVRMenu(PyObject *SWIGUNUSEDPARM(self), PyObject
SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_IVRMenu" "', argument " "8"" of type '" "char const *""'");
}
arg8 = reinterpret_cast< char * >(buf8);
ecode9 = SWIG_AsVal_int(obj8, &val9);
if (!SWIG_IsOK(ecode9)) {
SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_IVRMenu" "', argument " "9"" of type '" "int""'");
}
arg9 = static_cast< int >(val9);
ecode10 = SWIG_AsVal_int(obj9, &val10);
if (!SWIG_IsOK(ecode10)) {
SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_IVRMenu" "', argument " "10"" of type '" "int""'");
}
arg10 = static_cast< int >(val10);
res9 = SWIG_AsCharPtrAndSize(obj8, &buf9, NULL, &alloc9);
if (!SWIG_IsOK(res9)) {
SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_IVRMenu" "', argument " "9"" of type '" "char const *""'");
}
arg9 = reinterpret_cast< char * >(buf9);
res10 = SWIG_AsCharPtrAndSize(obj9, &buf10, NULL, &alloc10);
if (!SWIG_IsOK(res10)) {
SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_IVRMenu" "', argument " "10"" of type '" "char const *""'");
}
arg10 = reinterpret_cast< char * >(buf10);
ecode11 = SWIG_AsVal_int(obj10, &val11);
if (!SWIG_IsOK(ecode11)) {
SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_IVRMenu" "', argument " "11"" of type '" "int""'");
@ -3207,7 +3217,17 @@ SWIGINTERN PyObject *_wrap_new_IVRMenu(PyObject *SWIGUNUSEDPARM(self), PyObject
SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "new_IVRMenu" "', argument " "14"" of type '" "int""'");
}
arg14 = static_cast< int >(val14);
result = (IVRMenu *)new IVRMenu(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,arg9,arg10,arg11,arg12,arg13,arg14);
ecode15 = SWIG_AsVal_int(obj14, &val15);
if (!SWIG_IsOK(ecode15)) {
SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "new_IVRMenu" "', argument " "15"" of type '" "int""'");
}
arg15 = static_cast< int >(val15);
ecode16 = SWIG_AsVal_int(obj15, &val16);
if (!SWIG_IsOK(ecode16)) {
SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "new_IVRMenu" "', argument " "16"" of type '" "int""'");
}
arg16 = static_cast< int >(val16);
result = (IVRMenu *)new IVRMenu(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,(char const *)arg9,(char const *)arg10,arg11,arg12,arg13,arg14,arg15,arg16);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IVRMenu, SWIG_POINTER_NEW | 0 );
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
@ -3216,6 +3236,8 @@ SWIGINTERN PyObject *_wrap_new_IVRMenu(PyObject *SWIGUNUSEDPARM(self), PyObject
if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
if (alloc8 == SWIG_NEWOBJ) delete[] buf8;
if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
if (alloc10 == SWIG_NEWOBJ) delete[] buf10;
return resultobj;
fail:
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
@ -3225,6 +3247,8 @@ 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;
if (alloc10 == SWIG_NEWOBJ) delete[] buf10;
return NULL;
}

View File

@ -108,6 +108,8 @@ SWITCH_DECLARE_CONSTRUCTOR IVRMenu::IVRMenu(IVRMenu *main,
const char *exit_sound,
const char *confirm_macro,
const char *confirm_key,
const char *tts_engine,
const char *tts_voice,
int confirm_attempts,
int inter_timeout,
int digit_len,
@ -123,7 +125,8 @@ SWITCH_DECLARE_CONSTRUCTOR IVRMenu::IVRMenu(IVRMenu *main,
}
switch_ivr_menu_init(&menu, main ? main->menu : NULL, name, greeting_sound, short_greeting_sound, invalid_sound,
exit_sound, confirm_macro, confirm_key, confirm_attempts, inter_timeout, digit_len, timeout, max_failures, max_timeouts, pool);
exit_sound, confirm_macro, confirm_key, tts_engine, tts_voice, confirm_attempts, inter_timeout,
digit_len, timeout, max_failures, max_timeouts, pool);
}

View File

@ -44,6 +44,8 @@ struct switch_ivr_menu {
char *ptr;
char *confirm_macro;
char *confirm_key;
char *tts_engine;
char *tts_voice;
int confirm_attempts;
int digit_len;
int max_failures;
@ -99,6 +101,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_init(switch_ivr_menu_t ** new_me
const char *exit_sound,
const char *confirm_macro,
const char *confirm_key,
const char *tts_engine,
const char *tts_voice,
int confirm_attempts,
int inter_timeout,
int digit_len,
@ -159,8 +163,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_init(switch_ivr_menu_t ** new_me
menu->confirm_macro = switch_core_strdup(menu->pool, confirm_macro);
}
if (!switch_strlen_zero(confirm_key)) {
menu->confirm_key = switch_core_strdup(menu->pool, confirm_key);
if (!switch_strlen_zero(tts_engine)) {
menu->tts_engine = switch_core_strdup(menu->pool, tts_engine);
}
if (!switch_strlen_zero(tts_voice)) {
menu->tts_voice = switch_core_strdup(menu->pool, tts_voice);
}
menu->confirm_attempts = confirm_attempts;
@ -373,6 +381,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *s
channel = switch_core_session_get_channel(session);
if (!(menu = switch_ivr_menu_find(stack, name))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Menu!\n");
return SWITCH_STATUS_FALSE;
@ -383,6 +392,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *s
return SWITCH_STATUS_FALSE;
}
if(!switch_strlen_zero(menu->tts_engine) && !switch_strlen_zero(menu->tts_voice)) {
switch_channel_set_variable(channel, "tts_engine", menu->tts_engine);
switch_channel_set_variable(channel, "tts_voice", menu->tts_voice);
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Executing IVR menu %s\n", menu->name);
switch_channel_set_variable(channel, "ivr_menu_status", "success");
@ -719,6 +733,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_build(switch_ivr_menu_
const char *max_timeouts = switch_xml_attr_soft(xml_menu, "max-timeouts");
const char *confirm_macro= switch_xml_attr(xml_menu, "confirm-macro");
const char *confirm_key= switch_xml_attr(xml_menu, "confirm-key");
const char *tts_engine= switch_xml_attr(xml_menu, "tts-engine");
const char *tts_voice= switch_xml_attr(xml_menu, "tts-voice");
const char *confirm_attempts = switch_xml_attr_soft(xml_menu, "confirm-attempts");
const char *digit_len = switch_xml_attr_soft(xml_menu, "digit-len");
const char *inter_timeout = switch_xml_attr_soft(xml_menu, "inter-digit-timeout");
@ -740,6 +756,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_build(switch_ivr_menu_
exit_sound,
confirm_macro,
confirm_key,
tts_engine,
tts_voice,
atoi(confirm_attempts),
atoi(inter_timeout),
atoi(digit_len),