<br><br><div class="gmail_quote">2010/3/1 michal kalinowski <span dir="ltr"><<a href="mailto:michal.kalinowski@interia.pl">michal.kalinowski@interia.pl</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thank's Brian<br>
<br>
So at this moment i have only clean configuration in lua without any XML.<br>
<br>
I get example from wiki:<br>
<br>
hash={["main"]=undef,<br>
<br>
["name"]="top",<br>
<div class="im"><br>
["greet_long"]="phrase:demo_ivr_main_menu",<br>
<br>
["greet_short"]="phrase:demo_ivr_main_menu_short",<br>
<br>
</div>["invalid_sound"]="ivr/ivrthat_was_an_invalid_entry.wav",<br>
<br>
["exit_sound"]="voicemail/vmgoodbye.wav",<br>
<br>
["confirm_macro"]="undef",<br>
<br>
["confirm_key"]="undef",<br>
<br>
["confirm_attempts"]="3",<br>
<br>
["inter_digit_timeout"]="2000",<br>
<br>
["digit_len"]="1",<br>
<br>
["timeout"]="10000",<br>
["max_failures"]="3"<br>
}<br>
top = freeswitch.IVRMenu(hash["main"],<br>
hash["name"],<br>
hash["greet_long"],hash["greet_short"],<br>
hash["invalid_sound"],<br>
hash["exit_sound"],<br>
hash["confirm_macro"],<br>
hash["confirm_key"],<br>
hash["confirm_attempts"],<br>
hash["inter_digit_timeout"],<br>
hash["digit_len"],<br>
hash["timeout"],<br>
hash["max_failures"]);<br>
<br>
top:bindAction("menu-exec-app", "playback/tmp/swimp.raw","2");<br>
top:execute(session, "top");<br>
<br>
But something is wrong freeswitch say<br>
2010-03-01 13:02:43.633721 [ERR] mod_lua.cpp:182 Error in IVRMenu<br>
expected 16..16 args, got 13<br>
stack traceback:<br>
[C]: in function 'IVRMenu'<br>
/usr/local/freeswitch/scripts/ivr.lua:19: in main chunk<br>
<br>
What args FS expect?<br></blockquote><div><br>I ran into this issue when I was converting the demo IVR to Lua. There are indeed 16 arguments but you've only got 13 of them. Here's a snippet from the Lua script I'm working on:<br>
<span style="font-family: courier new,monospace;">ivr_def = {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> ["main"] = undef,</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> ["name"] = "demo_ivr_lua",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> ["greet_long"] = "phrase:demo_ivr_main_menu",</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> ["greet_short"] = "phrase:demo_ivr_main_menu_short",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> ["invalid_sound"] = "ivr/ivr-that_was_an_invalid_entry.wav",</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> ["exit_sound"] = "voicemail/vm-goodbye.wav",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> ["confirm_macro"] = "",</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> ["confirm_key"] = "",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> ["tts_engine"] = "flite",</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> ["tts_voice"] = "rms",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> ["confirm_attempts"] = "3",</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> ["inter_digit_timeout"] = "2000",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> ["digit_len"] = "4",</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> ["timeout"] = "10000",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> ["max_failures"] = "3",</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> ["max_timeouts"] = "2"</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">}</span><br style="font-family: courier new,monospace;">
Those are all 16 arguments. Notice you need tts_engine, tts_voice, and max_timeouts. Try that and let us know how it goes.<br><br>-MC<br><br></div></div>