How to log the callid/uniqueid in first field of cdr-csv?

I’ve been parsing the master.csv.* files and matching those up with the queue_log.* files (both rotated on a 5 minute basis).

Out of 200,000 incoming calls, I’ve found that 27,000 of them don’t have the same queue_log time as the master.csv start time. Of those 27,000, there are 23,000 that can match the master.csv start time to the “time” part of the callid field in queue_log.

That leaves 4,000 calls unaccounted for. Not only that, but the query to match the other 23,000 calls has doubled the log import script run time. Both of these problems could be averted if we simply logged the callid in the cdr-csv file.
I’ve found out how to do this for mysql cdr-csv logging, but we don’t do that. How can we enable the uniqueid / callid field for regular master.csv log files?