Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
liblinphone
Commits
6e4cc073
Commit
6e4cc073
authored
2 months ago
by
Mickaël Turnel
Browse files
Options
Download
Patches
Plain Diff
Add a workaround for ICE used by WebRTC
(cherry picked from commit
c26adf04
)
parent
92731381
master
feature/AEC3
feature/python-wrapper-tests
feature/swift_push_unit_tests
fix/copy_message_id_content_operator
fix/encrypted_chat_subscription_failed
fix/fec-find-payload-type-number
fix/ios_registerforpush_on_core_start_5_4
fix/message_not_sent_rework
fix/relay_ice_candidates_conference_tests
fix/tunnel-crash-rtp-transport
fix/unsubscribe_chatroom_on_account_unregister
fix/workaround_for_sip_simple_messages_with_bad_to_header
hotfix/use-negotiated-extension-ids
release/5.4
5.5.0-alpha
5.4.5
5.4.4
5.4.3
5.4.2
5.4.1
5.4.0
1 merge request
!3409
Fix call without media treated as incoming with an outgoing call
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/conference/session/ms2-stream.cpp
+38
-15
src/conference/session/ms2-stream.cpp
with
38 additions
and
15 deletions
src/conference/session/ms2-stream.cpp
+
38
−
15
View file @
6e4cc073
...
...
@@ -646,13 +646,36 @@ void MS2Stream::getRtpDestination(const OfferAnswerContext ¶ms, RtpAddressIn
?
params
.
resultMediaDescription
->
getStreamAtIdx
(
static_cast
<
unsigned
int
>
(
mBundleOwner
->
getIndex
()))
:
params
.
getResultStreamDescription
();
info
->
rtpAddr
=
stream
.
rtp_addr
.
empty
()
==
false
?
stream
.
rtp_addr
:
params
.
resultMediaDescription
->
addr
;
bool
isMulticast
=
!!
ms_is_multicast
(
info
->
rtpAddr
.
c_str
());
info
->
rtpPort
=
stream
.
rtp_port
;
info
->
rtcpAddr
=
stream
.
rtcp_addr
.
empty
()
==
false
?
stream
.
rtcp_addr
:
info
->
rtpAddr
;
info
->
rtcpPort
=
(
linphone_core_rtcp_enabled
(
getCCore
())
&&
!
isMulticast
)
?
(
stream
.
rtcp_port
?
stream
.
rtcp_port
:
stream
.
rtp_port
+
1
)
:
0
;
const
auto
&
remoteStream
=
(
mRtpBundle
&&
!
mOwnsBundle
&&
mBundleOwner
)
?
params
.
remoteMediaDescription
->
getStreamAtIdx
(
static_cast
<
unsigned
int
>
(
mBundleOwner
->
getIndex
()))
:
params
.
getRemoteStreamDescription
();
// Work-around for WebRTC as it does not send remote candidates when it should.
// So in this case, re-use the IP and port already used by ICE.
if
(
!
params
.
localIsOfferer
&&
getIceService
().
isActive
()
&&
getIceService
().
hasCompleted
()
&&
remoteStream
.
ice_remote_candidates
.
empty
())
{
const
auto
*
session
=
(
mRtpBundle
&&
!
mOwnsBundle
&&
mBundleOwner
)
?
mBundleOwner
->
mSessions
.
rtp_session
:
mSessions
.
rtp_session
;
char
rtpAddr
[
64
]
=
{};
bctbx_sockaddr_to_ip_address
((
struct
sockaddr
*
)
&
session
->
rtp
.
gs
.
rem_addr
,
session
->
rtp
.
gs
.
rem_addrlen
,
rtpAddr
,
sizeof
(
rtpAddr
),
&
info
->
rtpPort
);
info
->
rtpAddr
=
string
(
rtpAddr
);
char
rtcpAddr
[
64
]
=
{};
bctbx_sockaddr_to_ip_address
((
struct
sockaddr
*
)
&
session
->
rtcp
.
gs
.
rem_addr
,
session
->
rtcp
.
gs
.
rem_addrlen
,
rtcpAddr
,
sizeof
(
rtcpAddr
),
&
info
->
rtcpPort
);
info
->
rtcpAddr
=
string
(
rtcpAddr
);
}
else
{
info
->
rtpAddr
=
stream
.
rtp_addr
.
empty
()
==
false
?
stream
.
rtp_addr
:
params
.
resultMediaDescription
->
addr
;
bool
isMulticast
=
!!
ms_is_multicast
(
info
->
rtpAddr
.
c_str
());
info
->
rtpPort
=
stream
.
rtp_port
;
info
->
rtcpAddr
=
stream
.
rtcp_addr
.
empty
()
==
false
?
stream
.
rtcp_addr
:
info
->
rtpAddr
;
info
->
rtcpPort
=
(
linphone_core_rtcp_enabled
(
getCCore
())
&&
!
isMulticast
)
?
(
stream
.
rtcp_port
?
stream
.
rtcp_port
:
stream
.
rtp_port
+
1
)
:
0
;
}
}
/*
...
...
@@ -1105,14 +1128,14 @@ void MS2Stream::updateDestinations(const OfferAnswerContext ¶ms) {
return
;
}
std
::
string
rtpAddr
=
(
resultStreamDesc
.
rtp_addr
.
empty
()
==
false
)
?
resultStreamDesc
.
rtp_addr
:
params
.
resultMediaDescription
->
addr
;
std
::
string
rtcpAddr
=
(
resultStreamDesc
.
rtcp_addr
.
empty
()
==
false
)
?
resultStreamDesc
.
rtcp_addr
:
params
.
resultMediaDescription
->
addr
;
lInfo
()
<<
"Change audio stream destination:
RTP="
<<
rtpAddr
<<
":"
<<
resultStreamDesc
.
rtp_p
ort
<<
" RTCP="
<<
rtcpAddr
<<
":"
<<
resultStreamDesc
.
rtcp_port
;
rtp_session_set_remote_addr_full
(
mSessions
.
rtp_session
,
rtpAddr
.
c_str
(),
resultStreamDesc
.
rtp_port
,
rtcpAddr
.
c_str
(),
resultStreamDesc
.
rtcp
_p
ort
);
RtpAddressInfo
info
;
getRtpDestination
(
params
,
&
info
)
;
lInfo
()
<<
"Change audio stream destination: RTP="
<<
info
.
rtpAddr
<<
":"
<<
info
.
rtpPort
<<
"
RT
C
P="
<<
info
.
rt
c
pAddr
<<
":"
<<
info
.
rtcpP
ort
;
rtp_session_set_remote_addr_full
(
mSessions
.
rtp_session
,
info
.
rtpAddr
.
c_str
(),
info
.
rtpPort
,
info
.
rtcpAddr
.
c_str
()
,
info
.
rtcp
P
ort
);
}
bool
MS2Stream
::
updateRtpProfile
(
const
OfferAnswerContext
&
params
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets