[Freeswitch-users] significant delay waiting for response after playAndGetDigits()

Wes wes-fs at 499x.com
Thu Jun 30 22:46:39 MSD 2011


I've narrowed it down a bit.  I think this may be a bug (memory leak maybe?)

It seems that the pagd function is very responsive on the first use, but 
on each repeated call to this function, it takes longer to respond to 
the user's keypress.

The following test script illustrates the problem.  It asks user to 
press a key, then it starts counting up to 10.  The first time, it stops 
right away after you press a key, telling you what key you pressed, the 
second time, it gets as far as the number 3, the third time, it counts 
up to six, and so on, until it completes the count all the way to 10, 
and then it says you've pressed an invalid entry, even though you indeed 
pressed a key at the beginning of the message.

lua script:
http://pastebin.freeswitch.org/16637

phrase xml:
http://pastebin.freeswitch.org/16636

Log:
http://pastebin.freeswitch.org/16635

Could someone try this example on their own system to see if they could 
duplicate the behavior?

Thanks in advance!


On 6/30/2011 10:10 AM, Wes wrote:
> I am experiencing a delay waiting for the system to respond in a lua
> script that is using playAndGetDigits.  I press a key while the voice is
> still speaking, and it continues to speak for a few seconds before
> moving to the part of the script for the particular keypress.
>
> Also, related: sometimes it speaks the "invalid" message even though the
> key pressed is a valid one, and then immediately after speaking the
> invalid message, it continues with the processing for the key that was
> pressed.  So I know I didn't press an invalid key.
>
> --        session:execute('flush_dtmf');
>           session:flushDigits()
>           local digits = session:playAndGetDigits(1, 1, 3, 2000, "#",
> "phrase:play_submit_rerecord:1:2:3", invalid, "\\d{1}")
>           if ( digits == "1") then
>
> ETC
>
> here is the phrase:
>
> <macro name="play_submit_rerecord">
> <input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
> <match>
> <action function="speak-text"
>                   data="To listen to your dictation, press $1, To submit
> your dictation , press $2, To discard your dictation and start over,
> press $3."/>
> </match>
> </input>
> </macro>
>
> Is the speak-text just too cpu intensive and causing it to be slow to
> respond to the DTMF?
>
> Any help would be appreciated... thanks!
>
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> http://www.cluecon.com 877-7-4ACLUE
>
> 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



More information about the FreeSWITCH-users mailing list