Author Topic: Something weired with Queue call distribution - Why is there unfair call distri?  (Read 4963 times)

torontob

  • Full Member
  • ***
  • Posts: 155
  • Karma: 0
    • View Profile
Hi Everyone,

I have the Queues setup in FreePBX to Leastrecent strategy. I have a problem that I see a call that was waiting only 10 minutes was picked up before a call that was waiting for more than 20 minutes. Following is the records from Queuemetrics and FreePBX:


QueueMetrics records:
Code: [Select]
Date                  Caller   Queue   Wait   Duration    Pos.      Disconnection   Handled by   Attempts    
01/31 - 13:37:14 4444444444 Russian 10:44   1:23         5 Agent        Agent/367        1
01/31 - 13:35:39 7777777777 Russian 20:11   0:06         3 Caller        Agent/370        1
Corresponding FreePBX records:
Code: [Select]
Calldate                 Channel         Source               Clid                              Dst     Disposition     Duration
2011-01-31 13:47:56 Local/367@... 4444444444 "M11:RuQ: 44444444444" <44444444444> 367 ANSWERED 01:25
2011-01-31 13:36:29 Zap/6-1... 4444444444 "RuQ: 44444444444" <44444444444>        498 ANSWERED 12:52

2011-01-31 13:55:48 Local/370@... 7777777777 "M21:RuQ: 7777777777" <7777777777> 370 ANSWERED 00:08
2011-01-31 13:35:05 Zap/3-1... 7777777777 "RuQ: 7777777777" <7777777777>        498 ANSWERED 20:51

Queue Russian is 498 by number. As you can see Caller number 4444444444 was waiting for 20 minutes and entered the queue before Caller number 7777777777 and yet it was answered 10 minutes after the Caller 444444444. In fact 7777777777 should have been answered first.

As per above FreePBX reports I don't also see any attempts on other extensions so it is not a case of agent not picking up the phone. Both calls were picked up with the first attempt. Of course this is a very busy queue as you can see with the wait times but when an extension becomes available it should be assigned to the longest waiting call shouldn't it?

Any clarifications would be appreciated.

Following is how the queue is setup which is Leastrecent for strategy:






Thanks,
« Last Edit: January 31, 2011, 20:43:56 by torontob »

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Looks like an anomaly to me, but I'm not an expert on Trixbox.

If you have the callid for the second call (the one that was queued early but ended up being answered late) I would like you to run a text search on your queue_log file so we ca see the exact records that were written.




torontob

  • Full Member
  • ***
  • Posts: 155
  • Karma: 0
    • View Profile
Hello,

All right so I did a search and found the unique call id "1296498905.68292" you requested and run a search for it in queue_log file. Then I also did a search for the other number which was answered unfairly sooner and that is also pasted at the bottom here.

First, the CLID 7777777777 that was waiting 20 minutes and should have been answered before the other number:
Code: [Select]
1296498939|1296498905.68292|498|NONE|ENTERQUEUE||7777777777
1296499664|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499677|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499677|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499682|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499682|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499687|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499688|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|1000
1296499693|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499693|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499698|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499698|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499703|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499703|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499709|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499709|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499714|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499714|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499719|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499719|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499725|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499725|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499730|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499730|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499735|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499735|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499741|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499741|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499746|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499746|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499751|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499751|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499757|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|1000
1296499757|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|1000
1296499769|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499769|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499774|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499774|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499779|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499779|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499785|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499785|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499790|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499790|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499795|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499795|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499801|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499801|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499806|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499806|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499811|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499811|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499817|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499817|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499822|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499822|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499827|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499827|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499833|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499833|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499838|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499838|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499843|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499843|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499848|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499849|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|1000
1296499861|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499861|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499866|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499866|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499871|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499871|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499877|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499877|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499882|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499882|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499888|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|1000
1296499888|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|1000
1296499893|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499893|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499898|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499898|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499903|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499903|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499909|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499909|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499914|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499914|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499919|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499919|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499925|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499925|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499930|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499930|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499935|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499935|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499941|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499941|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499953|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499953|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499958|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499958|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499963|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499963|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499969|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499969|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499974|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499974|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499979|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499979|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499985|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499985|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499990|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499990|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296499995|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296499995|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500001|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|1000
1296500001|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|1000
1296500006|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500006|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500011|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500011|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500017|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|1000
1296500017|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|1000
1296500022|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500022|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500027|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500027|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500032|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500033|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|1000
1296500045|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500045|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500050|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500050|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500055|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500055|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500061|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500061|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500066|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500066|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500071|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500071|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500077|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500077|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500082|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500082|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500088|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|1000
1296500088|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|1000
1296500093|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500093|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500098|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500099|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|1000
1296500104|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500104|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500109|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500109|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500114|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500115|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|1000
1296500120|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500120|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500125|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500125|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500137|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500137|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500143|1296498905.68292|498|Local/370@from-internal/n|RINGNOANSWER|0
1296500143|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500148|1296498905.68292|498|Local/362@from-internal/n|RINGNOANSWER|0
1296500148|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|0
1296500150|1296498905.68292|498|Local/370@from-internal/n|CONNECT|1211|1296500148.69383
1296500156|1296498905.68292|498|Local/370@from-internal/n|COMPLETECALLER|1211|6|3

And here is the 4444444444 number which waited only 10 minutes and got through:
Code: [Select]
1296499034|1296498989.68324|498|NONE|ENTERQUEUE||4444444444
1296499678|1296498989.68324|498|Local/367@from-internal/n|CONNECT|644|1296499676.68591
1296499761|1296498989.68324|498|Local/367@from-internal/n|COMPLETEAGENT|644|83|5


 ??? Why do I have only three lines in queue_log for the other number and so many lines for the first number?  ???
Obviously there are so many attempts on the first number to the two extension 367 and 370 but since they were on call it comes back busy. But for the second number all I see is only three lines of queue_log corresponding to call id "1296498989.68324". Which behavior is normal first of all?

It would be greatly appreciated if you can clarify how the Queue in Asterisk works. Does it have to continuously ring and get BUSY or does Asterisk come back and tells the Queue that "hey there is an open extension waiting for you" which is what happened in second call.


Thanks
« Last Edit: February 03, 2011, 00:30:26 by torontob »

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
If I am to put through an hypothesis, I think that something went wrong with the first call - it sys it tried calling both phones every 5 seconds, but they would not actually ring - it looks like they were busy or something, because the call is retried immediately after trial. I'd go for a bug of some sort - the second call went through at the first attempt.
 

torontob

  • Full Member
  • ***
  • Posts: 155
  • Karma: 0
    • View Profile
Thanks for the input.

1- But is that normal behavior to call every 5 seconds? Of course the two extensions were on other calls so why call them every 5 seconds?

2- Why didn't the second call do that? It also waited fro 10 minutes and it only attempted the call once and that is only after 10 minutes.

3- What does the 1000 at the end of lines like this mean: "1296500115|1296498905.68292|498|Local/367@from-internal/n|RINGNOANSWER|1000" 

4- What other logs can I look into to further investigate this?

Thanks again,



QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
The answer to your questions would be quite lengthy, but you can find about app_queue in Asterisk on Voip INFO wiki.


I would go look for the /var/log/asterisk/full that's where all stuff actually is.




coolname

  • Full Member
  • ***
  • Posts: 163
  • Karma: 0
    • View Profile
The queue ring method is always not to be it should be  in trixbox,especially in a heavy queue,so we only use the ringall method,if you found the probelm,you can post here,3Q