[asterisk-bugs] [JIRA] (ASTERISK-26462) [patch] app_queue: While using queues with realtime, setting back to an empty context doesn't stop the exit key usage

George Joseph (JIRA) noreply at issues.asterisk.org
Wed Aug 2 10:14:10 CDT 2017


     [ https://issues.asterisk.org/jira/browse/ASTERISK-26462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Joseph updated ASTERISK-26462:
-------------------------------------

    Target Release Version/s: 15.0.0

> [patch] app_queue: While using queues with realtime, setting back to an empty context doesn't stop the exit key usage
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-26462
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26462
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_queue
>    Affects Versions: 13.11.2
>         Environment: CentOS 6 64bit, MySQL 5.7 used with ODBC
>            Reporter: Leandro Dardini
>            Severity: Minor
>      Target Release: 11.25.0, 13.13.0, 14.2.0, 15.0.0
>
>         Attachments: app_queue.c.patch
>
>
> I am using realtime queues and they perform great. In extconfig.conf I have them configured as 
> queues => odbc,asterisk1,queue,1
> queues => odbc,asterisk2,queue,2
> queue_members => odbc,asterisk1,queue_member,1
> queue_members => odbc,asterisk2,queue_member,2
> If I have a queue and if I set a context name in the "context" field, when listening to MOH, pressing a DTMF key will exit to that context. If I set back the field "context" to an empty value, I can still exit the queue by pressing a DTMF key. I have tried issuing a QUEUE REFRESH command, a queue reload, even reloading the app_queue module... nothing works. Only restarting asterisk will fix the problem, correctly forbidding the user to exit the queue with a DTMF key.
> If I check the database, every time a caller joins the queue, the table queue is read, but probably "internally" the context data is not updated.
> After a check of the source code, I think to have identified the problem and applying a small change, fixed the issue, but I need your quality checks to confirm this.
> The problem is in the app_queue.c file, in the init_queue function. It initializes a lots of variables to its default values, but not the "context" field. In this way, the context field it is never reset because empty values are skipped while loading from the database. Other fields may suffer the same problem.
> --- app_queue.c~        2016-09-09 18:14:37.000000000 +0200
> +++ app_queue.c 2016-10-13 09:01:31.000000000 +0200
> @@ -2646,6 +2646,9 @@
>         q->retry = DEFAULT_RETRY;
>         q->timeout = DEFAULT_TIMEOUT;
>         q->maxlen = 0;
> +
> +       ast_string_field_set(q, context, "");
> +
>         q->announcefrequency = 0;
>         q->minannouncefrequency = DEFAULT_MIN_ANNOUNCE_FREQUENCY;
>         q->announceholdtime = 1;



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list