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><extension name="CallBack"><br> <condition field="destination_number" expression="^6471231234$"><br>
<action application="set" data="api_hangup_hook=luarun callback.lua ${caller_id_number}"/><br>
<action application="hangup" /><br> </condition><br> </extension><br><br><b>callback.lua</b><br><br>os.execute("sleep " .. tonumber(10));<br><br>pin_number_test="0511";<br>
out_gateway1="sofia/gateway/voipms/1";<br>message_dir="/usr/local/freeswitch/sounds/en/us/callie/custom/callback/";<br><br>number_to_call= argv[1];<br><br>session = freeswitch.Session("{bypass_media_after_bridge=true,ignore_early_media=true,originate_timeout=40}"..out_gateway1..number_to_call);<br>
session:setAutoHangup(false);<br><br>if ( session:ready() ) then<br> session:sleep(3000);<br> session:streamFile(message_dir.."enter-dest.wav");<br>end<br><br>Thanks<br>Lloyd<br>