I have asked for this before requesting the Disa details be stored in mysql as far as the pins but got a negative reply. I am now submitting a more simple modification to the Disa details.
In cdr_mysql.conf
userfield=1
The php script to generate the disa should include:
exten => 1,n,Authenticate(/etc/asterisk/disa-1.conf,am,16)
..............
exten => 1,n,Set(SetCDRUserField=${CDR(accountcode)})
The "a" parameter tells it to store the usage in both a separate .csv file AND in the cdr database of mysql; the "m" parameter tells it to use md5 hashes.
in Disa-1.conf
Test user:81dc9bdb52d04dc20036dbd8313ed055
This says "Test user" is the description of the pin and, in md5, "1234" is the pin number. The result is excellent allowing the tracking of "runaway" pins or pins that have been guessed, given out to others, or etc as it records everything in the mysql cdr.
Another option i have also added the the disa dialplan:
exten => 1,n,Set(CALLERID(all)=${CALLERID(all)})
This should be included on the disa page as a CHECKABLE option to preserve the original callerid!!!
For now, I have disa.conf as my actual authentication file and extensions_override_freepbx.conf the file to contain the disa dialplan SO THAT FREEPBX DOESN'T OVERWRITE IT!