[Freeswitch-users] playAndGetDigits working as designed?

Avi Marcus avi at avimarcus.net
Thu Jun 14 17:02:55 MSD 2012


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.
You might want getdigits<http://wiki.freeswitch.org/wiki/Mod_lua#session:getDigits>,
a
simpler way to get input without retry options.

Wait, are you using this for confirm of pickup for hunting to mobiles?
Doesn't http://wiki.freeswitch.org/wiki/Variable_group_confirm_file work
for you? It seems to fit my use case.
-Avi


On Thu, Jun 14, 2012 at 12:26 PM, Alex Lake <alex at digitalmail.com> wrote:

> I have the following in a lua script:
>
> session:streamFile(whisper)
> dtmf = session:playAndGetDigits(1,1,1,5000,"#",accept,accept,"\\d+")
>
> The idea is that the caller hears "Call for Alex of Wibble
> Corp"..."Press 1 to accept" and then he has 5s to press 1, otherwise
> it's assumed that the call has gone to mobile voicemail.
>
> What seems to be happening is:
>
> the caller hears "Call for Alex of Wibble Corp"..."Press 1 to accept"
> <pause 5s> "Press 1 to accept" <immediate hangup>
>
> (I'm surprised that it says it twice, and ignores the <timeout> attribute)
>
> Actually, I wouldn't mind something that went
>
> "Call for Alex of Wibble Corp"..."Press 1 to accept" <pause 3s> "Press 1
> to accept" <pause 3s> <hangup>
>
> But telling the user to press 1 and IMMEDIATELY hanging up seems wrong!
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> Join Us At ClueCon - Aug 7-9, 2012
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120614/370c4a7a/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list