[asterisk-commits] app queue: AgentComplete event has wrong reason (asterisk[13])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Sep 19 16:26:28 CDT 2015


Matt Jordan has submitted this change and it was merged.

Change subject: app_queue: AgentComplete event has wrong reason
......................................................................


app_queue: AgentComplete event has wrong reason

When a queued caller transfers an agent to another extension sometimes the
raised AgentComplete event has a reason of "caller" and sometimes "transfer".
Since a transfer has taken place this should always be transfer. This occurs
because sometimes the stasis hangup event arrives before the transfer event
thus writing a different reason out.

With this patch, when a hangup event is received during a transfer it will
check to see if the channel that is hanging up is part of a transfer. If so
it will return and let the subsequently received transfer event handler take
care of the cleanup.

ASTERISK-25399 #close

Change-Id: Ic63c49bd9a5ed463ea7a032fd2ea3d63bc81a50d
---
M apps/app_queue.c
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Anonymous Coward #1000019: Verified
  Matt Jordan: Looks good to me, approved
  Joshua Colp: Looks good to me, but someone else must approve



diff --git a/apps/app_queue.c b/apps/app_queue.c
index c0ee9f3..2995274 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -5998,7 +5998,9 @@
 	}
 
 	chan = ast_channel_get_by_name(channel_blob->snapshot->name);
-	if (chan && ast_channel_has_role(chan, AST_TRANSFERER_ROLE_NAME)) {
+	if (chan && (ast_channel_has_role(chan, AST_TRANSFERER_ROLE_NAME) ||
+		     !ast_strlen_zero(pbx_builtin_getvar_helper(chan, "ATTENDEDTRANSFER")) ||
+		     !ast_strlen_zero(pbx_builtin_getvar_helper(chan, "BLINDTRANSFER")))) {
 		/* Channel that is hanging up is doing it as part of a transfer.
 		 * We'll get a transfer event later
 		 */

-- 
To view, visit https://gerrit.asterisk.org/1280
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic63c49bd9a5ed463ea7a032fd2ea3d63bc81a50d
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-commits mailing list