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

@@ -127,10 +127,22 @@ router.post('/', async(req, res) => {
}
else {
logger.debug({call_hook: app.call_hook}, 'creating http client for call hook');
app.requestor = new HttpRequestor(logger, account.account_sid, app.call_hook, account.webhook_secret);
app.requestor = new HttpRequestor(
logger,
account.service_provider_sid,
account.account_sid,
app.call_hook,
account.webhook_secret
);
}
if (!app.notifier && app.call_status_hook) {
app.notifier = new HttpRequestor(logger, account.account_sid, app.call_status_hook, account.webhook_secret);
app.notifier = new HttpRequestor(
logger,
account.service_provider_sid,
account.account_sid,
app.call_status_hook,
account.webhook_secret
);
logger.debug({call_hook: app.call_hook}, 'creating http client for call status hook');
}
else if (!app.notifier) {