diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-15 22:28:38 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-15 22:28:38 +0000 |
commit | ce0ecd9732e87f392f4daa99ae6ef4b79d290517 (patch) | |
tree | db20534be0036d7f45b58ed333244d8adee314bd /channels | |
parent | cea5268a0ac1a6deb4c71b4f58ebd3d51efa3328 (diff) |
print a more user friendly error message with the text representation of codecs
(issue #7233, Mithraen)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39933 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index ca810f782..026df911c 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -3331,8 +3331,15 @@ static int sip_write(struct ast_channel *ast, struct ast_frame *frame) 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) { |