<div dir="ltr">Lua does not require a semi-colon at the end of each line of code, although it typically does not object either.<div><br></div><div>How are you launching this script? </div><div><br></div><div>-MSC</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 17, 2016 at 8:58 AM, Nduwayezu, Joselyne <span dir="ltr"><<a href="mailto:35633@heb.be" target="_blank">35633@heb.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello i use this lua script tha i found on freeswitch wiki</div><div>But when i run it i have the errors:</div><div>syntax error near unexpected token ;</div><div>seesion.answer();</div><div><br></div><div>and when i remove the ";" i have the error on the while loop, syntax error near the unexpected token ==, while (session:ready() == true.</div><div><br></div><div>I there something i did not conigure in order the script to work? do we put ";" after an instructtion like session:answer() or not.</div><div><br></div><div>Thank you or your reply.</div><div><br></div><div title="Hint: double-click to select code"><div><code>session:answer();</code></div><div><code>while (session:ready() == true) do</code></div><div><code> </code><code>session:setAutoHangup(false);</code></div><div><code> </code><code>session:set_tts_params("flite", "kal");</code></div><div><code> </code><code>session:speak("Welcome. Welcome to the VoIp World!. this is a Blind Users Programing Community. powered by Freeswitch, the free / ultimate PBX. thank to toni!");</code></div><div><code> </code><code>session:sleep(100);</code></div><div><code> </code><code>session:speak("please select an Action.");</code></div><div><code> </code><code>session:sleep(100);</code></div><div><code> </code><code>session:speak("to call the conference, press 1");</code></div><div><code> </code><code>session:sleep(100);</code></div><div><code> </code><code>session:speak("to call Freeswitch IVR, press 2");</code></div><div><code> </code><code>session:sleep(100);</code></div><div><code> </code><code>session:speak("to call Voice Mail, press 3");</code></div><div><code> </code><code>session:sleep(100);</code></div><div><code> </code><code>session:speak("for Music on hold, press 4");</code></div><div><code> </code><code>session:sleep(100);</code></div><div><code> </code><code>session:speak("to call me, press 0");</code></div><div><code> </code><code>session:sleep(3000);</code></div><div><code> </code><code>digits = session:getDigits(1, "", 3000);</code></div><div><code> </code><code>if (digits == "1") then</code></div><div><code> </code><code>session:execute("transfer","9888");</code></div><div><code> </code><code>end</code></div><div><code> </code><code>if (digits == "2") then</code></div><div><code> </code><code>session:execute("transfer","5000");</code></div><div><code> </code><code>end</code></div><div><code> </code><code>if (digits == "3") then</code></div><div><code> </code><code>session:execute("transfer","4000");</code></div><div><code> </code><code>end</code></div><div><code> </code><code>if (digits == "4") then</code></div><div><code> </code><code>session:execute("transfer","9999");</code></div><div><code> </code><code>end</code></div><div><code> </code><code>if (digits == "0") then</code></div><div><code> </code><code>session:execute("transfer","<a href="mailto:voipaware@sip.voipuser.org" target="_blank">voipaware@sip.voipuser.org</a>");</code></div><div><code> </code><code>end</code></div><div><code>end</code></div></div><p><br></p><div><br></div><div><br clear="all"></div><div><div><div dir="ltr">NDUWAYEZU Joselyne<br></div></div></div>
</div>
<br>
Haute École de Bruxelles<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>