[Home]

Summary:ASTERISK-04920: Roundrobin Queus Strategy
Reporter:Alessio Focardi (alessiof)Labels:
Date Opened:2005-08-29 03:15:28Date Closed:2011-06-07 14:10:25
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Hi there,

this is my queues.conf, I'm using todays CVS:

[599]
joinempty = yes
musiconhold = default
strategy = roundrobin
servicelevel = 60
wrapuptime = 0
maxlen = 0
timeout=15
announce-frequency = 15
member => SIP/381
member => SIP/300

At first call 381 rings, if you hang up and call again you get the 300
ringing ... this looks more rrmemory than roundrobin, there is
something wrong in my setup maybe ?

Tnx !
Comments:By: Alessio Focardi (alessiof) 2005-08-29 03:40:54

Sorry:

I'm using todays [CVS]

should be read:

I'm using 1.2.0-beta1

Tnx!

By: Kevin P. Fleming (kpfleming) 2005-08-29 15:33:18

We cannot help you debug this problem without a call trace, as requested in the bug posting guidelines. There are many reasons that the second call could go to SIP/300, not just the queue strategy.

By: Alessio Focardi (alessiof) 2005-08-29 17:58:21

Here are more details, if other stuff is needed please let me know, I will provide it: sorry for not following guidelines from start.


*CLI> show queues

599          has 0 calls (max unlimited) in 'roundrobin' strategy (0s holdtime), W:0, C:0, A:0, SL:0.0% within 60s
  Members:
     SIP/385 (available) has taken no calls yet
     SIP/300 (available) has taken no calls yet
  No Callers


First call trace


-- Executing Queue("SIP/399-089e", "599||||86400") in new stack
   -- Started music on hold, class 'default', on SIP/399-089e
   -- Called SIP/385
   -- SIP/385-4070 is ringing
   -- SIP/385-4070 is ringing
   -- SIP/385-4070 is ringing
   -- Stopped music on hold on SIP/399-089e
 == Spawn extension (dialplan, 599, 22) exited non-zero on 'SIP/399-089e'


Then I hangup the calling phone (sip/385 has not answered) and here is

Second call trace

-- Executing Queue("SIP/399-dd08", "599||||86400") in new stack
   -- Started music on hold, class 'default', on SIP/399-dd08
   -- Called SIP/300
   -- SIP/300-ca19 is ringing
   -- SIP/300-ca19 is ringing
   -- SIP/300-ca19 is ringing
    -- Stopped music on hold on SIP/399-dd08
 == Spawn extension (dialplan, 599, 22) exited non-zero on 'SIP/399-dd08'

As you can see now call has ben directed to SIP/300

Calls are cicling, here is what happens if I stay more on the calling phone

 -- Executing Queue("SIP/399-b892", "599||||86400") in new stack
   -- Started music on hold, class 'default', on SIP/399-b892
   -- Called SIP/385
   -- SIP/385-fb23 is ringing
   -- SIP/385-fb23 is ringing
   -- SIP/385-fb23 is ringing
   -- SIP/385-fb23 is ringing
   -- SIP/385-fb23 is ringing
   -- Nobody picked up in 15000 ms
   -- Stopped music on hold on SIP/399-b892
   -- Playing 'queue-youarenext' (language 'it')
   -- Told SIP/399-b892 in 599 their queue position (which was 1)
   -- Playing 'queue-thankyou' (language 'it')
   -- Started music on hold, class 'default', on SIP/399-b892
   -- Called SIP/300
   -- SIP/300-3ae5 is ringing
   -- SIP/300-3ae5 is ringing
   -- SIP/300-3ae5 is ringing
   -- SIP/300-3ae5 is ringing
   -- SIP/300-3ae5 is ringing
   -- Stopped music on hold on SIP/399-b892
 == Spawn extension (dialplan, 599, 22) exited non-zero on 'SIP/399-b892'

Hope it helps, tnx for the support!

By: Kevin P. Fleming (kpfleming) 2005-08-29 19:25:11

This was not intentionally changed, so if you can tell us when it last worked for you that would be most helpful in tracking down the problem.

By: Alessio Focardi (alessiof) 2005-08-30 07:21:31

Sorry but I have no idea of when this behaviour started, I can tell you that 2 weeks ago using a fresh CVS I noticed the problem.

Take in consideration that making such queue and downloading the CVS was contestual, so all this demostrate only that 2 weeks ago the problem was there, dunno where it started.

Just one question: were you able to reproduce my problem? Do I have to chek something in my setup ?

Tnx!

By: Michael Jerris (mikej) 2005-08-30 16:28:43

Can you please checkout cvs using -D from different dates to narrow down the date that this behavior change occoured on.

By: Kevin P. Fleming (kpfleming) 2005-08-30 23:18:10

Never mind... this is expected behavior.

Here is how it works:

roundrobin mode remembers the last agent it _started_ with for a new call, and starts with the next agent in the list. If you have three agents, the first call will go to agent 1->2->3, the next call will go to 2->3->1, the next call will go to 3->2->1, etc.

rrmemory mode remembers the last agent it tried to _call_, regardless of who it started with, so that the next call will go the agent after the last one who answered. If you have three agents and the first call rings 1->2 (and is answered), then the next call will ring 3->1 (and is answered), then the next call will ring 2->3->1, etc. For the first call, if agent 2 answered it in roundrobin mode, they would still be the first agent for the next call, but rrmemory mode will move past them.

By: Kevin P. Fleming (kpfleming) 2005-08-30 23:19:33

You can, however, achieve what you want by using roundrobin mode and putting a different penalty on each agent, in the order you wish them to be called. app_queue will always try all agents with no penalty, then the ones with penalty 1, etc.

By: Alessio Focardi (alessiof) 2005-08-31 04:24:22

Reopened the issue to give thanks for explanation, can I post it in the wiki for future reference?

P.S.

I'm using queues for call overflow, something like: call should go to phone XXX and, only if it's busy or has not answered, cicle to YYY.

It seems there is space for a "circular" logic, that would ring phones in the exact order they where put in the queue, always starting from the fist one.

Anyway penalty will fit just right for me!


Again, tnx!

By: Michael Jerris (mikej) 2005-08-31 08:13:53

Sure.. feel free to post it on the wiki.