Running on dev mode

Hi everyone, I’m new here, I’ve been exhaustively reading the documentation and testing Asterisk on AWS EC2 Ubuntu server for weeks, and you might be wondering “so what? I don’t care” and you’re right, my question here is: Is there a way to install Asterisk on WSL Ubuntu or docker containers, or using virtual box to test it on my computer and not have to spend money on servers?

And if possible is there a video/guide/article where it explains how to do it?

all the asterisk videos/guides/articles are old and don’t cover these things

Testing on AWS EC2 works perfectly but I’ve tried running it on docker (using ubuntu images since there is no official Asterisk image on docker hub) and nothing has worked, my SIP telephony applications don’t even connect to Asterisk

It works fine in virtual machines, or WSL. Docker is complicated due to networking. SIP embeds IP addresses in the signaling so that has to be correct or things will go awry, and ports also have to be forwarded.

Do you have any installation guide in wsl? I can’t get it to work

It’s a normal Linux distribution so normal instructions should work. If it’s not, then you need to provide further information beyond “I can’t get it to work” such as what is actually happening.

Okay, I’m on the Ubuntu server, I stopped trying in WSL for now, I’m using Asterisk-18.24.1 and I want to implement the Aeap-Speech-to-Text repository from GitHub, I’ve configured everything correctly and there’s no problem but I don’t know where to put the API KEY

Server on port ‘9099’: started listening
Server on port ‘9099’: client connected
message: {“request”:“setup”,“version”:“0.1.0”,“codecs”:[{“name”:“ulaw”}],“params”:{},“id”:“9e6b81a8-58a8-4c2b-88ae-52c624b5cc0c”}
GoogleProvider: Error: Could not load the default credentials. Browse to Authenticate for using client libraries  |  Authentication  |  Google Cloud for more information. - ending stream
/home/ubuntu/aeap-speech-to-text/node_modules/google-auth-library/build/src/auth/googleauth.js:180
throw new Error(‘Could not load the default credentials. Browse to Authenticate for using client libraries  |  Authentication  |  Google Cloud for more information.’);

chatGPT says:

To configure the Google Speech API credentials for the aeap-speech-to-text project, you need to set the environment variable GOOGLE_APPLICATION_CREDENTIALS. Here’s how you can do it: Set the environment variable: Before starting your Node.js application, set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of your Google credentials JSON file.
Add the environment variable in your index.js: Open index.js and add the following line at the top:
process.env.GOOGLE_APPLICATION_CREDENTIALS = ‘/path/to/your/credentials-file.json’;

I dont think that that is the correct place to add the credentials, I read the Google documentation but it doesn’t say exactly where to put the API key.

That project does nothing special when it comes to the Google library usage, however you configure the Google library with the application credentials is how you do it.

You created this repository, is there any way to return an audio file (.wav) for the dialplan to obtain and play?

I personally didn’t create that repository or code. As for your question, no. It’s not written to do that.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.