My cdr is working but the userfield is every time NULL
On extensions.conf I put this line
same => n,Set(CDR(userfield)=${CDR(accountcode)})
cdr.conf
[odbc]
loguniqueid=yes ; log uniqueid. Default is "no"
loguserfield=yes ; log user field. Default is "no"
accountlogs=yes ; create separate log file for each account code. Default is "yes"
I make a test call, cdr is working, but the userfield remain null
select dst,userfield from asterisk.cdr;
+------+-----------+
| dst | userfield |
+------+-----------+
| 600 | NULL |
| 600 | NULL |
| 1002 | NULL |
| 1002 | NULL |
| 1002 | NULL |
| 1004 | NULL |
| 1004 | NULL |
| 600 | NULL |
| 1004 | NULL |
| 1004 | NULL |
| 1004 | NULL |
| 1004 | NULL |
| 1004 | NULL |
+------+-----------+
What I miss?