mirror of
https://github.com/jambonz/sbc-inbound.git
synced 2025-12-19 04:37:43 +00:00
Sdes testing (#67)
* sdes testing * log rtpengine answer * test with sdes off (again)
This commit is contained in:
@@ -9,7 +9,8 @@
|
||||
"teams": {
|
||||
"transport-protocol": "RTP/SAVP",
|
||||
"ICE": "default",
|
||||
"flags": ["generate mid", "media handover", "port latching"],
|
||||
"SDES": "off",
|
||||
"flags": ["generate mid", "SDES-no", "media handover", "port latching"],
|
||||
"rtcp-mux": ["accept"]
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ const SrsClient = require('@jambonz/siprec-client-utils');
|
||||
const {
|
||||
makeRtpEngineOpts,
|
||||
SdpWantsSrtp,
|
||||
SdpDoesNotWantDTLS,
|
||||
SdpWantsSDES,
|
||||
nudgeCallCounts,
|
||||
roundTripTime,
|
||||
parseConnectionIp
|
||||
@@ -153,8 +153,8 @@ class CallSession extends Emitter {
|
||||
this.logger.debug(`using feature server ${featureServer}`);
|
||||
|
||||
const wantsSrtp = this.req.locals.possibleWebRtcClient = SdpWantsSrtp(sdp);
|
||||
const doesNotWantDTLS = wantsSrtp && SdpDoesNotWantDTLS(sdp);
|
||||
this.rtpEngineOpts = makeRtpEngineOpts(this.req, wantsSrtp, false, this.isFromMSTeams || doesNotWantDTLS);
|
||||
const wantsSDES = SdpWantsSDES(sdp);
|
||||
this.rtpEngineOpts = makeRtpEngineOpts(this.req, wantsSrtp, false, this.isFromMSTeams || wantsSDES);
|
||||
this.rtpEngineResource = {destroy: this.del.bind(null, this.rtpEngineOpts.common)};
|
||||
const obj = parseUri(this.req.uri);
|
||||
let proxy, host, uri;
|
||||
@@ -264,6 +264,7 @@ class CallSession extends Emitter {
|
||||
};
|
||||
const startAt = process.hrtime();
|
||||
const response = await this.answer(opts);
|
||||
this.logger.debug({response, opts}, 'response from rtpengine to answer');
|
||||
const rtt = roundTripTime(startAt);
|
||||
this.stats.histogram('app.rtpengine.response_time', rtt, [
|
||||
'direction:inbound', 'command:answer', `rtpengine:${this.rtpengineIp}`]);
|
||||
|
||||
@@ -41,7 +41,7 @@ function makeRtpEngineOpts(req, srcIsUsingSrtp, dstIsUsingSrtp, teams = false) {
|
||||
};
|
||||
}
|
||||
|
||||
const SdpDoesNotWantDTLS = (sdp) => {
|
||||
const SdpWantsSDES = (sdp) => {
|
||||
return /m=audio.*\s+RTP\/SAVP/.test(sdp);
|
||||
};
|
||||
const SdpWantsSrtp = (sdp) => {
|
||||
@@ -181,7 +181,7 @@ const parseConnectionIp = (sdp) => {
|
||||
module.exports = {
|
||||
isWSS,
|
||||
SdpWantsSrtp,
|
||||
SdpDoesNotWantDTLS,
|
||||
SdpWantsSDES,
|
||||
getAppserver,
|
||||
makeRtpEngineOpts,
|
||||
makeAccountCallCountKey,
|
||||
|
||||
Reference in New Issue
Block a user