Summary:ASTERISK-21574: Queue is sending multiple calls to the available agents at once when autofill is enabled
Reporter:Alexandre Keller (alexandrekeller)Labels:
Date Opened:2013-04-18 08:18:35Date Closed:2013-05-07 15:48:24
Status:Closed/CompleteComponents:Applications/app_queue Channels/chan_local
Versions:Frequency of
is duplicated byASTERISK-21660 Queue does not respect agent status - deliver a call even agent is busy or unavailable
is related toASTERISK-16115 [patch] problem with ringinuse=no, queue members receive sometimes two calls
Environment:Linux Debian v6, Asterisk Attachments:( 0) full.20130422-NoRTP
Description:My client's asterisk queue is having a strange behavior, if I enable the autofill option it start to delivered all waiting calls to every available agent, that's OK, but, it's send multiple calls to the same agent:


   SIP and Queues are on ARA (Realtime)
   Queue Members are dynamically added (AddQueueMember)
   Strategy: rrmemory
   Timeout: 12
   Retry: 3
   WrapUpTime: 5
   All members use 2 D-Link Gateways 32 FXS ports
Comments:By: Richard Mudgett (rmudgett) 2013-04-18 11:50:07.603-0500

This could be the same as ASTERISK-16115.

By: Alexandre Keller (alexandrekeller) 2013-04-22 09:32:39.968-0500

I manage to find that if I do not use Local Channel as member of a Queue, and use a SIP peer instead, the problem doesn't occur, so the issue is related to Local Channel.

By: Richard Mudgett (rmudgett) 2013-04-22 09:59:03.795-0500

Using local channels requires that you also specify a real device to monitor the device state as well in the queues.conf file:

From queues.conf.sample:
; syntax: member => interface,[,penalty][,membername][,state_interface][,ringinuse]
;member => DAHDI/1
;member => DAHDI/2,10
;member => DAHDI/3,10,Bob Johnson
;member => Agent/1001
;member => Agent/1002
;member => Local/1000@default,0,John Smith,SIP/1000
;member => Local/2000@default,0,Lorem Ipsum,SIP/2000,no

By: Alexandre Keller (alexandrekeller) 2013-04-22 11:41:04.251-0500

Thanks Richard, I already did that, but I'll check all the parameters again.

By: Alexandre Keller (alexandrekeller) 2013-04-22 13:40:55.066-0500

I've just checked the parameters, they're all OK.

TEST has 46 calls (max unlimited) in 'leastrecent' strategy (186s holdtime, 130s talktime), W:0, C:5, A:7, SL:0.0% within 0s
     SIP/3639 (Local/2082@agent_callback/n) (dynamic) (In use) has taken 1 calls (last was 32 secs ago)
     SIP/3630 (Local/2163@agent_callback/n) (dynamic) (In use) has taken no calls yet
     SIP/3621 (Local/2009@agent_callback/n) (dynamic) (paused) (Not in use) has taken no calls yet
     SIP/3537 (Local/2032@agent_callback/n) (dynamic) (paused) (Not in use) has taken no calls yet
     SIP/3646 (Local/2056@agent_callback/n) (dynamic) (Not in use) has taken 1 calls (last was 9 secs ago)
     SIP/3633 (Local/2150@agent_callback/n) (dynamic) (In use) has taken 1 calls (last was 49 secs ago)
     SIP/3589 (Local/2107@agent_callback/n) (dynamic) (In use) has taken no calls yet
     SIP/3623 (Local/2073@agent_callback/n) (dynamic) (In use) has taken no calls yet
     SIP/3637 (Local/2084@agent_callback/n) (dynamic) (In use) has taken no calls yet
     SIP/3642 (Local/2074@agent_callback/n) (dynamic) (Not in use) has taken no calls yet
     SIP/3651 (Local/2145@agent_callback/n) (dynamic) (In use) has taken no calls yet
     SIP/3635 (Local/2169@agent_callback/n) (dynamic) (In use) has taken no calls yet
     SIP/3658 (Local/2149@agent_callback/n) (dynamic) (In use) has taken 1 calls (last was 43 secs ago)
     SIP/3628 (Local/2058@agent_callback/n) (dynamic) (In use) has taken 1 calls (last was 20 secs ago)
     SIP/3632 (Local/2162@agent_callback/n) (dynamic) (In use) has taken no calls yet
     SIP/3590 (Local/2031@agent_callback/n) (dynamic) (In use) has taken no calls yet
     SIP/3638 (Local/2146@agent_callback/n) (dynamic) (In use) has taken no calls yet

But on queue_log:

Any more ideas?!

By: Alexandre Keller (alexandrekeller) 2013-04-22 14:33:40.024-0500

I was able to detect that it happens only to the agents that just hangup.

By: Alexandre Keller (alexandrekeller) 2013-04-23 07:26:48.300-0500

Here is the full log.

By: Alexandre Keller (alexandrekeller) 2013-04-23 07:38:18.191-0500

Here are an example where SIP/3641 hungs up (1366720563|1366720485.303234|TELEPRECO|SIP/3641|COMPLETECALLER|7|68|1) and the queue has delivered a new call (1366720570|1366720570.303267|TELEPRECO|SIP/3641|RINGNOANSWER|0).



By: Alexandre Keller (alexandrekeller) 2013-04-23 12:30:02.264-0500

I changed the dynamic agente from Local Channel to directly SIP.

The issue stands. As soon as a agent hangs up, the queue delivers a new call to him, ignoring completely all timeout parameters setup.


By: Alexandre Keller (alexandrekeller) 2013-04-25 16:29:08.148-0500

Here are some additional infos on the environment:

- Linux Debian v6
- Asterisk
- SIP and Queues are on ARA (Realtime)
- Queue Members are dynamically added (AddQueueMember)
- Strategy: rrmemory
- Timeout: 12
- Retry: 3
- WrapUpTime: 5
- All members use 2 D-Link Gateways 32 FXS ports

Anything else to someone give any kind of answer?

By: Alexandre Keller (alexandrekeller) 2013-04-29 09:06:41.082-0500

Please, anyone, any ideas?

By: Alexandre Keller (alexandrekeller) 2013-04-30 07:32:06.192-0500

Is there anyone following up on this, or I am just wasting time writing the comments here?


By: Rusty Newton (rnewton) 2013-04-30 16:02:40.758-0500

1. I couldn't see any of the specific examples you posted in the full log that you attached.

2. Please point out exactly where in the full log the issue is demonstrated. Or attach a new full log (with VERBOSE, DEBUG and manager output) along with a corresponding queue_log and point out where the issue is demonstrated in both logs.

The queue_log output you pasted inline makes it look like a bug, but its not enough information to be helpful.

3. Do you have callcounter=yes enabled for all your SIP peers?

4. Various components of Asterisk Realtime Architecture are covered under extended support and issues that occur where they are involved will be supported by the community. There is a chance that this issue could result from the ARA interactions involved or at least be exacerbated by them. It would be useful if you could reproduce the issue in a more controlled environment and outside of using realtime, if for any reason to help narrow down where the issue lies. Also you may want to describe which realtime backend modules you are using and provide sanitized configuration files.

5. This could be another form of ASTERISK-16115 , but it'll take a developer looking deeper to know for sure. ASTERISK-19820 could be involved too. Your best bet is to get where you can describe for a developer exactly how to reproduce the issue on demand (or at least with a high frequency).

Additionally if you haven't already you might want to bring this issue up on the asterisk-users mailing list to see if any others are experiencing the same problem.

By: Alexandre Keller (alexandrekeller) 2013-05-02 05:39:03.319-0500

As I was collecting all the infos and logs requested yesterday, I've also checked the fxs gateway, and realized that everything I thought was an issue related to Asterisk or Queues, was actually related to the gateway.

Let me apologize for opening this issue.

Thanks in advance.

By: Rusty Newton (rnewton) 2013-05-07 15:48:14.433-0500

No worries. Thanks for reporting back!

By: Jegan T (jegan.t) 2017-09-05 14:22:10.979-0500

Hi Alexandre,

Good day!.. We have a same above problem (ASTERISK 21574) - queue is sending multiple calls to the available agents. We have did lot of tests, but still can't able to find the exact issues.

Can you please explain what kind of gateway issue which you have been faced.

Awaiting your response much!..

Many Thanks,