[asterisk-speech-rec] DTMF Delay

Scott Higginbotham scotth at voicenet.com
Sun Mar 11 17:39:57 MST 2007


I've got an odd situation with DTMF selections being given a delay
compared to the responsiveness of a voice selected menu option.

I load both grammars, one for selecting options 1-9 via Voice selection
and one for DTMF selection so that the user can simply press 1-9 if they
don't like to speak the menu option.

Both work; however selecting the menu option with DTMF causes a good
5-10 second delay before you are taken to the next context after
selecting your option, whereas speaking the command is almost
instantaneously taking you to the next context without the 5-10 second
delay.

A snippet of my code looks like:

exten => s,1,Playback(custom/default/welcome_0)
exten => s,2,SpeechCreate(lumenvox)
exten => s,3,SpeechActivateGrammar(numbers)
exten => s,4,SpeechActivateGrammar(choicetone)
exten => s,5,NoOp(Make it past grammar load)
exten => s,n,SpeechStart
exten => s,n,SpeechBackground(custom/default/menu_main|3)
exten => s,n,NoOP(${SPEECH_TEXT(0)})
exten => s,n,Set(SELECTION=${SPEECH_TEXT(0)})
exten => s,n,SpeechDeactivateGrammar(numbers)
exten => s,n,SpeechDeactivateGrammar(choicetone)
exten => s,n,SpeechDestroy
exten => s,n,NoOp(Received a response of ${SELECTION})
exten => s,n,GotoIf($["${SELECTION}" = "0"]?,3,1)
exten => s,n,GotoIf($["${SELECTION}" = "1"]?region-1,s,2)
exten => s,n,GotoIf($["${SELECTION}" = "2"]?region-2,s,2)
exten => s,n,GotoIf($["${SELECTION}" = "3"]?region-3,s,2)
exten => s,n,GotoIf($["${SELECTION}" = "4"]?region-4,s,2)
exten => s,n,GotoIf($["${SELECTION}" = "5"]?,3,1)
exten => s,n,GotoIf($["${SELECTION}" = "6"]?,3,1)
exten => s,n,GotoIf($["${SELECTION}" = "7"]?advanced,s,1)
exten => s,n,GotoIf($["${SELECTION}" = "8"]?,3,1)
exten => s,n,GotoIf($["${SELECTION}" = "9"]?,3,1)
exten => s,n,Playback(custom/default/no_response_1)            
exten => s,n,Wait(2)                                           
exten => s,n,Goto(new-caller-intro-nresp,s,1)
exten => 1,1,Goto(region-1,s,2)
exten => 3,1,Playback(invalid)
exten => 3,2,Goto(new-caller-intro,s,1)

Any thoughts?

Scott Higginbotham
Systems / Network Operations Manager
215.259.2185 or 1.800.835.5710 ext 2185
scotth at voicenet.com 


More information about the asterisk-speech-rec mailing list