Re: [asterisk-users] Gotoif Question

2010-02-04 Thread Barry Miller
I think the quotes cause the values to be compared as strings, not
numbers.  The old shell programmer's trick (which allows for empty
strings):

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

ought to cause a numeric comparison.

-- 
Barry

On Thu, Feb 04, 2010 at 09:42:18AM -0600, Danny Nicholas wrote:
 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
 
  
 

 -- 
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

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

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


Re: [asterisk-users] Gotoif Question

2010-02-04 Thread Álvaro Rosendo Olmedo


--
Antes de imprimir este mensaje piense bien si es necesario hacerlo:
El medio ambiente es cosa de todos.
--
AVISO LEGAL

Este mensaje, dirigido solamente a su destinatario, es confidencial.
Si lo ha recibido por error, CAJA DE GUADALAJARA le informa que su
contenido es reservado y no se autoriza su lectura, copia ni uso.

CAJA DE GUADALAJARA no garantiza la confidencialidad de los mensajes
transmitidos por Internet y se reserva el derecho a ejercer las acciones
legales que le correspondan contra todo tercero que acceda de forma
ilegal al contenido de este mensaje y al de los ficheros contenidos
en el mismo. 
--


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

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


Re: [asterisk-users] Gotoif Question

2010-02-04 Thread Álvaro Rosendo Olmedo
C

- Mensaje original -
De: Barry Miller asterisk-us...@notanet.net
Para: 'Asterisk Users Mailing List - Non-Commercial Discussion'
asterisk-users@lists.digium.com
Enviado: Thu Feb 04 17:45:47 2010
Asunto: Re: [asterisk-users] Gotoif Question

I think the quotes cause the values to be compared as strings, not
numbers.  The old shell programmer's trick (which allows for empty
strings):

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

ought to cause a numeric comparison.

-- 
Barry

On Thu, Feb 04, 2010 at 09:42:18AM -0600, Danny Nicholas wrote:
 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
 
  
 

 -- 
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

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

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

--
Antes de imprimir este mensaje piense bien si es necesario hacerlo:
El medio ambiente es cosa de todos.
--
AVISO LEGAL

Este mensaje, dirigido solamente a su destinatario, es confidencial.
Si lo ha recibido por error, CAJA DE GUADALAJARA le informa que su
contenido es reservado y no se autoriza su lectura, copia ni uso.

CAJA DE GUADALAJARA no garantiza la confidencialidad de los mensajes
transmitidos por Internet y se reserva el derecho a ejercer las acciones
legales que le correspondan contra todo tercero que acceda de forma
ilegal al contenido de este mensaje y al de los ficheros contenidos
en el mismo. 
--


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

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


Re: [asterisk-users] Gotoif Question

2010-02-04 Thread Danny Nicholas
That's my dial plan lesson for today.

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Barry Miller
Sent: Thursday, February 04, 2010 10:46 AM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] Gotoif Question

I think the quotes cause the values to be compared as strings, not
numbers.  The old shell programmer's trick (which allows for empty
strings):

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

ought to cause a numeric comparison.

-- 
Barry

On Thu, Feb 04, 2010 at 09:42:18AM -0600, Danny Nicholas wrote:
 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
 
  
 

 -- 
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

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

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


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

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


Re: [Asterisk-Users] Gotoif question

2005-01-06 Thread Diego Aguirre
Try this:
exten = s,2,GotoIf($[${CALLERIDNUM:0:3} == 800] || 
$[${CALLERIDNUM:0:3} = 866] || $[${CALLERIDNUM:0:3} = 877] || 
$[${CALLERIDNUM:0:3} = 888]?s|108)


Diego Aguirre
FWD# 459696
- Original Message - 
From: John Hill [EMAIL PROTECTED]
To: 'Asterisk Users Mailing List - Non-Commercial Discussion' 
asterisk-users@lists.digium.com
Sent: Thursday, January 06, 2005 11:30 AM
Subject: [Asterisk-Users] Gotoif question


Is there a way to combine these lines into one?
exten = s,2,GotoIf($[${CALLERIDNUM:0:3} = 800]?s|108)
exten = s,3,GotoIf($[${CALLERIDNUM:0:3} = 866]?s|108)
exten = s,4,GotoIf($[${CALLERIDNUM:0:3} = 877]?s|108)
exten = s,5,GotoIf($[${CALLERIDNUM:0:3} = 888]?s|108)
Thanks
--John
___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users
___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] Gotoif question

2005-01-06 Thread John Hill
That did it.
Thanks
--John

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:asterisk-users-
 [EMAIL PROTECTED] On Behalf Of Diego Aguirre
 Sent: Thursday, January 06, 2005 8:42 AM
 To: Asterisk Users Mailing List - Non-Commercial Discussion
 Subject: Re: [Asterisk-Users] Gotoif question
 
 Try this:
 
 exten = s,2,GotoIf($[${CALLERIDNUM:0:3} == 800] ||
 $[${CALLERIDNUM:0:3} = 866] || $[${CALLERIDNUM:0:3} = 877] ||
 $[${CALLERIDNUM:0:3} = 888]?s|108)
 
 
 
 Diego Aguirre
 FWD# 459696
 
 - Original Message -
 From: John Hill [EMAIL PROTECTED]
 To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
 asterisk-users@lists.digium.com
 Sent: Thursday, January 06, 2005 11:30 AM
 Subject: [Asterisk-Users] Gotoif question
 
 
  Is there a way to combine these lines into one?
 
  exten = s,2,GotoIf($[${CALLERIDNUM:0:3} = 800]?s|108)
  exten = s,3,GotoIf($[${CALLERIDNUM:0:3} = 866]?s|108)
  exten = s,4,GotoIf($[${CALLERIDNUM:0:3} = 877]?s|108)
  exten = s,5,GotoIf($[${CALLERIDNUM:0:3} = 888]?s|108)
 
  Thanks
  --John
 
  ___
  Asterisk-Users mailing list
  Asterisk-Users@lists.digium.com
  http://lists.digium.com/mailman/listinfo/asterisk-users
  To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 
 
 ___
 Asterisk-Users mailing list
 Asterisk-Users@lists.digium.com
 http://lists.digium.com/mailman/listinfo/asterisk-users
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users