mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
remove video from sdp in case of reInvite if the call is audio call (#1159)
https://github.com/jambonz/jambonz-feature-server/issues/1158
This commit is contained in:
@@ -279,7 +279,12 @@ class SingleDialer extends Emitter {
|
|||||||
this.logger.info('dial is onhold, emit event');
|
this.logger.info('dial is onhold, emit event');
|
||||||
this.emit('reinvite', req, res);
|
this.emit('reinvite', req, res);
|
||||||
} else {
|
} else {
|
||||||
const newSdp = await this.ep.modify(req.body);
|
let newSdp = await this.ep.modify(req.body);
|
||||||
|
// in case of reINVITE if video call is enabled in FS and the call is not a video call,
|
||||||
|
// remove video media from the SDP
|
||||||
|
if (process.env.JAMBONES_VIDEO_CALLS_ENABLED_IN_FS && !this.opts?.isVideoCall) {
|
||||||
|
newSdp = removeVideoSdp(newSdp);
|
||||||
|
}
|
||||||
res.send(200, {body: newSdp});
|
res.send(200, {body: newSdp});
|
||||||
this.logger.info({offer: req.body, answer: newSdp}, 'SingleDialer:exec: handling reINVITE');
|
this.logger.info({offer: req.body, answer: newSdp}, 'SingleDialer:exec: handling reINVITE');
|
||||||
}
|
}
|
||||||
@@ -565,7 +570,8 @@ function placeOutdial({
|
|||||||
}) {
|
}) {
|
||||||
const myOpts = deepcopy(opts);
|
const myOpts = deepcopy(opts);
|
||||||
const sd = new SingleDialer({
|
const sd = new SingleDialer({
|
||||||
logger, sbcAddress, target, myOpts, application, callInfo, accountInfo, rootSpan, startSpan, dialTask, onHoldMusic
|
logger, sbcAddress, target, opts: myOpts, application, callInfo,
|
||||||
|
accountInfo, rootSpan, startSpan, dialTask, onHoldMusic
|
||||||
});
|
});
|
||||||
sd.exec(srf, ms, myOpts);
|
sd.exec(srf, ms, myOpts);
|
||||||
return sd;
|
return sd;
|
||||||
|
|||||||
Reference in New Issue
Block a user