fix exception when receiving REFER but dial task ended (#1353)

This commit is contained in:
Dave Horton
2025-09-10 12:23:32 -04:00
committed by GitHub
parent add8d63e8e
commit acaadceaa2
2 changed files with 4 additions and 1 deletions

View File

@@ -2681,7 +2681,7 @@ Duration=${duration} `
*/
_onRefer(req, res) {
const task = this.currentTask;
const sd = task.sd;
const sd = task?.sd;
if (task && TaskName.Dial === task.name && sd && task.referHook) {
task.handleRefer(this, req, res);
}

View File

@@ -777,6 +777,9 @@ class TaskDial extends Task {
this.epOther.api('uuid_break', this.epOther.uuid);
this.epOther.bridge(sd.ep);
}
else {
this.logger.error('Dial:_connectSingleDial - no other endpoint to bridge!');
}
this.bridged = true;
}