kill task after hangup or refer

This commit is contained in:
akirilyuk committed 2022-02-01 13:06:57 +01:00
1 parent 9f757b439f
commit db6f56a068
1 file changed
+2
+2
View File
@@ -223,12 +223,14 @@ class Cognigy extends Task {
this.performAction({cognigyResult: 'hangup Succeeded'});
this.reportedFinalAction = true;
this.notifyTaskDone();
this.kill(cs);
return;
case 'refer':
await this._makeReferTask(evt.data.number);
this.performAction({cognigyResult: 'refer succeeded'});
this.reportedFinalAction = true;
this.notifyTaskDone();
this.kill(cs);
return;
default:
break;