Uploaded image for project: 'FreePBX'
  1. FreePBX
  2. FREEPBX-20731

app-queue-caller-count not stating correct caller count if a static agent is a Ring Group



    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 14
    • Fix Version/s: None
    • Component/s: Queues
    • Labels:
    • ToDo:
    • Asterisk Version:
      16.4.1 b
    • Distro Version:
    • Distro:
      FreePBX Distro


      Queue Feature Code for checking number of callers in queue is not working properly if you utilize a Ring Group as a static agent.


      No matter how many callers are in queue, it states 0 callers waiting in this circumstance.


      I currently have this assigned to a BLF on the phone, such that it flashes when callers are waiting and it does, indeed, flash when callers are waiting, but it still states 0 callers when you press the button/dial the code. Here's some output (101 is Phone, 200 is RG, 1001 is Queue):

          -- Executing [*47*1001@from-internal:1] Set("SIP/101-00000019", "QUEUE=1001") in new stack
          -- Executing [*47*1001@from-internal:2] Goto("SIP/101-00000019", "app-queue-caller-count,s,1") in new stack
          -- Goto (app-queue-caller-count,s,1)
          -- Executing [s@app-queue-caller-count:1] AGI("SIP/101-00000019", "queue_devstate.agi,getuserQueues,101,1001") in new stack
          -- Launched AGI Script /var/lib/asterisk/agi-bin/queue_devstate.agi
          -- queue_devstate.agi,getuserQueues,101,1001: Initiating queue: 1001
          -- queue_devstate.agi,getuserQueues,101,1001: Agent 200 is static
          -- queue_devstate.agi,getuserQueues,101,1001: Agent 200 is assigned to queue 1001
          -- queue_devstate.agi,getuserQueues,101,1001: Getting ready to skip callers in 1001
          -- queue_devstate.agi,getuserQueues,101,1001: Skipping caller 1. SIP/fpbx-1-hApHQYhm847N-00000014 (wait: 0:22, prio: 0) in queue 1001
          -- queue_devstate.agi,getuserQueues,101,1001: Skipping caller 2. SIP/100-00000017 (wait: 0:13, prio: 0) in queue 1001
          -- queue_devstate.agi,getuserQueues,101,1001: Finished parsing queues
          -- <SIP/101-00000019>AGI Script queue_devstate.agi completed, returning 0
          -- Executing [s@app-queue-caller-count:2] Answer("SIP/101-00000019", "") in new stack
          -- Executing [s@app-queue-caller-count:3] Set("SIP/101-00000019", "COUNT=0") in new stack
          -- Executing [s@app-queue-caller-count:4] NoOp("SIP/101-00000019", "0") in new stack
          -- Executing [s@app-queue-caller-count:5] GotoIf("SIP/101-00000019", "1?skip") in new stack
          -- Goto (app-queue-caller-count,s,13)
          -- Executing [s@app-queue-caller-count:13] Wait("SIP/101-00000019", "1") in new stack
          -- Executing [s@app-queue-caller-count:14] SayNumber("SIP/101-00000019", "0,f") in new stack
          -- <SIP/101-00000019> Playing 'digits/0.ulaw' (language 'en')
          -- Executing [s@app-queue-caller-count:15] Playback("SIP/101-00000019", "queue-quantity2") in new stack
          -- <SIP/101-00000019> Playing 'queue-quantity2.ulaw' (language 'en')
          -- Executing [s@app-queue-caller-count:16] Return("SIP/101-00000019", "") in new stack
      [2019-11-05 04:39:04] ERROR[29819][C-00000013]: app_stack.c:389 return_exec: Return without Gosub: stack is unallocated
        == Spawn extension (app-queue-caller-count, s, 16) exited non-zero on 'SIP/101-00000019'

      For some reason it is "skipping" the waiting callers and not counting them if there is a Ring Group used as an agent entry. If I remove the Ring Group from the agent list, it reports the correct number of callers waiting.

      Yes, I know using a Ring Group as a static agent is not exactly standard, but this has been used in the past to allow for "late" call pickups if an agent narrowly misses a queue call and wants to try to grab it (*8) after ringing stops. (Mind you, call pickup has stopped working in this scenario recently too, but that is another matter entirely...and I'm not reporting that one because it is an antiquated use case scenario.) There may be those out there who still have RGs in their Agent lists.

      The reason I am reporting this is because there may be a deeper issue with the process by which app-queue-caller-count is determining that final number that could be improved upon. There's no logical reason why it would miscount callers just because one of the Agents is a Ring Group #. You could try pointing to Ring Group's ringing status as a cause, but that doesn't jive because it properly counts callers that are currently ringing agent phones when there ISN'T an RG in the Static Agent list.


      Steps to reproduce:

      1) Add a Ring Group # as a Static Agent in a Queue, even with other "normal" static agents
      2) Have calls holding in queue
      3) Dial 47<queue_no> and you'll be incorrectly told there are 0 callers waiting


        Gliffy Diagrams




              • Assignee:
                TheWebMachine TheWebMachine
              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created:


                  Error rendering 'slack.nextup.jira:nextup-jira-plus-status'. Please contact your Jira administrators.