From 3a6d63a1c69c0090fd085287e8f8ff892aabf994 Mon Sep 17 00:00:00 2001 From: Markus Frindt Date: Tue, 26 Nov 2024 16:26:20 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20the=20issue=20for=20outbound=20calls=20th?= =?UTF-8?q?at=20always=20the=20None=20credentials=20wer=E2=80=A6=20(#984)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix the issue for outbound calls that always the None credentials were used. session:new for rest dial did not contain recognizer.label and synthesizer.label * update comment --------- Co-authored-by: mfrindt --- lib/http-routes/api/create-call.js | 9 ++++++--- lib/tasks/rest_dial.js | 6 ++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/http-routes/api/create-call.js b/lib/http-routes/api/create-call.js index b16e4f22..a9352c92 100644 --- a/lib/http-routes/api/create-call.js +++ b/lib/http-routes/api/create-call.js @@ -208,10 +208,13 @@ router.post('/', /** * create our application object - - * not from the database as per an inbound call, - * but from the provided params in the request + * we merge the inbound call application, + * with the provided app params from the request body */ - const app = req.body; + const app = { + ...application, + ...req.body + }; /** * attach our requestor and notifier objects diff --git a/lib/tasks/rest_dial.js b/lib/tasks/rest_dial.js index ee347078..fc76ecea 100644 --- a/lib/tasks/rest_dial.js +++ b/lib/tasks/rest_dial.js @@ -77,11 +77,13 @@ class TaskRestDial extends Task { synthesizer: { vendor: cs.speechSynthesisVendor, language: cs.speechSynthesisLanguage, - voice: cs.speechSynthesisVoice + voice: cs.speechSynthesisVoice, + label: cs.speechSynthesisLabel, }, recognizer: { vendor: cs.speechRecognizerVendor, - language: cs.speechRecognizerLanguage + language: cs.speechRecognizerLanguage, + label: cs.speechRecognizerLabel, } } };