Skip to content

Commit

Permalink
send_silence_when_idle only after call is answered or bridged
Browse files Browse the repository at this point in the history
  • Loading branch information
davehorton committed Jan 10, 2025
1 parent f3690ef commit 8613e65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/tasks/dial.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/place-outdial.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 8613e65

Please sign in to comment.