Skip to content
Snippets Groups Projects
Commit fff5a55a authored by Russell Bryant's avatar Russell Bryant
Browse files

print a more user friendly error message with the text representation of codecs

(issue #7233, Mithraen)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 65373a19
Branches
Tags
No related merge requests found
...@@ -3331,8 +3331,15 @@ static int sip_write(struct ast_channel *ast, struct ast_frame *frame) ...@@ -3331,8 +3331,15 @@ static int sip_write(struct ast_channel *ast, struct ast_frame *frame)
switch (frame->frametype) { switch (frame->frametype) {
case AST_FRAME_VOICE: case AST_FRAME_VOICE:
if (!(frame->subclass & ast->nativeformats)) { 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", char s1[512], s2[512], s3[512];
frame->subclass, ast->nativeformats, ast->readformat, ast->writeformat); 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; return 0;
} }
if (p) { if (p) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment