Cdr not logging abandons

I cannot find any abandon information in the MySQL database we have our CDR data logging to. I haven’t found any explicit answers anywhere on the asterik, trixbox or freepbx forums. Though you guys gave me some good leads. I discovered that doing a cdr status from the asterisk CLI gives me the following info:

trix*CLI> cdr status
CDR logging: enabled
CDR mode: simple
CDR output unanswered calls: no
CDR registered backend: mysql
trix*CLI> 

I’m guessing that changing the option “CDR output unanswered calls” to yes may give me what I need? I don’t know what the CDR Mode reffers to or even if there is an option other than simple?

I also found a log file that has abandon info not in the mysql database

# grep -i abandon /var/log/asterisk/queue_log
1219322000|1219321989.19963|20|NONE|ABANDON|1|1|5
1219325581|1219325508.20134|30|NONE|ABANDON|1|1|53
1219325792|1219325732.20170|10|NONE|ABANDON|1|1|51
1219327084|1219327036.20247|10|NONE|ABANDON|2|2|40
1219328877|1219328596.20381|10|NONE|ABANDON|1|2|270
1219333839|1219333779.20829|10|NONE|ABANDON|1|1|49
1219335285|1219335068.20904|10|NONE|ABANDON|1|2|202
1219340971|1219340893.21283|10|NONE|ABANDON|3|3|28
[# 

The numbers after the first “|” are in the same format as the uniquid field in the cdr database. searching on those numbers returns no results… though other stuff in that log does match up with the cdr database.

I guess the questions I’m hoping someone can answer are
[list]
[]How do I change “CDR output unanswered calls”, and what does it control?
[
]How do I change “CDR mode”, do I want to, and what does it control?
[*]What’s logging to the /var/log/asterisk/queue_log, and can I get that into mysql?
[/list]

Any help on any part would be appreciated.

Look in /etc/asterisk/cdr.conf. It explains all the options available. In the [general] context there is probably a line like:

;unanswered = no

Change that line to (or if it doesn’t exist, add the line):

unanswered = yes

Then reload asterisk. You should see many more rows in your cdr output.

I believe the CDR mode can be simple or batch. You probably want to continue using simple.

A good background on Asterisk billing is at http://voip-info.kinghost.com.br/wiki/view/Asterisk+billing.html. More info on the queues_log can also be found at http://www.voip-info.org/wiki/view/Asterisk+log+queue_log.

A tool that may help you use the queues_log effectively is at http://www.asternic.org/stats/.

Awesome. Thank you. I’m going to look into that now. I’ll post the results for posterity later.

Once I discovered the queue_log and installed Asternic Stats, I started getting the info I needed. Asternic is still not perfect though, or maybe my queue_log isn’t

Transfered calls are not listed in the log (or in asternic) and any calls landing in the Queue and then getting transfered adds the total time of the call to the original person who picked it up.

So if I picked up a call from the queue, and in 30 seconds transfered it to a co worker… and that coworker spent 20 mins with the customer… my stats for that call would be recorded as 20mins 30 secs.

Anyone run into this? Or know a resource I could get more info from?

In case anyone had a similar issue, the transfer problem seems at least partial due to a bug. http://bugs.digium.com/view.php?id=13395