diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2022-04-30 03:34:50 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2022-04-30 03:34:50 +0300 |
commit | f230e3c9c51a390e817b57bcb3874d72318f9add (patch) | |
tree | 1eea987a8e749e3d9f4e9bdd9c0d211bb1854a7e | |
parent | 55e91e4a6f4e56d0e03da785549b3c107dd4409d (diff) |
Disable data channels for the SIP bridge subscriberfix-endless-offer-requests-with-the-sip-bridge
The SIP bridge publisher does not have data channels, so they need to be
explicitly disabled in the subscriber. Otherwise it would try to open
them, which would cause an endless loop of renegotiations, as after a
negotiation the data channels will still not be opened, which will
trigger a negotiation again.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r-- | src/utils/webrtc/webrtc.js | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/utils/webrtc/webrtc.js b/src/utils/webrtc/webrtc.js index c2c508724..49d268147 100644 --- a/src/utils/webrtc/webrtc.js +++ b/src/utils/webrtc/webrtc.js @@ -1172,6 +1172,15 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local } else { callParticipantModel.setScreenPeer(peer) } + + // The SIP bridge publisher does not have data channels, so they + // need to be explicitly disabled in the subscriber. Otherwise it + // would try to open them, which would cause an endless loop of + // renegotiations, as after a negotiation the data channels will + // still not be opened, which will trigger a negotiation again. + if (callParticipantModel.get('internal')) { + peer.enableDataChannels = false + } } if (peer.type === 'video') { @@ -1185,10 +1194,10 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local setHandlerForNegotiationNeeded(peer) - // Make sure required data channels exist for all peers. This - // is required for peers that get created by SimpleWebRTC from - // received "Offer" messages. Otherwise the "channelMessage" - // will not be called. + // Make sure required data channels exist for all peers (that have + // not disabled them). This is required for peers that get created + // by SimpleWebRTC from received "Offer" messages. Otherwise the + // "channelMessage" will not be called. peer.getDataChannel('status') } }) |