Show active codec in chan_pjsip

Is there a CLI command to show the codec in an active chan_pjsip connection? If I use pjsip show channel I get a nice listing of many useful values for the active channel, but there doesn’t seem to be an easy way of seeing which codec it is using. This seems to be the extent of what I get:

  Channel:  <ChannelId........................................>  <State.....>  <Time(sec)>
      Exten: <DialedExten.............>  CLCID: <ConnectedLineCID.......>

sip show channels has “Format” as a column header, and sip show channel shows ever greater detail, but I can’t seem to see the active coded for pjsip channels.

Thanks in advance!

‘core show channel [tab]’

1 Like

A little verbose, but it works. Thank you! :grinning:

Is it fair to say that I could use the “WriteTranscode” and “ReadTranscode” values returned by that command for both SIP and PJSIP channels to see how many of my g729 licenses I’m using?

The overall goal here is that I’m not sure when I’m using up one of my licenses and when I’m not. If I even allow ulaw on my trunk, even as a secondary codec, it always uses that. So I had to set my trunk to allow=g729, disallow=all, which will cause a call to fail if I run out of licenses. I would like to be able to use g729, then fall back to ulaw if I exceed my license count, but that doesn’t seem possible. As it stands, it’s proven a little difficult to even get real numbers as to how many licenses are being used in the first place.