mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
metrics
This commit is contained in:
@@ -71,7 +71,6 @@ class TaskDial extends Task {
|
||||
super(logger, opts);
|
||||
this.preconditions = TaskPreconditions.None;
|
||||
|
||||
this.actionHook = this.data.actionHook;
|
||||
this.earlyMedia = this.data.answerOnBridge === true;
|
||||
this.callerId = this.data.callerId;
|
||||
this.dialMusic = this.data.dialMusic;
|
||||
@@ -128,7 +127,7 @@ class TaskDial extends Task {
|
||||
this._installDtmfDetection(cs, this.epOther, this.parentDtmfCollector);
|
||||
await this._attemptCalls(cs);
|
||||
await this.awaitTaskDone();
|
||||
await this.performAction(Object.assign({}, cs.callInfo, this.results));
|
||||
await this.performAction(this.results);
|
||||
this._removeDtmfDetection(cs, this.epOther);
|
||||
this._removeDtmfDetection(cs, this.ep);
|
||||
} catch (err) {
|
||||
@@ -280,6 +279,12 @@ class TaskDial extends Task {
|
||||
}
|
||||
})
|
||||
.on('callStatusChange', (obj) => {
|
||||
if (this.results.dialCallStatus !== CallStatus.Completed) {
|
||||
Object.assign(this.results, {
|
||||
dialCallStatus: obj.callStatus,
|
||||
dialCallSid: sd.callSid,
|
||||
});
|
||||
}
|
||||
switch (obj.callStatus) {
|
||||
case CallStatus.Trying:
|
||||
break;
|
||||
@@ -303,12 +308,6 @@ class TaskDial extends Task {
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (this.results.dialCallStatus !== CallStatus.Completed) {
|
||||
Object.assign(this.results, {
|
||||
dialCallStatus: obj.callStatus,
|
||||
dialCallSid: sd.callSid,
|
||||
});
|
||||
}
|
||||
})
|
||||
.on('accept', () => {
|
||||
this.logger.debug(`Dial:_attemptCalls - we have a winner: ${sd.callSid}`);
|
||||
|
||||
Reference in New Issue
Block a user