[asterisk-commits] russell: trunk r39933 - /trunk/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Aug 15 15:28:39 MST 2006


Author: russell
Date: Tue Aug 15 17:28:38 2006
New Revision: 39933

URL: http://svn.digium.com/view/asterisk?rev=39933&view=rev
Log:
print a more user friendly error message with the text representation of codecs
(issue #7233, Mithraen)

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=39933&r1=39932&r2=39933&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Aug 15 17:28:38 2006
@@ -3331,8 +3331,15 @@
 	switch (frame->frametype) {
 	case AST_FRAME_VOICE:
 		if (!(frame->subclass & ast->nativeformats)) {
-			ast_log(LOG_WARNING, "Asked to transmit frame type %d, while native formats is %d (read/write = %d/%d)\n",
-				frame->subclass, ast->nativeformats, ast->readformat, ast->writeformat);
+			char s1[512], s2[512], s3[512];
+			ast_log(LOG_WARNING, "Asked to transmit frame type %d, while native formats is %s(%d) read/write = %s(%d)/%s(%d)\n",
+				frame->subclass, 
+				ast_getformatname_multiple(s1, sizeof(s1) - 1, ast->nativeformats & AST_FORMAT_AUDIO_MASK),
+				ast->nativeformats & AST_FORMAT_AUDIO_MASK,
+				ast_getformatname_multiple(s2, sizeof(s2) - 1, ast->readformat),
+				ast->readformat,
+				ast_getformatname_multiple(s3, sizeof(s3) - 1, ast->writeformat),
+				ast->writeformat);
 			return 0;
 		}
 		if (p) {



More information about the asterisk-commits mailing list