Alex Hermann
2009-Feb-19 13:25 UTC
[asterisk-users] Not answering call when queue is full or has no members
Hello all, 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? -- Greetings, Alex Hermann
Lenz Emilitri
2009-Feb-19 14:44 UTC
[asterisk-users] Not answering call when queue is full or has no members
You can know if the queue is full before issuing the answer() or the queue() command, so you can avoid answering at all. l. 2009/2/19 Alex Hermann <alex at speakup.nl>> Hello all, > > > 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? > > > -- > Greetings, > > Alex Hermann > > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-- Loway - home of QueueMetrics - http://queuemetrics.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090219/7cc84cf1/attachment.htm
Philipp Kempgen
2009-Feb-19 15:11 UTC
[asterisk-users] Not answering call when queue is full or has no members
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 --