CDR - recordingfile column

Hi all,

I’m running FreePBX/Asterisk 1.8.15 and asterisk-addons 1.8 with ODBC connection for the CDR data to be written to mySQL.

All is working fine however I’m now writing a quick PHP page for an admin that will sit inside another app for extracting CDR data and call download. Essentially, exactly what Call Monitor is.

I can find the call via regex using the uniqueid field but it seems a bit long winded, i’m seeing examples of people’s recordingfile column being populated but i can’t seem to find any documentation regarding it and how to get it to populate. If it’s populates with /var/spool/asterisk/monitor/year/month/day/filename.wav that may be a tider way of doing the select.

Any ideas guys?

Nobody? :slight_smile:

I would love some help with this as well. Haven’t been able to find a solution after an hour of searching.

I would suggest reviewing our code in the ARI module.

Exactly what call monitor does?

http://www.freepbx.org/trac/browser/freepbx/branches/2.11/amp_conf/htdocs/recordings/modules/callmonitor.module#L224

After playing around with it some more I got it working.

The Recording column will auto-fill if:
The CDR column “recordingfile” has a file name of an audio file in /var/spool/asterisk/monitor

Adding these two lines to a DialPlan will get the job done:
exten => _X.,n,Set(CDR(recordingfile)=${UNIQUEID}.wav)
exten => _X.,n,MixMonitor(${UNIQUEID}.wav)

*Note: there may be more functionality built into how the recording column is populated that I am unfamiliar with. I did not look through the source code to see exact behavior.