[Home]

Summary:ASTERISK-29408: app_queue: Queue events don't occur after caller leaves queue, but when caller hangs up
Reporter:Sebastian Nocetti (sebastian.nocetti)Labels:
Date Opened:2021-04-28 11:27:19Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:Applications/app_queue
Versions:16.17.0 18.3.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Linux Ubunutu 20.04, Asterisk 18.3.0 (tested with older versions too, Asterisk 13, 16, etc)Attachments:( 0) debug_log_hangupcommand.txt
( 1) debug_log_redirect.txt
( 2) debug_log.txt
Description:If I do some manager actions like:

Redirect
Hangup
sendDtmf

Queue events are not fired correctly, example:

If I do a Redirect (manager redirect action on caller channel) I expect a queue log event like TRANSFER or COMPLETEAGENT, but none is fired. Event is fired AFTER caller ends call (for example if I redirect to a playback, COMPLETECALLER is fired AFTER caller listen to file)

If I do a HANGUP on Agent Channel, I expect a COMPLETEAGENT fired, but instead a COMPLETECALLER is fired.

If I send a dtmf from manager to hangup call using queue "c" option, I expect a COMPLETEAGENT fired but none is fired, instead call continues execution but COMPLETECALLER is fired AFTER caller ends call.

Comments:By: Asterisk Team (asteriskteam) 2021-04-28 11:27:19.753-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. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

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.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Joshua C. Colp (jcolp) 2021-04-28 11:39:33.950-0500

We require additional debug to continue with triage of your issue. Please follow the instructions on the wiki [1] for how to collect debugging information from Asterisk. For expediency, where possible, attach the debug with a '.txt' file extension so that the debug will be usable for further analysis.

Thanks!

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



By: Sebastian Nocetti (sebastian.nocetti) 2021-04-29 08:14:33.627-0500

Debug done...



By: Sebastian Nocetti (sebastian.nocetti) 2021-04-29 08:18:06.963-0500

I attached debug as asked by documentation.

To reproduce problem:

- Put a call on queue.
- Answer call by an agent.
- Send a Hangup from manager (for example from a python script) to hangup agent channel
- Check queue event.

- Put a call on queue
- Answer call.
- Send a Redirect from manager (python script) to transfer caller channel to another context
- No event generated until caller hangups call (I expet some queue event like TRANSFER or at least COMPLETEAGENT)


- Put a call on queue
- Configure queue to continue execution after calee hangup
- Send a hangup from manager (from python script)
- Call continues to next priority but no queue event generated (I expet some COMPLETEAGENT or similar to fire)
- After caller listen for a playback, for example, and only after, then COMPLETECALLER is fired

By: Joshua C. Colp (jcolp) 2021-04-29 08:20:36.902-0500

The debug doesn't contain any calls, any queue debug, or any AMI actions you are referring to. Did you prune the debug before attaching? Did you collect debug while doing all of the things you stated?

By: Sebastian Nocetti (sebastian.nocetti) 2021-04-29 09:24:25.632-0500

Debug attached now correclty, as you can see I fired a custom event COMPLETEAGENT_CUSTOM as a hack because the real COMPLETEAGENT is not fired.

What I need is to control hangup, redirect from a web page using manager commands. Check this log to see the problem.

By: Joshua C. Colp (jcolp) 2021-04-29 09:46:35.839-0500

I don't see any use of Hangup or Redirect in this log. What I see is SIP/3000 using DTMF '*' and then SIP/pbxconsoltic leaving the call and going back into the dialplan. If it happens with that, then the logic which writes out the queue log entry may not take into account the caller continuing afterwards in the dialplan which based on my reading seems to be the case.

By: Sebastian Nocetti (sebastian.nocetti) 2021-04-29 10:28:45.479-0500

Yes, this is an example, in this case I am sending dtmf * to hangup call using this queue option, but the issue is the same, no COMPLETEAGENT fired.

This log case is:

- Caller enters queue.
- Agent answer call
- After agent speaks, I send a manager action dtmf on agent channel simulating he pressed dtmf for call hangup ( * )
- As queue has continue option, caller continues on dialplan, agent call is ended (I expect on this moment COMPLETEAGENT fired), queue event is not fired
- Caller hears some playback
- Caller end call and COMPLETECALLER is fired (but call was out of queue before, when I send * dtmf form hangup).

What I expect is queue event COMPLETEAGENT fired because I forced to send * dtmf to end cail using manager command.

I will attach debug for all other cases soon.



By: Sebastian Nocetti (sebastian.nocetti) 2021-04-29 10:34:15.367-0500

Attached debug file with Redirect manager command, as you can see, I expect some event inmediatliy caller is out of queue, but no event is fired. Instead caller is redirected to anoter extension, hears some playback and after that COMPLETECALLER is fired.

By: Sebastian Nocetti (sebastian.nocetti) 2021-04-29 10:39:12.295-0500

Attached debug with hangup manager command.