<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><SPAN><VAR id=yui-ie-cursor></VAR><BR class=yui-cursor></SPAN></div>
<div><BR></div>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV dir=ltr><FONT size=2 face=Arial>
<DIV style="BORDER-BOTTOM: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; PADDING-BOTTOM: 0px; LINE-HEIGHT: 0; MARGIN: 5px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; HEIGHT: 0px; FONT-SIZE: 0px; BORDER-TOP: #ccc 1px solid; BORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 0px" class=hr contentEditable=false readonly="true"></DIV><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Jim Daley &lt;jim.daley1223@yahoo.com&gt;<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> "freeswitch-users@lists.freeswitch.org" &lt;freeswitch-users@lists.freeswitch.org&gt;; "freeswitch-users@lists.freeswitch.org" &lt;freeswitch-users@lists.freeswitch.org&gt; <BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Thursday, November 8, 2012 6:31 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> [Freeswitch-users] (no subject)<BR></FONT></DIV><BR>
<DIV id=yiv1024287>
<DIV>
<DIV style="BACKGROUND-COLOR: #fff; FONT-FAMILY: times new roman, new york, times, serif; COLOR: #000; FONT-SIZE: 12pt">
<DIV>I hope this is the right place to ask this question.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I am running freeswitch using LUA. <VAR id=yiv1024287yui-ie-cursor></VAR>I'm doing outbound calling for a load tester.</DIV>
<DIV>&nbsp;</DIV>
<DIV>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>&nbsp;</DIV>
<DIV>Is there a way to do this. Sample code below...thanks</DIV>
<DIV>&nbsp;</DIV><SPAN lang=EN><SPAN lang=EN>
<DIV>if (session:ready()) then</DIV>
<DIV>session:answer();</DIV>
<DIV>session:setVariable("CallCmp", "Script_dcetest1")</DIV>
<DIV>session:setVariable("PromptFail", "Script_dcetest1") ;</DIV>
<DIV>api = freeswitch.API();</DIV>
<DIV>session:sleep(1000);</DIV>
<DIV></DIV>
<DIV>--status = session:getVariable("SilenceStatus");</DIV>
<DIV></DIV>
<DIV>session:execute("wait_for_silence", "200 30 20 20000"); --</DIV>
<DIV></DIV>
<DIV>-- Continue in english, press 2</DIV>
<DIV>status = session:getVariable("SilenceStatus"); -- This will get past langauge and main menu prompts</DIV>
<DIV>if((status == "unset")and(session:ready())) then </DIV>
<DIV>session:execute("send_dtmf", "2@100"); --@ determines dtmf length, enter NPI</DIV></SPAN></SPAN></DIV></DIV></DIV><BR>_________________________________________________________________________<BR>Professional FreeSWITCH Consulting Services:<BR><A href="mailto:consulting@freeswitch.org" ymailto="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>FreeSWITCH-users mailing list<BR><A
 href="mailto:FreeSWITCH-users@lists.freeswitch.org" ymailto="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><BR></DIV></DIV></div></body></html>