<div dir="ltr"><div>I did as you said but i still have the syntax erroe on the second line: <strong>session:setHangupHook(&quot;</strong>onHangup&quot;,&quot;rien&quot;).</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">NDUWAYEZU Joselyne<br></div></div></div>
<br><div class="gmail_quote">2016-05-17 18:33 GMT+02:00 Jude Mukundane <span dir="ltr">&lt;<a href="mailto:jude19love@gmail.com" target="_blank">jude19love@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hello Joselyne, <br><br></div>try this. it works for me:<br><br><br><b>session:answer()<br>session:setHangupHook(&quot;onHangup&quot;,&quot;rien&quot;)<br><br>if (session:ready()) then</b><br><br></div>just replace your first two lines with the above and try. <br><br></div>good luck!<br><br></div>Jude Mukundane<br><div><div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, May 17, 2016 at 4:58 PM, Nduwayezu, Joselyne <span dir="ltr">&lt;<a href="mailto:35633@heb.be" target="_blank">35633@heb.be</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div><div class="h5"><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 &quot;;&quot; 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 &quot;;&quot; 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(&quot;flite&quot;, &quot;kal&quot;);</code></div><div><code>    </code><code>session:speak(&quot;Welcome. Welcome to the VoIp World!. this is a Blind Users Programing Community. powered by Freeswitch, the free / ultimate PBX. thank to toni!&quot;);</code></div><div><code>    </code><code>session:sleep(100);</code></div><div><code>    </code><code>session:speak(&quot;please select an Action.&quot;);</code></div><div><code>    </code><code>session:sleep(100);</code></div><div><code>    </code><code>session:speak(&quot;to call the conference, press 1&quot;);</code></div><div><code>    </code><code>session:sleep(100);</code></div><div><code>    </code><code>session:speak(&quot;to call Freeswitch IVR, press 2&quot;);</code></div><div><code>    </code><code>session:sleep(100);</code></div><div><code>    </code><code>session:speak(&quot;to call Voice Mail, press 3&quot;);</code></div><div><code>    </code><code>session:sleep(100);</code></div><div><code>    </code><code>session:speak(&quot;for Music on hold, press 4&quot;);</code></div><div><code>    </code><code>session:sleep(100);</code></div><div><code>    </code><code>session:speak(&quot;to call me, press 0&quot;);</code></div><div><code>    </code><code>session:sleep(3000);</code></div><div><code>    </code><code>digits = session:getDigits(1, &quot;&quot;, 3000);</code></div><div><code>    </code><code>if (digits == &quot;1&quot;)  then</code></div><div><code>        </code><code>session:execute(&quot;transfer&quot;,&quot;9888&quot;);</code></div><div><code>    </code><code>end</code></div><div><code>    </code><code>if (digits == &quot;2&quot;)  then</code></div><div><code>        </code><code>session:execute(&quot;transfer&quot;,&quot;5000&quot;);</code></div><div><code>    </code><code>end</code></div><div><code>    </code><code>if (digits == &quot;3&quot;)  then</code></div><div><code>        </code><code>session:execute(&quot;transfer&quot;,&quot;4000&quot;);</code></div><div><code>    </code><code>end</code></div><div><code>    </code><code>if (digits == &quot;4&quot;)  then</code></div><div><code>        </code><code>session:execute(&quot;transfer&quot;,&quot;9999&quot;);</code></div><div><code>    </code><code>end</code></div><div><code>    </code><code>if (digits == &quot;0&quot;)  then</code></div><div><code>        </code><code>session:execute(&quot;transfer&quot;,&quot;<a href="mailto:voipaware@sip.voipuser.org" target="_blank">voipaware@sip.voipuser.org</a>&quot;);</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></div></div>
Haute École de Bruxelles<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank" rel="noreferrer">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank" rel="noreferrer">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank" rel="noreferrer">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank" rel="noreferrer">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank" rel="noreferrer">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank" rel="noreferrer">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank" rel="noreferrer">http://www.freeswitch.org</a><br></blockquote></div><br></div></div></div></div></div></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank" rel="noreferrer">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank" rel="noreferrer">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank" rel="noreferrer">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank" rel="noreferrer">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" target="_blank" rel="noreferrer">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank" rel="noreferrer">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank" rel="noreferrer">http://www.freeswitch.org</a><br></blockquote></div><br></div>

<br>
Haute École de Bruxelles