<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="RIGHT: auto">I hope this is the right place to ask this question.</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">I am running freeswitch using LUA. <VAR id=yui-ie-cursor></VAR>I'm doing outbound calling for a load tester.</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">I have a number that when you call it you need to enter 2654# before the call get's answered. So I need a way of dialing DTMF digits before the other end answers. I tried to just sleep and send_dtmf after the session.ready but that doesn't work.</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">Is there a way to do this. Sample code below...thanks</div>
<div style="RIGHT: auto"> </div><SPAN style="RIGHT: auto" lang=EN><SPAN style="RIGHT: auto" lang=EN>
<div style="RIGHT: auto">if (session:ready()) then</div>
<div style="RIGHT: auto">session:answer();</div>
<div style="RIGHT: auto">session:setVariable("CallCmp", "Script_dcetest1")</div>
<div style="RIGHT: auto">session:setVariable("PromptFail", "Script_dcetest1") ;</div>
<div style="RIGHT: auto">api = freeswitch.API();</div>
<div style="RIGHT: auto">session:sleep(1000);</div>
<div></div>
<div style="RIGHT: auto">--status = session:getVariable("SilenceStatus");</div>
<div></div>
<div style="RIGHT: auto">session:execute("wait_for_silence", "200 30 20 20000"); --</div>
<div></div>
<div style="RIGHT: auto">-- Continue in english, press 2</div>
<div style="RIGHT: auto">status = session:getVariable("SilenceStatus"); -- This will get past langauge and main menu prompts</div>
<div style="RIGHT: auto">if((status == "unset")and(session:ready())) then </div>
<div style="RIGHT: auto">session:execute("send_dtmf", "2@100"); --@ determines dtmf length, enter NPI</div></SPAN></SPAN></div></body></html>