Queue doesn't see agents in Not in Use status

Hi,
I have queues in asterisk 18.5.1, in some queues I have a problem when an agent has Not in Use status and the queue doesn’t see him.
Queue configuration for exmple:
[2042997821]
setinterfacevar=yes
ringinuse=no
strategy=leastrecent
wrapuptime=60
announce-holdtime=No
periodic-announce-frequency=0
announce-position=no
announce-frequency=0
min-announce-frequency=0
servicelevel=60
weight=0
timeout=15
retry=5
memberdelay=0
monitor-type=MixMonitor

In global configuration file:
autofill=yes
persistentmembers = yes
monitor-type = MixMonitor
shared_lastcall=yes

I run debug and get some information about agent, caller and queue
Agent comes out of pause:
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Skip: 0; SQL: INSERT INTO queue_log (time, data5, data4, data3, data2, data1, event, agent, queuename, callid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Parameter 1 (‘time’) = ‘2023-03-06 10:22:16.821552’
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Parameter 2 (‘data5’) = ‘’
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Parameter 3 (‘data4’) = ‘’
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Parameter 4 (‘data3’) = ‘’
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Parameter 5 (‘data2’) = ‘’
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Parameter 6 (‘data1’) = ‘Ready;2;1678087336’
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Parameter 7 (‘event’) = ‘UNPAUSE’
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Parameter 8 (‘agent’) = ‘5366’
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Parameter 9 (‘queuename’) = ‘2042997821’
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Parameter 10 (‘callid’) = ‘NONE’
[Mar 6 10:22:16] DEBUG[32022] res_odbc.c: Releasing ODBC handle 0x30390a0 into pool
[Mar 6 10:22:16] DEBUG[32022] manager.c: Running action ‘QueuePenalty’
[Mar 6 10:22:16] DEBUG[32022] res_odbc.c: Reusing ODBC handle 0x30390a0 from class ‘asteriskcdrdb’
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Skip: 0; SQL: INSERT INTO queue_log (time, data5, data4, data3, data2, data1, event, agent, queuename, callid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Parameter 1 (‘time’) = ‘2023-03-06 10:22:16.824128’
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Parameter 2 (‘data5’) = ‘’
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Parameter 3 (‘data4’) = ‘’
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Parameter 4 (‘data3’) = ‘’
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Parameter 5 (‘data2’) = ‘’
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Parameter 6 (‘data1’) = ‘10’
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Parameter 7 (‘event’) = ‘PENALTY’
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Parameter 8 (‘agent’) = ‘PJSIP/5366@5366’
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Parameter 9 (‘queuename’) = ‘2042997821’
[Mar 6 10:22:16] DEBUG[32022] res_config_odbc.c: Parameter 10 (‘callid’) = ‘NONE’

After a short time range asterisk accepts the call and queues it
[Mar 6 10:22:43] DEBUG[31381][C-0001b5ed] app_queue.c: Queue ‘2042997821’ Join, Channel ‘PJSIP/transit_04-00021833’, Position ‘1’
[Mar 6 10:22:43] DEBUG[31381][C-0001b5ed] res_odbc.c: Reusing ODBC handle 0x30390a0 from class ‘asteriskcdrdb’
[Mar 6 10:22:43] DEBUG[31381][C-0001b5ed] res_config_odbc.c: Skip: 0; SQL: INSERT INTO queue_log (time, data5, data4, data3, data2, data1, event, agent, queuename, callid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
[Mar 6 10:22:43] DEBUG[31381][C-0001b5ed] res_config_odbc.c: Parameter 1 (‘time’) = ‘2023-03-06 10:22:43.317643’
[Mar 6 10:22:43] DEBUG[31381][C-0001b5ed] res_config_odbc.c: Parameter 2 (‘data5’) = ‘’
[Mar 6 10:22:43] DEBUG[31381][C-0001b5ed] res_config_odbc.c: Parameter 3 (‘data4’) = ‘’
[Mar 6 10:22:43] DEBUG[31381][C-0001b5ed] res_config_odbc.c: Parameter 4 (‘data3’) = ‘1’
[Mar 6 10:22:43] DEBUG[31381][C-0001b5ed] res_config_odbc.c: Parameter 5 (‘data2’) = ‘number’
[Mar 6 10:22:43] DEBUG[31381][C-0001b5ed] res_config_odbc.c: Parameter 6 (‘data1’) = ‘’
[Mar 6 10:22:43] DEBUG[31381][C-0001b5ed] res_config_odbc.c: Parameter 7 (‘event’) = ‘ENTERQUEUE’
[Mar 6 10:22:43] DEBUG[31381][C-0001b5ed] res_config_odbc.c: Parameter 8 (‘agent’) = ‘NONE’
[Mar 6 10:22:43] DEBUG[31381][C-0001b5ed] res_config_odbc.c: Parameter 9 (‘queuename’) = ‘2042997821’
[Mar 6 10:22:43] DEBUG[31381][C-0001b5ed] res_config_odbc.c: Parameter 10 (‘callid’) = ‘1678087363.1989892’
[Mar 6 10:22:43] DEBUG[31381][C-0001b5ed] res_odbc.c: Releasing ODBC handle 0x30390a0 into pool
[Mar 6 10:22:43] VERBOSE[31381][C-0001b5ed] res_musiconhold.c: Started music on hold, class ‘default’, on channel ‘PJSIP/transit_04-00021833’
[Mar 6 10:22:43] DEBUG[31381][C-0001b5ed] channel.c: Scheduling timer at (50 requested / 50 actual) timer ticks per second
And I see that queue doesn’t have members.
[Mar 6 10:22:43] DEBUG[31381][C-0001b5ed] app_queue.c: There are 0 available members.

And it all looks like this problem is only for one agent.
Can you help me to understand why?

Are they still within their 1 minute wrapup time?

What is the queue’s current maximum penalty?

Thanks for your reply!
This agent looks like an agent that the queue does not see, no matter how much time has passed since the end of the conversation(call). Here is earlier example:
[1]+ Done date && asterisk -rx “core show channels” | grep --color=auto active\ ca && asterisk -rx “queue show 2042997821” | grep --color=auto -v paused
[1] 16929
Mon Mar 6 09:25:18 MSK 2023
297 active calls
2042997821 has 0 calls (max unlimited) in ‘leastrecent’ strategy (22s holdtime, 572s talktime), W:0, C:9, A:13, SL:77.8%, SL2:77.3% within 60s
Members:
5366 (PJSIP/5366@5366 from PJSIP/5366) with penalty 10 (ringinuse disabled) (dynamic) (Not in use) has taken 1 calls (last was 90 secs ago)
No Callers

2042997821 has 2 calls (max unlimited) in ‘leastrecent’ strategy (22s holdtime, 567s talktime), W:0, C:11, A:21, SL:81.8%, SL2:81.2% within 60s
Members:
5366 (PJSIP/5366@5366 from PJSIP/5366) with penalty 10 (ringinuse disabled) (dynamic) (Not in use) has taken 1 calls (last was 681 secs ago)
Callers:
1. PJSIP/transit_04-0001de2f (wait: 0:53, prio: 0)
2. PJSIP/transit_04-0001dea5 (wait: 0:27, prio: 0)

Asterisk ending (0).
[1]+ Done date && asterisk -rx “core show channels” | grep --color=auto active\ ca && asterisk -rx “queue show 2042997821” | grep --color=auto -v paused
[1] 32151
Mon Mar 6 09:35:14 MSK 2023
222 active calls
2042997821 has 0 calls (max unlimited) in ‘leastrecent’ strategy (24s holdtime, 567s talktime), W:0, C:11, A:22, SL:81.8%, SL2:81.8% within 60s
Members:
5366 (PJSIP/5366@5366 from PJSIP/5366) with penalty 10 (ringinuse disabled) (dynamic) (Not in use) has taken 1 calls (last was 686 secs ago)
7837 (PJSIP/7837@7837 from PJSIP/7837) with penalty 10 (ringinuse disabled) (dynamic) (in call) (Busy) has taken 4 calls (last was 238 secs ago)
No Callers

As you see queue ignored this agent and ABANDONED counter is growing, but 7837 takes 1 call after another call completes.
All agents in queue have pentalty 10. It is some default value

The default is zero, so you must have set this explicitly. If you set it explicitly it should have been a reason, and one reason would be that you had set minimum and maximum penalties, for, at least, some Queue() calls. Given that you are not aware of setting penalty 10, you may also not be aware of other penalty system settings.

Note that the log shows AMI being used to set agent penalties.

did this agent transfer the call ?

Ok, why is this only happening with 1 agent, the rest of the agents in the queue have the same penalty value and work fine?

He didn’t transfer

I don’t know, but setting penalties is somewhat unusual, especially setting them all the same. You need to understand why that is being done.

Regarding the other suggestion, I’m not sure how transfers are currently handled - I thought this had been fixed - but it used to be the case that the agent would not be available for the queue, even though they had an available device state, until the caller had cleared; the caller remained in the Queue application, even though there had been a transfer.

This shows that pauses were being used for the agent, and:

agents that are not inuse, but are paused, would not be counted as available members, so the agent could have been pausing themselves a lot, and were paused when the call being handled by the other agent arrived, but unpaused when you did the queue show commands.

I see when agent in pause:
5366 (PJSIP/5366@5366 from PJSIP/5366) with penalty 10 (ringinuse disabled) (dynamic) (paused:Not Ready;1;1678170048 was 1103 secs ago) (Busy) has taken 1 calls (last was 1475 secs ago)
Agent went from pause with new state UNPAUSE and only indicates Not in Use status. That’s why I think this is some bug with agent in queue. And I don’t understand what I can do

Any Ideas?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.