Adding the codec in CDR Userfield

Is there any way to add the codec that was used on a SIP-SIP call in the CDR Userfield? Is there any way from where can I extract the codec information and store it into a variable?

Any help or suggestion are greatly appreciated.

Can anybody help please?

Thank you!

Does this work for you? Not sure if this is what you need as I’ve not used this before.