FreePBX, asterisk 13, DISA and CDR records

Hello,

I have FreePBX 12 and asterisk 11 system working without any problems. Recently we attempted to upgrade asterisk to version 13 without any changes to configuration, and while everything works fine, there is one small problem with CDR records generated after DISA calls. Users call to access phone# (2895558888) , type password and dial destination (036555000). Some of this calls are chargeable, so there is a requirement to run “billing” report every month.
3 records are created for each call. In asterisk 11, this is created (only fields of interest in report are dumped)

+---------------------+-------------+-------------+--------------------+-------------+---------+
| calldate            | src         | dst         | dcontext           | disposition | billsec |
+---------------------+-------------+-------------+--------------------+-------------+---------+
| 2017-07-18 22:31:32 | 4165558888  | 2895558888  | from-trunk-sip-001 | ANSWERED    |      13 |
| 2017-07-18 22:31:45 | 4165558888  | 036555000   | from-internal      | ANSWERED    |       1 |
| 2017-07-18 22:31:45 | 4165558888  | 036555000   | disa-dial          | ANSWERED    |       7 |
+---------------------+-------------+-------------+--------------------+-------------+---------+

3rd record is one of my interest, easy to find with dcontext = ‘disa-dial’, and billsec is actual length of the call.

With asterisk 13, following is created

+---------------------+-------------+-----------+---------------+-------------+---------+
| calldate            | src         | dst       | dcontext      | disposition | billsec |
+---------------------+-------------+-----------+---------------+-------------+---------+
| 2017-07-18 22:18:23 |             | 036555000 | from-internal | ANSWERED    |       0 |
| 2017-07-18 22:18:23 | 4165558888  | 036555000 | disa-dial     | ANSWERED    |       4 |
| 2017-07-18 22:18:27 | 4165558888  | 036555000 | disa-dial     | ANSWERED    |      15 |
+---------------------+-------------+-----------+---------------+-------------+---------+

As you can see, there is a big difference, and main problem for us is duplicate ‘disa-dial’ record, second one is actual billing record, while first is always 4 seconds.

Is there anything in settings of asterisk 13 (or Freepbx) to bring CDR records content same or similar with asterisk 11? We can not migrate to 13 before this problem is fixed.

Thanks

Perhaps

SELECT xxxxxx FROM cdr WHERE billsec != 4;

?

1 Like

Thanks, but I do not have access to report code, only Freepbx/asterisk configuration

Then perhaps a cron job running every minute or better yet but a little harder, an incron job that watches /var/log/asterisk/Master.csv for writes and then calls mysql with

DELETE from cdr WHERE billsec = 4;

After more testing, I’ve realized that duplicate record is not exactly 4 secs all the time, it depends on
dialed destination.
And even it is, it would delete legitimate 4 secs length calls (although highly unlikely)
I am looking at asterisk 13 configuration/patch solution if possible.

Thank you

You could ask ( at Digium not here) but asterisk is moving to cel as cdr is quite broken, and patches cause more problems than they resolve.