mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-22 01:27:55 +00:00
write service_provider_sid with alerts
This commit is contained in:
@@ -201,6 +201,12 @@ class CallSession extends Emitter {
|
||||
return this.direction === CallDirection.Inbound && this.res.finalResponseSent;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the account sid
|
||||
*/
|
||||
get serviceProviderSid() {
|
||||
return this.callInfo.serviceProviderSid;
|
||||
}
|
||||
/**
|
||||
* returns the account sid
|
||||
*/
|
||||
@@ -520,6 +526,7 @@ class CallSession extends Emitter {
|
||||
this.logger.info({err}, `malformed google service_key provisioned for account ${sid}`);
|
||||
writeAlerts({
|
||||
alert_type: AlertType.TTS_FAILURE,
|
||||
service_provider_sid: this.serviceProviderSid,
|
||||
account_sid: this.accountSid,
|
||||
vendor
|
||||
}).catch((err) => this.logger.error({err}, 'Error writing tts alert'));
|
||||
@@ -550,6 +557,7 @@ class CallSession extends Emitter {
|
||||
else {
|
||||
writeAlerts({
|
||||
alert_type: AlertType.STT_NOT_PROVISIONED,
|
||||
service_provider_sid: this.serviceProviderSid,
|
||||
account_sid: this.accountSid,
|
||||
vendor
|
||||
}).catch((err) => this.logger.error({err}, 'Error writing tts alert'));
|
||||
@@ -1382,8 +1390,13 @@ class CallSession extends Emitter {
|
||||
}
|
||||
else {
|
||||
this.logger.info({accountSid: this.accountSid, webhook: r[0]}, 'performQueueWebhook: webhook found');
|
||||
this.queueEventHookRequestor = new HttpRequestor(this.logger, this.accountSid,
|
||||
r[0], this.webhook_secret);
|
||||
this.queueEventHookRequestor = new HttpRequestor(
|
||||
this.logger,
|
||||
this.serviceProviderSid,
|
||||
this.accountSid,
|
||||
r[0],
|
||||
this.webhook_secret
|
||||
);
|
||||
this.queueEventHook = r[0];
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user