[Home]

Summary:ASTERISK-00041: app_queue alternate queue routing not working correctly
Reporter:unknownLabels:
Date Opened:2003-08-03 16:47:49Date Closed:2004-03-27 14:55:58.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:app_queue when using anything but ringall will not behave correctly.  Example: if you have to agents loged in via AddQueueMember it will ring only the first agent that logged in over and over.  Roundrobin wont go to the next agent in the queue.  Fewestcalls won't loop around to other agents that are available.  Granted it should ring the one with fewest calls first but if they dont answer it should go on to the next agent in queue.

****** ADDITIONAL INFORMATION ******

I cant get the issue with circuit-busy to reproduce again but I can get the call queue issues to reproduce like clock work:

techsupport  has 1 calls (max unlimited) in 'fewestcalls' strategy
  Members:
     SIP/112 has taken no calls yet
     SIP/111 has taken 1 calls (last was 81 secs ago)
  Callers:
     1. H323/ip$x.x.x.x:11534/364 (wait: 1:14)

   -- Called 112
   -- SIP/112-131f is ringing
   -- Nobody picked up in 10000 ms
   -- Called 112
   -- SIP/112-9c31 is ringing
   -- Nobody picked up in 10000 ms
   -- Called 112
   -- SIP/112-06a7 is ringing
   -- Nobody picked up in 10000 ms
   -- Called 112
   -- SIP/112-6105 is ringing
   -- Nobody picked up in 10000 ms
   -- Called 112
   -- SIP/112-e458 is ringing
   -- Nobody picked up in 10000 ms
   -- Called 112
   -- SIP/112-3fed is ringing
   -- Nobody picked up in 10000 ms
   -- Called 112
   -- SIP/112-1cbe is ringing
   -- Nobody picked up in 10000 ms
   -- Called 112
   -- SIP/112-59f1 is ringing
   -- Nobody picked up in 10000 ms
   -- Called 112
   -- SIP/112-4122 is ringing
   -- Nobody picked up in 10000 ms

show queues
techsupport  has 1 calls (max unlimited) in 'fewestcalls' strategy
  Members:
     SIP/112 has taken no calls yet
     SIP/111 has taken 1 calls (last was 385 secs ago)
  Callers:
     1. H323/ip$x.x.x.x:11534/364 (wait: 6:18)

   -- Called 112
   -- SIP/112-5cd4 is ringing



In this example ext 111 has taken one call.  Exten 112 has steped away from their desk and forgot to logout.  It will only ring ext 112 over and over.  Never rolling over to ext 111 after 112 doesn't answer.  It should roll to the next agent if the current agent is busy.  Agent 111 sits idle.
Comments:By: () 2003-08-03 17:07:30

I'm guessing a wise thing to do is have an option to log the agent out of the queue if they don't answer after x number of times.  That would be a nice feature.

By: Mark Spencer (markster) 2003-08-05 22:54:30

Enable debugging in /etc/asterisk/logger.conf by adding ",debug" to the console line, and paste the results.  You should see information about which channels the queue is trying.  Also, of course, be sure to use latest CVS.

By: () 2003-08-06 09:02:14

It rings both members in the queue if the phone isn't answered when it first trys 111.  But the caller is still in queue till the next round. At which time it returns circuit-busy and both phones start to ring if you pickup the phone you get dead air.  Call is still in queue and when it trys again it gets 486 busy messages until the next try at which time it seems to ring correctly.

*CLI> show queues
techsupport  has 0 calls (max unlimited) in 'fewestcalls' strategy
  Members:
     SIP/112 has taken no calls yet
     SIP/111 has taken no calls yet
  No Callers

DEBUG[21524]: File app_queue.c, Line 723 (try_calling): Simple queue (no URL)
DEBUG[21524]: File app_queue.c, Line 723 (try_calling): Simple queue (no URL)
DEBUG[21524]: File app_queue.c, Line 403 (ring_one): Trying 'SIP/111' with metric 0
DEBUG[21524]: File chan_sip.c, Line 618 (create_addr): Setting NAT on RTP to 0
   -- Called 111
DEBUG[7176]: File chan_sip.c, Line 511 (__sip_ack): Acked pending invite 102
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '43c1df5d538e9d02135abaab35448ed5@x.x.x.x' of Request 102: Found
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '43c1df5d538e9d02135abaab35448ed5@x.x.x.x' of Request 102: Not Found
   -- SIP/111-ef8f is ringing
DEBUG[7176]: File chan_sip.c, Line 618 (create_addr): Setting NAT on RTP to 0
DEBUG[7176]: File chan_sip.c, Line 618 (create_addr): Setting NAT on RTP to 0
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '4e8c3735685b84f96716692912e62a20@x.x.x.x' of Request 102: Found
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '44a00b0e3f0560e81051f8934e13ae7f@x.x.x.x' of Request 102: Found
   -- Nobody picked up in 20000 ms
DEBUG[21524]: File chan_sip.c, Line 949 (sip_hangup): find_user(111)
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '43c1df5d538e9d02135abaab35448ed5@x.x.x.x' of Request 102: Found
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '43c1df5d538e9d02135abaab35448ed5@x.x.x.x' of Request 102: Not Found
DEBUG[7176]: File chan_sip.c, Line 618 (create_addr): Setting NAT on RTP to 0
DEBUG[7176]: File chan_sip.c, Line 618 (create_addr): Setting NAT on RTP to 0
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '1becf12f6d189a473a99ed3d542a053b@x.x.x.x' of Request 102: Found
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '456741d979d4aa04634c7b6661c5917e@x.x.x.x' of Request 102: Found
DEBUG[7176]: File chan_sip.c, Line 618 (create_addr): Setting NAT on RTP to 0
DEBUG[7176]: File chan_sip.c, Line 618 (create_addr): Setting NAT on RTP to 0
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '341f25da078dec64533b56f802a8616b@x.x.x.x' of Request 102: Found
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '352269ab43a156d875d3da8c616e128c@x.x.x.x' of Request 102: Found
DEBUG[21524]: File app_queue.c, Line 723 (try_calling): Simple queue (no URL)
DEBUG[21524]: File app_queue.c, Line 723 (try_calling): Simple queue (no URL)
DEBUG[21524]: File app_queue.c, Line 403 (ring_one): Trying 'SIP/111' with metric 0
DEBUG[21524]: File chan_sip.c, Line 618 (create_addr): Setting NAT on RTP to 0
   -- Called 111
NOTICE[7176]: File chan_sip.c, Line 713 (auto_congest): Auto-congesting SIP/111-0b93
   -- SIP/111-0b93 is circuit-busy
DEBUG[21524]: File chan_sip.c, Line 949 (sip_hangup): find_user(111)
DEBUG[21524]: File app_queue.c, Line 403 (ring_one): Trying 'SIP/112' with metric 0
DEBUG[21524]: File chan_sip.c, Line 618 (create_addr): Setting NAT on RTP to 0
   -- Called 112
WARNING[21524]: File rtp.c, Line 349 (ast_rtp_read): RTP Read error: Resource temporarily unavailable
NOTICE[7176]: File chan_sip.c, Line 713 (auto_congest): Auto-congesting SIP/112-25ae
   -- SIP/112-25ae is circuit-busy
DEBUG[21524]: File chan_sip.c, Line 949 (sip_hangup): find_user(112)
DEBUG[21524]: File app_queue.c, Line 409 (ring_one): Nobody left to try ringing in queue
DEBUG[21524]: File app_queue.c, Line 466 (wait_for_answer): Everyone is busy at this time
DEBUG[7176]: File chan_sip.c, Line 511 (__sip_ack): Acked pending invite 102
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '5a07364a70287363529a3f2e056040a8@x.x.x.x' of Request 102: Found
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '5a07364a70287363529a3f2e056040a8@x.x.x.x' of Request 102: Found
DEBUG[7176]: File chan_sip.c, Line 511 (__sip_ack): Acked pending invite 102
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '7b469e7a7503bc0370159da963f06f2a@x.x.x.x' of Request 102: Found
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '7b469e7a7503bc0370159da963f06f2a@x.x.x.x' of Request 102: Found
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '17fb2aa3796112094eabfaec091b14a0@x.x.x.x' of Request 102: Found
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '49770c861b1a73502f4a9c99386ec749@x.x.x.x' of Request 102: Found
DEBUG[7176]: File chan_sip.c, Line 476 (__sip_autodestruct): Auto destroying call '5a07364a70287363529a3f2e056040a8@x.x.x.x'
DEBUG[7176]: File chan_sip.c, Line 476 (__sip_autodestruct): Auto destroying call '7b469e7a7503bc0370159da963f06f2a@x.x.x.x'
DEBUG[7176]: File chan_sip.c, Line 618 (create_addr): Setting NAT on RTP to 0
DEBUG[7176]: File chan_sip.c, Line 618 (create_addr): Setting NAT on RTP to 0
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '702a4f8331817dab0456590b39cda65a@x.x.x.x' of Request 102: Found
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '753dabc24bd05f436c47cc147ce4fe09@x.x.x.x' of Request 102: Found
DEBUG[7176]: File chan_sip.c, Line 618 (create_addr): Setting NAT on RTP to 0
DEBUG[7176]: File chan_sip.c, Line 618 (create_addr): Setting NAT on RTP to 0
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '50cfe7846a392f186faa4428182a8ab5@x.x.x.x' of Request 102: Found
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '0832af853bf221580605145d6d2b0097@x.x.x.x' of Request 102: Found
DEBUG[21524]: File app_queue.c, Line 723 (try_calling): Simple queue (no URL)
DEBUG[21524]: File app_queue.c, Line 723 (try_calling): Simple queue (no URL)
DEBUG[21524]: File app_queue.c, Line 403 (ring_one): Trying 'SIP/111' with metric 0
DEBUG[21524]: File chan_sip.c, Line 618 (create_addr): Setting NAT on RTP to 0
   -- Called 111
DEBUG[7176]: File chan_sip.c, Line 511 (__sip_ack): Acked pending invite 102
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '0e63faf71593ef720dea9c9e533091c1@x.x.x.x' of Request 102: Found
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '0e63faf71593ef720dea9c9e533091c1@x.x.x.x' of Request 102: Not Found
   -- Got SIP response 486 "Busy Here" back from x.x.x.x
   -- SIP/111-d9ee is busy
DEBUG[21524]: File chan_sip.c, Line 949 (sip_hangup): find_user(111)
DEBUG[21524]: File app_queue.c, Line 403 (ring_one): Trying 'SIP/112' with metric 0
DEBUG[21524]: File chan_sip.c, Line 618 (create_addr): Setting NAT on RTP to 0
   -- Called 112
DEBUG[7176]: File chan_sip.c, Line 511 (__sip_ack): Acked pending invite 102
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '0e9a79cf7e01d54d46da252e30e71fa9@x.x.x.x' of Request 102: Found
DEBUG[7176]: File chan_sip.c, Line 529 (__sip_ack): Stopping retransmission on '0e9a79cf7e01d54d46da252e30e71fa9@x.x.x.x' of Request 102: Not Found
   -- Got SIP response 486 "Busy Here" back from x.x.x.x
   -- SIP/112-84d2 is busy
DEBUG[21524]: File chan_sip.c, Line 949 (sip_hangup): find_user(112)
DEBUG[21524]: File app_queue.c, Line 409 (ring_one): Nobody left to try ringing in queue
DEBUG[21524]: File app_queue.c, Line 466 (wait_for_answer): Everyone is busy at this time

By: () 2003-08-06 09:03:48

Both phones were on hook the whole time.  So nobody answered any calls and nobody was on the phone.  I'm just interested in how it reacts when people don't answer the phone.  Which can happen at times.

By: Brian West (bkw918) 2003-08-08 15:25:09

My recent test to give you more of an idea what its doing.  This is roundrobin.  It never goes to the second agent SIP/1234... even while on a call it still trys to ring 1236

asterisk*CLI> sip show peers
Name/username    Host                 Mask             Port     Status
1236/1236        65.38.28.149    (D)  255.255.255.255  5060     Unmonitored
1235/1235        (Unspecified)   (D)  255.255.255.255  0        Unmonitored
1234/1234        65.38.28.150    (D)  255.255.255.255  5060     Unmonitored
asterisk*CLI> show queues
techsupport  has 4 calls (max unlimited) in 'roundrobin' strategy
  Members:
     SIP/1234 has taken no calls yet
     SIP/1236 has taken no calls yet
  Callers:
     1. IAX[brian@65.38.28.149:5036]/24 (wait: 0:18)
     2. IAX[brian@65.38.28.149:5036]/25 (wait: 0:17)
     3. IAX[brian@65.38.28.149:5036]/26 (wait: 0:16)
     4. IAX[brian@65.38.28.149:5036]/27 (wait: 0:14)

default      has 0 calls (max unlimited) in 'ringall' strategy
  No Members
  No Callers

   -- Called 1236
   -- SIP/1236-7fc3 is ringing
   -- Nobody picked up in 15000 ms
   -- Called 1236
   -- SIP/1236-df37 is ringing
   -- Nobody picked up in 15000 ms
   -- Called 1236
   -- SIP/1236-c56b is ringing
   -- Nobody picked up in 15000 ms
   -- Called 1236
   -- SIP/1236-e9a7 is ringing
   -- Nobody picked up in 15000 ms
   -- Called 1236
   -- SIP/1236-b4dd is ringing
   -- Nobody picked up in 15000 ms
   -- Called 1236
   -- SIP/1236-029d is ringing
   -- Nobody picked up in 15000 ms
   -- Called 1236
   -- SIP/1236-f0aa is ringing
   -- Nobody picked up in 15000 ms
   -- Called 1236
   -- SIP/1236-c264 is ringing
   -- Nobody picked up in 15000 ms
   -- Called 1236
   -- SIP/1236-bd12 is ringing
   -- Nobody picked up in 15000 ms
   -- Called 1236
   -- SIP/1236-197e is ringing
   -- Nobody picked up in 15000 ms
   -- Called 1236
   -- SIP/1236-2056 is ringing
   -- Nobody picked up in 15000 ms
   -- Called 1236
   -- SIP/1236-fa07 is ringing
   -- Nobody picked up in 15000 ms
   -- Called 1236
   -- SIP/1236-994b is ringing
   -- Nobody picked up in 15000 ms
   -- Called 1236
   -- SIP/1236-220d is ringing
   -- Nobody picked up in 15000 ms
   -- Called 1236
   -- SIP/1236-997a is ringing
   -- SIP/1236-997a answered IAX[brian@65.38.28.149:5036]/24
   -- Stopped music on hold on IAX[brian@65.38.28.149:5036]/24
   -- Called 1236
   -- SIP/1236-e4ab is ringing
   -- Nobody picked up in 15000 ms
   -- Called 1236
   -- SIP/1236-9ed1 is ringing
   -- Nobody picked up in 15000 ms
   -- Called 1236
   -- SIP/1236-b26c is ringing
   -- Nobody picked up in 15000 ms
 == Spawn extension (demo, 900, 2) exited non-zero on 'IAX[brian@65.38.28.149:5036]/24'
   -- Hungup 'IAX[brian@65.38.28.149:5036]/24'
   -- Called 1236
   -- SIP/1236-bfd6 is ringing

By: Brian West (bkw918) 2003-08-08 19:45:35

This only happens when using the Dynamic AddQueueMemeber and RemoveQueueMember functions with no agents defined.  Just thought I would let ya know.

bkw

By: Mark Spencer (markster) 2003-08-14 15:11:57

Can you tell me if this is fixed in CVS?

By: Mark Spencer (markster) 2003-08-15 17:39:19

Committed to CVS