mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
Feature/siprec server (#143)
* fixes from testing * modify Task#exec to take resources as an object rather than argument list * pass 2 endpoints to Transcribe when invoked in a SipRec call session * logging * change siprec invite to sendrecv just so freeswitch does not try to reinvite (TODO: block outgoing media at rtpengine) * Config: when enabling recording, block until siprec dialog is established * missed play verb in commit 031c79d * linting * bugfix: get final transcript in siprec call
This commit is contained in:
@@ -4,8 +4,6 @@ const {TaskName, TaskPreconditions} = require('../utils/constants');
|
||||
class TaskConfig extends Task {
|
||||
constructor(logger, opts) {
|
||||
super(logger, opts);
|
||||
this.preconditions = TaskPreconditions.Endpoint;
|
||||
|
||||
[
|
||||
'synthesizer',
|
||||
'recognizer',
|
||||
@@ -28,7 +26,9 @@ class TaskConfig extends Task {
|
||||
});
|
||||
}
|
||||
if (this.bargeIn.sticky) this.autoEnable = true;
|
||||
this.preconditions = this.bargeIn.enable ? TaskPreconditions.Endpoint : TaskPreconditions.None;
|
||||
this.preconditions = (this.bargeIn.enable || this.record?.action) ?
|
||||
TaskPreconditions.Endpoint :
|
||||
TaskPreconditions.None;
|
||||
}
|
||||
|
||||
get name() { return TaskName.Config; }
|
||||
@@ -108,7 +108,13 @@ class TaskConfig extends Task {
|
||||
cs.disableBotMode();
|
||||
}
|
||||
}
|
||||
if (this.record.action) cs.notifyRecordOptions(this.record);
|
||||
if (this.record.action) {
|
||||
try {
|
||||
await cs.notifyRecordOptions(this.record);
|
||||
} catch (err) {
|
||||
this.logger.info({err}, 'Config: error starting recording');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async kill(cs) {
|
||||
|
||||
Reference in New Issue
Block a user