[asterisk-speech-rec] SpeechBackground + DTMF yielding stuck key-like behavior

Brian J. Conway bconway at alum.wpi.edu
Tue Jun 10 17:34:02 CDT 2008


Greetings.  I am running Asterisk 1.4.20.1 with LumenVox & connector 
(8.0) on a couple  Linux distributions (mostly) successfully.  However, I 
have run into an issue where a speech variable is not being set correctly 
after DTMF use, and I'm not sure if I'm doing something wrong.  Consider 
the following context (the 'answer' and the loading of the grammars are 
done previously):

[lumenvox-test]
exten => s,1,SpeechCreate
exten => s,n,SpeechActivateGrammar(yesno)
exten => s,n,SpeechActivateGrammar(digits)
exten => s,n,Wait(2)
exten => s,n,SpeechBackground(beep|3)
exten => s,n,Noop,${SPEECH_SCORE(0)}
exten => s,n,Noop,${SPEECH_TEXT(0)}
exten => s,n,SpeechBackground(beep|3)
exten => s,n,Noop,${SPEECH_SCORE(0)}
exten => s,n,Noop,${SPEECH_TEXT(0)}
exten => s,n,SpeechBackground(beep|3)
exten => s,n,Noop,${SPEECH_SCORE(0)}
exten => s,n,Noop,${SPEECH_TEXT(0)}
exten => s,n,SpeechDeactivateGrammar(yesno)
exten => s,n,SpeechDeactivateGrammar(digits)
exten => s,n,SpeechDestroy

Here is the behavior when saying "three" during the first beep, and 
ignoring the second two beeps.  As expected, the latter two Noop's don't 
provide any response:

-----
     -- Executing [s at lumenvox-test:1] 
SpeechCreate("SIP/SEND-t0906-08257800", "") in new stack
     -- Executing [s at lumenvox-test:2] 
SpeechActivateGrammar("SIP/SEND-t0906-08257800", "yesno") in new stack
     -- Executing [s at lumenvox-test:3] 
SpeechActivateGrammar("SIP/SEND-t0906-08257800", "digits") in new stack
     -- Executing [s at lumenvox-test:4] Wait("SIP/SEND-t0906-08257800", "2") 
in new stack
     -- Executing [s at lumenvox-test:5] 
SpeechBackground("SIP/SEND-t0906-08257800", "beep|3") in new stack
     -- Executing [s at lumenvox-test:6] NoOp("SIP/SEND-t0906-08257800", 
"999") in new stack
     -- Executing [s at lumenvox-test:7] NoOp("SIP/SEND-t0906-08257800", "3") 
in new stack
     -- Executing [s at lumenvox-test:8] 
SpeechBackground("SIP/SEND-t0906-08257800", "beep|3") in new stack
     -- Executing [s at lumenvox-test:9] NoOp("SIP/SEND-t0906-08257800", "") 
in new stack
     -- Executing [s at lumenvox-test:10] NoOp("SIP/SEND-t0906-08257800", "") 
in new stack
     -- Executing [s at lumenvox-test:11] 
SpeechBackground("SIP/SEND-t0906-08257800", "beep|3") in new stack
     -- Executing [s at lumenvox-test:12] NoOp("SIP/SEND-t0906-08257800", "") 
in new stack
     -- Executing [s at lumenvox-test:13] NoOp("SIP/SEND-t0906-08257800", "") 
in new stack
     -- Executing [s at lumenvox-test:14] 
SpeechDeactivateGrammar("SIP/SEND-t0906-08257800", "yesno") in new stack
     -- Executing [s at lumenvox-test:15] 
SpeechDeactivateGrammar("SIP/SEND-t0906-08257800", "digits") in new stack
     -- Executing [s at lumenvox-test:16] 
SpeechDestroy("SIP/SEND-t0906-08257800", "") in new stack
-----

Here is the same call when pressing 3 on the keypard during the first 
beep, and ignoring the second two beeps:

-----
     -- Executing [s at lumenvox-test:1] 
SpeechCreate("SIP/SEND-t0906-a9b004a8", "") in new stack
     -- Executing [s at lumenvox-test:2] 
SpeechActivateGrammar("SIP/SEND-t0906-a9b004a8", "yesno") in new stack
     -- Executing [s at lumenvox-test:3] 
SpeechActivateGrammar("SIP/SEND-t0906-a9b004a8", "digits") in new stack
     -- Executing [s at lumenvox-test:4] Wait("SIP/SEND-t0906-a9b004a8", "2") 
in new stack
     -- Executing [s at lumenvox-test:5] 
SpeechBackground("SIP/SEND-t0906-a9b004a8", "beep|3") in new stack
     -- Executing [s at lumenvox-test:6] NoOp("SIP/SEND-t0906-a9b004a8", 
"1000") in new stack
     -- Executing [s at lumenvox-test:7] NoOp("SIP/SEND-t0906-a9b004a8", "3") 
in new stack
     -- Executing [s at lumenvox-test:8] 
SpeechBackground("SIP/SEND-t0906-a9b004a8", "beep|3") in new stack
     -- Executing [s at lumenvox-test:9] NoOp("SIP/SEND-t0906-a9b004a8", 
"1000") in new stack
     -- Executing [s at lumenvox-test:10] NoOp("SIP/SEND-t0906-a9b004a8", "3") 
in new stack
     -- Executing [s at lumenvox-test:11] 
SpeechBackground("SIP/SEND-t0906-a9b004a8", "beep|3") in new stack
     -- Executing [s at lumenvox-test:12] NoOp("SIP/SEND-t0906-a9b004a8", 
"1000") in new stack
     -- Executing [s at lumenvox-test:13] NoOp("SIP/SEND-t0906-a9b004a8", "3") 
in new stack
     -- Executing [s at lumenvox-test:14] 
SpeechDeactivateGrammar("SIP/SEND-t0906-a9b004a8", "yesno") in new stack
     -- Executing [s at lumenvox-test:15] 
SpeechDeactivateGrammar("SIP/SEND-t0906-a9b004a8", "digits") in new stack
     -- Executing [s at lumenvox-test:16] 
SpeechDestroy("SIP/SEND-t0906-a9b004a8", "") in new stack
-----

As you can see, the latter two SpeechBackground's don't return empty 
values, but instead the original keypad input from the earlier use. 
This causes a very messy fall-through situation unless you change those 
variables immediately via a voice and SpeechBackground.  Bug or am I doing 
something wrong?  Thanks.

Brian J. Conway



More information about the asterisk-speech-rec mailing list