[asterisk-users] Logging codec used in CDR

Philipp von Klitzing
Fri, 09 Jul 2010 21:50:26 -0000

Hi!

> Is there a way to log the negotiated codec that was used for each call
> in CDR or in a separate log file?

Use CHANNEL(audionativeformat) - and do the same with the help of the M
option to Dial() for the remote call leg. Store that info in the CDR
"userfield", or create your own field if you are on Asterisk 1.6 with
the
adaptive CDR columns.

Note: In principle the codec can be changed in the middle of the call,
however in practice this very rarely (never) happens.

And while you are at it also look at RTCP stats as well. If you are still
on Asterisk 1.4 then consider to apply bug/patch #10590.

More details:
http://www.voip-info.org/wiki/index.php?page=Asterisk+RTCP

Philipp