kill task after hangup or refer

This commit is contained in:
akirilyuk
2022-02-01 13:06:57 +01:00
parent 9f757b439f
commit db6f56a068

View File

@@ -223,12 +223,14 @@ class Cognigy extends Task {
this.performAction({cognigyResult: 'hangup Succeeded'}); this.performAction({cognigyResult: 'hangup Succeeded'});
this.reportedFinalAction = true; this.reportedFinalAction = true;
this.notifyTaskDone(); this.notifyTaskDone();
this.kill(cs);
return; return;
case 'refer': case 'refer':
await this._makeReferTask(evt.data.number); await this._makeReferTask(evt.data.number);
this.performAction({cognigyResult: 'refer succeeded'}); this.performAction({cognigyResult: 'refer succeeded'});
this.reportedFinalAction = true; this.reportedFinalAction = true;
this.notifyTaskDone(); this.notifyTaskDone();
this.kill(cs);
return; return;
default: default:
break; break;