diff --git a/index.js b/index.js index 0c62009..72eac80 100644 --- a/index.js +++ b/index.js @@ -47,7 +47,7 @@ const cdrPool = mariadb.createPool(config.cdrdb); const json2csv = (obj) => { // Specifically for CDR - let csv = "call_date,src,dst,disposition,caller_id,duration,billsec,context\n"; + let csv = "call_date,src,dst,disposition,caller_id,duration,billsec,context,recordingfile\n"; for (let key in obj) { data = [ obj[key].calldate, @@ -57,7 +57,8 @@ const json2csv = (obj) => { // Specifically for CDR obj[key].clid, obj[key].duration, obj[key].billsec, - obj[key].dcontext + obj[key].dcontext, + obj[key].recordingfile ]; csv += data.join(",") + "\n"; }