This commit is contained in:
Dave Horton
2022-06-14 08:24:44 -04:00
parent 5e9407ff4e
commit 05d6c8d467

View File

@@ -52,19 +52,18 @@ class TaskRestDial extends Task {
const httpHeaders = b3 && {b3}; const httpHeaders = b3 && {b3};
const params = { const params = {
...cs.callInfo, ...cs.callInfo,
defaults: { defaults: {
synthesizer: { synthesizer: {
vendor: cs.speechSynthesisVendor, vendor: cs.speechSynthesisVendor,
language: cs.speechSynthesisLanguage, language: cs.speechSynthesisLanguage,
voice: cs.speechSynthesisVoice voice: cs.speechSynthesisVoice
}, },
recognizer: { recognizer: {
vendor: cs.speechRecognizerVendor, vendor: cs.speechRecognizerVendor,
language: cs.speechRecognizerLanguage language: cs.speechRecognizerLanguage
}
} }
}; }
};
const tasks = await cs.requestor.request('session:new', this.call_hook, params, httpHeaders); const tasks = await cs.requestor.request('session:new', this.call_hook, params, httpHeaders);
if (tasks && Array.isArray(tasks)) { if (tasks && Array.isArray(tasks)) {
this.logger.debug({tasks: tasks}, `TaskRestDial: replacing application with ${tasks.length} tasks`); this.logger.debug({tasks: tasks}, `TaskRestDial: replacing application with ${tasks.length} tasks`);