jambonz / jambonz-webapp

A simple provisioning web app for jambonz
MIT License
5 stars 21 forks source link

Extend Alerts for fallback #453

Open Catharsis68 opened 3 weeks ago

Catharsis68 commented 3 weeks ago

Currently we do not have any alert that we are switching from the primary vendor to the fallback in case of an error.

We need to extend the alerts that the fallback has applied, the fallback max limit has been reached and that we are sticking with the fallback till the end of the day.

writeAlerts({
      account_sid: cs.accountSid,
      alert_type: AlertType.STT_FAILURE, || AlertType.TTS_FAILURE
      message: `Error in STT / TTS. Apply fallback ${fallbackVendor}`,
      vendor: this.vendor,
    }).catch((err) => this.logger.info({err}, 'Error generating alert for failure'));