[Asterisk-code-review] chan pjsip: transfers with direct media reinvite has wrong a... (asterisk[13])
Kevin Harwell
asteriskteam at digium.com
Fri Mar 18 11:13:11 CDT 2016
Hello Anonymous Coward #1000019, Joshua Colp, George Joseph,
I'd like you to reexamine a change. Please visit
https://gerrit.asterisk.org/2419
to look at the new patch set (#4).
Change subject: chan_pjsip: transfers with direct media reinvite has wrong address/port
......................................................................
chan_pjsip: transfers with direct media reinvite has wrong address/port
During a transfer involving direct media a race occurs between when the
transferer channel is swapped out, initiating rtp changes/updates, and the
subsequent reinvites.
When Alice, after speaking with Charlie (Bob is on hold), connects Bob and
Charlie invites are sent to each in order to establish the call between them.
Bob is taken off hold and Charlie is told to have his media flow through
Asterisk. However, if before those invites go out the bridge updates Bob's
and/or Charlie's rtp information with direct media data (i.e. address, port)
then the invite(s) will contain the remote data in the SDP instead of the
Asterisk data.
The race occurs in the native bridge glue code when updating the peer. The
direct_media_address can get set twice before sending out the first invite
during call connection. This can happen because the checking/setting of the
direct_media_address happened in one thread while the sending of the invite(s)
happened in another thread.
This fix removes the race condition by moving the checking/setting of the
direct_media_address to be in the same thread as the sending of the invites(s).
This serializes the checking/setting and sending so they can no longer happen
out of order.
ASTERISK-25849 #close
Change-Id: Idfea590175e74f401929a601dba0c91ca1a7f873
---
M channels/chan_pjsip.c
1 file changed, 84 insertions(+), 35 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/19/2419/4
--
To view, visit https://gerrit.asterisk.org/2419
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idfea590175e74f401929a601dba0c91ca1a7f873
Gerrit-PatchSet: 4
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
More information about the asterisk-code-review
mailing list