<div dir="ltr"><div dir="ltr">On Wed, Apr 24, 2019 at 10:29 AM marek cervenka <<a href="mailto:cervajs2@gmail.com">cervajs2@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>hi,</p>
<p>in asterisk 13.24.1 is something "different" with AMI events
(precisely Hangup event)</p>
<p>scenario</p>
<p>simple call to queue, call is answered by Agent</p>
<p>in asterisk 13.23.1 is AMI flow like this<br>
</p>
<div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Consolas,"Courier New",monospace;font-weight:normal;font-size:14px;line-height:19px;white-space:pre-wrap"><div><span style="color:rgb(212,212,212)">{ </span><span style="color:rgb(156,220,254)">"event"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"QueueCallerJoin"</span><span style="color:rgb(212,212,212)">, </span><span style="color:rgb(156,220,254)">"uniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512600.457"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"linkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512600.457"</span><span style="color:rgb(212,212,212)"> }</span></div><div><span style="color:rgb(212,212,212)">{ </span><span style="color:rgb(156,220,254)">"event"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"AgentCalled"</span><span style="color:rgb(212,212,212)">, </span><span style="color:rgb(156,220,254)">"uniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512600.457"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"linkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512600.457"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"destuniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512601.464"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"destlinkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512600.457"</span><span style="color:rgb(212,212,212)">}</span></div><div><span style="color:rgb(212,212,212)">{ </span><span style="color:rgb(156,220,254)">"event"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"AgentConnect"</span><span style="color:rgb(212,212,212)">, </span><span style="color:rgb(156,220,254)">"uniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512600.457"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"linkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512600.457"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"destuniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512601.464"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"destlinkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512600.457"</span><span style="color:rgb(212,212,212)">,}</span></div><div><span style="color:rgb(212,212,212)">{ </span><span style="color:rgb(156,220,254)">"event"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"Hangup"</span><span style="color:rgb(212,212,212)">, </span><span style="color:rgb(156,220,254)">"uniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512601.465"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"linkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512600.457"</span><span style="color:rgb(212,212,212)"> }</span></div><div><span style="color:rgb(212,212,212)">{ </span><span style="color:rgb(156,220,254)">"event"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"Hangup"</span><span style="color:rgb(212,212,212)">, </span><span style="color:rgb(156,220,254)">"uniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512601.471"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"linkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512600.457"</span><span style="color:rgb(212,212,212)"> }</span></div><div><span style="color:rgb(212,212,212)">{ </span><span style="color:rgb(156,220,254)">"event"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"AgentComplete"</span><span style="color:rgb(212,212,212)">, </span><span style="color:rgb(156,220,254)">"uniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512600.457"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"linkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512600.457"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"destuniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512601.471"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"destlinkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512600.457"</span><span style="color:rgb(212,212,212)">,}</span></div><div><span style="color:rgb(212,212,212)">{ </span><span style="color:rgb(156,220,254)">"event"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"Hangup"</span><span style="color:rgb(212,212,212)">, </span><span style="color:rgb(156,220,254)">"uniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512601.464"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"linkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512600.457"</span><span style="color:rgb(212,212,212)"> }</span></div><div><span style="color:rgb(212,212,212)">{ </span><span style="color:rgb(156,220,254)">"event"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"Hangup"</span><span style="color:rgb(212,212,212)">, </span><span style="color:rgb(156,220,254)">"uniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512600.457"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"linkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512600.457"</span><span style="color:rgb(212,212,212)"> }</span></div></div>
<p>but it changed in asterisk 13.24.1 and later (ast 13.26.0 tested)</p>
<div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Consolas,"Courier New",monospace;font-weight:normal;font-size:14px;line-height:19px;white-space:pre-wrap"><div><span style="color:rgb(212,212,212)">{ </span><span style="color:rgb(156,220,254)">"event"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"QueueCallerJoin"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"uniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.0"</span><span style="color:rgb(212,212,212)"> ,</span><span style="color:rgb(156,220,254)">"linkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.0"</span><span style="color:rgb(212,212,212)"> }</span></div><div><span style="color:rgb(212,212,212)">{ </span><span style="color:rgb(156,220,254)">"event"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"AgentCalled"</span><span style="color:rgb(212,212,212)">, </span><span style="color:rgb(156,220,254)">"uniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.0"</span><span style="color:rgb(212,212,212)"> ,</span><span style="color:rgb(156,220,254)">"linkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.0"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"destuniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.7"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"destlinkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.0"</span><span style="color:rgb(212,212,212)"> }</span></div><div><span style="color:rgb(212,212,212)">{ </span><span style="color:rgb(156,220,254)">"event"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"Hangup"</span><span style="color:rgb(212,212,212)">, </span><span style="color:rgb(156,220,254)">"uniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.7"</span><span style="color:rgb(212,212,212)"> ,</span><span style="color:rgb(156,220,254)">"linkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.0"</span><span style="color:rgb(212,212,212)"> }</span></div><div><span style="color:rgb(212,212,212)">{ </span><span style="color:rgb(156,220,254)">"event"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"AgentConnect"</span><span style="color:rgb(212,212,212)">, </span><span style="color:rgb(156,220,254)">"uniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.0"</span><span style="color:rgb(212,212,212)"> ,</span><span style="color:rgb(156,220,254)">"linkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.0"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"destuniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.7"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"destlinkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.0"</span><span style="color:rgb(212,212,212)"> }</span></div><div><span style="color:rgb(212,212,212)">{ </span><span style="color:rgb(156,220,254)">"event"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"Hangup"</span><span style="color:rgb(212,212,212)">, </span><span style="color:rgb(156,220,254)">"uniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.8"</span><span style="color:rgb(212,212,212)"> ,</span><span style="color:rgb(156,220,254)">"linkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.0"</span><span style="color:rgb(212,212,212)"> }</span></div><div><span style="color:rgb(212,212,212)">{ </span><span style="color:rgb(156,220,254)">"event"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"AgentComplete"</span><span style="color:rgb(212,212,212)">, </span><span style="color:rgb(156,220,254)">"uniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.0"</span><span style="color:rgb(212,212,212)"> ,</span><span style="color:rgb(156,220,254)">"linkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.0"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"destuniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.14"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"destlinkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.0"</span><span style="color:rgb(212,212,212)"> }</span></div><div><span style="color:rgb(212,212,212)">{ </span><span style="color:rgb(156,220,254)">"event"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"Hangup"</span><span style="color:rgb(212,212,212)">, </span><span style="color:rgb(156,220,254)">"uniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.14"</span><span style="color:rgb(212,212,212)">,</span><span style="color:rgb(156,220,254)">"linkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.0"</span><span style="color:rgb(212,212,212)"> }</span></div><div><span style="color:rgb(212,212,212)">{ </span><span style="color:rgb(156,220,254)">"event"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"Hangup"</span><span style="color:rgb(212,212,212)">, </span><span style="color:rgb(156,220,254)">"uniqueid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.0"</span><span style="color:rgb(212,212,212)">, </span><span style="color:rgb(156,220,254)">"linkedid"</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">"1555512879.0"</span><span style="color:rgb(212,212,212)"> }</span></div></div>
<p>first Hangup is before AgentConnect</p>
<p>do you think it can be considered bug? <br></p></div></blockquote><div>Given the information it doesn't seem like a bug. Ordering between most AMI events is not guaranteed. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF"><p>
</p>
<p>any ideas where this change happened?<br></p></div></blockquote><div>If it's only due to threading and timing it'd be tough to track down. Depending on timing an alteration could make it so any given thread is now running slightly slower, or even faster, than before. Thus altering the order. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF"><p>
</p>
<p><br>
</p>
<p>i found only these changes to app_queue<br>
</p>
<p><a href="https://issues.asterisk.org/jira/browse/ASTERISK-28125" target="_blank">https://issues.asterisk.org/jira/browse/ASTERISK-28125</a></p>
<p><a href="https://github.com/asterisk/asterisk/commit/f23a12244d8286e26554b7658a042f51497c1485" target="_blank">https://github.com/asterisk/asterisk/commit/f23a12244d8286e26554b7658a042f51497c1485</a></p>
<p><br>
</p>
<p>Marek<br><br>
</p>
</div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Kevin Harwell<div>Digium - A Sangoma Company | Senior Software Developer<div>445 Jan Davis Drive NW - Huntsville, AL 35806 - US</div><div>Check us out at: <a href="https://digium.com" target="_blank">https://digium.com</a> & <a href="https://asterisk.org" target="_blank">https://asterisk.org</a></div></div></div></div></div>