Skip to content

Commit

Permalink
remove Firefox hasIncompatibleCLineWithSomeSIPEndpoints hack because …
Browse files Browse the repository at this point in the history
…it no longer implies, and in some cases lead to errors (see onsip#222)
  • Loading branch information
James Criscuolo committed Jan 18, 2016
1 parent 36772ec commit 92c5bd7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
17 changes: 4 additions & 13 deletions src/Hacks.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
*/

module.exports = function (SIP) {

//keep to quiet jshint, and remain consistent with other files
SIP = SIP;

var Hacks = {
AllBrowsers: {
maskDtls: function (message) {
Expand Down Expand Up @@ -80,19 +84,6 @@ var Hacks = {
}
return sdp;
},

hasIncompatibleCLineWithSomeSIPEndpoints: function(sdp) {
/*
* Firefox appears to be following https://tools.ietf.org/html/rfc5245#section-9.1.1.1
* and using a c line IP address of 0.0.0.0. This is completely valid, however it is
* causing some endpoints (such as FreeSWITCH) to interpret the SDP as being on hold
* https://freeswitch.org/jira/browse/FS-6955. To get around this issue we pull the
* replace the c line with 1.1.1.1 which SIP clients do not interpret as hold.
* This makes the other endpoint believe that the call is not on hold and audio flows
* because ICE determines the media pathway (not the c line).
*/
return sdp.replace(/(0\.0\.0\.0)/gmi, SIP.Utils.getRandomTestNetIP());
}
},

Chrome: {
Expand Down
1 change: 0 additions & 1 deletion src/WebRTC/MediaHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,6 @@ MediaHandler.prototype = Object.create(SIP.MediaHandler.prototype, {

sdp = SIP.Hacks.Chrome.needsExplicitlyInactiveSDP(sdp);
sdp = SIP.Hacks.AllBrowsers.unmaskDtls(sdp);
sdp = SIP.Hacks.Firefox.hasIncompatibleCLineWithSomeSIPEndpoints(sdp);

var sdpWrapper = {
type: methodName === 'createOffer' ? 'offer' : 'answer',
Expand Down

0 comments on commit 92c5bd7

Please sign in to comment.