mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
fix exception when receiving REFER but dial task ended (#1353)
This commit is contained in:
@@ -2681,7 +2681,7 @@ Duration=${duration} `
|
|||||||
*/
|
*/
|
||||||
_onRefer(req, res) {
|
_onRefer(req, res) {
|
||||||
const task = this.currentTask;
|
const task = this.currentTask;
|
||||||
const sd = task.sd;
|
const sd = task?.sd;
|
||||||
if (task && TaskName.Dial === task.name && sd && task.referHook) {
|
if (task && TaskName.Dial === task.name && sd && task.referHook) {
|
||||||
task.handleRefer(this, req, res);
|
task.handleRefer(this, req, res);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -777,6 +777,9 @@ class TaskDial extends Task {
|
|||||||
this.epOther.api('uuid_break', this.epOther.uuid);
|
this.epOther.api('uuid_break', this.epOther.uuid);
|
||||||
this.epOther.bridge(sd.ep);
|
this.epOther.bridge(sd.ep);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
this.logger.error('Dial:_connectSingleDial - no other endpoint to bridge!');
|
||||||
|
}
|
||||||
this.bridged = true;
|
this.bridged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user