mirror of
https://github.com/jambonz/sbc-outbound.git
synced 2025-12-19 04:27:45 +00:00
support opus transcode (#150)
* support opus transcode * dont resend reinvite when release media for srtp * wip * fix review comment
This commit is contained in:
@@ -144,11 +144,6 @@ class CallSession extends Emitter {
|
||||
return this._mediaReleased;
|
||||
}
|
||||
|
||||
get calleeIsUsingSrtp() {
|
||||
const tp = this.rtpEngineOpts?.uac?.mediaOpts['transport-protocol'];
|
||||
return tp && -1 !== tp.indexOf('SAVP');
|
||||
}
|
||||
|
||||
subscribeForDTMF(dlg) {
|
||||
if (!this._subscribedForDTMF) {
|
||||
this._subscribedForDTMF = true;
|
||||
@@ -839,7 +834,9 @@ Duration=${payload.duration} `
|
||||
|
||||
/* if this is a re-invite from the FS to change media anchoring, avoid sending the reinvite out */
|
||||
let sdp;
|
||||
if (isReleasingMedia && !this.calleeIsUsingSrtp) {
|
||||
//HL 2024-11-13: previously forwarded re-invites to webrtc clients but further testing has shown to be unnecessary
|
||||
//if (isReleasingMedia && !this.calleeIsUsingSrtp) {
|
||||
if (isReleasingMedia) {
|
||||
this.logger.info(`got a reinvite from FS to ${reason}`);
|
||||
sdp = dlg.other.remote.sdp;
|
||||
if (!answerMedia.flags.includes('port latching')) answerMedia.flags.push('port latching');
|
||||
|
||||
@@ -40,7 +40,11 @@ function makeRtpEngineOpts(req, srcIsUsingSrtp, dstIsUsingSrtp, padCrypto, teams
|
||||
},
|
||||
uac: {
|
||||
tag: null,
|
||||
mediaOpts: dstOpts
|
||||
mediaOpts: {
|
||||
...dstOpts,
|
||||
...(process.env.JAMBONES_CODEC_OFFER_WITH_ORDER &&
|
||||
{ codec: { offer: process.env.JAMBONES_CODEC_OFFER_WITH_ORDER.split(','), strip: 'all' } }),
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user