• Idefisk
  • Tools
  • Tutorials
  • Reviews
  • VoIP Providers
  • Archives
ZOIPER softphone
AsteriskGuru Archives
Mailing List Archives
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[asterisk-speech-rec] SpeechBackground + DTMF yielding stuck

 
   AsteriskGuru Archives Forum Index -> Asterisk-Speech-Rec
View previous topic :: View next topic  
Author Message
bconway at alum.wpi.edu
Guest





PostPosted: Tue Jun 10, 2008 9:39 pm    Post subject: [asterisk-speech-rec] SpeechBackground + DTMF yielding stuck

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

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-speech-rec mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-speech-rec
Back to top
tbenson at a-1networks.co
Guest





PostPosted: Tue Jun 10, 2008 10:54 pm    Post subject: [asterisk-speech-rec] SpeechBackground + DTMF yielding stuck

Each time you create a 'SpeechBackground' you are resetting the variables as you are grabbing speech again.

Try this:

[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,Set(SCORE1=${SPEECH_SCORE(0)})
exten => s,n,Set(TEXT1=${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,Set(SCORE2=${SPEECH_SCORE(0)})
exten => s,n,Set(TEXT2=${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,Set(SCORE3=${SPEECH_SCORE(0)})
exten => s,n,Set(TEXT3=${SPEECH_TEXT(0)})
exten => s,n,SpeechDeactivateGrammar(yesno)
exten => s,n,SpeechDeactivateGrammar(digits)
exten => s,n,SpeechDestroy
exten => s,n,Verbose(1, First time was Result: ${SCORE1} Text: ${TEXT1})
exten => s,n,Verbose(1, Second time was Result: ${SCORE2} Text: ${TEXT2})
exten => s,n,Verbose(1, Third time was Result: ${SCORE3} Text: ${TEXT3})
exten => s,h,Hangup


Here you are storing the result score and text for each prompt to a new channel variable, after this you can run another speechbackground to get new scores and text's, just make sure to store them elsewhere before going for another speech interaction. This should point out to you how to store them, and probably give you the missing part where you see why you are rewriting the variables each time you get speech.

Trevor

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-speech-rec mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-speech-rec
Back to top
bconway at alum.wpi.edu
Guest





PostPosted: Tue Jun 10, 2008 11:04 pm    Post subject: [asterisk-speech-rec] SpeechBackground + DTMF yielding stuck

On Tue, 10 Jun 2008 16:47:41 -0700 (PDT)
Trevor Benson <tbenson@a-1networks.com> wrote:

Quote:
Each time you create a 'SpeechBackground' you are resetting the
variables as you are grabbing speech again.

-snip-

Quote:


Here you are storing the result score and text for each prompt to a new
channel variable, after this you can run another speechbackground to
get new scores and text's, just make sure to store them elsewhere
before going for another speech interaction. This should point out to
you how to store them, and probably give you the missing part where you
see why you are rewriting the variables each time you get speech.


Thanks for the reply.

I understand that, and the variables being reset is what I'm expecting.
My point is that it's *not* happening when using DTMF. A
SpeechBackground that does not receive any speech is continuing to use
the result from the *previous* application call when DTMF is used (on the
first of three beeps in my previous example). Let me know if I wasn't
clear with my previous code snippet and sequence of events. Thanks.

Brian J. Conway

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-speech-rec mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-speech-rec
Back to top
tbenson at a-1networks.co
Guest





PostPosted: Thu Jun 12, 2008 4:44 pm    Post subject: [asterisk-speech-rec] SpeechBackground + DTMF yielding stuck

Quote:
I understand that, and the variables being reset is what I'm expecting.
My point is that it's *not* happening when using DTMF. A
SpeechBackground that does not receive any speech is continuing to use
the result from the *previous* application call when DTMF is used (on
the
first of three beeps in my previous example). Let me know if I wasn't
clear with my previous code snippet and sequence of events. Thanks.

Yeah I misunderstood previously. I think that DTMF stores in another variable (${EXTEN}?) when doing that, I will have to dig into some of my speech/dtmf code and see what I was doing to handle it when they started using keypress instead.


Quote:
Brian J. Conway

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-speech-rec mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-speech-rec

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-speech-rec mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-speech-rec
Back to top
Display posts from previous:   
   AsteriskGuru Archives Forum Index -> Asterisk-Speech-Rec All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
contact us at: support@asteriskguru.com - asterisKGuru.com © all rights reserved   |   *asterisk is registered trademark of © Digium™