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

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

No files matched your search

+1 -1
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);
}