Summary:ASTERISK-00983: [patch] nicer codec debug messages
Reporter:malzina (malzina)Labels:
Date Opened:2004-02-03 10:55:44.000-0600Date Closed:2008-01-15 14:55:24.000-0600
Versions:Frequency of
Environment:Attachments:( 0) patch.diff.txt
( 1) patch.diff.txt
Description:With this patch you can see the actual codec names (not only OR'ed IDs) in debug messages (use sipdebug=1)
Comments:By: Tilghman Lesher (tilghman) 2004-02-03 14:13:51.000-0600

Please reupload your patchset in 'diff -u' format.

By: malzina (malzina) 2004-02-04 04:44:37.000-0600

Ok. Please discard debug_codec_names.cvs.diff.
Here is the patch in "diff -u" format (patch.cvs.diff).

By: Brian West (bkw918) 2004-02-04 08:55:34.000-0600

attach sample out put?

By: malzina (malzina) 2004-02-04 09:21:34.000-0600

Ok, for instance:

Capabilities: us - 0x20e(GSM|ULAW|ALAW|SPEEX), peer - audio=0x60e(GSM|ULAW|ALAW|SPEEX|ILBC)/video=0x0(EMPTY), combined - 0x20e(GSM|ULAW|ALAW|SPEEX)
instead of
Capabilities: us - 526, them - 1550/0, combined - 526


Answering with preferred capability 0x200(SPEEX)
instead of
Answering with preferred capability 512

By the way, I upload another version of the patch (I had forgotten to remove a small debug message of mine)

By: Brian West (bkw918) 2004-04-17 23:38:08

can you update this for CVS-HEAD please?

By: malzina (malzina) 2004-04-28 10:46:35

Here is an update working with the latest cvs Head (patch.diff).

By: Olle Johansson (oej) 2004-04-28 15:25:08

I've tried this before, but it didn't work because of dynamic RTP codec contstructs. Did you consider that? Can't see that you're involving the RTP code, but I might be confused...

By: malzina (malzina) 2004-04-29 05:45:43

I display codec names from the "capability" variables (with ast_getformatname_multiple()...) which are built with ORed values of AST_FORMAT_xxx constants defined in ast_h323.h. It just links asterisk internal format constants with displayable strings.

The "capability" is, indeed, built according to static and dynamic SDP codec constructs in chan_sip.c:2214 (ast_rtp_set_rtpmap_type,...), but this is a separate process that occures before.

By: Brian West (bkw918) 2004-05-02 16:03:11

use ast_verbose instead of printf

By: Brian West (bkw918) 2004-05-18 23:13:13

can you update this it won't apply cleanly

By: Mark Spencer (markster) 2004-05-18 23:27:25

Added to CVS, thanks!

By: Digium Subversion (svnbot) 2008-01-15 14:55:24.000-0600

Repository: asterisk
Revision: 3011

U   trunk/channels/chan_sip.c
U   trunk/frame.c
U   trunk/include/asterisk/frame.h

r3011 | markster | 2008-01-15 14:55:24 -0600 (Tue, 15 Jan 2008) | 2 lines

Allow multiple codecs to be printed in debug (bug ASTERISK-983)