mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
wip: implemented listen, transcribe, play
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
const Task = require('./task');
|
||||
const {TaskName} = require('../utils/constants');
|
||||
const {TaskName, TaskPreconditions} = require('../utils/constants');
|
||||
|
||||
class TaskHangup extends Task {
|
||||
constructor(logger, opts) {
|
||||
super(logger, opts);
|
||||
this.headers = this.data.headers || {};
|
||||
|
||||
this.preconditions = TaskPreconditions.StableCall;
|
||||
}
|
||||
|
||||
get name() { return TaskName.Hangup; }
|
||||
@@ -16,7 +18,7 @@ class TaskHangup extends Task {
|
||||
try {
|
||||
await dlg.destroy({headers: this.headers});
|
||||
} catch (err) {
|
||||
this.logger.error(err, `TaskHangup:exec - Error hanging up call with sip call id ${dlg.sip.callId}`);
|
||||
this.logger.error(err, 'TaskHangup:exec - Error hanging up call');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user