write service_provider_sid with alerts

This commit is contained in:
Dave Horton
2022-09-07 23:51:40 +02:00
parent e90ef6bc70
commit 889257d7db
14 changed files with 85 additions and 175 deletions

View File

@@ -163,6 +163,7 @@ class TaskGather extends Task {
const {writeAlerts, AlertType} = cs.srf.locals;
this.logger.info(`TaskGather:exec - ERROR stt using ${this.vendor} requested but creds not supplied`);
writeAlerts({
service_provider_sid: cs.serviceProviderSid,
account_sid: cs.accountSid,
alert_type: AlertType.STT_NOT_PROVISIONED,
vendor: this.vendor
@@ -399,6 +400,7 @@ class TaskGather extends Task {
const {writeAlerts, AlertType} = this.cs.srf.locals;
this.logger.error(err, 'TaskGather:_startTranscribing error');
writeAlerts({
service_provider_sid: this.cs.serviceProviderSid,
account_sid: this.cs.accountSid,
alert_type: AlertType.STT_FAILURE,
vendor: this.vendor,

View File

@@ -47,6 +47,7 @@ class TaskSay extends Task {
try {
if (!credentials) {
writeAlerts({
service_provider_sid: cs.serviceProviderSid,
account_sid: cs.accountSid,
alert_type: AlertType.TTS_NOT_PROVISIONED,
vendor
@@ -92,6 +93,7 @@ class TaskSay extends Task {
this.logger.info({err}, 'Error synthesizing tts');
span.end();
writeAlerts({
service_provider_sid: cs.serviceProviderSid,
account_sid: cs.accountSid,
alert_type: AlertType.TTS_NOT_PROVISIONED,
vendor,

View File

@@ -86,6 +86,7 @@ class TaskTranscribe extends Task {
const {writeAlerts, AlertType} = cs.srf.locals;
this.logger.info(`TaskTranscribe:exec - ERROR stt using ${this.vendor} requested but creds not supplied`);
writeAlerts({
service_provider_sid: cs.serviceProviderSid,
account_sid: cs.accountSid,
alert_type: AlertType.STT_NOT_PROVISIONED,
vendor: this.vendor