Set Asterisk 16 on a VM with ubuntu 22.04 as distro

Hi all, I try to learn how to set up a basic Asterisk 16 on Linux Ubuntu Distro. I Followed a simple tutorial at this link ; [Tutorial]( Install Asterisk 16 LTS on Ubuntu 22.04|20.04|18.04 | ComputingForGeeks)

I achieved the installation but I’m still not able to start the service. This is the message I got from sudo systemctl restart asterisk ;

Job for asterisk.service failed because the control process exited with error code.

this is the status of the service;

asterisk.service - LSB: Asterisk PBX
Loaded: loaded (/etc/init.d/asterisk; generated)
Active: failed (Result: exit-code) since Sat 2022-06-04…
Docs: man:systemd-sysv-generator(8)
Process: 13539 ExecStart=/etc/init.d/asterisk start (code-exited, status=1/FAILURE)

chown: invalid user: ‘asterisk’

I created user with those commands

sudo groupadd asterisk
sudo useradd -r -d /var/lib/asterisk -g asterisk asterisk
sudo usermod -aG audio,dialout asterisk
sudo chown -R asterisk.asterisk /etc/asterisk
sudo chown -R asterisk.asterisk /var/{lib,log,spool}/asterisk
sudo chown -R asterisk.asterisk /usr/lib/asterisk

I can’t see anything obviously wrong, but note that running non-root is optional, so you should consider not changing the user until you have got it starting.

You should check the permission changes worked, and you should look through the code of the startup script (which will almost certainly be a third party contribution, to work out where it was trying to use chown.

Looking through the instructions, I notice it advises making a gratuitous change that violates current Asterisk policies, by enabling a module that is considered deprecated, app_macro. I’d advise deleting or undoing that step, otherwise you may end up leaning how to use a feature that is likely to completely disappear in the near future.

1 Like

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