We have google based voicemail transcription on several PBXes. It quit working. The transcriptions using a glcloud script that uses ACCESSTOKEN to authenticate to google cloud apps. I do not see too many of the several scripts running around using such. Here is an example of the code in the script:
ACCESSTOKEN is derived from the curl output below. This token is used to authenticate to the google cloud storage API to send and remove the voicemail recordings for transcription.
This token expires every hour, so this script will request a new ACCESS TOKEN for each voicemail to transcribe to keep things fresh.
ACCESSTOKEN=$(curl
–request POST
–data “client_id=${ClientID}&client_secret=${ClientSECRET}&refresh_token=${REFRESHtoken}&grant_type=refresh_token”
https://accounts.google.com/o/oauth2/token)
ACCESSTOKEN=$((echo $ACCESSTOKEN) | jq ‘.access_token’)
ACCESSTOKEN=$(echo “${ACCESSTOKEN//”/}")
#echo $ACCESSTOKEN
The other scripts I see, such as Tony722 in github, has the following statement to install GCloud CLI and establish authentication. “Follow steps 1 and 2 of the instructions on Google Cloud Installing the gcloud CLI | Google Cloud”
That page on google says, do the following to establish authentication:
sudo tee -a /etc/yum.repos.d/google-cloud-sdk.repo << EOM
[google-cloud-cli]
name=Google Cloud CLI
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el8-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=0
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOM
Is either of these approaches better than the other? drawbacks of either?
Why cant I make the gcloud CLI install work - not the best linux admin here!!