[asterisk-users] Case-sensitivity of Dialplan variables.

Michael L. Young myoung at acsacc.com
Wed Oct 3 09:21:42 CDT 2012


----- Original Message -----
> From: "Ira" <ira at extrasensory.com>
> To: "Asterisk Users Mailing List - Non-Commercial Discussion" <asterisk-users at lists.digium.com>
> Sent: Wednesday, October 3, 2012 3:21:50 AM
> Subject: Re: [asterisk-users] Case-sensitivity of Dialplan variables.
> 
> At 07:59 PM 10/2/2012, you wrote:
> >
> >While true that most users are probably not programmers, most people
> >administering Asterisk would be system / network admins,
> >correct?  System admins and networking admins are used to working in
> >environments such as Linux where variables and file names are case
> >sensitive.
> >
> >If someone is moving from a GUI interface to CLI, then they
> >would/should know that case sensitivity is important and therefore
> >the change shouldn't pose a problem.
> 
> I'm not a system / network admin, at least not for Linux. I have one
> Linux machine, it runs Asterisk and Samba. I can usually make
> Asterisk do what I want. Samba works but I have little to no idea
> why.  I run "yum update" occasionally and I run V11 trunk or whatever
> the proper name would be for the development version.

I can think of some situations where case sensitivity could be a problem.  I hope I am not out in left field with my thinking.   Asterisk can be found in companies that have several offices.  Asterisk could be used in a cluster.  Asterisk may be administered by many different folks at a company and probably more than one Asterisk box.  If those individuals are expecting the variables to be case sensitive, it becomes a problem trying to debug problems in the dial plan.  They may not know that an individual in one office is doing things one way because they are not expecting variables to be case sensitive while another individual is expecting things to be case sensitive.  It really can create a lot of trouble and confusion in bigger deployments versus a single individual administering his own box.
 
> If there was a compiler and declared variables then case makes
> perfect sense. Without that, I'd never get a C program to work.
> 
> I know people want case sensitivity, it's the "right" way to do it,
> but how does it help Asterisk?

This helps Asterisk by following a more or less established standard that everyone expects.  I believe that this case-insensitivity in the dial plan actually came as a surprise to some who had never stumbled across it before.  Again, those with experience in unix/linux environments have been trained that variables are case sensitive and they do not have to be programming in C to know that.

> Does anyone have configurations that would be broken by case
> insensitivity?

Some people might have broken dial plans and that is why this was brought up on the list in order to gain attention and feedback.  But, it will only break for the next release.  It won't affect current releases.  Instead, Mark is planning on documenting the current behavior on the Asterisk wiki.  From what I am observing so far, it looks like it may only affect a small number of people.  My feeling is that the majority may have already been using variables as if they were case sensitive already.  That was how variables were documented on the Asterisk wiki... as being case sensitive.

> If not, then what is the upside of enforcing case sensitivity?

The upside is that we have consistency.  This helps to keep bug reporrts to a minimum and in my opinion helps the end user not to create problems for themselves.  The example mentioned in the issue being worked on, is say, an application is expecting the variable ${MIXMONITOR_FILENAME}.  A user thinks, "Hey, the dial plan is case insensitive" and uses ${mixmonitor_filename} or ${MixMonitor_FileName} to set the file name.  They find out that the variable is being ignored.  They later check the variable ${MIXMONITOR_FILENAME} (notice all uppercase) in the dial plan and it shows him that it is set.  They then think there is a bug in Asterisk... well, the problem is that they didn't set the variable according to what app_mixmonitor is expecting.  The application IS case sensitive when it comes to variables.  So, this is the confusion that can be caused by having one part of Asterisk be case sensitive and another part of Asterisk NOT be case sensitive.

I hope this explanation helps those reading this to understand better what is trying to be resolved here.  At least, this is the way I am understanding the reason for the proposal presented to the list.



More information about the asterisk-users mailing list