@bflinte wrote:
I'm trying to insert call stats into the userfield column in my CDR's. My logs show that the macro processes, but nothing shows up in the database. I see that for csv files the cdr.conf needs "userfield=yes". Do I need to do the same thing for odbc somehow?
I tried this, but it didn't work:
cdr.conf
[odbc]
loguserfield=yesThis is the macro I have in extensions_custom.conf:
[macro-hangupcall-custom]
; start of QoS reporting
exten => s,1,NoOp(Start QoS)
exten => s,n,NoOp(Packets Sent: ${CHANNEL(rtcp,txcount)})
exten => s,n,Set(CDR(userfield)=${CDR(userfield)} Packets Sent: ${CHANNEL(rtcp,txcount)})
exten => s,n(continue),NoOp(End of QoS)
exten => s,n,MacroExit()The logs are showing this:
pbx.c: Executing [s@macro-hangupcall-custom:1] NoOp("PJSIP/1001-00000002", "Start QoS") in new stack
pbx.c: Executing [s@macro-hangupcall-custom:2] NoOp("PJSIP/1001-00000002", "Packets Sent: 189") in new stack
pbx.c: Executing [s@macro-hangupcall-custom:3] Set("PJSIP/1001-00000002", "CDR(userfield)= Packets Sent: 189") in new stack
pbx.c: Executing [s@macro-hangupcall-custom:5] NoOp("PJSIP/1001-00000002", "End of QoS") in new stack
pbx.c: Executing [s@macro-hangupcall-custom:6] MacroExit("PJSIP/1001-00000002", "") in new stack
pbx.c: Executing [s@macro-hangupcall:5] Hangup("PJSIP/1001-00000002", "") in new stackI just can't seem to figure out if it is my cdr configuration or my dialplan that is causing this not to work. Thanks!!
Posts: 4
Participants: 2