[asterisk-users] Gotoif Question

Danny Nicholas danny at debsinc.com
Thu Feb 4 09:42:18 CST 2010


Hi Gang,

             I'm working on a lumenvox app and am having "fun" with the
Gotoif's on speech/DTMF recognition.  If you're using DTMF to enter a number
instead of speech to enter a numeric value, the engine will often return a
"confidence score" of 1000 instead of 1-999.  Therefore this Gotoif fails:

exten => s,n,GotoIf($["${SPEECH_SCORE(0)}" <= "${THRESHOLD}"]?:tag)

 

${THRESHOLD} was set to 850.

If SPEECH_SCORE(0) <= 850 (1-850) fails

851-999 succeeds

1000 fails

 

My workaround was this:

exten => s,n,GotoIf($["${SPEECH_SCORE(0)}" = "1000"]?tag)

exten => s,n,GotoIf($["${SPEECH_SCORE(0)}" <= "${THRESHOLD}"]?:tag)

 

Is there a better way than using to Gotoif's per evaluation?

 

Regards,

 

Danny Nicholas

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100204/b068abc1/attachment.htm 


More information about the asterisk-users mailing list