[asterisk-bugs] [Asterisk 0013402]: Read() does not set variable

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Sep 1 13:03:18 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13402 
====================================================================== 
Reported By:                raymor
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13402
Category:                   Applications/app_read
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.0-beta9 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-08-30 11:21 CDT
Last Modified:              2008-09-01 13:03 CDT
====================================================================== 
Summary:                    Read() does not set variable
Description: 
When Read()ing dtmf input, although the debugging 
console shows what the user entered the variable 
is left unset.  For example, this code from the 
documentation does not work:

exten => s,1,Gotoif($[ "${LEN(${extensao})}" < "3"]?3:100)
exten => s,n,NoOp(executando - ${extensao} - )
exten => s,n,Read(digito||1)
exten => s,n,SayDigits(${digito})
exten => s,n,Set(extensao=${extensao}${digito})
exten => s,n,GoTo(s,1)
exten => s,100,GoTo(from-pstn,s,1)
exten => h,1,hangup()

SayDigits says nothing because ${digito} is empty 
regardless of what the user presses.

====================================================================== 

---------------------------------------------------------------------- 
 (0091955) raymor (reporter) - 2008-09-01 13:03
 http://bugs.digium.com/view.php?id=13402#c91955 
---------------------------------------------------------------------- 
I downgraded to Asterisk 1.4.21.2 in order to get things 
working, so I can;t confirm the fix.  I can however confirm 
that commas work in 1.4.21.2, so documentaion should reflect 
for ease of upgrading commas are preferred in 1.4.

One place that appeared in documentation is the wiki:
http://www.voip-info.org/wiki/view/Asterisk+cmd+Read

I have updated the wiki. When updating I made it read that 
commas would work in 1.4, based on testing it in 1.4.21.2.
Please update the wiki if commas were not allowed in 1.4.

Presumably any documentation of Read() that has not been 
recently updated shows the old syntax. 

This is actually one example of a much larger bug - 
Asterisk has too many syntax changes generally.
For example, there have been at least three different 
incompatible ways of setting the caller ID for different 
1.x versions.  Syntax should be changed less often and 
whenever possible changes should EXTEND existing syntax
rather than replacing it in order to achieve compatibility 
between versions when possible. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-09-01 13:03 raymor         Note Added: 0091955                          
======================================================================




More information about the asterisk-bugs mailing list