How to show codec used during a call?


We would like to know the CLI command (or AMI) to display the audio codec which is being used in an ongoing call, please.


core show channel …

Note this will tell you the acceptable codes, and possibly the outgoing codec. The incoming codec can, theoretically, change from frame to frame, when using VoIP type channels.

For RTP based protocols, rtp debug will give you the frame by frame codec, but you will need to use the relevant channel driver debug option to see which payload type number corresponds to which codec.

Thank you for your message. The RTP based log would be great. I know that ‘rtp set debug on’ will enable RTP debug mode but the codec in use is not being shown. I don’t know how to use the relevant channel driver debug option you are referring to. I am using chan_sip but how do I use its debug option please to show the codec in use?


“sip set debug on”. Combined with some level of verbose logging, and also consider enabling debug logging. It is best to get debugging from the log files, so enable the full log in logger.conf.

Also note that low numbered payload types are standardised, so you can decode these without reference to the protocol debugging:

1 Like