[Home]

Summary:ASTERISK-28573: Missing event AgentComplete on AttendedTransfer
Reporter:Martin Nyström (martin.nystrom)Labels:
Date Opened:2019-10-08 06:54:25Date Closed:2019-10-24 12:00:05
Priority:MinorRegression?
Status:Closed/CompleteComponents:Applications/app_queue
Versions:13.28.1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Centos 7Attachments:( 0) messages_events.txt
( 1) messages_telnet.txt
( 2) messages.txt
( 3) telnet_log.txt
Description:When performing an attended transfer, the event AgentComplete is not send when the second leg finishes the call.

When I look at the app_queue.c I find this documented for the ManagerEvent AgentComplete

"<synopsis>Raised when a queue member has finished servicing a caller in the queue.</synopsis>"

This is simply not true for Attended Transfers. AgentComplete is only sent when the first leg finishes the call.

Call flow
1) Incoming call Z to Queue A
2) Call Z is put on hold
3) Agent in Queue A dials the Queue B
4) Agent in Queue B answers
5) Agent in Queue A performs the attended transfer

The agentcomplete is sent when (5) is performed. It is not sent when Queue B ends the call with Z.

Is this intended? If yes, what would be the work around to fetch the call data from the last leg of an attended transfer using events?
Comments:By: Asterisk Team (asteriskteam) 2019-10-08 06:54:26.254-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: Joshua C. Colp (jcolp) 2019-10-09 09:08:07.370-0500

Thank you for taking the time to report this bug and helping to make Asterisk better. Unfortunately, we cannot work on this bug because your description did not include enough information. Please read over the Asterisk Issue Guidelines [1] which discusses the information necessary for your issue to be resolved and the format that information needs to be in. We would be grateful if you would then provide a more complete description of the problem. At a minimum, we need:

1. The specific steps or actions you took that caused you to encounter the problem.
2. The behavior you expected and the location of documentation that led you to that expectation.
3. The behavior you actually encountered.

To demonstrate the issue in detail, please include Asterisk log files generated per the instructions on the wiki [2]. If applicable, please ensure that protocol-level trace debugging is enabled, e.g., 'sip set debug on' if the issue involves chan_sip, and configuration information such as dialplan and channel configuration.

Thanks!

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines

[2] https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information



By: Martin Nyström (martin.nystrom) 2019-10-09 09:34:00.902-0500

Asterisk logs for attended transfer

By: Martin Nyström (martin.nystrom) 2019-10-09 09:42:55.139-0500

I attached the asterisk CLI output from an attended transfer.

1. The specific steps or actions you took that caused you to encounter the problem.
Attended transfer between Queue A and Queue B, more specific call flow is in the original post

2. The behavior you expected and the location of documentation that led you to that expectation.
We expect an AgentComplete event to be sent both when the call leaves Queue A/Agent A and when call ends in Queue B/Agent B.

As the app_queue.c says
"Raised when a queue member has finished servicing a caller in the queue."

When performing attended transfers between two queues, the caller is served in two different queues, therefor there should be one AgentComplete in each as there is one agent in each queue managing the call.

3. The behavior you actually encountered.
AgentComplete is only sent when the first LEG ends. It is not sent when the second LEG ends.

By: Martin Nyström (martin.nystrom) 2019-10-09 09:56:20.546-0500

Attended transfers with manager debug enabled

By: Benjamin Keith Ford (bford) 2019-10-09 11:14:19.459-0500

I tried to replicate the scenario, but am seeing both AgentComplete AMI events. I used telnet rather than the CLI - can you try this method and see if there is a difference in behavior for you? This should help narrow down where the bug is actually occurring.

By: Martin Nyström (martin.nystrom) 2019-10-09 12:32:49.630-0500

Hello Benjamin, can you share the verbose logs for your test scenario? We are using the AMI to listen to the events and we are missing them there.

By: Martin Nyström (martin.nystrom) 2019-10-10 01:49:55.714-0500

I now added logs on AMI Events when connected to Telnet. The behaviour is the same. Missing AgentComplete on the last leg.

By: Benjamin Keith Ford (bford) 2019-10-10 09:18:24.733-0500

Thanks for posting the log. I do see 2 AgentComplete events in there (3 actually), but they are all back to back, which is odd. I've attached my telnet logs as well, which has 2 AgentComplete events in the areas I would expect them to be. Here's my setup, to eliminate any discrepancies between our tests:

* Two queues, with 1 agent each
* A phone calls the first queue
* Agent answers, then uses attended transfer feature (however it is configured in your features.conf) (both queues should have the 't' and 'T' options set for this)
* The agent dials the other queue
* Once the agent in the other queue answers, the agent in the first queue hangs up
* The caller is now connected with the agent in the second queue, and an AgentComplete event happens
* When the agent hangs up on the caller, another AgentComplete message occurs

Does this line up with what you are doing / what you would expect?

By: Martin Nyström (martin.nystrom) 2019-10-10 09:46:17.028-0500

I added the tT options to my internal route that goes to the queue and the first queue. It didn't do any change.

However, I did manage to get the ending AgentComplete's by performing the attended transfer before the agent in Queue B answers. Meaning I hit the Transfer button while I wait for an agent to answer the call in Queue B.

Does this give any hint?


Also to answer your question: Your log is what I would expect yes.

By: Benjamin Keith Ford (bford) 2019-10-10 10:22:19.319-0500

The 'tT' option is what allows attended transfers using the DTMF code in features.conf. It sounds like the way the transfer is being done is causing problems. Try setting your attended transfer in features.conf and use that method to transfer the call from one queue to the other, following the steps in my previous comment. That's the recommended way to handle the transfer. For reference, here's what my features.conf looks like:

{code}
[featuremap]
atxfer => *2
{code}

By: Asterisk Team (asteriskteam) 2019-10-24 12:00:04.017-0500

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines