I found one post where someone said to make sure from-pstn-custom was included into the from-pstn context and create the following in extensions_custom.conf:
The accountcode variable changed in Asterisk 1.6. ${ACCOUNTCODE} has been depricated and replaced with ${CDR(accountcode)}.
My fix:
(1) I copied macro-dialout-trunk into extensions_override_freepbx.conf.
(2) As the second step in the macro, I added “exten => s,n,Set(CDR(userfield)=${CDR(accountcode)})”
(3) Reloaded Asterisk and tested.
I’ve figured out how to get the userfield populated by copying a context or macro to extensions_override_freepbx.conf and modifying it there. So I know the settings for userfield and everything are finally correct.
The next step in getting this problem resolved is figuring out which macro(s) I need to modify to set userfield to account code plus some additional data.
I’ve been trying to trace this down for a day now. Ideas?