<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">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 class="gmail_signature"><div dir="ltr">NDUWAYEZU Joselyne<br></div></div></div>
</div>
<br>
Haute École de Bruxelles