<div dir="ltr">it&#39;s playing twice because of the second accept -- that&#39;s what it plays upon invalid entry. But you don&#39;t want any message on non-match.<div>You might want <a href="http://wiki.freeswitch.org/wiki/Mod_lua#session:getDigits">getdigits</a>, a simpler way to get input without retry options.</div>

<div><br></div><div>Wait, are you using this for confirm of pickup for hunting to mobiles?</div><div>Doesn&#39;t <a href="http://wiki.freeswitch.org/wiki/Variable_group_confirm_file">http://wiki.freeswitch.org/wiki/Variable_group_confirm_file</a> work for you? It seems to fit my use case.<br clear="all">

<div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif"><span style="font-size:small">-Avi</span></span></div><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif"><span style="font-size:small"><br>

</span></span></div><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif"><span style="font-size:small"><br></span></span></div><div class="gmail_quote">On Thu, Jun 14, 2012 at 12:26 PM, Alex Lake <span dir="ltr">&lt;<a href="mailto:alex@digitalmail.com" target="_blank">alex@digitalmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have the following in a lua script:<br>
<br>
session:streamFile(whisper)<br>
dtmf = session:playAndGetDigits(1,1,1,5000,&quot;#&quot;,accept,accept,&quot;\\d+&quot;)<br>
<br>
The idea is that the caller hears &quot;Call for Alex of Wibble<br>
Corp&quot;...&quot;Press 1 to accept&quot; and then he has 5s to press 1, otherwise<br>
it&#39;s assumed that the call has gone to mobile voicemail.<br>
<br>
What seems to be happening is:<br>
<br>
the caller hears &quot;Call for Alex of Wibble Corp&quot;...&quot;Press 1 to accept&quot;<br>
&lt;pause 5s&gt; &quot;Press 1 to accept&quot; &lt;immediate hangup&gt;<br>
<br>
(I&#39;m surprised that it says it twice, and ignores the &lt;timeout&gt; attribute)<br>
<br>
Actually, I wouldn&#39;t mind something that went<br>
<br>
&quot;Call for Alex of Wibble Corp&quot;...&quot;Press 1 to accept&quot; &lt;pause 3s&gt; &quot;Press 1<br>
to accept&quot; &lt;pause 3s&gt; &lt;hangup&gt;<br>
<br>
But telling the user to press 1 and IMMEDIATELY hanging up seems wrong!<br>
<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>
</blockquote></div><br></div></div>