Userfield in CDR Reports

How to set the content of the “Userfield” field. I’m only interested in three states: incoming call, outgoing call, and internal call. I want to describe these three states in the Userfield. I’m using FreePBX version 17.

You might want to consider reviewing the related Asterisk documentation on CDRs and sample cdr.conf file in the Asterisk source tree – especially the loguserfield part – or looking into CEL processing, or the commercial CDR Pro module.