drachtio-srf 4.5.40 → 4.5.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/srf.js +4 -6
- package/package.json +1 -1
package/lib/srf.js
CHANGED
|
@@ -10,6 +10,7 @@ const debug = require('debug')('drachtio:srf') ;
|
|
|
10
10
|
const Socket = require('net').Socket;
|
|
11
11
|
const noop = () => {};
|
|
12
12
|
const idgen = require('short-uuid')();
|
|
13
|
+
const sdpTransform = require('sdp-transform');
|
|
13
14
|
|
|
14
15
|
class DialogState {}
|
|
15
16
|
class DialogDirection {}
|
|
@@ -560,12 +561,9 @@ class Srf extends Emitter {
|
|
|
560
561
|
res
|
|
561
562
|
});
|
|
562
563
|
}
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
bhSdp = bhSdp.replace(/(o=[a-zA-Z0-9]+\s+\d+\s+\d+\s+IN\s+IP4\s+)(\d+\.\d+\.\d+\.\d+)/,
|
|
567
|
-
(match, p1) => { return p1 + '0.0.0.0' ;}
|
|
568
|
-
) ;
|
|
564
|
+
const parsed = sdpTransform.parse(res.body);
|
|
565
|
+
parsed.direction = 'recvonly';
|
|
566
|
+
const bhSdp = sdpTransform.write(parsed);
|
|
569
567
|
ack({
|
|
570
568
|
body: bhSdp
|
|
571
569
|
}) ;
|