[Asterisk-code-review] app queue: Fix Attended transfer hangup with removing pendin... (asterisk[13.23])

Cao Minh Hiep asteriskteam at digium.com
Wed Sep 5 21:15:09 CDT 2018


Cao Minh Hiep has uploaded this change for review. ( https://gerrit.asterisk.org/10047


Change subject: app_queue: Fix Attended transfer hangup with removing pending member.
......................................................................

app_queue: Fix Attended transfer hangup with removing pending member.

This issue related to setting of holdtime, announcements, member delays.
It works well if we set the member delays to "0" and no announcements
and no holdtime.This issue will happen if we set member delays to "1",
"2"... or announcements or holdtime and hangs up the call during
processing it.

And here is the reason:
(At the step of answering a phone.)
It takes care any holdtime, announcements, member delays,
or other options after a call has been answered if it exists.
(We can see the following the part of the source code to know it.)
Normally, After the call has been aswered,
and we wait for the processing one of the cases of the member delays
or hold time or announcements finished, "if (ast_check_hangup(peer))"
will be not executed, then queue will be updated at update_queue().
Here, pending member will be removed.

However, after the call has been aswered,
if we hangs up the call during one of the cases of the member delays
or hold time or announcements, "if (ast_check_hangup(peer))"
will be executed.
outgoing = NULL and at hangupcalls, pending members will not be removed.

* This fixed patch will remove the pending member from container
* before hanging up the call with outgoing is NULL.

ASTERISK-27920

Reported by: Cao Minh Hiep
Tested by: Cao Minh Hiep

Change-Id: Ib780fbf48ace9d2d8eaa1270b9d530a4fc14c855
---
M apps/app_queue.c
1 file changed, 1 insertion(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/47/10047/1

diff --git a/apps/app_queue.c b/apps/app_queue.c
index 12f09ec..f8173d7 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -6761,6 +6761,7 @@
 
 				ast_channel_publish_dial(qe->chan, peer, member->interface, ast_hangup_cause_to_dial_status(ast_channel_hangupcause(peer)));
 				ast_autoservice_chan_hangup_peer(qe->chan, peer);
+				pending_members_remove(member);
 				ao2_ref(member, -1);
 				goto out;
 			} else if (ast_check_hangup(qe->chan)) {

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

Gerrit-Project: asterisk
Gerrit-Branch: 13.23
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib780fbf48ace9d2d8eaa1270b9d530a4fc14c855
Gerrit-Change-Number: 10047
Gerrit-PatchSet: 1
Gerrit-Owner: Cao Minh Hiep <chiep at infinitalk.co.jp>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180905/15b8a25d/attachment.html>


More information about the asterisk-code-review mailing list