[Home]

Summary:ASTERISK-11942: Queue handling problems with IAX/possibly others
Reporter:jeffery palmer (darren1713)Labels:
Date Opened:2008-04-29 16:42:42Date Closed:2011-06-07 14:02:44
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:I'll be glad to develop a fix for this, but I need some feedback as to why/what/and general intentions.

I have 8 IAX members of a very basic rrmemory queue. When a call comes into the queue, it will pick a single IAX channel to ring.

The major problem is that until that IAX channel is answered, ALL consecutive calls are routed to the same IAX channel. So, here's the scenario.

> Inbound call -> app_queue -> ring IAX device #1
> Inbound call -> app_queue -> ring IAX device #1
> Inbound call -> app_queue -> ring IAX device #1
IAX device #1 ANSWERED
> Inbound call -> app_queue -> ring IAX device #2
> Inbound call -> app_queue -> ring IAX device #2

and this should look like:

> Inbound call -> app_queue -> ring IAX device #1
> Inbound call -> app_queue -> ring IAX device #2
> Inbound call -> app_queue -> ring IAX device #3
IAX device #1 ANSWERED
> Inbound call -> app_queue -> ring IAX device #4
> Inbound call -> app_queue -> ring IAX device ASTERISK-1

I would like to discuss why this is happening, or if it's intentional for other channels such as SIP/ZAP/etc.

I have a patch for iax for counting currently active calls (minus registrations/pokes/etc) which can help here too.
Comments:By: Mark Michelson (mmichelson) 2008-04-29 16:43:51

Have you tried setting ringinuse=no for the queue?

By: jeffery palmer (darren1713) 2008-04-29 17:14:57

Yes I have tried that but it either does not work on iax channels or it does not fix the problem in the queue app.

By: Mark Michelson (mmichelson) 2008-04-29 17:37:52

Okay, just had to check since that's a common problem encountered. By setting ringinuse to "no" it means that it will only attempt to ring queue members whose current state is "not in use" or "unknown."

I would be interested in seeing what "queue show" displays for the device state of the queue member when his phone is ringing. If it still says "not in use" even though the phone is ringing, then the problem is most likely an IAX2-specific problem.

Thanks!

By: jeffery palmer (darren1713) 2008-04-30 11:33:53

queue show does show ringing...but here's the really interesting information, why are there 2 callers shown, and only 1 phone ringing! This happens with any strategy other than "ringall"

   -- Executing [s@macro-trunkdial:2] Queue("SIP/jeff-08210380", "satellitebox1|r|||10") in new stack
satellitebox has 2 calls (max unlimited) in 'leastrecent' strategy (0s holdtime), W:0, C:0, A:1, SL:0.0% within 0s
  Members:
     IAX2/000B3C01789D (Not in use) has taken no calls yet
     IAX2/000B3C02275D (Not in use) has taken no calls yet
     IAX2/000B3C022762 (Not in use) has taken no calls yet
     IAX2/000B3C022772 (Not in use) has taken no calls yet
     IAX2/000B3C02275C (Not in use) has taken no calls yet
     IAX2/000B3C02276C (Not in use) has taken no calls yet
     IAX2/000B3C02276F (Not in use) has taken no calls yet
     IAX2/000B3C016F39 (Ringing) has taken no calls yet
  Callers:
     1. Zap/8-1 (wait: 0:04, prio: 0)
     2. SIP/jeff-08210380 (wait: 0:02, prio: 0)

By: jeffery palmer (darren1713) 2008-05-16 12:02:27

Does anyone have any ideas since app_queue is really broken?

By: stp (stp) 2008-05-16 22:24:38

Do you set autofill=yes for the queue

By: Mark Michelson (mmichelson) 2008-06-13 12:11:30

darren1713: I noticed this issue was still open. First of all, is this still happening?

As stp asked, do you have autofill=yes set? If you do not, then only one phone ringing would make sense. If you do not have autofill on, then what you should see with multiple callers in the queue is that only one phone will ring. Then when the queue member answers, another phone will begin ringing for the second caller in the queue and so on.

By: Tilghman Lesher (tilghman) 2008-07-25 17:09:03

No response from reporter in over a month.

By: jeffery palmer (darren1713) 2008-07-25 18:28:24

Why would it be the default behavior to not ring 2 phones if there are two calls in the queue?

If there are 100 people sitting at a desk, and 100 callers enter the queue, the second line doesn't ring until the first one answers? and the third doesn't ring until the second answers? I think the 100'th person might be sitting there doing a whole lot of nothing for a very long time.

I understand that may be the way it is programmed to work, but it isn't making much sense to me in a real world scenario.

By: Tilghman Lesher (tilghman) 2008-07-25 21:25:27

The reason why it doesn't is because the Queue has a strict policy about ensuring that calls are answered in the order in which they are received.  Consider that if it sends the first call to the first agent, the second call to the second agent, and the first agent doesn't answer, then the second caller got answered before the first (thus violating the principle).  The autofill setting enables precisely that behavior, which is why it has been recommended that you try it.

By: Tilghman Lesher (tilghman) 2008-08-07 11:59:56

Again, no response from reporter.