[Home]

Summary:ASTERISK-20151: No CDR when queue call hangs up while ringing agent and 2 or more agents in that queue are busy
Reporter:millsu2 (millsu2)Labels:
Date Opened:2012-07-19 16:59:36Date Closed:2012-07-26 07:32:48
Priority:MinorRegression?
Status:Closed/CompleteComponents:Applications/app_queue
Versions:1.8.11.1 10.6.1 Frequency of
Occurrence
Frequent
Related
Issues:
Environment:DebianAttachments:( 0) debug.log
Description:When a call rings in to a queue with at least one available agent and at least 2 busy agents no CDR record is generated if the caller hangs up while ringing the free agent. I tested this with both 5 and 3 agents in the queue.

It does this regardless if endbeforehexten=yes or endbeforehexten=no. I did not test with unanswered=yes since that will mess up our CDR's.

I can recreate the problem in Asterisk 10.6.1 by creating a queue called 'test', adding 3 queue members through AddQueueMember, making 2 of them busy by calling an outside line or calling each other, then putting a call in the queue. The queue will ring the free agent. While it is ringing, before the agent answers, the queue caller hangs up.
At this point a CDR should be created for this call in all configured cdr back ends, but none is created either in the CSV file, the pgsql database or throguh odbc to pgsql.

While gathering the logfile data, I noticed it was trying to log only to sqlite, which I didn't know was enabled.I checked that db file and the CDR's were correctly logged there. I turned off sqlite and tested again, but the CDR is now not logged anywhere.

The attached debug log was done on a test machine with no activity so it mostly only includes info about the specific call (timestamp: Jul 20 14:30:38)

Comments:By: Rusty Newton (rnewton) 2012-07-19 17:10:13.474-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. You may find it helpful to read the Asterisk Issue Guidelines https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines. 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
3. the behavior you actually encountered (in as much detail as possible).

This likely includes output from the console with debug level logging, a SIP trace (if this is SIP related), and configuration information such as dialplan (e.g. extensions.conf) and channel configuration (e.g. sip.conf). Thanks!


Please also include any relevant config files for your queues or CDR configuration. Sanitize please!

By: Rusty Newton (rnewton) 2012-07-19 17:11:53.129-0500

Additionally an Asterisk full log with DEBUG and VERBOSE messages of at least level 5 would be helpful. Please point out the timestamps in the log where this call occurs.

By: Matt Jordan (mjordan) 2012-07-26 07:31:18.658-0500

Backing this up a second.

"I can recreate the problem in Asterisk 10.6.1 by creating a queue called 'test', adding 3 queue members through AddQueueMember, making 2 of them busy by calling an outside line or calling each other, then putting a call in the queue. The queue will ring the free agent. While it is ringing, before the agent answers, the queue caller hangs up.
At this point a CDR should be created for this call in all configured cdr back ends, but none is created either in the CSV file, the pgsql database or throguh odbc to pgsql."

This is incorrect.  If a queue caller hangs up before anyone is answered, then a CDR record is only created if the unanswered=yes option is present.  In that case, then a CDR record should be created with a disposition of "NO ANSWER".  There is an existing bug where the disposition may be "BUSY" in this case, but either way, the only way a CDR record will exist is if you allow unanswered calls to be logged.

Reading the definition of the unanswered setting:
"In brief, this option controls the reporting of unanswered calls which only have an A  party. Calls which get offered to an outgoing line, but are unanswered, are still logged, and that is the intended behaviour. (It also results in some B side CDRs being output, as they have the B side channel as their source channel, and no destination  channel.)"

If a queue caller calls into a queue and no agent picks them up, then the caller was never bridged with another channel, i.e., there was no B side channel.  They explicitly fall into the unanswered scenario.

As it is, this does not appear to be a bug, so long as a CDR record appears when you have unanswered=yes.

As such, I'm closing this out as "Not a bug".  If no CDR records are created when unanswered=yes is set, then please contact a bug marshal in #asterisk-bugs and we can reopen this issue.

By: millsu2 (millsu2) 2012-07-30 11:56:56.748-0500

Calls are answered either with Playback() or Answer() before being sent to the Queue() application. Queued calls where the caller hangs up when an agent is not ringing are logged in the CDR, but if an agent is ringing they are sometimes logged and sometimes not. Since the behavior is inconsistent I still think it is a bug.
It seems that the number of busy agents affects whether or not these calls are logged. Also, all of these calls that hang up before being sent to the Queue() app have a CDR (I assume because they are explicitly answered with Answer()).