[asterisk-bugs] [Asterisk 0010700]: [patch] Asterisk case sensitive problem.

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Sep 13 11:13:31 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10700 
====================================================================== 
Reported By:                eliel
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   10700
Category:                   Applications/app_queue
Reproducibility:            always
Severity:                   trivial
Priority:                   normal
Status:                     new
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 82273 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             09-11-2007 19:20 CDT
Last Modified:              09-13-2007 11:13 CDT
====================================================================== 
Summary:                    [patch] Asterisk case sensitive problem.
Description: 
I think all asterisk should be case insensitive cause I have seen this
problem in too many modules:
The config (in this case queues.conf) is loaded case sensitive, but the
CLI is case insensitive so we have a problem like this:
We have 2 queues named: Prueba and prueba they are loaded in memory case
sensitive:

eliel-laptop*CLI> queue show
Prueba       has 0 calls (max unlimited) in 'ringall' strategy (0s
holdtime), W:0, C:0, A:0, SL:0.0% within 0s
   Members:
      sip/eliel (Unavailable) has taken no calls yet
   No Callers
eliel-laptop*CLI>
prueba       has 0 calls (max unlimited) in 'ringall' strategy (0s
holdtime), W:0, C:0, A:0, SL:0.0% within 0s
   Members:
      Sip/eliel (Unavailable) has taken no calls yet
   No Callers

But when I try to get info from an especific queue like this:

eliel-laptop*CLI> queue show prueba
Prueba       has 0 calls (max unlimited) in 'ringall' strategy (0s
holdtime), W:0, C:0, A:0, SL:0.0% within 0s
   Members:
      sip/eliel (Unavailable) has taken no calls yet
   No Callers

eliel-laptop*CLI> queue show Prueba
Prueba       has 0 calls (max unlimited) in 'ringall' strategy (0s
holdtime), W:0, C:0, A:0, SL:0.0% within 0s
   Members:
      sip/eliel (Unavailable) has taken no calls yet
   No Callers

I always get one of the two queues info... I did a patch to make the
autocomplete of queue_show case insensitive but we are loosing some of the
great 'autocomplete' features like doing a:
'queue show PrUeBa' :-).

This problem is found again in chan_sip.c and other modules, my patch I
think shouldn't be applied, I think asterisk should load the config in a
case insensitive manner and don't allow to load sip peers like ELIEL and
eliel or queues like Prueba and prueba (discarding the lastone).
====================================================================== 

---------------------------------------------------------------------- 
 putnopvut - 09-13-07 11:13  
---------------------------------------------------------------------- 
I realized after writing 10700.patch that part of it should be implemented
in 1.4 and trunk no matter if we move to case-insensitive queues or not.
That is, Asterisk should check if multiple queues have the same name and
warn the user that subsequent queues with that name will be skipped. As
such, I have committed part of 10700.patch to 1.4 and trunk already. I just
left out the strcasecmp changes.

The change to 1.4 is in revision 82326 and the change to trunk is in
revision 82327. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
09-13-07 11:13  putnopvut      Note Added: 0070490                          
======================================================================




More information about the asterisk-bugs mailing list