[asterisk-bugs] [Asterisk 0011638]: Can't make two channels compatible if they have common video codec
noreply at bugs.digium.com
noreply at bugs.digium.com
Wed Dec 26 21:45:21 CST 2007
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=11638
======================================================================
Reported By: cwhuang
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 11638
Category: Channels/chan_sip/Video
Reproducibility: always
Severity: major
Priority: normal
Status: new
Asterisk Version: SVN
SVN Branch (only for SVN checkouts, not tarball releases): 1.4
SVN Revision (number only!): 94824
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 12-26-2007 21:42 CST
Last Modified: 12-26-2007 21:45 CST
======================================================================
Summary: Can't make two channels compatible if they have
common video codec
Description:
I'm testing asterisk 1.4 with some video phones. I usually got such
errors:
[Dec 27 11:24:53] WARNING[13425]: channel.c:3038 set_format: Unable to
find a codec translation path from unknown to unknown
[Dec 27 11:24:53] WARNING[13425]: channel.c:3423
ast_channel_make_compatible: Unable to set read format on channel
SIP/401-08ee0760 to 524288
[Dec 27 11:24:53] WARNING[13425]: app_dial.c:1685 dial_exec_full: Had to
drop call because I couldn't make SIP/401-08ee0760 compatible with
SIP/405-08ef0908
One of my phone has codec (gsm|h263), the other has (g729|h263). They
should be compatible.
======================================================================
----------------------------------------------------------------------
cwhuang - 12-26-07 21:45
----------------------------------------------------------------------
By analyzing the API ast_translator_best_choice(), I think it incorrectly
take the common video codec into consideration. The following simple patch
fixes the problem.
Index: main/translate.c
===================================================================
--- main/translate.c (revision 94825)
+++ main/translate.c (working copy)
@@ -796,7 +796,7 @@
int cur, cursrc;
int besttime = INT_MAX;
int beststeps = INT_MAX;
- int common = (*dst) & (*srcs); /* are there common formats ? */
+ int common = (*dst) & (*srcs) & AST_FORMAT_AUDIO_MASK; /* are
there common formats ? */
if (common) { /* yes, pick one and return */
for (cur = 1, y = 0; y < MAX_FORMAT; cur <<= 1, y++) {
Issue History
Date Modified Username Field Change
======================================================================
12-26-07 21:45 cwhuang Note Added: 0075992
======================================================================
More information about the asterisk-bugs
mailing list