mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
google custom voice (#506)
* google custom voice * fixed * wip * wip * wip * wip
This commit is contained in:
@@ -27,6 +27,9 @@ WHERE pn.account_sid IS NULL
|
||||
AND pn.service_provider_sid =
|
||||
(SELECT service_provider_sid from accounts where account_sid = ?)
|
||||
AND pn.number = ?`;
|
||||
const sqlQueryGoogleCustomVoices = `SELECT *
|
||||
FROM google_custom_voices
|
||||
WHERE google_custom_voice_sid = ?`;
|
||||
|
||||
const speechMapper = (cred) => {
|
||||
const {credential, ...obj} = cred;
|
||||
@@ -161,10 +164,22 @@ module.exports = (logger, srf) => {
|
||||
}
|
||||
};
|
||||
|
||||
const lookupGoogleCustomVoice = async(google_custom_voice_sid) => {
|
||||
const pp = pool.promise();
|
||||
try {
|
||||
const [r] = await pp.query(sqlQueryGoogleCustomVoices, [google_custom_voice_sid]);
|
||||
return r;
|
||||
|
||||
} catch (err) {
|
||||
logger.error({err}, `lookupGoogleCustomVoices: Error ${google_custom_voice_sid}`);
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
lookupAccountDetails,
|
||||
updateSpeechCredentialLastUsed,
|
||||
lookupCarrier,
|
||||
lookupCarrierByPhoneNumber
|
||||
lookupCarrierByPhoneNumber,
|
||||
lookupGoogleCustomVoice
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user