Hi, I have a question about the CDRs module. I activated the cdr-custom module by uncommenting one of the Master.csv lines in /etc/asterisk/cdr_custom.conf.
I’m testing a very simple scenario where a caller dials a DID, that forwards the call then to the callee.
Caller == 201012345678
DID == 201512345678
Callee == 201212345678
Strangely I see in the Master.csv file that the DID keeps popping up in the first few fields, and then the caller and callee numbers only appear in the src and dst channel fields.
Here’s the CDR line I’m talking about:
parallels@parallels-Parallels-Virtual-Platform:~$ tail -1 /var/log/asterisk/cdr-custom/Master.csv
“”“”" <201512345678>“,“201512345678”,“201512345678”,“from-internal”,“PJSIP/201012345678-0000000c”,“PJSIP/mytrunk-0000000d”,“Dial”,“PJSIP/201212345678@mytrunk”,“2023-03-29 03:10:03”,”“,“2023-03-29 03:10:09”,“6”,“0”,“BUSY”,“DOCUMENTATION”,”“,“1680052203.16”,”",12
Strangely the first field is empty, although it should be the clid field according to the configuration file (I didn’t change it by the way:
Master.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},${CSV_QUOTE(${CDR(dstchannel)})},${CSV_QUOTE(${CDR(lastapp)})},${CSV_QUOTE(${CDR(lastdata)})},${CSV_QUOTE(${CDR(start)})},${CSV_QUOTE(${CDR(answer)})},${CSV_QUOTE(${CDR(end)})},${CSV_QUOTE(${CDR(duration,f)})},${CSV_QUOTE(${CDR(billsec,f)})},${CSV_QUOTE(${CDR(disposition)})},${CSV_QUOTE(${CDR(amaflags)})},${CSV_QUOTE(${CDR(accountcode)})},${CSV_QUOTE(${CDR(uniqueid)})},${CSV_QUOTE(${CDR(userfield)})},${CDR(sequence)}
Can someone help me do the following please:
- Show the Caller number in one field
- Show the DID number in another field
- Show the Callee number in a third field
- Show the trunk contact IP address in different fields (one for the incoming call and another for the outgoing call)
Thank you in advance.