From 4f947ad3f2e5a8b71bb96360691996584acef449 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Sun, 7 Jun 2020 14:51:52 -0400 Subject: [PATCH] bugfix: rtpengine now generates internal IP on sdp for internal-facing streams --- lib/call-session.js | 2 +- lib/utils.js | 1 + test/docker-compose-testbed.yaml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/call-session.js b/lib/call-session.js index f7bd899..5acb2d2 100644 --- a/lib/call-session.js +++ b/lib/call-session.js @@ -116,7 +116,7 @@ class CallSession extends Emitter { // rtpengine 'offer' debug('sending offer command to rtpengine'); - const response = await this.offer(this.rtpEngineOpts.offer); + const response = await this.offer(this.rtpEngineOpts.offer, {sdp: this.req.body}); debug(`response from rtpengine to offer ${JSON.stringify(response)}`); this.logger.debug({offer: this.rtpEngineOpts.offer, response}, 'initial offer to rtpengine'); if ('ok' !== response.result) { diff --git a/lib/utils.js b/lib/utils.js index b7c4094..a6ca9a0 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -10,6 +10,7 @@ function makeRtpEngineOpts(req, srcIsUsingSrtp, dstIsUsingSrtp, teams = false) { common, offer: Object.assign( {'sdp': req.body, 'replace': ['origin', 'session-connection']}, + {'direction': [ 'private', 'public']}, common, dstIsUsingSrtp ? srtpOpts : rtpCharacteristics), answer: Object.assign( diff --git a/test/docker-compose-testbed.yaml b/test/docker-compose-testbed.yaml index e72ca3e..682ce94 100644 --- a/test/docker-compose-testbed.yaml +++ b/test/docker-compose-testbed.yaml @@ -27,6 +27,7 @@ services: rtpengine: image: drachtio/rtpengine:latest + command: rtpengine --interface private/172.39.0.12 --interface public/172.39.0.12!172.39.0.12 ports: - "12222:22222/udp" networks: