Feat/844 Sending callSid in the custom-stt start message (#848)

* https://github.com/jambonz/jambonz-feature-server/issues/844

sending callSid in options, so that the callSid is sent to stt websocket in case of custom websocket

* feat/844: checking for existance of task.cs.callSid

* feat/844: changed the condition to task.cs?.callSid
This commit is contained in:
rammohan-kore
2024-08-13 18:58:19 +05:30
committed by GitHub
parent 6d0aeff6e2
commit ee68575ea4

View File

@@ -848,7 +848,8 @@ module.exports = (logger) => {
{hints: rOpts.hints}), {hints: rOpts.hints}),
...(rOpts.hints?.length > 0 && typeof rOpts.hints[0] === 'object' && ...(rOpts.hints?.length > 0 && typeof rOpts.hints[0] === 'object' &&
{hints: JSON.stringify(rOpts.hints)}), {hints: JSON.stringify(rOpts.hints)}),
...(typeof rOpts.hintsBoost === 'number' && {hintsBoost: rOpts.hintsBoost}) ...(typeof rOpts.hintsBoost === 'number' && {hintsBoost: rOpts.hintsBoost}),
...(task.cs?.callSid && {callSid: task.cs.callSid})
}; };
opts = { opts = {
...opts, ...opts,