Log Custom Variable In Cdr

Home » Asterisk Users » Log Custom Variable In Cdr
Asterisk Users 1 Comment

Hello,

in my extensions.conf, I have a custom macro which I use at the beginning of incoming call, and then I turn on cdr recording:

exten => 123456789,1,Macro(record)

same => n,Set(CDR_PROP(disable)=0)

the macro is defined later, and sets one filename variable:

[macro-record]
exten => s,1,Set(FILE=${CDR(src)}-${CDR(dst)}.wav)
…..

my question is, how can I log this filename in my cdr ?

I would like to have custom field in my sqlite database, where this filename is stored.

I added another column in my cdr_sqlite3_custom.conf with the variable
${FILE}:

columns => time, src, dst, duration, file values =>
‘${CDR(start)}’,’${CDR(src)}’,’${CDR(dst)}’,’${CDR(billsec)}’,’${FILE}’

but the column is empty

it looks like the variable is local to the macro, and does not exist outside?

One thought on - Log Custom Variable In Cdr