send application defaults for speech in initial webhook

This commit is contained in:
Dave Horton
2022-04-09 11:38:31 -04:00
parent 92ca40c9b3
commit 41d6c74c8e

View File

@@ -235,7 +235,20 @@ module.exports = function(srf, logger) {
} }
/* retrieve the application to execute for this inbound call */ /* retrieve the application to execute for this inbound call */
const params = Object.assign(['POST', 'WS'].includes(app.call_hook.method) ? {sip: req.msg} : {}, const params = Object.assign(['POST', 'WS'].includes(app.call_hook.method) ? {sip: req.msg} : {},
req.locals.callInfo); req.locals.callInfo, {
defaults: {
synthesizer: {
vendor: app.speech_synthesis_vendor,
language: app.speech_synthesis_language,
voice: app.speech_synthesis_voice
},
recognizer: {
vendor: app.speech_recognizer_vendor,
language: app.speech_recognizer_language
}
}
});
logger.debug({params}, 'sending initial webhook');
const obj = rootSpan.startChildSpan('performAppWebhook'); const obj = rootSpan.startChildSpan('performAppWebhook');
span = obj.span; span = obj.span;
const b3 = rootSpan.getTracingPropagation(); const b3 = rootSpan.getTracingPropagation();