[asterisk-bugs] [Asterisk 0012349]: Optional timeout parameter is not optional

noreply at bugs.digium.com noreply at bugs.digium.com
Tue Apr 1 16:56:06 CDT 2008


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.digium.com/view.php?id=12349 
====================================================================== 
Reported By:                johnlange
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   12349
Category:                   Applications/app_queue
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.18 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             04-01-2008 16:56 CDT
Last Modified:              04-01-2008 16:56 CDT
====================================================================== 
Summary:                    Optional timeout parameter is not optional
Description: 
The documentation shows that Queues should be called as follows:

Queue(queuename[|options[|URL][|announceoverride][|timeout][|AGI])

However, if timeout is left empty or set to 0, the queue times out
immediately.

e.g.:

exten => s,1,Queue(queue-test|ti||||update-queue)

The logged in agent gets a very short ring then the call sits in the queue
for a few seconds then goes to the next priority after the Queue
statement.

I think that this:

        /* set the expire time based on the supplied timeout; */
        if (args.queuetimeoutstr)
                qe.expire = qe.start + atoi(args.queuetimeoutstr);
        else
                qe.expire = 0;

should actually be:

        /* set the expire time based on the supplied timeout; */
        if (!ast_strlen_zero(args.queuetimeoutstr))          
                qe.expire = qe.start + atoi(args.queuetimeoutstr);
        else
                qe.expire = 0;

I tried this above and it seemed to fix the problem. Diff is in additonal
info.
====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
04-01-08 16:56  johnlange      Asterisk Version          => 1.4.18          
04-01-08 16:56  johnlange      SVN Branch (only for SVN checkou => N/A          
  
======================================================================




More information about the asterisk-bugs mailing list