Adaptive MySQL CDR not working

I have my cdr writing to a MySQL table but can’t add an additional field.

I’m using Asterisk and Asterisk-addons

From my python script…
agi.set_variable(‘CDR(test)’,‘TEST’) -------------> This is null in cdr table
agi.set_variable(‘CDR(userfield)’,‘TEST’) ----------> This works

or from dialplan
exten => _NXXNXXXXXX,1,Set(CDR(test)=‘test’) ---------> also NULL in table

I have restarted asterisk many times and the field exists in the table. Is there an option I need to set to allow adaptive cdr?

Thanks for any help!

Do i need to use the adaptive_odbc? I thought mysql now supports adaptive CDR?

OK, I can get it to work if I set the variable using the h extension.
exten => h,1,Set(CDR(test)=value)

Anyone know why it matters when i set it? I need to set variables from the agi script.
Why can CDR(userfield) be set whenever, but CDR(custom) must be set from h?
For now i guess i’m working on creating my own cdr directly in MySQL.