<p>Nathan Bruning has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11058">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_queue: fixed ordering of events for queue agent dial<br><br>Send out AgentCalled and DialBegin *before* calling the channel<br>of the queue agent.<br><br>Before this, the AgentCalled event could either be sent before or after the<br>events of the queue agent, depending on thread scheduling.<br><br>ASTERISK-28310 #close<br><br>Change-Id: Id0865fb306136f30a1aa8be82f3753c47059ff2d<br>---<br>M apps/app_queue.c<br>1 file changed, 8 insertions(+), 13 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/58/11058/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_queue.c b/apps/app_queue.c</span><br><span>index 9b1f486..79d8710 100644</span><br><span>--- a/apps/app_queue.c</span><br><span>+++ b/apps/app_queue.c</span><br><span>@@ -4577,6 +4577,14 @@</span><br><span> /* Save the original channel name to detect call pickup masquerading in. */</span><br><span> tmp->orig_chan_name = ast_strdup(ast_channel_name(tmp->chan));</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ blob = ast_json_pack("{s: s, s: s, s: s}",</span><br><span style="color: hsl(120, 100%, 40%);">+ "Queue", qe->parent->name,</span><br><span style="color: hsl(120, 100%, 40%);">+ "Interface", tmp->interface,</span><br><span style="color: hsl(120, 100%, 40%);">+ "MemberName", tmp->member->membername);</span><br><span style="color: hsl(120, 100%, 40%);">+ queue_publish_multi_channel_blob(qe->chan, tmp->chan, queue_agent_called_type(), blob);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_channel_publish_dial(qe->chan, tmp->chan, tmp->interface, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> ast_channel_unlock(tmp->chan);</span><br><span> ast_channel_unlock(qe->chan);</span><br><span> </span><br><span>@@ -4594,19 +4602,6 @@</span><br><span> return 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- ast_channel_lock_both(tmp->chan, qe->chan);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- blob = ast_json_pack("{s: s, s: s, s: s}",</span><br><span style="color: hsl(0, 100%, 40%);">- "Queue", qe->parent->name,</span><br><span style="color: hsl(0, 100%, 40%);">- "Interface", tmp->interface,</span><br><span style="color: hsl(0, 100%, 40%);">- "MemberName", tmp->member->membername);</span><br><span style="color: hsl(0, 100%, 40%);">- queue_publish_multi_channel_blob(qe->chan, tmp->chan, queue_agent_called_type(), blob);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- ast_channel_publish_dial(qe->chan, tmp->chan, tmp->interface, NULL);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- ast_channel_unlock(tmp->chan);</span><br><span style="color: hsl(0, 100%, 40%);">- ast_channel_unlock(qe->chan);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> ast_verb(3, "Called %s\n", tmp->interface);</span><br><span> </span><br><span> return 1;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11058">change 11058</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/11058"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: Id0865fb306136f30a1aa8be82f3753c47059ff2d </div>
<div style="display:none"> Gerrit-Change-Number: 11058 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Nathan Bruning <nathan@iperity.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>