[asterisk-users] Not answering call when queue is full or has no members

Philipp Kempgen philipp.kempgen at amooma.de
Thu Feb 19 09:11:17 CST 2009


Alex Hermann schrieb:
> I'm trying to prevent answering a channel when a queue is either full or has 
> no members. It seems I'm forced to answer a call before I call Queue() or 
> else the audio is in the early media (which is unacceptable because of the 
> short duration of early media on ISDN).
> 
> Is there any way to let Queue() automatically answer a channel if the call is 
> going to be placed in the queue and will still be unanswered when the 
> QUEUESTATUS is any of FULL, JOINEMPTY, or JOINUNAVAIL?

In Asterisk 1.6 that would be:

Set(free=${QUEUE_MEMBER(support,free)});
if (${free} > 0) {
	Answer();
	Queue(support);
}
else {
	Voicemail();  // or Busy() | ...
}

However that's not atomic so there might be a race condition.

In Asterisk 1.4 you need an AGI script I guess.


    Philipp Kempgen
-- 
AMOOCON 2009, May 4-5, Rostock / Germany   ->  http://www.amoocon.de
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
-- 



More information about the asterisk-users mailing list