Thats a very good question, let me show you how you can do it.<div><br><div><font face="courier new, monospace"><div>session:answer();</div><div>session:streamFile(&quot;blah.wav&quot;);</div><div>op=&#39;+&#39;</div><div>
if op == &quot;+&quot; then</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>r = a + b</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>session:streamFile(&quot;finally-I-did-this.wav&quot;); </div>
<div>elseif op == &quot;-&quot; then</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>r = a - b</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>session:streamFile(&quot;It-was-vry-difficult.wav&quot;);  </div>
<div>elseif op == &quot;*&quot; then</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>r = a*b</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>session:streamFile(&quot;just-kidding.wav&quot;);  </div>
<div>elseif op == &quot;/&quot; then</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>r = a/b</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>session:streamFile(&quot;only-took-5-hrs-for-this.wav&quot;);  </div>
<div>else</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>error(&quot;invalid operation&quot;)</div><div>end</div><div>session:hangup();</div><div><br></div><div><br></div></font></div><div><font face="times new roman, new york, times, serif"><span style="font-size:15px">But whatever you want to do if it requires you to include some header/library on top don&#39;t forget to add it. </span></font></div>
<div><font face="times new roman, new york, times, serif"><span style="font-size:15px"><br></span></font></div><div><font face="times new roman, new york, times, serif"><span style="font-size:15px"><br></span></font></div>
<div><font face="times new roman, new york, times, serif"><span style="font-size:15px">Regards,</span></font></div><div><font face="times new roman, new york, times, serif"><span style="font-size:15px">Sammy Go.</span></font></div>
<div><font face="times new roman, new york, times, serif"><span style="font-size:15px"><br></span></font></div><div><font face="times new roman, new york, times, serif"><span style="font-size:15px"><br></span></font></div>
<div><font face="times new roman, new york, times, serif"><span style="font-size:15px">On Tue, May 29, 2012 at 2:38 PM, Samira Mh </span></font><span dir="ltr" style="font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif;font-size:15px">&lt;<a href="mailto:saami_mh@ymail.com" target="_blank">saami_mh@ymail.com</a>&gt;</span><font face="times new roman, new york, times, serif"><span style="font-size:15px"> wrote:</span></font></div>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><div><div><font face="&#39;times new roman&#39;, &#39;new york&#39;, times, serif">i have created the file named &quot;helloworld.lua&quot; like this:</font></div>
<div><font face="&#39;times new roman&#39;, &#39;new york&#39;, times, serif">session:answer();</font></div><div><font face="&#39;times new roman&#39;, &#39;new york&#39;, times, serif">session:streamFile(&quot;blah.wav&quot;);</font></div>
<div><font face="&#39;times new roman&#39;, &#39;new york&#39;, times, serif">session:hangup();</font></div><div style="font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif;font-size:12pt">and it working correctly,</div>
<div style="font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif;font-size:12pt">**now i want to use lua command -not freeswitch command -in lua </div><div style="font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif;font-size:12pt">
for example run:</div><div style="font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif;font-size:12pt"><br></div><div style="font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif;font-size:12pt">
op=&#39;+&#39;</div><div style="font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif;font-size:12pt"><pre style="text-align:justify">if op == &quot;+&quot; then
      r = a + b
    elseif op == &quot;-&quot; then
      r = a - b
    elseif op == &quot;*&quot; then
      r = a*b
    elseif op == &quot;/&quot; then
      r = a/b
    else
      error(&quot;invalid operation&quot;)
    end</pre><pre style="text-align:justify">but how can do that?</pre><pre style="text-align:justify">thanks alot</pre></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">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
Join Us At ClueCon - Aug 7-9, 2012<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">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>