[asterisk-bugs] [Asterisk 0018453]: Dialplan does not work as it should

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Dec 9 15:42:55 CST 2010


The following issue has been SUBMITTED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18453 
====================================================================== 
Reported By:                falves11
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18453
Category:                   PBX/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.2 
SVN Revision (number only!): 297824 
Request Review:              
====================================================================== 
Date Submitted:             2010-12-09 15:42 CST
Last Modified:              2010-12-09 15:42 CST
====================================================================== 
Summary:                    Dialplan does not work as it should
Description: 
Given a set of global variables GW0=A, GW1=B, etc,, and two integer global
variables MXC=0 and MX=1

The following line does not work (erroneously), 
exten =>_X.,1,Set(Target=${GW${${RAND(${MXC},${MX})}}})

So I had to break it in 2 separate lines, that do exactly what the first
line should do
exten =>_X.,1,Set(junky=${RAND(${MXC},${MX})})
exten =>_X.,n,Set(Target=${GW${junky}})

The goal os to have the variable Target to randomly fluctuate between GW0 
and GW1.
I think that the parser is flawed, since both ways to express the logic
are correct.


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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-12-09 15:42 falves11       New Issue                                    
2010-12-09 15:42 falves11       Asterisk Version          => SVN             
2010-12-09 15:42 falves11       Regression                => No              
2010-12-09 15:42 falves11       SVN Branch (only for SVN checkouts, not tarball
releases) => 1.6.2           
2010-12-09 15:42 falves11       SVN Revision (number only!) => 297824          
======================================================================




More information about the asterisk-bugs mailing list