Installing Docker on same server as FreePBX distro

Anybody done this? I basically need to create a sandbox for a remote trusted user to login to and don’t want to allow them to roam all over the server or make changes accidentally.

Thanks!!

Alternatively, would this approach ‘damage’ the FreePBX install? Chroot jail

Why would you do this? Just make a proper sandbox server for this.

agreed. am loading a virtualbox now.

provided you have the resources, no problem. I do my TTS STT in one.

interesting. So you have docker installed on your freepbx distro server and have a docker container doing TTS/STT in/on it?

Not quite, I have several dockers to do various things and they can be started and stopped at whim but it is not a distro server, and that might be a problem when you need to compile their res_speech_vosk module if you don’t have full knowledge of how 'The Distro" builds asterisk.

If you want an economy SST engine, it takes about half an hour or so but $0 out f pocket.

The RTFM bit

https://alphacephei.com/vosk/install

the docker bit

docker run -d -p 2700:2700 alphacep/kaldi-en:latest

and the "asterisk Hook"

https://github.com/alphacep/vosk-asterisk

I will tell you it takes lots of memory, probably going to need 8G but just one CPU will do

thanks, Dicko, I’d LOVE to play with this stuff but I don’t have full knowledge (or much at all) of how the distro builds asterisk. I’d hate to mess up my install. Having said that I have just installed freepbx on a virtual machine so maybe I could play there…

That would work fine. For a ‘low stress’ recipe, I suggest you follow @billsimon 's

https://wiki.freepbx.org/display/FDT/How+to+Install+FreePBX+15+on+Debian+10+with+Asterisk+16%2C+PHP+7.3

(or wait for his
https://wiki.freepbx.org/display/FDT/How+to+Install+FreePBX+16+on+Debian+11+with+Asterisk+18%2C+PHP+7.4

which he hasn’t yet posted :wink: )

Then you can do a full on download and build of Asterisk from source following the Vosk recipe . it should then work as advertised.

OK, thanks. I asked the vosk people and they said

Hello. Sure, you can try vosk-asterisk:

GitHub - alphacep/vosk-asterisk: Speech Recognition in Asterisk with Vosk Server

it should work with freepbx too

but I don’t know how I would add the module as it’ll get overwritten, won’t it, when FPBX starts?

I’ll following your advice and look at the wiki post.

No. FreePBX per se is fully respectful of the modules you have installed and loaded in /etc/asterisk/modules.conf when asterisk starts , but you can’t compile the Vosk module without Asterisk source code, and that is not currently available in ‘the distro’ (or @billsimon’s recipe) , so you unfortunately will have to to dig a little deeper Yossarian

You will (currently) loose any ability to use commercial modules, but there is hope that as ‘the distro (>=16)’ moves from Zend to IonCube which supports a lot more ‘things’, up to php 7.4 on linux,windows macos and bsd, using any CPU architecture, then technically commercial modules would be then install-able.

any ‘context’ (which are not ‘modules’) you write that call any speech* extensions should be in extensions_custom.conf to prevent FreePBX (distro or non-distro) from over-writing it, otherwise it JWFM.

Is there any way I could run vosk as a parallel application, perhaps on another Pi, to avoid messing up my freepbx instance? I’ve hosed it so many times in the last couple of years with faulty SD cards or faulty power supplies to the Pi, that I’m very wary of messing it up again. It’s SO fiddly to tweak to how I want it, even with backups.

(Please don’t shout at me for running it on a Pi.)

The asterisk plugin uses a websocket, so replace the service on 127.0.0.1:2700 with one on 6.7.8.9:2700 for example.

Pi 3 and newer have proper power management and won’t corrupt the card on failure.
Use a ‘high endurance’ card with capacity much larger than the occupied space and it will run reliably for years. Examples:
https://www.amazon.com/SanDisk-Endurance-microSDXC-Adapter-Monitoring/dp/B07NY23WBG/
https://www.amazon.com/Samsung-Endurance-128GB-Micro-Adapter/dp/B07B984HJ5/

Of course, you should also use a conservatively rated power adapter and ensure that you aren’t making log entries on every attempted attack.

But you will need at least 8g of ram to run this code , so ‘not yet’ for a raspberry

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