[Asterisk-code-review] app_queue: fixed ordering of events for queue agent dial (...asterisk[16])

Richard Mudgett asteriskteam at digium.com
Fri Mar 1 12:19:37 CST 2019


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/11058 )

Change subject: app_queue: fixed ordering of events for queue agent dial
......................................................................


Patch Set 1:

> Patch Set 1:
> 
> > Patch Set 1: Code-Review-1
> > 
> > I feel that this patch will introduce a lot of subtle unintended changes and other bugs.
> > 
> > * The channel snapshots before this change were taken AFTER the channel was called.  So they would indicate that the target was called.
> > 
> > * If the ast_call() fails now you have to report DialEnd when you didn't before because it is defined that you get a DialEnd paired with a DialBegin.
> > 
> > * The ordering of the events for any other calling method does not enforce this ordering change as you are only doing it for app_queue.  Thus the other methods will still send the UserEvent you mention in the ASTERISK issue before the DialBegin events.
> 
> OK, good points. Any other direction to fix this?
> 
> Otherwise, it would be a good idea to clarify this in the documentation, so that AMI consumers know they have to account for various orderings. As "unusual" event ordering happens only very sparingly, we've only come across this when our app was already in production...

Another thing is that these events that you are trying to impose an ordering on are for different channels.  The DialBegin and AgentCalled events in your ASTERISK issue are for the outgoing queue channel (i.e., the ;1 channel of a local channel pair) and the UserEvent event is on the ;2 channel of the local channel pair.  You are trying to order events that do not have a defined ordering.  Because these events are for different channels, it is conceivable that the events can still be out of your desired order even with your current patch.  All your patch is doing is shrinking the window of opportunity and only in the case of app_queue.

I don't think there is a good way to impose the ordering because more than one thread and stasis message queue is involved.


-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11058
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Id0865fb306136f30a1aa8be82f3753c47059ff2d
Gerrit-Change-Number: 11058
Gerrit-PatchSet: 1
Gerrit-Owner: Nathan Bruning <nathan at iperity.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Nathan Bruning <nathan at iperity.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Fri, 01 Mar 2019 18:19:37 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190301/72b3c936/attachment.html>


More information about the asterisk-code-review mailing list