<br clear="all">I did a simple test with javascript. The same setup working with the following javascript. <br><br><br>session = new Session(&#39;sofia/gateway/voipms/14161231234&#39;);<br><br>session.waitForAnswer(10000);<br>

<br>if (session.ready()) {<br>        session.sleep(1000);<br>        session.streamFile(&#39;/usr/local/freeswitch/sounds/en/us/callie/custom/callback/enter-dest.wav&#39;);<br>}<br><br>---<br><br>Thanks<br>Lloyd<br><br>
<br>

<br><br><div class="gmail_quote">On Thu, Jun 10, 2010 at 1:26 AM, Aloysius Lloyd <span dir="ltr">&lt;<a href="mailto:lloyd.aloysius@gmail.com">lloyd.aloysius@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Hi All,<br><br>I am trying to build a callback application using LUA. I have the following setup.<br><br>- Dial the DID number<br>- Hangup<br>- Callback lua initiate the call after 10 secods<br><br>The above working great. <br>


<br>But when I answer the call ...the wav file never play on the channel.What I am doing wrong?<br><br><br>&lt;extension name=&quot;CallBack&quot;&gt;<br>    &lt;condition field=&quot;destination_number&quot; expression=&quot;^6471231234$&quot;&gt;<br>


        &lt;action application=&quot;set&quot; data=&quot;api_hangup_hook=luarun callback.lua ${caller_id_number}&quot;/&gt;<br>
         &lt;action application=&quot;hangup&quot; /&gt;<br>    &lt;/condition&gt;<br>  &lt;/extension&gt;<br><br><b>callback.lua</b><br><br>os.execute(&quot;sleep &quot; .. tonumber(10));<br><br>pin_number_test=&quot;0511&quot;;<br>



out_gateway1=&quot;sofia/gateway/voipms/1&quot;;<br>message_dir=&quot;/usr/local/freeswitch/sounds/en/us/callie/custom/callback/&quot;;<br><br>number_to_call= argv[1];<br><br>session = freeswitch.Session(&quot;{bypass_media_after_bridge=true,ignore_early_media=true,originate_timeout=40}&quot;..out_gateway1..number_to_call);<br>



session:setAutoHangup(false);<br><br>if ( session:ready() ) then<br>        session:sleep(3000);<br>        session:streamFile(message_dir..&quot;enter-dest.wav&quot;);<br>end<br><br>Thanks<br><font color="#888888">Lloyd<br>


</font></blockquote></div><br>