[asterisk-users] log custom variable in cdr
Fourhundred Thecat
400thecat at gmx.ch
Thu Apr 6 00:34:24 CDT 2023
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?
More information about the asterisk-users
mailing list