bugfix: account returned when carrier default routing is used was wrong

This commit is contained in:
Dave Horton
2022-12-19 21:09:14 -05:00
parent faafaa8549
commit a9e79b23bd

View File

@@ -233,13 +233,15 @@ module.exports = (srf, logger) => {
};
}
else if (accountLevelGateways.length === 1) {
const [accounts] = await pp.query('SELECT * from accounts where account_sid = ?',
accountLevelGateways[0].account_sid);
return {
fromCarrier: true,
gateway: accountLevelGateways[0],
service_provider_sid: accountLevelGateways[0].service_provider_sid,
account_sid: accountLevelGateways[0].account_sid,
application_sid: accountLevelGateways[0].application_sid,
account: accountLevelGateways[0]
account: accounts[0]
};
}
else {