[Home]

Summary:ASTERISK-29199: app_queue: Calls not connected
Reporter:EDV O-TON (edvoton)Labels:
Date Opened:2020-12-07 07:00:40.000-0600Date Closed:
Priority:MajorRegression?
Status:Open/NewComponents:Applications/app_queue
Versions:18.10.1 Frequency of
Occurrence
Constant
Related
Issues:
is duplicated byASTERISK-29971 Calls not connected while using min_/max_penalty and weight
Environment:Ubuntu 20.04 with latest patchesAttachments:( 0) debuglog.txt
( 1) debuglog.txt
Description:Agent has two queues A and B
Queue A has a higher weight ( e.g. 66) than queue B (e.g. 65).
The queue A gets a call while the agent is on call. The agent is manually paused in Queue A but not in Queue B. After the agent hangup his active call another call for queue B gets in. This one isn't transferred to the agent until the call in queue A is connected to another agent or the caller quits.

A test with weights vice versa worked as expected and the call ist immediately connected to the agent

Comments:By: Asterisk Team (asteriskteam) 2020-12-07 07:00:42.386-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Kevin Harwell (kharwell) 2020-12-07 17:25:59.827-0600

Please attach your configuration (_queues.conf_, _pjsip.conf_, _extensions.conf_), or a minimum configuration that will reproduce the issue.

Also, an Asterisk debug log [1] with SIP trace of the scenario would be helpful.

[1] https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

By: EDV O-TON (edvoton) 2020-12-08 02:49:15.285-0600

We are using realtime queues and agents but a minimum config required to recreate this is by using these statements:

queues table:

INSERT INTO `queues` (`name`, `musiconhold`, `announce`, `context`, `timeout`, `ringinuse`, `setinterfacevar`, `setqueuevar`, `setqueueentryvar`, `monitor_format`, `membermacro`, `membergosub`, `queue_youarenext`, `queue_thereare`, `queue_callswaiting`, `queue_quantity1`, `queue_quantity2`, `queue_holdtime`, `queue_minutes`, `queue_minute`, `queue_seconds`, `queue_thankyou`, `queue_callerannounce`, `queue_reporthold`, `announce_frequency`, `announce_to_first_user`, `min_announce_frequency`, `announce_round_seconds`, `announce_holdtime`, `announce_position`, `announce_position_limit`, `periodic_announce`, `periodic_announce_frequency`, `relative_periodic_announce`, `random_periodic_announce`, `retry`, `wrapuptime`, `penaltymemberslimit`, `autofill`, `monitor_type`, `autopause`, `autopausedelay`, `autopausebusy`, `autopauseunavail`, `maxlen`, `servicelevel`, `strategy`, `joinempty`, `leavewhenempty`, `reportholdtime`, `memberdelay`, `weight`, `timeoutrestart`, `defaultrule`, `timeoutpriority`) VALUES
('666', 'default', '', '', 15, 'no', 'yes', 'yes', 'yes', NULL, '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0, 'no', 0, 5, 'no', 'no', 0, '', 0, 'yes', 'no', 5, 8, 0, 'yes', '', 'no', 0, 'no', 'no', 0, 0, 'leastrecent', 'yes', 'no', 'no', 0, 66, 'no', '', 'app'),
('667', 'default', '', '', 15, 'no', 'yes', 'yes', 'yes', NULL, '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0, 'no', 0, 5, 'no', 'no', 0, '', 0, 'yes', 'no', 5, 8, 0, 'yes', '', 'no', 0, 'no', 'no', 0, 0, 'leastrecent', 'yes', 'no', 'no', 0, 65, 'no', '', 'app');


queue_member table:

INSERT INTO `queue_members` (`queue_name`, `interface`, `membername`, `state_interface`, `penalty`, `paused`, `uniqueid`) VALUES
('666', 'pjsip/123', 'testagent', NULL, 30, 0, 'b431d038-840b-4f2d-b81d-85bff77dc150'),
('667', 'pjsip/123', 'testagent', NULL, 30, 0, 'f8e1346b-307f-4486-b6f5-1db5e342e628');


and this extension.conf:

[default]
exten => 123,1,Dial(PJSIP/${EXTEN})
exten => _66X,1,Answer()
same => n,Queue(${EXTEN})


By: Joshua C. Colp (jcolp) 2020-12-09 04:16:29.644-0600

Have you tested this in a non-realtime environment to ensure that is a global issue, and not one specifically isolated to a realtime configuration?

By: EDV O-TON (edvoton) 2020-12-09 04:36:33.232-0600

I have tested it in a non-realtime environment and the result is the same.
Here's the minimal queues.conf (appended to the default sample)

[666]
weight=66
member => PJSIP/123,30,testagent

[667]
weight=65
member => PJSIP/123,30,testagent


By: Joshua C. Colp (jcolp) 2020-12-09 04:40:35.312-0600

Can you please also collect debug information[1] and attach it? The app_queue module has logging which can make it clear why it is doing what it is doing at times.

[1] https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

By: EDV O-TON (edvoton) 2020-12-09 05:09:45.863-0600

Here is the debug log of the whole scenario:

- phone 744 calls phone 742 to get a busy state
- phone 741 calls queue 666
- agent 742 is paused in the queue 666
- phone 742 ends the call
- phone 744 calls queue 667
- the bug effect
- phone 741 ends call
- phone 742 gets the queue 667 call
- phone 742 ends call

By: Kevin Harwell (kharwell) 2020-12-09 14:53:05.125-0600

Confirmed using specified file based config.

By: EDV O-TON (edvoton) 2022-03-16 05:42:50.218-0500

It's also a problem, when you work with penalties instead of paused agents:

We have some queues where we use queuerules and min-/max-penalties to create an overflow to other agents. If the weight of the queue with penalty settings is higher than other ones the agents are in, they will not get any calls of these queues until there are no calls for the higher weighted queues.

Description:

Agent has two queues A and B, both with penalty 60.
Queue A has a higher weight ( e.g. 66) than queue B (e.g. 65).
Queue A has a min_penalty = 0 and max_penalty = 50, so that the agent is outside the range. Queue A has a queuerule, that will raise the maxpenalty after 30 seconds by 10, so that the agent gets the call.
The queue A gets a call, then queue B gets a call, too. The queue B call isn't transferred to the agent until the call in queue A is connected to another agent or the caller quits.

A test with weights vice versa worked as expected and the call ist immediately connected to the agent



Here are the minimal config files to reproduce:

queues.conf
------------
[666]
weight=66
member => PJSIP/123,60,testagent
defaultrule = testrule

[667]
weight=65
member => PJSIP/123,60,testagent
------------

extension.conf
------------
[default]

exten => 666,1,Answer()
same => n,Set(QUEUE_MIN_PENALTY=0)
same => n,Set(QUEUE_MAX_PENALTY=50)
same => n,Queue(666)

exten => 667,1,Answer()
same => n,Queue(667)
------------

queuerules.conf
------------
[testrule]
penaltychange => 30,+10
------------