<p>George Joseph <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/10048">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Joshua Colp: Looks good to me, but someone else must approve; Verified
  Richard Mudgett: Looks good to me, approved
  George Joseph: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_queue: Fix Attended transfer hangup with removing pending member.<br><br>This issue related to setting of holdtime, announcements, member delays.<br>It works well if we set the member delays to "0" and no announcements<br>and no holdtime.This issue will happen if we set member delays to "1",<br>"2"... or announcements or holdtime and hangs up the call during<br>processing it.<br><br>And here is the reason:<br>(At the step of answering a phone.)<br>It takes care any holdtime, announcements, member delays,<br>or other options after a call has been answered if it exists.<br><br>Normally, After the call has been aswered,<br>and we wait for the processing one of the cases of the member delays<br>or hold time or announcements finished, "if (ast_check_hangup(peer))"<br>will be not executed, then queue will be updated at update_queue().<br>Here, pending member will be removed.<br><br>However, after the call has been aswered,<br>if we hangs up the call during one of the cases of the member delays<br>or hold time or announcements, "if (ast_check_hangup(peer))"<br>will be executed.<br>outgoing = NULL and at hangupcalls, pending members will not be removed.<br><br>* This fixed patch will remove the pending member from container<br>before hanging up the call with outgoing is NULL.<br><br>ASTERISK-27920<br><br>Reported by: Cao Minh Hiep<br>Tested by: Cao Minh Hiep<br><br>Change-Id: Ib780fbf48ace9d2d8eaa1270b9d530a4fc14c855<br>---<br>M apps/app_queue.c<br>1 file changed, 3 insertions(+), 0 deletions(-)<br><br></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 2c7ed2a..50f9029 100644</span><br><span>--- a/apps/app_queue.c</span><br><span>+++ b/apps/app_queue.c</span><br><span>@@ -6761,6 +6761,7 @@</span><br><span> </span><br><span>                             ast_channel_publish_dial(qe->chan, peer, member->interface, ast_hangup_cause_to_dial_status(ast_channel_hangupcause(peer)));</span><br><span>                           ast_autoservice_chan_hangup_peer(qe->chan, peer);</span><br><span style="color: hsl(120, 100%, 40%);">+                          pending_members_remove(member);</span><br><span>                              ao2_ref(member, -1);</span><br><span>                                 goto out;</span><br><span>                    } else if (ast_check_hangup(qe->chan)) {</span><br><span>@@ -6771,6 +6772,7 @@</span><br><span>                          qe->handled = -1;</span><br><span>                                 ast_channel_publish_dial(qe->chan, peer, member->interface, ast_hangup_cause_to_dial_status(ast_channel_hangupcause(peer)));</span><br><span>                           ast_autoservice_chan_hangup_peer(qe->chan, peer);</span><br><span style="color: hsl(120, 100%, 40%);">+                          pending_members_remove(member);</span><br><span>                              ao2_ref(member, -1);</span><br><span>                                 return -1;</span><br><span>                   }</span><br><span>@@ -6790,6 +6792,7 @@</span><br><span>                    record_abandoned(qe);</span><br><span>                        ast_channel_publish_dial(qe->chan, peer, member->interface, ast_hangup_cause_to_dial_status(ast_channel_hangupcause(peer)));</span><br><span>                   ast_autoservice_chan_hangup_peer(qe->chan, peer);</span><br><span style="color: hsl(120, 100%, 40%);">+                  pending_members_remove(member);</span><br><span>                      ao2_ref(member, -1);</span><br><span>                         return -1;</span><br><span>           }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10048">change 10048</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/10048"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ib780fbf48ace9d2d8eaa1270b9d530a4fc14c855 </div>
<div style="display:none"> Gerrit-Change-Number: 10048 </div>
<div style="display:none"> Gerrit-PatchSet: 8 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Cao Minh Hiep <chiep@infinitalk.co.jp> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jaco Kroon <jaco@uls.co.za> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 (1000185) </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>