Summary:ASTERISK-00192: [patch] QueueTimeout Patch
Reporter:outtolunc (outtolunc)Labels:
Date Opened:2003-08-28 16:10:53Date Closed:2011-06-07 14:11:59
Versions:Frequency of
Environment:Attachments:( 0) app_queue.diff
Description:i've found that when spooling a call to queue, if no reps are available the call just sits there (listening to moh), and sits there... (even some of you mention that after-hours kicks in and they could sit there all night (unless they hangup)) <G>


well, this is a queuetimeout mod, settable in queues.conf with the syntax:  queuetimeout = 60
when the queuetimeout is reached, the call will use that queues context=xxxxxxx and process it as an exten => s,1,...

NOTE: for this to work you must use the new method of spooling queue calls..
spool file...
Channel: IAX/tbsprod@NuFone/XXXXXXXXXX
MaxRetries: 0
WaitTime: 20
Callerid: TBS <(408) XXX-XXXX>
Context: op_outgoing
Extension: 1
Priority: 1
exten => 1,1,Queue(op_ready,t)

and you also need the context you used in queues.conf
exten => 1,1,Playback(vm-isunavail)
exten => 1,2,Hangup
exten => s,1,Playback(vm-isunavail)
exten => s,2,Hangup
exten => t,1,Goto(s,2)
exten => i,1,Goto(s,2)
exten => o,1,Goto(s,1)

Comments:By: davetroy (davetroy) 2003-09-07 14:55:35

I embarked on solving this as well, but rather than trying to send it to the 's' extension in the queue's context, it just dumps after the timeout and lets the calling extension figure out what to do with it.

This patch uses the 'queuetimeout' parameter as well, and also includes position and holdtime announcements, as per bug ASTERISK-211.

The patch can be downloaded here:

See also bug ASTERISK-211.

By: Adam Goryachev (adamg) 2003-09-11 08:27:49

Well, I went about to implement this precise thing (and in fact it was my first real functionality patch to asterisk that actually worked !!!)

Anyway, afterward I came here, realised it was already done... so wanted to add my 0.02c ...

I think this feature is perhaps best implemented using the first method, that way you can differentiate in the dialplan between no agents logged into the queue as opposed to the call was in the queue for too long. (ie, on timeout redirect to a given context).

Hopefully this will be added to CVS shortly...

By: John Todd (jtodd) 2003-09-13 20:00:46

OK, so again we have two patches that do the same thing.  Can you all determine which is the "best" way to do this, and then get a yea/nay vote on it so Mark knows what he has to look at for final update candidate?

By: Brian West (bkw918) 2003-09-13 20:06:29

I'm thinking some of these patches belong in a contrib directory in cvs.  That would then allow more time to refine and/or figure out which ones work best.  Beacuse we have too many cooks in the kitchen.

my 2 cents

By: davetroy (davetroy) 2003-09-17 10:18:39

Perhaps return a priority+101 value if no agents in queue?  Should also consider what priority to return if queue is full (len == maxlen).

By: yamez (yamez) 2003-10-12 17:49:24

You know if either of these patchs will be in CVS soon?
Hell I would be happy if queue() just listened to AbsoluteTimeout
it does not! If it did. I could have done something like this:

exten => 3860,1,AbsoluteTimeout(10)
exten => 3860,2,Queue(nocnq|tT)
exten => 3860,3,AbsoluteTimeout(0)
exten => 3860,4,Background(OpsMenuNight)
exten => 3860,5,Voicemail2(u3860@isdnnet)
exten => 3860,6,Goto(default|#|1)
exten => t,1,Goto(3860|3)
exten => 0,1,Goto(receptionist|s|1)

By: John Todd (jtodd) 2003-10-24 00:32:41

Gentlemen - can we get a consensus and some testing done on these very useful patches?

By: yamez (yamez) 2003-10-24 06:03:47

I have been testing the:
For over a week. It has not caused any crashes and does seem to work well. I am only using the queuetimeout part of the patch.  I would have tried the other
patch as well but it did not include the queuetimeout.

I would not mind the timeout being in seconds instead of queue cycles. Either
version will work for me.

By: davetroy (davetroy) 2003-11-10 09:06:10.000-0600

Would suggest that this be merged with bug ASTERISK-211.  The patch presented there includes queue timeout functionality.

By: ltropiano (ltropiano) 2004-01-10 23:35:22.000-0600

Just curious, couldn't you use the "n" option to Queue ... seems to do what you want it to do.

By: Brian West (bkw918) 2004-01-26 21:43:26.000-0600

n option didn't exist when this patch was first created.  n can do what is needed now I think.