mirror of
https://github.com/jambonz/sbc-inbound.git
synced 2026-07-23 20:31:51 +00:00
update to latest rtpengine-utils
This commit is contained in:
@@ -69,7 +69,7 @@ const {
|
||||
const ngProtocol = process.env.JAMBONES_NG_PROTOCOL || 'udp';
|
||||
const ngPort = process.env.RTPENGINE_PORT || ('udp' === ngProtocol ? 22222 : 8080);
|
||||
const {getRtpEngine, setRtpEngines} = require('@jambonz/rtpengine-utils')([], logger, {
|
||||
emitter: stats,
|
||||
//emitter: stats,
|
||||
dtmfListenPort: process.env.DTMF_LISTEN_PORT || 22224,
|
||||
protocol: ngProtocol
|
||||
});
|
||||
|
||||
+11
-7
@@ -172,13 +172,6 @@ class CallSession extends Emitter {
|
||||
throw new Error('rtpengine failed: answer');
|
||||
}
|
||||
|
||||
/* special case: Five9 Voicestream calls do not advertise a:sendonly, though they should */
|
||||
if (this.isFive9VoiceStream) {
|
||||
this.logger.info('Voicestream call from Five9, blocking audio in the reverse direction');
|
||||
const response = Promise.all([this.blockMedia(opts), this.blockDTMF(opts)]);
|
||||
this.logger.debug({response}, 'response to blocMedia');
|
||||
}
|
||||
|
||||
let headers = {
|
||||
'From': createBLegFromHeader(this.req),
|
||||
'To': this.req.get('To'),
|
||||
@@ -257,6 +250,17 @@ class CallSession extends Emitter {
|
||||
this.logger.error(`rtpengine answer failed with ${JSON.stringify(response)}`);
|
||||
throw new Error('rtpengine failed: answer');
|
||||
}
|
||||
/* special case: Five9 Voicestream calls do not advertise a:sendonly, though they should */
|
||||
if (this.isFive9VoiceStream) {
|
||||
const opts = {
|
||||
...this.rtpEngineOpts.common,
|
||||
'from-tag':this.rtpEngineOpts.uac.tag
|
||||
};
|
||||
this.logger.info('Voicestream call from Five9, blocking audio in the reverse direction');
|
||||
const response = await Promise.all([this.blockMedia(opts), this.blockDTMF(opts)]);
|
||||
this.logger.debug({response}, 'response to blockMedia/blockDTMF');
|
||||
}
|
||||
|
||||
return response.sdp;
|
||||
}
|
||||
});
|
||||
|
||||
Generated
+25
-5285
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -29,7 +29,7 @@
|
||||
"@jambonz/http-authenticator": "^0.2.2",
|
||||
"@jambonz/http-health-check": "^0.0.1",
|
||||
"@jambonz/realtimedb-helpers": "^0.4.29",
|
||||
"@jambonz/rtpengine-utils": "^0.3.6",
|
||||
"@jambonz/rtpengine-utils": "^0.3.9",
|
||||
"@jambonz/siprec-client-utils": "^0.1.4",
|
||||
"@jambonz/stats-collector": "^0.1.6",
|
||||
"@jambonz/time-series": "^0.2.5",
|
||||
|
||||
Reference in New Issue
Block a user