<div dir="ltr">it's playing twice because of the second accept -- that's what it plays upon invalid entry. But you don'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'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"><<a href="mailto:alex@digitalmail.com" target="_blank">alex@digitalmail.com</a>></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,"#",accept,accept,"\\d+")<br>
<br>
The idea is that the caller hears "Call for Alex of Wibble<br>
Corp"..."Press 1 to accept" and then he has 5s to press 1, otherwise<br>
it's assumed that the call has gone to mobile voicemail.<br>
<br>
What seems to be happening is:<br>
<br>
the caller hears "Call for Alex of Wibble Corp"..."Press 1 to accept"<br>
<pause 5s> "Press 1 to accept" <immediate hangup><br>
<br>
(I'm surprised that it says it twice, and ignores the <timeout> attribute)<br>
<br>
Actually, I wouldn't mind something that went<br>
<br>
"Call for Alex of Wibble Corp"..."Press 1 to accept" <pause 3s> "Press 1<br>
to accept" <pause 3s> <hangup><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>