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

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Sep 3 14:35:14 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-03 14:35 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.

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

---------------------------------------------------------------------- 
 (0092035) putnopvut (administrator) - 2008-09-03 14:35
 http://bugs.digium.com/view.php?id=13402#c92035 
---------------------------------------------------------------------- 
The issue at hand, the fact that Read was not populating the variable, has
been identified as being the use of pipes instead of commas. I have
confirmed by making a sample dialplan that used pipes that the issue the
reporter mentions happens.

As far as the comma and pipe usage goes, it is documented in UPGRADE.txt
in the Asterisk source directory of 1.6.0. That document is the place to
look to find behavior changes and application syntax changes when upgrading
major versions of Asterisk.

Anyway, as far as backwards-compatibility of applications goes, this
really isn't the proper forum for this sort of discussion. I'm not trying
to blow off your point, but we've been hearing about this more and more the
past few months and so our future efforts when changing the code is to
preserve backwards-compatibility of old applications if at all possible. As
far as changing things which were removed with the 1.2 or 1.4 releases
goes, that's a different matter.

Anyway, since the issue reported here has been identified and no fix is
necessary, I'm going to go ahead and close this issue. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-09-03 14:35 putnopvut      Note Added: 0092035                          
======================================================================




More information about the asterisk-bugs mailing list