[Home]

Summary:ASTERISK-28165: app_queue: QueueMemberStatus ami event duplication
Reporter:Roman Pertsev (romkazor)Labels:AMI QueueMemberStatus Queues
Date Opened:2018-11-15 02:31:32.000-0600Date Closed:2021-03-19 05:03:26
Priority:MinorRegression?
Status:Closed/CompleteComponents:Applications/app_queue Core/PBX
Versions:13.21.1 13.23.1 Frequency of
Occurrence
Constant
Related
Issues:
duplicatesASTERISK-29355 app_queue: Queue member status message sent even if status doesn't change
Environment:Centos 6.9Attachments:( 0) ami-output-when-inbound-call.txt
( 1) queuememberstatus.txt
( 2) queues.conf
( 3) queue-show.png
( 4) queue-show-when-inbound-call.png
Description:Hello. If member of queue works at 2+ queues, then AMI event QueueMemberStatus duplicate and more.

Example:
Member 100 in queue 600
AMI output for 100:
QueueMemberStatus

Example:
Member 100 in queues 600 and 601
AMI output for 100:
QueueMemberStatus
QueueMemberStatus
QueueMemberStatus
QueueMemberStatus

Example:
Member 100 in queues 600 and 601 and 602
AMI output for 100:
QueueMemberStatus
QueueMemberStatus
QueueMemberStatus
QueueMemberStatus
QueueMemberStatus
QueueMemberStatus
QueueMemberStatus
QueueMemberStatus
QueueMemberStatus
Comments:By: Asterisk Team (asteriskteam) 2018-11-15 02:31:34.869-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.

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].

By: Roman Pertsev (romkazor) 2018-11-15 02:35:42.742-0600

Example AMI output for member 100 in two queues

By: Kevin Harwell (kharwell) 2018-11-16 15:31:53.207-0600

I'm not seeing the same results. Is the ami output you posted a direct copy/paste? Meaning between those events there are no other events?

Please attach your queues.conf file and also post the output from the following CLI command:
{noformat}
*CLI> queue show
{noformat}

Thanks!

By: Roman Pertsev (romkazor) 2018-11-17 05:40:32.174-0600

Hello Kevin. Here is cleanly test with 3 queues and 1 member and 1 incoming call.
queue show before call
queue show in call
ami output in call (directly copy from ami output)

By: Benjamin Keith Ford (bford) 2018-11-20 14:53:53.715-0600

I'm not seeing this behavior either. I'm using the queue setup you provided, and assigned the same member to each of the 3 queues. I dialed into queue 600 with another extension, and only got expected QueueMemberStatus events with AMI. Are these the same steps you are using when this occurs?

By: Roman Pertsev (romkazor) 2018-11-21 04:37:27.347-0600

Yes, Benjamin, the same steps. Ok, trying a simple example: 1 caller, 1 agent, 1 queue (I specifically reinstall the asterisk 13.23.1 on another server and got the same problem):
AMI output when agent is ringing. Double QueueMemberStatus event (only timestamp is different)

Event: QueueCallerJoin
Privilege: agent,all
Timestamp: 1542795809.868283
Channel: SIP/101-00000009
ChannelState: 4
ChannelStateDesc: Ring
CallerIDNum: 101
CallerIDName: Alexey K.
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: ru
AccountCode:
Context: from-internal
Exten: 600
Priority: 1
Uniqueid: 1542795809.9
Linkedid: 1542795809.9
Queue: 600
Position: 1
Count: 1

Event: QueueMemberStatus
Privilege: agent,all
Timestamp: 1542795809.870308
Queue: 600
MemberName: 100
Interface: SIP/100
StateInterface: SIP/100
Membership: dynamic
Penalty: 0
CallsTaken: 0
LastCall: 0
InCall: 0
Status: 6
Paused: 0
PausedReason:
Ringinuse: 0

Event: AgentCalled
Privilege: agent,all
Timestamp: 1542795809.870619
Channel: SIP/101-00000009
ChannelState: 4
ChannelStateDesc: Ring
CallerIDNum: 101
CallerIDName: Alexey K.
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: ru
AccountCode:
Context: from-internal
Exten: 600
Priority: 1
Uniqueid: 1542795809.9
Linkedid: 1542795809.9
DestChannel: SIP/100-0000000a
DestChannelState: 0
DestChannelStateDesc: Down
DestCallerIDNum: 100
DestCallerIDName: Roman P.
DestConnectedLineNum: 101
DestConnectedLineName: Alexey K.
DestLanguage: ru
DestAccountCode:
DestContext: from-internal
DestExten: 600
DestPriority: 1
DestUniqueid: 1542795809.10
DestLinkedid: 1542795809.9
Queue: 600
Interface: SIP/100
MemberName: 100

Event: QueueMemberStatus
Privilege: agent,all
Timestamp: 1542795809.966464
Queue: 600
MemberName: 100
Interface: SIP/100
StateInterface: SIP/100
Membership: dynamic
Penalty: 0
CallsTaken: 0
LastCall: 0
InCall: 0
Status: 6
Paused: 0
PausedReason:
Ringinuse: 0



By: Benjamin Keith Ford (bford) 2018-11-26 15:19:42.674-0600

Strange, I'm still not seeing the second QueueMemberStatus event. Could you provide some more information, such as:
# How are you adding your members to the queue? Are you doing it through configuration files, or adding them dynamically through the Asterisk CLI?
# Out of curiosity, does this happen when using real-time queues?
# If you could provide a log file with the full output from start to finish of this happening, that may shed some light on what's going on.

By: Roman Pertsev (romkazor) 2018-12-02 06:34:09.445-0600

Very strange.
1. Adding by cli for this test, but its no matter
2. No real-time, config only
If you add agent 100 in 600, 601 and 602 as SIP/100 and ring to 600 you get 9 event of QueueMemberStatus from start to end call

If you add agent 100 in 600, 601 and 602 as Local/100@from-queue/n and ring to 600 you get 9 event of QueueMemberStatus from start to end call

BUT if you add 100 in 600, 601 and 602 as (queue add member Local/100@from-queue/n to 600 penalty 0 as 100 state_interface hint:100@ext-local) you gtt 18 event of QueueMemberStatus from start to end call

Normally, i must get only 6 event of QueueMemberStatus (one event per queue when call start, and one event per queue when call stop)

By: Chris Savinovich (csavinovich) 2018-12-06 14:17:37.719-0600

Hello Roman. I am sorry for the delay but it will work much better if you just send us the sections in your dialplan related to this. Please also send any short external scripts that will help us replicate these results.
Thank you
CS


By: Roman Pertsev (romkazor) 2018-12-07 04:39:25.217-0600

Guys, dialplan is simple:

queues.conf
[600]
autofill=yes
retry=1
ringinuse=no
strategy=rrmemory
timeout=40

extensions.conf
exten => 600,1,Queue(600,t,,,40,,,,,)

manger.conf
[user]
secret = password
deny = 0.0.0.0/0.0.0.0
permit = 127.0.0.1/255.255.255.0
read = agent,system
write = agent
writetimeout = 5000

That's all.

Just add 1 member (queue add member SIP/100 to 600) to queue and make call to this queue and after a few seconds make hangup. You'll get 3 events of QueueMemberStatus
On all my servers on Centos 6.9-6.10 with asterisk 13.23.1 i get 3 events, but although need 2 events.

I don't understand what's problem to get this result on your side.


By: Joshua C. Colp (jcolp) 2018-12-10 09:10:30.562-0600

I was able to reproduce this using the latest given configuration by adding a Local channel to the queue as a dynamic member from the CLI, and then just calling it again using a Local channel. When hung up two duplicate QueueMemberStatus messages were sent:

{noformat}
Event: QueueMemberStatus
Privilege: agent,all
Queue: 600
MemberName: Local/s@agent
Interface: Local/s@agent
StateInterface: Local/s@agent
Membership: dynamic
Penalty: 0
CallsTaken: 0
LastCall: 0
InCall: 0
Status: 1
Paused: 0
PausedReason:
Ringinuse: 0

Event: QueueMemberStatus
Privilege: agent,all
Queue: 600
MemberName: Local/s@agent
Interface: Local/s@agent
StateInterface: Local/s@agent
Membership: dynamic
Penalty: 0
CallsTaken: 0
LastCall: 0
InCall: 0
Status: 1
Paused: 0
PausedReason:
Ringinuse: 0
{noformat}

I'm keeping this issue at a Minor level as it is redundant that two are sent, but does not inherently break anything.

By: Roman Pertsev (romkazor) 2018-12-10 09:52:35.140-0600

Ok this is already something, thanks. Try to add /n to Local interface and add agent to 2-3 queues, you will be surprised!

By: Marek Cervenka (cervajs) 2019-04-08 10:34:12.270-0500

We have the same problem(ast 13.24.1, centos7). When number of queues is bigger, the performance penalty is unpleasant

By: Roman Pertsev (romkazor) 2019-12-18 09:52:03.871-0600

Hello guys. Is there any news? it's been over a year, but all version of asterisk still duplicated (double, triple, etc.) QueueMemberStatus
Hint in queue and Local channel affect that.

By: Kevin Harwell (kharwell) 2019-12-18 11:05:05.693-0600

No one is currently working this issue. Any updates will be made here when they become available.