[asterisk-dev] Asterisk Queues case sensitive?

Eliel Sardanons eliels at gmail.com
Mon Sep 10 13:33:21 CDT 2007


Hello,
        I have seen many app_queue.c case problems, related to realtime.
When we use realtime queues, they are not loaded in memory until a call
enters that queue (via Queue() dialplan application) or we do a 'show queue
<realtime-queue>', the problem is that while doing a 'show queue <a>' that
queue (<a>) is found case insensitive (in realtime) so:
If we have a queue named Prueba on mysql, and we do a: 'show queue PRUEBA'
then the queue Prueba is loaded in memory as 'PRUEBA' and should be loaded
as 'Prueba' as is defined in mysql. Then manager actions compare the
received parameter 'Queue:' case sensitive (strcmp) and not (strcasecmp) so
the queue Prueba loaded as PRUEBA is never recognized on actions.
Another problem I have seen is that while loading queues.conf if we have a
queue named Prueba and a queue named PRUEBA on CLI commands we can't reach
PRUEBA because the autocomplete and the CLI command finds Prueba first or
PRUEBA and we are not able to do:
show queue Prueba
AND
show queue PRUEBA
Returning a reply for this command with different results.

I'm doing a patch for this issue but the question is: Queues should be case
sensitive or insensitive?

The solution would be to use always strcmp or strcasecmp.

Thanks in advanced.

eliel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20070910/b6d4433f/attachment.htm 


More information about the asterisk-dev mailing list