[asterisk-bugs] [Asterisk 0017403]: [patch] RTP directmedia is broken in some cases
Asterisk Bug Tracker
noreply at bugs.digium.com
Mon Jan 17 10:38:24 CST 2011
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=17403
======================================================================
Reported By: one47
Assigned To: twilson
======================================================================
Project: Asterisk
Issue ID: 17403
Category: Channels/chan_sip/CodecHandling
Reproducibility: always
Severity: major
Priority: normal
Status: closed
Target Version: 1.6.2.15
Asterisk Version: SVN
JIRA: SWP-1578
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 2010-05-26 09:45 CDT
Last Modified: 2011-01-17 10:38 CST
======================================================================
Summary: [patch] RTP directmedia is broken in some cases
Description:
It is "well known" that setting up directmedia paths between SIP devices
with different preferred-codec lists can be problematic. The solution has
previously been to either disable directmedia, or use the codec-negotiation
patch which is available for Asterisk 1.2 and 1.4.
PROBLEM: In its simplest form, the problem is (I believe) as follows:
When RTP tries to set up a direct media path, it does so by setting each
party separately, and giving each party free reign over their codec choice.
Thus under some circumstances the 2 remote devices can make 2 choices which
are different. If the 2 parties disagree on the negotiated codec, you
generally get silence in both directions.
SOLUTION: Make rtp.c just a bit more clever about what codecs each party
is offered - In fact, do not allow a choice, just tell them what is
acceptable.
EXAMPLE: Device A (g722|alaw) calls via asterisk to device B (alaw) -
Initially a transcoded path is setup between the 2 parties. directmedia is
enabled, and they have a common codec (alaw).
At present, during negotiation, RTP tells A to use (alaw) and B to use
(g722|alaw) - chan_sip.c then notes those codec requests, ignores them and
tells A to use (g722|alaw) and B to use (alaw)
Of course this results in A using g722, and B using alaw - Resulting in
silence.
The patch (to be attached) changes:
main/rtp.c to make it choose a single audio and video codec where possible
before passing the directmedia request on to the channels.
channels/chan_sip.c to make it use the passed in codec offering from RTP
as long as it is doing a directmedia reinvite - At any other time, old
behaviour remains, allowing better codec choices where possible.
======================================================================
----------------------------------------------------------------------
(0130565) svnbot (reporter) - 2011-01-17 10:38
https://issues.asterisk.org/view.php?id=17403#c130565
----------------------------------------------------------------------
Repository: asterisk
Revision: 302048
_U trunk/
U trunk/channels/chan_sip.c
------------------------------------------------------------------------
r302048 | twilson | 2011-01-17 10:38:23 -0600 (Mon, 17 Jan 2011) | 21
lines
Merged revisions 293493 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r293493 | twilson | 2010-11-01 09:58:00 -0500 (Mon, 01 Nov 2010) | 14
lines
Only offer codecs both sides support for directmedia
When using directmedia, Asterisk needs to limit the codecs offered to
just
the ones that both sides recognize, otherwise they may end up sending
audio
that the other side doesn't understand.
(closes issue https://issues.asterisk.org/view.php?id=17403)
Reported by: one47
Patches:
sip_codecs_simplified4 uploaded by one47 (license 23)
Tested by: one47, falves11
Review: https://reviewboard.asterisk.org/r/967/
........
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=302048
Issue History
Date Modified Username Field Change
======================================================================
2011-01-17 10:38 svnbot Checkin
2011-01-17 10:38 svnbot Note Added: 0130565
======================================================================
More information about the asterisk-bugs
mailing list