send_silence_when_idle only after call is answered or bridged

This commit is contained in:
Dave Horton
2025-01-09 20:26:14 -05:00
parent f3690ef5ce
commit 8613e65e23
2 changed files with 4 additions and 2 deletions

View File

@@ -754,7 +754,6 @@ class TaskDial extends Task {
* audiocodes webrtc client somehow inserts massive latency if we send silence
* and then bridge A and B.
*/
this.ep.set('send_silence_when_idle', -1);
}
this.bridged = true;
}
@@ -844,6 +843,9 @@ class TaskDial extends Task {
this.timerMaxCallDuration = setTimeout(this._onMaxCallDuration.bind(this, cs), this.timeLimit * 1000);
}
sessionTracker.add(this.callSid, cs);
this.ep?.set({send_silence_when_idle: -1});
this.dlg.on('destroy', () => {
/* if our child is adulting, he's own his own now.. */
if (this.dlg) {

View File

@@ -496,7 +496,7 @@ class SingleDialer extends Emitter {
this.logger.debug('SingleDialer:reAnchorMedia: re-anchoring media after partial media');
this.ep = await this.ms.createEndpoint({remoteSdp: this.dlg.remote.sdp});
this._configMsEndpoint();
this._configMsEndpoint(false);
await this.dlg.modify(this.ep.local.sdp, {
headers: {
'X-Reason': 'anchor-media'