Sdes testing (#67)

* sdes testing

* log rtpengine answer

* test with sdes off (again)
This commit is contained in:
Dave Horton
2022-12-01 11:41:30 -05:00
committed by GitHub
parent 1f1a4d2330
commit b2d48c8954
3 changed files with 8 additions and 6 deletions

View File

@@ -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"]
}
}

View File

@@ -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}`]);

View File

@@ -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,