Hi, This may be a stupid/easy question for many of you. Q. how do I know what codec is being used for a particular call or call leg? Thanks. AK -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20051006/5c225e0b/attachment.htm
Mojo with Horan & Company, LLC
2005-Oct-06 15:45 UTC
[Asterisk-Users] how do I know what codec is being used
First you can do a show channels at the CLI (some output columns removed
for clarity):
pbx*CLI> show channels
Channel ... Application(Data)
Zap/1-1 ... Bridged Call(SIP/112-c8e1)
SIP/112-c8e1 ... Dial(Zap/1/7476011||TW)
2 active channels
1 active call
We can see the two call legs. My SIP extension, 112, Dial()ed 7476011
out Zap/1, and we can see that the Zap/1-1 channel is Bridged to my
SIP/112. That's the two legs of my call. Since I really only care
about codecs in relation to my sip leg, I would next type at the CLI:
pbx*CLI> show channel SIP/112-c8e1
(or pbx*CLI> show channel Zap/1-1, if I really wanted to see about the
Zap leg)
Among lots of other cool info, the output will contain what you need:
...
NativeFormat: 4
WriteFormat: 4
ReadFormat: 4
...
finally, by typing 'show codecs' at the CLI:
...
4 (1 << 2) (0x4) audio ulaw (G.711 u-law)
...
we see that codec 4 is ulaw. You could of course also do a:
sip show peer 112 (or other extension) to see what they have registered
with asterisk claiming to support:
...
Codecs : 0x104 (ulaw|g729)
Codec Order : (g729,ulaw)
...
Moj
Andy Kuo wrote:> Hi,
>
> This may be a stupid/easy question for many of you.
>
> Q. how do I know what codec is being used for a particular call or call
leg?
>
>
> Thanks.
> AK
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> --Bandwidth and Colocation sponsored by Easynews.com --
>
> Asterisk-Users mailing list
> Asterisk-Users@lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
--
Mojo <mojo@horanappraisals.com>
Office Manger, Horan & Company, LLC
(907) 747-6666 x112