[Home]

Summary:ASTERISK-09275: Queue does not fully allow '*' as exit digit
Reporter:Leonardo Gomes Figueira (sabbathbh)Labels:
Date Opened:2007-04-17 13:49:32Date Closed:2007-07-09 21:20:49
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Trying to use '*' as an exit extension on queue does not fully work to the first caller on the queue.

If the first caller press * during announcement messages the digit is accepted and the queue is terminated but if the key is pressed when the queue is calling the members it does not work.

Other digits (0-9,#) work fine all the time.


****** ADDITIONAL INFORMATION ******

The problem is in the second 'if' of this piece of code below from 'wait_for_answer' in app_queue.c:

if ((f->frametype == AST_FRAME_DTMF) && caller_disconnect && (f->subclass == '*')) {
       if (option_verbose > 3)
               ast_verbose(VERBOSE_PREFIX_3 "User hit %c to disconnect call.\n", f->subclass);
       *to=0;
       ast_frfree(f);
       return NULL;
}
if ((f->frametype == AST_FRAME_DTMF) && (f->subclass != '*') && valid_exit(qe, f->subclass)) {
       if (option_verbose > 3)
               ast_verbose(VERBOSE_PREFIX_3 "User pressed digit: %c\n", f->subclass);
       *to=0;
       *digit=f->subclass;
       ast_frfree(f);
       return NULL;
}

The first 'if' checks if '*' was pressed and the caller_disconnect option is enabled for the queue ('H' parameter to the Queue app).

Then the second 'if' checks if any valid digit was pressed but it excludes the '*' key.

IMHO if someone wants '*' as the exit digit and the caller_disconnect is disabled, there is no point to exclude '*' from the valid key. If caller_disconnect is enabled it will take precedence anyway since the first 'if' will return.

I think this check could be safely removed: && (f->subclass != '*')

Tested on 1.2 but this issue applies to 1.4 and trunk too.
Comments:By: Leonardo Gomes Figueira (sabbathbh) 2007-04-17 15:07:37

Ohhh my... Forgot to change the Project before posting the issue. Someone please change it to Applications/app_queue

Sorry :(

By: Jason Parker (jparker) 2007-04-20 14:55:40

Fixed in svn 1.2, 1.4, and trunk in revisions 61692, 61694, and 61695